:root {
    --primary: #c63735;
    --dark-bg: #1a1a1a;
    --footer-bg: #111111;
    --text-main: #333;
    --text-muted: #666;
    --white: #ffffff;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }

body { background: #fafafa; color: var(--text-main); overflow-x: hidden; }

/* Animações Base */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}
.content-fade-in { animation: fadeInUp 1s ease-out; }

/* Header Moderno */
.main-header {
    background: var(--white);
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}
.header-container { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; padding: 0 20px; }
.burger-menu { cursor: pointer; display: flex; flex-direction: column; gap: 5px; }
.burger-menu span { width: 25px; height: 3px; background: var(--dark-bg); transition: var(--transition); border-radius: 2px; }
.logo h2 { font-weight: 800; letter-spacing: -1px; margin: 0; }
.logo span { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 20px; }

/* Login e Cart Buttons no Header */
.login-trigger { background: none; border: 1px solid #ddd; padding: 8px 15px; border-radius: 20px; cursor: pointer; transition: 0.3s; font-weight: bold; }
.login-trigger:hover { border-color: var(--primary); color: var(--primary); }
.logout-btn { background: #eee; border: none; padding: 6px 12px; border-radius: 4px; font-size: 0.8rem; cursor: pointer; margin-left: 10px; }
.logout-btn:hover { background: #ff4444; color: white; }
.cart-trigger { cursor: pointer; position: relative; font-size: 1.2rem; }
#cart-count { position: absolute; top: -10px; right: -10px; background: var(--primary); color: white; border-radius: 50%; padding: 2px 6px; font-size: 0.7rem; font-weight: bold; }

/* Menu Lateral (Overlay) */
.side-menu {
    position: fixed; top: 0; left: -100%; width: 320px; height: 100vh;
    background: var(--dark-bg); z-index: 1000; transition: var(--transition);
    padding: 60px 40px; box-shadow: 5px 0 15px rgba(0,0,0,0.5);
}
.side-menu.active { left: 0; }
.close-btn { position: absolute; top: 20px; right: 20px; font-size: 35px; color: white; background: none; border: none; cursor: pointer; }
.logo-menu { font-size: 1.5rem; font-weight: bold; color: white; margin-bottom: 40px; }
.logo-menu span { color: var(--primary); }
.menu-content ul { list-style: none; }
.menu-content ul li { margin-bottom: 20px; }
.menu-content ul li a { color: #ccc; text-decoration: none; font-size: 1.1rem; transition: 0.3s; display: block; }
.menu-content ul li a:hover { color: var(--primary); padding-left: 10px; }

.hero-modern {
    /* Substitui o nome antigo pelo nome do teu novo ficheiro */
    background-image: url('img/fundojolda.png');

    /* 1. AUMENTA A ALTURA EM RELAÇÃO AO ECRÃ */
    /* 80vh significa que vai ocupar 80% da altura total do ecrã de quem visita */
    height: 65vh; 
    /* 2. AUMENTA A ALTURA MÍNIMA (Para ecrãs mais pequenos não ficar "esmagada") */
    min-height: 100px; 

    /* 3. AJUSTA A POSIÇÃO PARA NÃO CORTAR O TOPO */
    /* 'center' tenta mostrar o máximo de cima e de baixo de forma equilibrada */
    background-position: center; 
    background-size: cover;
    background-repeat: center;
    display: flex;
    align-items: center; /* Mantém o teu texto centrado verticalmente na nova altura */
}
.hero-overlay { background: linear-gradient(to right, rgba(0,0,0,0.85), rgba(0,0,0,0.2)); height: 100%; display: flex; align-items: center; padding: 0 10%; }
.hero-text { color: white; max-width: 600px; }
.hero-text h1 { font-size: 3rem; margin: 15px 0; line-height: 1.2; }
.hero-text p { font-size: 1.1rem; color: #ddd; margin-bottom: 20px; }
.badge { background: var(--primary); padding: 5px 12px; font-size: 0.8rem; border-radius: 4px; font-weight: bold; text-transform: uppercase; }
.btn-primary { display: inline-block; background: var(--primary); color: white; padding: 15px 30px; text-decoration: none; border-radius: 4px; font-weight: bold; transition: 0.3s; cursor: pointer; text-align: center; }
.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); }

    /* =========================================
   CARROSSEL DE MARCAS
   ========================================= */
    .brands-slider {
        background: #ffffff;
        padding: 40px 0;
        overflow: hidden; /* Mantém as marcas dentro do ecrã */
        position: relative;
        width: 100%;
        border-top: 1px solid #eee;
        border-bottom: 1px solid #eee;
        display: block;
    }

    .slider-track {
        display: flex;
        flex-direction: row !important; /* FORÇA a ficar na horizontal */
        flex-wrap: nowrap !important;   /* PROÍBE de saltar para a linha de baixo */
        width: max-content;             /* Garante que a calha estica tudo o que precisa */
    }

    .slide-group {
        display: flex;
        flex-direction: row !important; /* FORÇA a ficar na horizontal */
        flex-wrap: nowrap !important;   /* PROÍBE de saltar para a linha de baixo */
        flex-shrink: 0;
        align-items: center;
        animation: scrollBrands 25s linear infinite;
    }
    .brands-slider:hover .slide-group {
        animation-play-state: paused;
    }

    .slide {
        display: flex;
        justify-content: center;
        align-items: center;
        width: 200px; /* Reduzi um pouco a largura para ficarem mais juntos */
        padding: 0 15px;
        opacity: 0.6;
        transition: opacity 0.3s ease;
    }

    .slide:hover {
        opacity: 1;
    }

    .slide h3 {
        margin: 0;
        font-size: 1.5rem;
        color: #333;
        font-weight: bold;
    }

    @keyframes scrollBrands {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-100%);
        }
    }

/* Grid de Produtos */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px 60px 20px; }
.section-title { margin-bottom: 40px; border-left: 4px solid var(--primary); padding-left: 15px; }
.section-title h2 { font-size: 2rem; color: var(--dark-bg); }

.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 30px; }
.card { background: white; border: 1px solid #eee; padding: 20px; border-radius: 8px; transition: var(--transition); position: relative; cursor: pointer; }
.card:hover { box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: transparent; transform: translateY(-5px); }
.card img { width: 100%; height: 180px; object-fit: contain; margin-bottom: 15px; transition: 0.3s; }
.card:hover img { transform: scale(1.05); }
.card h4 { font-size: 1.1rem; color: var(--dark-bg); margin-bottom: 10px; height: 45px; overflow: hidden; }
.price-row { display: flex; justify-content: space-between; align-items: center; margin-top: 15px; border-top: 1px solid #eee; padding-top: 15px; }
.price { font-weight: bold; font-size: 1.3rem; color: var(--dark-bg); }
.add-btn { background: #f4f4f4; border: none; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; color: var(--dark-bg); transition: 0.3s; font-size: 1rem; }
.card:hover .add-btn { background: var(--primary); color: white; }

/* Estilos de Modais (Geral) */
/* Estilos de Modais (Geral) */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,0.7); display: flex; align-items: flex-start; justify-content: center; z-index: 2000; padding: 20px; overflow-y: auto; }
.hidden { display: none !important; }
.modal-card { background: white; width: 100%; max-width: 500px; border-radius: 12px; padding: 30px; position: relative; animation: fadeInUp 0.3s; margin: auto; }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 1.8rem; background: rgba(255,255,255,0.9); width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: none; cursor: pointer; color: #333; z-index: 50; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: 0.3s; }
.close-modal:hover { color: red; transform: scale(1.1); }

/* Modal Auth (Login) */
.auth-card { max-width: 400px !important; text-align: center; }
.auth-card input { width: 100%; padding: 12px 15px; margin: 10px 0; border: 1px solid #ddd; border-radius: 4px; font-size: 1rem; outline: none; }
.auth-card input:focus { border-color: var(--primary); }
#auth-switch { margin-top: 20px; font-size: 0.9rem; cursor: pointer; color: var(--text-muted); transition: 0.3s; }
#auth-switch:hover { color: var(--primary); text-decoration: underline; }

/* Modal Detalhe de Produto */
.product-detail { max-width: 800px !important; padding: 40px; max-height: 90vh; overflow-y: auto; }
.detail-container { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.detail-container img { width: 100%; max-height: 350px; object-fit: contain; background: #f9f9f9; border-radius: 8px; padding: 20px; }
.detail-info h2 { font-size: 2rem; margin-bottom: 5px; color: var(--dark-bg); }
.detail-info .ref { color: #888; font-size: 0.85rem; margin-bottom: 15px; font-weight: bold; }
.detail-info .desc { line-height: 1.6; color: #555; margin-bottom: 25px; }
.detail-info .price-big { font-size: 2.5rem; font-weight: 800; color: var(--dark-bg); margin-bottom: 20px; }

/* Modal Carrinho */
.modal-header { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; padding-bottom: 15px; margin-bottom: 15px; }
.cart-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid #f4f4f4; }
.remove-btn { background: #ffebee; border: none; color: #f44336; width: 25px; height: 25px; border-radius: 50%; cursor: pointer; font-weight: bold; margin-left: 10px; }
.whatsapp-btn { background: #25D366; color: white; border: none; width: 100%; padding: 15px; border-radius: 8px; font-weight: bold; font-size: 1.1rem; cursor: pointer; transition: 0.3s; }
.whatsapp-btn:hover { background: #1ebc5a; }

/* Footer Jofafe-Style */
.jofafe-footer { background: var(--footer-bg); color: #999; padding: 70px 0 20px 0; }
.footer-top { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 40px; padding: 0 20px 50px 20px; }
.footer-col h4 { color: white; margin-bottom: 20px; text-transform: uppercase; font-size: 0.95rem; }
.footer-col ul { list-style: none; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col ul li a { color: #999; text-decoration: none; transition: 0.3s; }
.footer-col ul li a:hover { color: var(--primary); padding-left: 5px; }
.social-links { display: flex; gap: 10px; margin-top: 15px; }
.social-links a { width: 35px; height: 35px; background: #222; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; text-decoration: none; transition: 0.3s; }
.social-links a:hover { background: var(--primary); }
.newsletter-box { display: flex; margin-top: 15px; }
.newsletter-box input { background: #222; border: none; padding: 12px; color: white; width: 100%; outline: none; }
.newsletter-box button { background: var(--primary); border: none; padding: 12px 15px; color: white; cursor: pointer; }
.footer-bottom { border-top: 1px solid #222; text-align: center; padding-top: 20px; font-size: 0.85rem; }

/* Responsividade */
@media (max-width: 768px) {
    .hero-text h1 { font-size: 2.2rem; }
    .detail-container { grid-template-columns: 1fr; }
    .header-actions { gap: 10px; }
    .login-trigger { font-size: 0; padding: 8px; }
    .login-trigger i { font-size: 1.2rem; }
    .product-detail { padding: 20px !important; max-height: 95vh; }
    .detail-container { gap: 20px; }
    .detail-container img { max-height: 250px; padding: 10px; }
    .detail-info h2 { font-size: 1.5rem; }
    .detail-info .price-big { font-size: 2rem; margin-bottom: 15px; }
}

/* Estilos para os Catálogos PDF */
.catalogos-grid {
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); 
    gap: 30px; 
    margin-bottom: 50px;
}
.cat-card {
    background: white; border: 1px solid #eee; border-radius: 8px; overflow: hidden;
    transition: var(--transition); text-align: center; cursor: pointer; text-decoration: none; display: block;
}
.cat-card:hover { transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.1); border-color: transparent; }
.cat-card img { width: 100%; height: 250px; object-fit: cover; border-bottom: 3px solid var(--primary); }
.cat-info { padding: 20px; }
.cat-info h4 { font-size: 1.1rem; color: var(--dark-bg); margin-bottom: 5px; }
.cat-info p { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 15px; height: 35px; overflow: hidden;}
.cat-btn { background: #f4f4f4; color: var(--dark-bg); padding: 8px 15px; border-radius: 4px; font-weight: bold; font-size: 0.9rem; transition: 0.3s; display: inline-block; }
.cat-card:hover .cat-btn { background: var(--primary); color: white; }

/* =========================================
   NOTIFICAÇÕES FLUTUANTES (TOASTS)
   ========================================= */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.toast {
    min-width: 250px;
    max-width: 350px;
    background: #fff;
    color: #333;
    padding: 15px 20px;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 500;
    font-size: 0.95rem;
    transform: translateX(120%); 
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55); 
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.success { border-left: 5px solid #2ecc71; }
.toast.error { border-left: 5px solid #e74c3c; }
.toast.info { border-left: 5px solid var(--primary); }

.toast i { font-size: 1.3rem; }
.toast.success i { color: #2ecc71; }
.toast.error i { color: #e74c3c; }
.toast.info i { color: var(--primary); }

/* =========================================
   BOTÃO FLUTUANTE WHATSAPP
   ========================================= */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 25px;
    right: 25px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 35px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9000;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.whatsapp-float:hover {
    background-color: #1ebe57;
    transform: scale(1.1);
    color: white;
}
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 80px; /* Sobe um pouco no telemóvel para não tapar as cookies */
        right: 15px;
        font-size: 28px;
    }
}
/* =========================================
   SISTEMA DE COOKIES (LOCK SCREEN OBRIGATÓRIO)
   ========================================= */
.cookie-lock-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.85); /* Fundo muito escuro para focar a atenção */
    backdrop-filter: blur(8px); /* Efeito de vidro embaciado no site */
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999; /* Fica por cima de TUDO no site */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-premium-box {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    padding: 40px 30px;
    border-radius: 16px;
    text-align: center;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    border-top: 5px solid var(--primary); /* Linha laranja elegante no topo */
    animation: zoomIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animação de entrada suave */
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.btn-cookie-accept {
    background: var(--primary);
    color: white;
    border: none;
    width: 100%;
    padding: 16px;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    box-shadow: 0 4px 15px rgba(242, 101, 34, 0.3);
}

.btn-cookie-accept:hover {
    background: #d85515;
    transform: translateY(-2px);
}

/* =========================================
   ESTILOS DO LOGÓTIPO DA MARCA (Versão Forçada)
   ========================================= */
.logo-img {
    height: 45px !important; /* FORÇA A ALTURA A 45px */
    width: auto !important;   /* MANTÉM A PROPORÇÃO SEMPRE */
    object-fit: contain !important;
    transition: transform 0.3s ease;
}

.logo:hover .logo-img {
    transform: scale(1.05); /* Pequeno zoom elegante */
}

/* Tamanho específico para telemóveis */
@media (max-width: 768px) {
    .logo-img {
        height: 35px !important; /* FORÇA UM POUCO MAIS PEQUENO NO TELEMÓVEL */
    }
}
