/* ========================================= */

/* --- 1. VARIÁVEIS CSS (ROOT) --- */

/* ========================================= */

:root {

    /* Cores */

    --primary-color: #A37F5D; /* Cor de Destaque (Cobre/Bronze) */

    --primary-highlight: #FFD700; /* Ouro puro para hover/títulos */

    --dark-bg: #1e1e1e; /* Fundo do Header e Footer */

    --darker-bg: #121212; /* Fundo Principal */

    --light-text: #EAEAEA; /* Texto Principal */

    --subtle-text: #A8A8A8; /* Texto Secundário */

    --border-color: #444444; 

    --border-color-dark: #333333;

    --success-color: #4CAF50; /* Verde para sucesso */

    --error-color: #F44336; /* Vermelho para erro */

    

    /* Espaçamento e Tipografia */

    --spacing-sm: 8px;

    --spacing-md: 16px;

    --spacing-lg: 32px;

    --font-size-base: 16px;

    --font-size-small: 14px;

    --transition-speed: 0.3s;

    --shadow-medium: 0 4px 10px rgba(0, 0, 0, 0.4);

}



/* ========================================= */

/* --- 2. BASE E LAYOUT GERAL --- */

/* ========================================= */

* {

    box-sizing: border-box; 

}



body {

    font-family: 'Montserrat', sans-serif;

    background-color: var(--darker-bg);

    color: var(--light-text);

    margin: 0;

    padding: 0;

    

    display: flex;

    flex-direction: column;

    min-height: 100vh;

}



main {

    flex-grow: 1; 

    padding: var(--spacing-lg) 0;

}



.container {

    width: 90%;

    max-width: 1200px;

    margin: 0 auto;

}



/* Estilos para Mensagens (usados em login/register/carrinho) */

.form-message, .message {

    padding: var(--spacing-md);

    margin-bottom: var(--spacing-lg);

    border-radius: 5px;

    font-weight: 500;

    text-align: center;

}

.form-message.success-message, .message.success {

    background-color: var(--success-color);

    color: var(--dark-bg);

}

.form-message.error-message, .message.error {

    background-color: var(--error-color);

    color: var(--light-text);

}





/* ========================================= */
/* --- 3. ESTILOS DO HEADER --- */
/* ========================================= */

.main-header {
    background-color: var(--dark-bg);
    border-bottom: 1px solid var(--border-color-dark);
    box-shadow: var(--shadow-medium);
    padding: var(--spacing-md) 0; 
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--spacing-md);
}

/* LOGO */
.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    color: var(--primary-highlight);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: 1px;
}

/* NAVEGAÇÃO PRINCIPAL */
.main-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
}

.main-nav ul li a {
    color: var(--light-text);
    text-decoration: none;
    padding: 12px 18px; 
    
    display: flex; 
    align-items: center; 
    gap: 6px; 
    
    transition: color var(--transition-speed);
}

.main-nav ul li a:hover {
    color: var(--primary-color);
}

/* DESTAQUE: PROMOÇÕES */
.main-nav ul li.nav-highlight a {
    color: var(--primary-highlight) !important;
    font-weight: 700;
    text-shadow: 0 0 5px rgba(255, 215, 0, 0.2);
    animation: pulse 1.5s infinite; 
}

.main-nav ul li.nav-highlight a:hover {
    color: var(--primary-color) !important;
    animation: none;
    text-shadow: none;
}
@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.02); opacity: 0.95; }
    100% { transform: scale(1); opacity: 1; }
}

/* NAVEGAÇÃO DE UTILIDADE (Carrinho/Login/Pesquisa) */
.utility-nav {
    display: flex;
    align-items: center;
    gap: 15px; /* Ajuste o gap para acomodar mais ícones */
}

.utility-link {
    color: var(--light-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: color var(--transition-speed), background-color var(--transition-speed);
}

.utility-link i {
    font-size: 1.1rem; /* Tamanho base dos ícones */
}

.utility-link:hover {
    color: var(--primary-highlight);
}

/* NOVO: ESTILO DA LISTA DE DESEJOS */
.wishlist-link i {
    /* Cor do ícone de coração */
    color: var(--light-text); 
    transition: color var(--transition-speed);
}

.wishlist-link:hover i {
    /* Cor de destaque ao passar o mouse */
    color: var(--primary-color); 
    transform: scale(1.1); /* Efeito sutil de zoom */
}
/* Se você usar a contagem, estilize-a como o contador do carrinho */
.wishlist-item-count {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 5px;
}


/* Contador do Carrinho */
.cart-item-count {
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border-radius: 50%;
    padding: 2px 7px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-left: 5px;
}

/* Botão de Mobile Toggle (Escondido por padrão) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--light-text);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0;
    transition: color var(--transition-speed);
    z-index: 101; 
}


/* ========================================= */
/* --- ESTILOS DA CAIXA DE PESQUISA (GERAL) --- */
/* ========================================= */
.search-box {
    position: relative;
    /* Manter z-index alto para a caixa de pesquisa */
    z-index: 100; 
    /* Adiciona padding para centralizar o ícone com os outros na utility-nav */
    padding-top: 5px; 
    padding-bottom: 5px;
}

/* Visibilidade do Trigger (ícone de lupa) */
.mobile-search-trigger {
    /* Assumimos que o ícone de lupa é visível no mobile e invisível no desktop */
    display: none; 
}

/* Estilos do input de pesquisa (Desktop) */
#search-input {
    padding: 8px 15px;
    border-radius: 20px;
    border: 1px solid var(--border-color-dark);
    background-color: #333;
    color: var(--light-text);
    width: 200px;
    transition: width 0.3s ease;
}

#search-input::placeholder {
    color: #999;
}

#search-input:focus {
    width: 250px;
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* LISTA DE RESULTADOS (Geral: Desktop) */
#search-results {
    position: absolute;
    top: 100%; /* Aparece exatamente por baixo do input */
    left: 0;
    min-width: 250px; 
    width: 100%;
    background-color: var(--dark-bg);
    border: 1px solid var(--primary-color);
    box-shadow: var(--shadow-medium);
    list-style: none;
    padding: 0;
    margin-top: 5px;
    z-index: 1000; /* CRÍTICO: Garante que está acima de qualquer menu */
    display: none; 
    border-radius: 5px;
    max-height: 300px;
    overflow-y: auto;
}

#search-results li {
    padding: 8px 15px;
    border-bottom: 1px solid #282828;
    cursor: pointer;
}

#search-results li:last-child {
    border-bottom: none;
}

#search-results li a {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--light-text);
}

#search-results li a:hover {
    background-color: #383838;
    color: var(--primary-highlight);
}

.search-result-image {
    width: 30px;
    height: 30px;
    object-fit: cover;
    border-radius: 3px;
    border: 1px solid var(--border-color-dark);
}

.search-result-name {
    flex-grow: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9rem;
}

#search-results .error,
#search-results .no-results {
    color: #FF6B6B;
    font-style: italic;
    text-align: center;
}

/* ========================================= */
/* --- MEDIA QUERY PARA MOBILE (768px ou menos) --- */
/* CORREÇÃO FINAL: FOCADA NA LARGURA E POSIÇÃO SEGURA */
/* ========================================= */
@media (max-width: 768px) {
    
    /* 1. Alinhamento Geral e Z-index */
    .utility-nav {
        display: flex;
        align-items: center; 
        /* Garantir que a barra tem z-index alto, se necessário */
        z-index: 50; 
    }

    .mobile-search-trigger {
        display: block; 
        font-size: 1.2rem;
        cursor: pointer;
        padding: 5px;
    }

    #search-input {
        display: none;
        /* MUITO IMPORTANTE: Garante que padding/borda são incluídos na largura */
        box-sizing: border-box; 
        padding: 8px 15px; 
        margin-right: 10px;
    }
    
    /* 2. ESTADO ATIVO: A caixa de pesquisa na linha */
    .search-box.active {
        position: relative; 
        width: auto;
        z-index: 105; 
        display: flex; 
        align-items: center;
        /* Garante que a caixa inteira tem espaço */
        flex-grow: 1; 
    }
    
    .search-box.active #search-input {
        display: block; 
        /* MUITO CRÍTICO: Use largura relativa ao container Flex (search-box) */
        width: 100%; 
        min-width: 150px; /* Garante que nunca encolhe demais */
        /* Retira a margem para que não haja folga desnecessária */
        margin-right: 0; 
    }

    .search-box.active .mobile-search-trigger {
        /* Move a lupa para o fim do input e serve como botão de fechar/confirmar */
        order: 2; 
        margin-left: 10px;
    }

    /* 3. LISTA DE RESULTADOS (CORRIGINDO SOBREPOSIÇÃO) */
    .search-box.active #search-results {
        position: absolute; 
        
        /* Começa logo abaixo da caixa de pesquisa ativa */
        top: 100%; 
        
        /* Alinhamos à esquerda e ocupamos o espaço total do search-box.active */
        left: 0; 
        width: 100%; 
        
        /* Aumentar o z-index para sobrepor qualquer coisa */
        z-index: 10000; 
        
        /* Garantir que há espaço para a pesquisa e resultados */
        max-height: 80vh; 
        box-sizing: border-box;
        
        /* Remova qualquer margem que possa estar a interferir no posicionamento */
        margin-top: 5px; 
    }
}
/* ========================================= */
/* --- 4. RESPONSIVIDADE MOBILE --- */
/* ========================================= */

@media (max-width: 1024px) {
    /* Esconde a navegação principal por padrão no mobile/tablet */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%; /* Abaixo do header */
        left: 0;
        width: 100%;
        background-color: var(--dark-bg);
        border-top: 1px solid var(--border-color-dark);
        box-shadow: var(--shadow-medium);
        z-index: 95;
        padding-bottom: 10px;
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
    }

    .main-nav ul li a {
        display: block;
        width: 100%;
        padding: 10px var(--spacing-md);
        border-bottom: 1px solid #282828;
    }

    /* Mostra o botão do menu */
    .menu-toggle {
        display: block;
    }

    /* Reorganiza e ajusta a barra de utilidade */
    .utility-nav {
        /* Apenas Login/Perfil, Carrinho e Lista de Desejos */
        gap: 5px;
    }

    .header-content-wrapper {
        gap: 10px;
    }
    
    /* Esconde a pesquisa no layout mobile para simplificar o header */
    .search-box {
        display: none;
    }

    /* Remove o texto dos links de utilidade para economizar espaço */
    .utility-link {
        padding: 5px; /* Menos padding */
        gap: 0;
    }
    
    .utility-link span {
        display: none; /* Esconde o texto "Perfil", "Sair", "Carrinho", etc. */
    }

    .cart-link i,
    .wishlist-link i,
    .profile-link i,
    .logout-link i {
        font-size: 1.3rem; /* Aumenta o tamanho dos ícones */
    }
    
    /* Garante que a contagem do carrinho permaneça visível */
    .cart-item-count {
        margin-left: 0;
        position: absolute;
        top: 0px;
        right: -5px;
    }
    .cart-link {
        position: relative; /* Para posicionar o contador corretamente */
    }
}


/* ========================================= */

/* --- 4. ESTILOS DA PESQUISA --- */

/* ========================================= */



.search-box { 

    position: relative; 

    display: flex; 

    align-items: center; 

    max-width: 250px; 

}



#search-input {

    padding: 10px 15px;

    border: 1px solid var(--border-color);

    border-radius: 5px;

    background-color: var(--darker-bg);

    color: var(--light-text);

    width: 100%;

    font-size: var(--font-size-base);

    transition: border-color var(--transition-speed);

}



#search-input:focus {

    border-color: var(--primary-color);

    outline: none;

}



/* Container principal da lista de resultados (Flutuante) */

#search-results {

    position: absolute;

    top: 100%; 

    left: 0;

    z-index: 200; 

    width: 350px; 

    max-height: 400px; 

    overflow-y: auto; 

    padding: 0;

    margin-top: 2px;

    list-style: none;

    background: var(--dark-bg);

    border: 1px solid var(--primary-color);

    border-radius: 5px;

    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.7);

    display: none; 

}



/* Estilo para cada link de resultado (A) */

#search-results li a {

    text-decoration: none;

    color: var(--light-text);

    display: flex; 

    align-items: center; 

    gap: 15px; 

    padding: 8px 15px;

    width: 100%;

    box-sizing: border-box;

    border-bottom: 1px solid var(--border-color-dark);

    transition: background-color var(--transition-speed);

}



/* Estilo para a Imagem do Produto */

.search-result-image {

    width: 40px !important; 

    height: 40px !important; 

    object-fit: cover; 

    border-radius: 3px;

    border: 1px solid var(--border-color);

    flex-shrink: 0;

}



/* Estilo para o Nome do Produto */

.search-result-name {

    flex-grow: 1; 

    white-space: nowrap;

    overflow: hidden;

    text-overflow: ellipsis; 

    font-size: var(--font-size-small);

}



/* Efeito ao passar o mouse */

#search-results li a:hover {

    background-color: #2a2a2a; 

    color: var(--primary-color);

}



#search-results li:last-child a {

    border-bottom: none;

}



/* ========================================= */

/* --- 5. ESTILOS DO LOGIN E REGISTO (NOVO) --- */

/* ========================================= */



.content-container {

    /* Centraliza o container na página */

    max-width: 450px;

    margin: var(--spacing-lg) auto;

    padding: var(--spacing-lg);

    background-color: var(--dark-bg);

    border-radius: 10px;

    box-shadow: var(--shadow-medium);

    border: 1px solid var(--border-color-dark);

}



.content-container h2 {

    font-family: 'Playfair Display', serif;

    text-align: center;

    color: var(--primary-highlight);

    margin-bottom: var(--spacing-lg);

    font-size: 2rem;

}



.form-group {

    margin-bottom: var(--spacing-md);

}



.form-group label {

    display: block;

    margin-bottom: var(--spacing-sm);

    color: var(--light-text);

    font-weight: 500;

}



.form-group input[type="email"],

.form-group input[type="password"],

.form-group input[type="text"] {

    width: 100%;

    padding: 12px;

    border: 1px solid var(--border-color);

    border-radius: 5px;

    background-color: var(--darker-bg);

    color: var(--light-text);

    font-size: var(--font-size-base);

    transition: border-color var(--transition-speed);

}



.form-group input:focus {

    border-color: var(--primary-color);

    outline: none;

}



/* Botão de Ação Principal (Login/Registar) */

.action-button.primary {

    width: 100%;

    padding: 15px;

    background-color: var(--primary-color);

    color: var(--dark-bg);

    border: none;

    border-radius: 5px;

    font-size: 1.1rem;

    font-weight: 700;

    cursor: pointer;

    margin-top: var(--spacing-md);

    transition: background-color var(--transition-speed), box-shadow var(--transition-speed);

}



.action-button.primary:hover {

    background-color: var(--primary-highlight);

    box-shadow: 0 0 15px rgba(255, 215, 0, 0.3);

}



/* Link para Registo/Login */

.content-container p a {

    text-decoration: none;

}





/* ========================================= */

/* --- 6. ESTILOS DO CARRINHO --- */

/* (Mantido o código anterior) */

/* ========================================= */



.cart-container {

    padding: var(--spacing-lg);

    max-width: 1000px;

    margin: 0 auto;

}



.cart-container h1 {

    font-family: 'Playfair Display', serif;

    text-align: center;

    color: var(--primary-highlight);

    margin-bottom: var(--spacing-lg);

    font-size: 2.2rem;

}



/* Estilo da Tabela */

.cart-table {

    width: 100%;

    border-collapse: collapse;

    margin-bottom: var(--spacing-lg);

    background-color: var(--dark-bg);

    box-shadow: var(--shadow-medium);

    border-radius: 8px;

    overflow: hidden; 

}



.cart-table thead {

    background-color: var(--primary-color);

    color: var(--dark-bg);

}



.cart-table th, .cart-table td {

    padding: var(--spacing-md);

    text-align: center;

    border-bottom: 1px solid var(--border-color-dark);

}



.cart-table th {

    font-weight: 700;

    text-transform: uppercase;

    font-size: var(--font-size-small);

}



.cart-table tbody tr:hover {

    background-color: #2a2a2a;

}



/* Célula de Informação do Produto (Nome + Imagem) */

.product-info-cell {

    display: flex;

    align-items: center;

    gap: var(--spacing-md);

    text-align: left;

    min-width: 200px;

}

.product-info-cell img {

    width: 60px;

    height: 60px;

    object-fit: cover;

    border-radius: 5px;

    border: 1px solid var(--border-color);

}



/* Formulário de Quantidade */

.update-quantity-form {

    display: flex;

    align-items: center;

    justify-content: center;

    gap: var(--spacing-sm);

}



.quantity-input {

    width: 60px;

    padding: 8px;

    border: 1px solid var(--border-color);

    border-radius: 5px;

    background-color: var(--darker-bg);

    color: var(--light-text);

    text-align: center;

}



.btn-update {

    background-color: var(--subtle-text);

    color: var(--dark-bg);

    border: none;

    padding: 8px 10px;

    border-radius: 5px;

    cursor: pointer;

    transition: background-color var(--transition-speed);

}

.btn-update:hover {

    background-color: var(--primary-color);

}



/* Ações de Remover */

.btn-remove {

    background-color: var(--error-color);

    color: white;

    border: none;

    padding: 8px 10px;

    border-radius: 5px;

    cursor: pointer;

    transition: opacity var(--transition-speed);

}

.btn-remove:hover {

    opacity: 0.8;

}



/* Total do Carrinho */

.cart-table tfoot td {

    border-top: 2px solid var(--primary-color);

    font-size: 1.1rem;

    font-weight: 700;

    background-color: #2a2a2a;

}

.total-label {

    text-align: right !important;

    padding-right: var(--spacing-lg);

    color: var(--primary-highlight);

}

.total-price {

    color: var(--primary-highlight);

}



/* Botões de Ação do Carrinho */

.cart-actions {

    display: flex;

    justify-content: space-between;

    align-items: center;

    gap: var(--spacing-md);

    padding: var(--spacing-md) 0;

    flex-wrap: wrap;

}



/* Botão Base */

.btn-continue-shopping, .btn-clear-cart, .btn-checkout, .btn-back-to-products {

    text-decoration: none;

    padding: 12px 20px;

    border-radius: 5px;

    font-weight: 700;

    display: flex;

    align-items: center;

    gap: 8px;

    transition: background-color var(--transition-speed), color var(--transition-speed);

    cursor: pointer;

    border: 1px solid transparent;

}



.btn-continue-shopping, .btn-back-to-products {

    background-color: transparent;

    color: var(--primary-color);

    border-color: var(--primary-color);

}

.btn-continue-shopping:hover, .btn-back-to-products:hover {

    background-color: var(--primary-color);

    color: var(--darker-bg);

}



.btn-clear-cart {

    background-color: var(--error-color);

    color: white;

    border: none;

}

.btn-clear-cart:hover {

    background-color: #c0392b; /* Vermelho mais escuro */

}



.btn-checkout {

    background-color: var(--primary-highlight);

    color: var(--dark-bg);

    border: none;

}

.btn-checkout:hover {

    background-color: #ffc400; /* Dourado mais escuro */

}



.empty-cart-message {

    text-align: center;

    padding: var(--spacing-lg);

    font-size: 1.2rem;

    color: var(--subtle-text);

}



/* ================================================= */
/* --- 7. ESTILOS DO FOOTER (LUXO E RESPONSIVO) --- */
/* ================================================= */

/* Variáveis de Contexto (Assumindo que estas existem no seu :root) */
/*
:root {
    --primary-color: #A37F5D; 
    --primary-highlight: #FFD700; 
    --dark-bg: #1e1e1e; 
    --darker-bg: #121212; 
    --light-text: #EAEAEA; 
    --subtle-text: #A8A8A8; 
    --border-color: #444444; 
    --border-color-dark: #333333;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 32px; 
    --spacing-xl: 48px;
    --transition-speed: 0.3s;
}
*/

.main-footer {
    background-color: var(--dark-bg);
    /* Aumentei o padding superior para um visual mais imponente */
    padding: var(--spacing-xl) 0 0; 
    color: var(--light-text);
    /* Borda superior mais proeminente e cor de destaque */
    border-top: 2px solid var(--primary-color); 
}

/* Alterado de flex para grid para melhor controlo de layout */
.footer-content-wrapper { 
    display: grid;
    /* Padrão para Mobile: 1 coluna */
    grid-template-columns: 1fr; 
    /* Espaçamento vertical e horizontal aumentado */
    gap: var(--spacing-xl); /* Aumentei o gap vertical para mais espaço no mobile */
    padding-bottom: var(--spacing-xl);
    width: 90%; /* Ajuste para o container, se não estiver usando um wrapper global */
    max-width: 1200px;
    margin: 0 auto;
}

/* Media Query para Layout Desktop/Tablet (adapta-se a >= 768px) */
@media (min-width: 768px) {
    .footer-content-wrapper {
        /* Layout de Luxo: Sobre (maior), Links, Suporte, Contacto */
        /* Ajustei a proporção para 2.5fr / 1fr / 1fr / 1.5fr para um 'Sobre' mais largo */
        grid-template-columns: 2.5fr 1fr 1fr 1.5fr; 
        gap: var(--spacing-lg) var(--spacing-xl);
    }
}

.footer-section {
    /* Removido o min-width para o grid lidar com isso, removendo potencial "desajuste" */
    padding: 0; 
}

/* Ajustes para Títulos */
.footer-section h3 {
    font-family: 'Playfair Display', serif; /* Fonte elegante, se disponível */
    font-size: 1.4rem; 
    color: var(--primary-highlight); /* Ouro puro para títulos */
    /* Aumentei a margem inferior para dar mais espaço */
    margin-bottom: var(--spacing-lg); 
    /* Borda mais grossa e de destaque */
    border-bottom: 3px solid var(--primary-color); 
    padding-bottom: var(--spacing-sm);
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Estilos de Links e Padrões */
.footer-section p {
    color: var(--subtle-text);
    margin-bottom: var(--spacing-md); /* Aumentei a margem inferior para parágrafos */
    /* Alinha o ícone e o texto ao topo (perfeito para contacto) */
    display: flex; 
    align-items: flex-start;
    gap: 10px; 
    line-height: 1.6;
}

/* Estilo para ícones dentro de parágrafos (como contacto) */
.footer-section p i {
    color: var(--primary-color); /* Cor de destaque para ícones de contacto */
    font-size: 1rem;
    /* Pequeno ajuste vertical para alinhar com o topo do texto */
    margin-top: 4px; 
    /* Garantir que o ícone não se mova */
    flex-shrink: 0; 
}

.footer-section ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section ul li a {
    color: var(--subtle-text);
    text-decoration: none;
    display: block;
    padding: 6px 0; /* Aumentei o padding vertical para mais espaço entre links */
    /* Adicionado transform para animação subtil */
    transition: color var(--transition-speed), transform var(--transition-speed); 
}

.footer-section ul li a:hover {
    color: var(--primary-highlight); /* Highlight dourado ao passar o mouse */
    /* Animação subtil para destacar o link */
    transform: translateX(6px); /* Movimento subtil ligeiramente maior */
}

/* Ícones Sociais */
.social-icons {
    display: flex;
    gap: var(--spacing-lg); /* Mais espaço entre ícones */
    margin-top: var(--spacing-lg);
}

.social-icons a {
    color: var(--subtle-text);
    font-size: 1.8rem; /* Ícones maiores */
    transition: color var(--transition-speed), transform var(--transition-speed);
}

.social-icons a:hover {
    color: var(--primary-highlight);
    transform: scale(1.15); /* Efeito de zoom ligeiramente maior no hover */
}

/* Rodapé Inferior */
.footer-bottom {
    background-color: var(--darker-bg); /* Fundo ainda mais escuro para contraste */
    padding: var(--spacing-md) 0;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.footer-bottom p {
    font-size: 0.9rem; /* Ligeiramente maior */
    color: var(--subtle-text);
    margin: 5px 0; 
}

/* Opcional: destaque para a linha de crédito */
.footer-bottom p:last-child {
    color: var(--primary-color); 
}


/* ========================================= */
/* --- 8. ESTILOS DA PÁGINA SOBRE NÓS --- */
/* ========================================= */

/* --- 8.1. Secção Hero (Banner) --- */

.about-hero {
    position: relative;
    padding: 100px 0;
    min-height: 40vh; /* Altura do banner */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efeito Parallax */
    
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Overlay escuro para legibilidade do texto */
.about-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); /* Overlay escuro */
    z-index: 1;
}

/* Conteúdo do Hero (Texto) */
.about-hero-content {
    position: relative; /* Fica acima do overlay */
    z-index: 2;
}

.about-hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    color: var(--primary-highlight); /* Usa a cor Dourada */
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    margin-bottom: var(--spacing-sm);
}

.about-hero p {
    font-size: 1.2rem;
    color: var(--light-text); /* Usa o texto claro */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    max-width: 600px;
    margin: 0 auto;
}

/* --- 8.2. Secção História (Imagem e Texto) --- */

.about-story {
    display: flex;
    align-items: center;
    gap: var(--spacing-lg);
    padding: var(--spacing-lg) 0;
    margin: var(--spacing-lg) 0;
    border-bottom: 1px solid var(--border-color);
}

.about-story-image {
    flex: 1; /* Ocupa metade do espaço */
    min-width: 300px;
}

.about-story-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.about-story-text {
    flex: 1.2; /* Ocupa um pouco mais de espaço */
}

.about-story-text h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-highlight); /* Usa Dourado */
    margin-bottom: var(--spacing-md);
}

.about-story-text p {
    font-size: 1rem;
    line-height: 1.8;
    color: var(--subtle-text); /* Usa o cinza subtil */
    margin-bottom: var(--spacing-md);
}

/* --- 8.3. Secção Valores (Grid) --- */

.about-values {
    text-align: center;
    padding: var(--spacing-lg) 0;
    margin-bottom: var(--spacing-lg);
}

.about-values h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-highlight);
    margin-bottom: var(--spacing-lg);
}

.values-grid {
    display: grid;
    /* 3 colunas em desktop */
    grid-template-columns: repeat(3, 1fr); 
    gap: var(--spacing-lg);
}

.value-item {
    background-color: var(--dark-bg); /* Fundo escuro dos cartões */
    padding: var(--spacing-lg);
    border-radius: 8px;
    border: 1px solid var(--border-color-dark);
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

.value-item i {
    color: var(--primary-color); /* Usa a cor Cobre/Bronze */
    margin-bottom: var(--spacing-md);
}

.value-item h3 {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-bottom: var(--spacing-sm);
}

.value-item p {
    color: var(--subtle-text);
    line-height: 1.6;
}

/* --- 8.4. Secção Conexão (Discord/Instagram) --- */

.about-connect {
    text-align: center;
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-lg);
    background-color: var(--dark-bg);
    border-radius: 8px;
    border: 1px solid var(--border-color-dark);
}

.about-connect h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.2rem;
    color: var(--primary-highlight);
    margin-bottom: var(--spacing-sm);
}
.about-connect p {
    color: var(--subtle-text);
    margin-bottom: var(--spacing-lg);
    font-size: 1.1rem;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-md);
    flex-wrap: wrap; /* Para ecrãs pequenos */
}

.social-btn {
    text-decoration: none;
    color: #fff;
    padding: 12px 24px;
    border-radius: 5px;
    font-weight: 700;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.social-btn i {
    font-size: 1.2rem;
}

/* Cor específica do Instagram */
.social-btn.instagram {
    background-color: #E1306C;
    border-color: #E1306C;
}
.social-btn.instagram:hover {
    background-color: #c11b58;
    box-shadow: 0 0 15px rgba(225, 48, 108, 0.5);
}

/* Cor específica do Discord */
.social-btn.discord {
    background-color: #5865F2;
    border-color: #5865F2;
}
.social-btn.discord:hover {
    background-color: #4a56d1;
    box-shadow: 0 0 15px rgba(88, 101, 242, 0.5);
}


/* --- 8.5. Animações e Responsividade --- */

/* Animação que usou no HTML */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Responsividade (Media Queries) */
@media (max-width: 900px) {
    /* Secção História: passa a coluna */
    .about-story {
        flex-direction: column;
    }
    
    /* Secção Valores: passa para 1 coluna */
    .values-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .about-hero h1 {
        font-size: 2.5rem;
    }
    .about-hero p {
        font-size: 1rem;
    }
    
    .about-story-text h2,
    .about-values h2,
    .about-connect h2 {
        font-size: 2rem;
    }

    /* Botões sociais ocupam 100% da largura */
    .social-btn {
        width: 100%;
        justify-content: center;
        margin: 5px 0;
    }
}

/* ========================================= */
/* --- 9. ESTILOS DA PÁGINA INICIAL (INDEX) --- */
/* ========================================= */

/* --- 9.1. Secção Hero (Banner Principal) --- */

.hero-section {
    position: relative;
    min-height: 80vh; /* Altura mínima para preencher o ecrã */
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efeito Parallax */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-lg) 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Overlay escuro */
    z-index: 1;
}

.hero-section .text-overlay {
    position: relative;
    z-index: 2;
}

.hero-section h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 6vw, 5rem); /* Tamanho de fonte fluido */
    color: #fff;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.7);
    margin-bottom: var(--spacing-md);
}

.hero-section p {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    color: #fff;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
    max-width: 700px;
    margin: 0 auto var(--spacing-lg);
}

/* --- 9.2. Coleção em Destaque --- */

.featured-collection-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--dark-bg);
    color: var(--light-text);
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--primary-highlight);
    margin-bottom: var(--spacing-md);
}

.collection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-lg);
    margin-top: var(--spacing-lg);
}

.collection-item {
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.collection-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.collection-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.collection-item h3 {
    margin-top: var(--spacing-md);
    font-family: 'Playfair Display', serif;
    color: var(--light-text);
    font-size: 1.5rem;
}

/* --- 9.3. Banner Intermédio --- */

.banner-section {
    background-size: cover;
    background-position: center;
    padding: 100px 0;
    position: relative;
}

.banner-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4); 
    z-index: 1;
}

.banner-section .container {
    position: relative;
    z-index: 2;
}

.banner-section h2 {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    color: var(--primary-highlight);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.6);
    margin-bottom: var(--spacing-md);
}

.banner-section p {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.2rem;
    color: var(--light-text);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.6);
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
}

/* --- 9.4. Testemunhos --- */

.testimonials-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--darker-bg); 
    color: var(--light-text);
    text-align: center;
}

.testimonial-card {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--dark-bg);
    padding: var(--spacing-lg);
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
}

.testimonial-card p {
    font-family: 'Montserrat', sans-serif;
    font-style: italic;
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: var(--spacing-md);
    color: var(--subtle-text);
}

.testimonial-card cite {
    display: block;
    font-style: normal;
    font-weight: bold;
    font-size: 1rem;
    color: var(--primary-highlight);
}

/* --- 9.5. Newsletter --- */

.newsletter-section {
    padding: var(--spacing-lg) 0;
    background-color: var(--dark-bg);
    color: var(--light-text);
}

.newsletter-section h2 {
    color: var(--light-text);
}

.newsletter-section form {
    display: flex;
    justify-content: center;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-section input[type="email"] {
    width: 100%;
    padding: 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px 0 0 8px;
    background-color: var(--darker-bg);
    color: var(--light-text);
    font-size: var(--font-size-base);
    transition: border-color 0.3s;
}

.newsletter-section input[type="email"]:focus {
    border-color: var(--primary-color);
    outline: none;
}

.newsletter-section button[type="submit"] {
    padding: 15px 30px;
    border-radius: 0 8px 8px 0;
    background-color: var(--primary-highlight);
    color: var(--dark-bg);
    border: none;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.3s;
}

.newsletter-section button[type="submit"]:hover {
    background-color: #ffc400; /* Dourado ligeiramente mais escuro */
}

/* --- 10. ESTILOS DE BOTÕES GERAIS (Revisão) --- */

/* Botão Primário (Usado no Hero) */
.action-button.primary {
    /* Usando os estilos que já tinha */
    padding: 15px 30px;
    background-color: var(--primary-highlight);
    color: var(--dark-bg);
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s, box-shadow 0.3s;
}

.action-button.primary:hover {
    background-color: #ffc400; /* Dourado mais escuro */
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.5);
}

/* Botão Secundário (Usado no Banner intermédio) */
.action-button.secondary {
    padding: 15px 30px;
    background-color: transparent;
    color: var(--primary-highlight);
    border: 2px solid var(--primary-highlight);
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s, color 0.3s;
}

.action-button.secondary:hover {
    background-color: var(--primary-highlight);
    color: var(--dark-bg);
}

/* ========================================= */
/* --- 11. RESPONSIVIDADE (Ajustes para Index) --- */
/* ========================================= */

@media (max-width: 768px) {
    /* Hero Section */
    .hero-section {
        min-height: 60vh;
    }
    .hero-section h1 {
        font-size: 2.5rem; 
    }
    .hero-section p {
        font-size: 1rem;
    }

    /* Titles */
    .section-title, .banner-section h2 {
        font-size: 2rem;
    }
    
    /* Collection Grid (passa a coluna) */
    .collection-grid {
        grid-template-columns: 1fr;
    }
    .collection-item img {
        height: 250px; /* Reduz altura da imagem */
    }

    /* Newsletter Form */
    .newsletter-section form {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    .newsletter-section input[type="email"] {
        border-radius: 8px;
    }
    .newsletter-section button[type="submit"] {
        border-radius: 8px;
    }
}

@media (max-width: 480px) {
    .action-button.primary, .action-button.secondary {
        width: 100%;
        text-align: center;
    }
}


/* ========================================= */
/* --- 12. ESTILOS DA PÁGINA PRODUTOS --- */
/* ========================================= */

/* Layout geral da página de produtos */
.products-page-container {
    display: flex;
    gap: var(--spacing-lg); /* Espaço entre a sidebar e o conteúdo principal */
    max-width: 1400px; /* Largura máxima do container da página */
    margin: var(--spacing-lg) auto;
    padding: 0 var(--spacing-md);
    box-sizing: border-box;
}

/* Sidebar de filtros */
.sidebar-filters {
    flex: 0 0 280px; /* Não cresce, não encolhe, largura base de 280px */
    background-color: #333333;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    border: 1px solid var(--border-color);
    align-self: flex-start; /* Alinha no topo */
}

.sidebar-filters h2 {
    color: var(--primary-highlight);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
}
.sidebar-filters h2 .fas {
    margin-right: 10px;
}

.filter-form {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Espaço entre os grupos de filtro */
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: var(--light-text);
    display: flex;
    align-items: center;
}
.filter-group label .fas {
    margin-right: 8px;
    color: var(--primary-highlight);
}


.sidebar-filters input[type="text"],
.sidebar-filters input[type="number"],
.sidebar-filters select {
    width: 100%; /* Preenche a largura do grupo */
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background-color: #4c4c4c;
    color: var(--light-text);
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box; /* Inclui padding e border na largura */
}

.sidebar-filters input[type="text"]:focus,
.sidebar-filters input[type="number"]:focus,
.sidebar-filters select:focus {
    border-color: var(--primary-highlight);
    box-shadow: 0 0 0 3px rgba(255,193,7,0.3);
    outline: none;
    background-color: #333333;
}

.filter-group.price-range div {
    display: flex;
    align-items: center;
    gap: 10px;
}
.filter-group.price-range input {
    flex: 1; /* Divide o espaço igualmente entre os inputs */
}
.filter-group.price-range span {
    color: var(--light-text);
    font-size: 1.2rem;
}

/* Estilo para o filtro de Promoção (Toggle Switch) */
.filter-group.promotion-filter {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #4c4c4c;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.filter-group.promotion-filter label {
    margin-bottom: 0;
    cursor: pointer;
    color: var(--light-text);
}
.filter-group.promotion-filter label .fas {
    color: var(--error-color); /* Vermelho para destaque */
}
.filter-group.promotion-filter input[type="checkbox"] {
    /* Esconde o checkbox original */
    display: none;
}
 
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 28px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--error-color); /* Cor vermelha para Promoção ativada */
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--error-color);
}

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Botões de filtro */
.btn-apply-filters,
.btn-clear-filters {
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%; 
    margin-top: 10px;
    text-align: center;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-light);
}

.btn-apply-filters {
    background-color: var(--success-color); /* Verde */
    color: white;
}
.btn-apply-filters:hover {
    background-color: #218838;
    transform: translateY(-2px);
}

.btn-clear-filters {
    background-color: #6c757d; /* Cinza */
    color: white;
}
.btn-clear-filters:hover {
    background-color: #5a6268;
    transform: translateY(-2px);
}
.btn-apply-filters .fas, .btn-clear-filters .fas {
    margin-right: 8px;
}


/* Conteúdo principal dos produtos */
.products-content {
    flex: 1; /* Ocupa o restante do espaço */
}

.products-content .section-title {
    margin-top: 0;
    margin-bottom: 30px;
    font-size: 2.5rem;
    text-align: center;
    color: var(--primary-highlight);
}

/* Grelha de produtos */
.product-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* Padrão para telas grandes: 3 colunas */
    gap: var(--spacing-lg);
    justify-content: center;
}


.product-card {
    background-color: #333333; /* Fundo do card */
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
    overflow: hidden;
    text-align: center;
    padding-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
}

.product-image-container {
    width: 100%;
    height: 250px; /* Altura fixa para as imagens */
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative; /* Para o badge de promoção */
    background-color: #4c4c4c;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.product-info {
    padding: 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.product-name {
    font-size: 1.5rem;
    color: var(--light-text);
    margin-top: 10px;
    margin-bottom: 5px;
    min-height: 48px; 
    display: flex;
    align-items: center;
    justify-content: center;
}
.product-name a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}
.product-name a:hover {
    color: var(--primary-highlight);
}

.product-category {
    font-size: 0.9rem;
    color: #a0a0a0;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.product-color {
    font-size: 0.95rem;
    color: var(--subtle-text);
    margin-top: -10px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-color .fas {
    margin-right: 5px;
    color: var(--primary-highlight);
}


/* IMPORTANTE: Estes estilos de .product-price serão redefinidos/movidos para
   o novo .price-wishlist-container, mas as definições de cor e tamanho
   para os spans internos continuam a aplicar-se:
*/
.product-price {
    /* Mantido para herança, mas as margens são movidas para o novo container */
    margin: 0; 
    padding: 0;
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-highlight);
}

.product-price .original-price {
    color: #a0a0a0;
    text-decoration: line-through;
    font-size: 1.2rem;
    margin-right: 10px;
}

.product-price .promotion-price {
    color: var(--success-color); /* Verde para o preço em promoção */
    font-size: 2.2rem;
}

.product-price .current-price {
    color: var(--primary-highlight);
    font-size: 2.2rem;
}


.promotion-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: var(--error-color);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    text-transform: uppercase;
}


/* Botão Adicionar ao Carrinho */
.add-to-cart-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    width: 100%;
}

.btn-add-to-cart {
    background-color: var(--primary-highlight);
    color: var(--primary-color);
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-add-to-cart:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}
.btn-add-to-cart:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    color: #e9ecef;
}

.product-quantity-input {
    width: 70px;
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #666;
    background-color: #555;
    color: var(--light-text);
    text-align: center;
}


.admin-actions {
    text-align: center;
    margin-bottom: 20px;
}
.btn-add-product {
    background-color: var(--secondary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    display: inline-block;
    margin-bottom: 15px;
    box-shadow: var(--shadow-light);
}
.btn-add-product:hover {
    background-color: #0056b3;
}


.admin-product-actions {
    display: flex;
    justify-content: space-around;
    gap: 10px;
    margin-top: 15px;
}

.btn-edit, .btn-remove {
    flex: 1;
    padding: 8px 15px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-edit {
    background-color: #17a2b8; /* Ciano/Info */
    color: white;
}
.btn-edit:hover {
    background-color: #138496;
}

.btn-remove {
    background-color: var(--error-color);
    color: white;
}
.btn-remove:hover {
    background-color: #c82333;
}

/* Mensagens de feedback (do carrinho ou da página) */
.message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    box-shadow: var(--shadow-light);
    color: var(--dark-bg); /* Corrigido para ser legível */
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ================================================= */
/* --- 13. ESTILOS DE REVIEW E LISTA DE DESEJOS --- */
/* (Adicionado para suportar Reviews e Wishlist ao lado do preço) */
/* ================================================= */

/* --- Estilos de Avaliação (Stars) --- */
.product-reviews {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9em;
    color: var(--subtle-text);
    justify-content: center; /* Centraliza as estrelas e contagem */
}
.product-reviews .stars {
    margin-right: 5px;
}
.product-reviews .full-star, .product-reviews .half-star {
    color: #FFC107; /* Amarelo */
}
.product-reviews .empty-star {
    color: #5c5c5c; /* Cinza escuro para estrelas vazias */
}
.review-count {
    color: var(--subtle-text);
    margin-left: 5px;
}

/* --- Estilos para alinhar Preço e Wishlist --- */
.price-wishlist-container {
    display: flex;
    justify-content: space-between; /* Espaça o preço e o coração */
    align-items: center;
    /* Usa as margens originais do .product-price para o novo container */
    margin-top: 15px;
    margin-bottom: 20px;
}

/* Reajustar o .product-price para ser flexível dentro do container */
.product-info .product-price {
    display: flex;
    align-items: baseline;
    margin: 0; /* Remove margens do bloco original, agora controladas pelo container */
    padding: 0;
}

.wishlist-form {
    line-height: 0; /* Ajuda a alinhar o ícone verticalmente */
}
.btn-wishlist {
    background: none;
    border: none;
    color: #999; /* Cor Cinza */
    cursor: pointer;
    font-size: 1.8rem; /* Tamanho maior para acompanhar o preço grande */
    padding: 0;
    transition: color 0.2s ease-in-out;
}
.btn-wishlist:hover {
    color: #ff69b4; /* Rosa no hover */
}
.btn-wishlist.active {
    color: var(--error-color); /* Vermelho para ativo (já na lista) */
}
.btn-wishlist:disabled {
    cursor: default;
    opacity: 0.5;
}

/* ========================================= */
/* --- 13. RESPONSIVIDADE (Geral e Produtos) --- */
/* ========================================= */

@media (max-width: 992px) {
    /* Header/Nav */
    .nav-links {
        display: none; /* Esconde links em mobile */
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 65px; /* Altura do header */
        left: 0;
        background-color: var(--dark-bg);
        box-shadow: var(--shadow-medium);
        padding: var(--spacing-md) 0;
        text-align: center;
    }
    .nav-links.active {
        display: flex;
    }
    .menu-toggle {
        display: block; /* Mostra o ícone em mobile */
    }

    /* Footer */
    .footer-content {
        flex-direction: column;
    }

    /* Produtos Page */
    .products-page-container {
        flex-direction: column;
        align-items: center;
    }

    .sidebar-filters {
        width: 100%;
        max-width: 600px;
        margin-bottom: var(--spacing-lg);
    }

    .product-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    /* Hero Section */
    .hero-section {
        min-height: 60vh;
    }
    .hero-section h1 {
        font-size: 2.5rem; 
    }
    .hero-section p {
        font-size: 1rem;
    }

    /* Titles */
    .section-title, .banner-section h2, .products-content .section-title {
        font-size: 2rem;
    }
    
    /* Collection Grid (passa a coluna) */
    .collection-grid {
        grid-template-columns: 1fr;
    }
    .collection-item img {
        height: 250px; /* Reduz altura da imagem */
    }

    /* Newsletter Form */
    .newsletter-section form {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    .newsletter-section input[type="email"] {
        border-radius: 8px;
    }
    .newsletter-section button[type="submit"] {
        border-radius: 8px;
    }
}


@media (max-width: 650px) {
    /* Products Grid */
    .product-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .action-button.primary, .action-button.secondary {
        width: 100%;
        text-align: center;
    }
}




/* ========================================= */
/* --- 15. Carrinho (Cart page) --- */
/* ========================================= */

body {
    font-family: 'Arial', sans-serif;
    background-color: #222; /* Fundo escuro para a página */
    color: #f5f5f5; /* Cor clara do texto */
    margin: 0;
    padding: 0;
    line-height: 1.6;
}

/* --- Estilos Específicos do Carrinho --- */

.cart-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
    background-color: #333;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    color: #f5f5f5;
}

.cart-title {
    text-align: center;
    color: #ffc107;
    margin-bottom: 30px;
    font-size: 2.5rem;
}
    
/* Estilos para a mensagem de feedback */
.alert-message {
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-weight: bold;
}

.alert-success {
    background-color: #28a745;
    color: white;
}

.alert-error {
    background-color: #dc3545;
    color: white;
}

.cart-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 30px;
}

.cart-table th, .cart-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #444;
}

.cart-table th {
    background-color: #4c4c4c;
    color: #ffc107;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.cart-table tbody tr:hover {
    background-color: #3a3a3a;
}

.cart-item-image {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    vertical-align: middle;
}

.item-name a {
    color: #f5f5f5;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s;
}

.item-name a:hover {
    color: #ffc107;
}

/* Controlo de Quantidade */
.quantity-control input[type="number"] {
    width: 60px;
    padding: 5px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #4c4c4c;
    color: #f5f5f5;
    text-align: center;
}

.quantity-form {
    display: flex;
    align-items: center;
    gap: 5px;
}

.btn-update-qty {
    background-color: #17a2b8; /* Azul */
    color: white;
    border: none;
    padding: 6px 10px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-update-qty:hover {
    background-color: #138496;
}

.btn-remove-item {
    background: none;
    color: #dc3545; /* Vermelho */
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    transition: color 0.3s;
}

.btn-remove-item:hover {
    color: #c82333;
}

.cart-summary {
    display: flex;
    justify-content: flex-end;
    margin-top: 20px;
    font-size: 1.3rem;
    font-weight: bold;
}

.cart-summary-box {
    background-color: #4c4c4c;
    padding: 20px;
    border-radius: 10px;
    min-width: 300px;
    text-align: right;
}

.cart-summary-box p {
    margin: 5px 0;
}

.total-row {
    border-top: 2px solid #ffc107;
    padding-top: 10px !important;
    font-size: 1.6rem;
    color: #ffc107;
}

.cart-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.btn-clear-cart {
    background-color: #dc3545;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-clear-cart:hover {
    background-color: #c82333;
}

.btn-checkout {
    background-color: #28a745;
    color: white;
    padding: 10px 30px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s;
}

.btn-checkout:hover {
    background-color: #1e7e34;
}

.btn-back-to-shop {
    background-color: #6c757d;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none; /* Para usar em tags <a> */
    transition: background-color 0.3s;
}
    
.btn-back-to-shop:hover {
    background-color: #5a6268;
}

/* Responsividade */
@media (max-width: 768px) {
    .cart-container {
        margin: 20px;
        padding: 15px;
    }
    .cart-table th, .cart-table td {
        padding: 10px 5px;
    }
    .cart-item-image {
        width: 50px;
        height: 50px;
    }
    .cart-summary {
        justify-content: center;
    }
    .cart-summary-box {
        min-width: 100%;
        text-align: center;
    }
    .cart-actions {
        flex-direction: column;
        gap: 15px;
    }
    .btn-clear-cart, .btn-checkout, .btn-back-to-shop {
        width: 100%;
        text-align: center;
    }
}

/* ========================================= */
/* --- 16. Produto detalhe (Product detalhe) --- */
/* ========================================= */

/* CORREÇÃO CRÍTICA DAS LISTAS: Remove os marcadores ("pintinhas") e o recuo */
.tab-content ul, 
.tab-content ol {
    list-style: none !important; /* FORÇA a remoção dos marcadores */
    padding-left: 0 !important; /* Remove o padding padrão para listas */
    margin-left: 0;
}
.tab-content li {
    padding-left: 0; 
    text-indent: 0; 
    list-style: none !important; /* Reforça a remoção do marcador */
    margin-bottom: 5px;
}

/* Base */
body {
    line-height: 1.6;
    overflow-x: hidden; /* Evita a barra de rolagem horizontal se não for necessário */
}
a { color: var(--light-text); text-decoration: none; }
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* Para Firefox (necessário caso você esteja usando este navegador) */
input[type="number"] {
    -moz-appearance: textfield;
}

/* Layout Principal */
.container-product {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    box-sizing: border-box; 
}

.breadcrumb {
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--subtle-text);
}
.breadcrumb a { color: var(--subtle-text); transition: color 0.3s; }
.breadcrumb a:hover { color: var(--primary-color); }

.product-wrapper {
    display: grid;
    grid-template-columns: 55% 40%; 
    gap: 5%;
    background-color: var(--dark-bg);
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium); /* Use sua variável de sombra */
}

/* 🌟 GALERIA DE IMAGENS 🌟 */
.product-gallery {
    background-color: #000; 
    border-radius: 8px;
    overflow: hidden;
}

.main-image-container {
    position: relative;
    padding-top: 100%; 
    height: 0; 
    overflow: hidden;
    background-color: #000;
}

.main-image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain; 
    transition: opacity 0.3s ease;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.6); 
    color: #fff;
    border: none;
    padding: 15px 12px; 
    cursor: pointer;
    font-size: 1.3rem;
    z-index: 10;
    transition: background 0.3s, opacity 0.3s;
    opacity: 0.85; 
}

.slider-btn.left-0 {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    left: 0;
    padding-left: 20px;
}

.slider-btn.right-0 {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
    right: 0;
    padding-right: 20px;
}

.slider-btn:hover {
    background: var(--primary-color);
    color: var(--dark-bg);
    opacity: 1;
}

.image-indicator-box {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.9rem;
    z-index: 11;
}

/* Informações do Produto (Coluna Direita) */
.product-category-tag {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 1px;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: bold;
}

.product-title {
    font-size: 2.5rem;
    margin: 0 0 15px 0;
    color: var(--primary-highlight);
    line-height: 1.2;
}

/* Avaliação (Estrelas) */
.product-rating-summary {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.avg-rating i.fa-star, .avg-rating i.fa-star-half-alt, 
.review-rating-stars i.fa-star, .review-rating-stars i.fa-star-half-alt {
    color: var(--primary-highlight);
}
.review-count {
    color: var(--subtle-text);
    font-size: 0.95rem;
    white-space: normal;
}

/* Preço */
.product-price-box {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color-dark);
}

.current-price {
    font-size: 2.2rem;
    font-weight: 300;
    color: var(--primary-highlight);
}

.old-price {
    text-decoration: line-through;
    color: var(--subtle-text);
    font-size: 1.2rem;
    margin-right: 15px;
}

/* Controles de Compra */
.quantity-label {
    display: block;
    font-size: 0.9rem;
    margin-bottom: 8px;
    color: var(--subtle-text);
}

.actions-row {
    display: flex;
    gap: 15px;
    height: 50px;
}

.qty-wrapper {
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.qty-btn {
    background: #333333; 
    color: #fff;
    border: none;
    width: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background 0.2s;
}
.qty-btn:hover { background: #444444; }

.qty-input-field {
    width: 50px;
    background: var(--darker-bg);
    color: var(--light-text);
    border: none;
    text-align: center;
    font-size: 1rem;
    /* Remoção do -moz-appearance: textfield; desnecessário aqui */
}

.btn-buy {
    flex-grow: 1;
    background-color: var(--primary-color);
    color: var(--dark-bg);
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: background 0.2s, box-shadow 0.2s;
}

.btn-buy:hover {
    background-color: var(--primary-highlight);
    box-shadow: 0 0 15px rgba(255, 215, 0, 0.4);
}

.btn-buy:disabled {
    background: #333;
    color: var(--subtle-text);
    cursor: not-allowed;
    box-shadow: none;
}

/* ABAS (Tabs) */
.product-details-tabs {
    margin-top: 50px;
    background-color: var(--dark-bg);
    padding: 30px;
    border-radius: 12px;
}

.tabs-header {
    display: flex;
    gap: 30px;
    border-bottom: 1px solid var(--border-color-dark);
    margin-bottom: 25px;
}

.tab-btn {
    background: none;
    border: none;
    padding-bottom: 15px;
    font-size: 1.1rem;
    color: var(--subtle-text);
    cursor: pointer;
    position: relative;
    transition: color 0.3s;
}

.tab-btn.active {
    color: var(--primary-color);
    font-weight: bold;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

.tab-content {
    display: none;
    color: var(--subtle-text);
    font-size: 1rem;
    line-height: 1.8;
}

.tab-content.active { display: block; }

/* FIX CRÍTICO 2: Controlar o conteúdo inserido na aba (Descrição/Especificações) */
.tab-content p, 
.tab-content ul, 
.tab-content ol, 
.tab-content div {
    max-width: 100%;
    word-wrap: break-word; 
    overflow-wrap: break-word; 
}

.tab-content img {
    max-width: 100%;
    height: auto;
    display: block; 
}

/* Tabela Técnica Dark */
.specs-table {
    width: 100%;
    border-collapse: collapse;
}

/* Tabela Responsiva - Garante que a tabela possa rolar em telas pequenas */
.specs-table-container {
    display: block;
    overflow-x: auto;
    white-space: nowrap;
}

.specs-table tr { border-bottom: 1px solid var(--border-color-dark); }
.specs-table th { 
    text-align: left; 
    padding: 15px 0; 
    color: var(--subtle-text);
    width: 30%; /* Mantido, mas pode ser ajustado em media query */
    font-weight: normal; 
    white-space: normal; 
}
.specs-table td { 
    text-align: right; 
    padding: 15px 0; 
    color: var(--light-text);
    font-weight: bold;
    white-space: normal; 
}

/* Responsividade */
@media (max-width: 768px) {
    .container-product {
        margin: 20px auto;
        padding: 0 10px; 
    }
    
    .product-wrapper { 
        grid-template-columns: 1fr; 
        padding: 20px 15px;
    }
    
    .product-title { font-size: 2rem; }
    
    .product-rating-summary {
        gap: 5px; 
    }
    
    .actions-row { 
        height: auto; 
        flex-direction: column; 
        gap: 10px; 
    }
    .qty-wrapper { width: 100%; }
    .btn-buy { width: 100%; height: 50px; }
    
    .product-details-tabs {
        margin-top: 30px;
        padding: 20px 15px;
    }

    .specs-table th {
        width: 40%;
    }
    .specs-table td {
        width: 60%;
    }
    
    .slider-btn.left-0 {
        padding-left: 10px;
    }

    .slider-btn.right-0 {
        padding-right: 10px;
    }
}

/* ========================================= */
/* --- 17. registro (register) --- */
/* ========================================= */


:root {
    --primary-color: #E0B86B; /* Dourado Principal */
    --primary-highlight: #ffdc99; /* Dourado para links destacados */
    --dark-color: #1a1a1a;
    --light-color: #f8f8f8;
    --text-color: #bbbbbb;
    --subtle-text: #888888; /* Variável para texto secundário */
    --accent-color: #a38b5d;
    --form-bg: #2a2a2a; /* Cor de fundo do container */
    --font-display: 'Cormorant Garamond', serif;
    --font-body: 'Poppins', sans-serif;
    --transition-speed: 0.3s ease-in-out;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-color);
    color: var(--text-color);
    margin: 0;
    /* Alteração: Removemos o display: flex e o alinhamento central */
    min-height: 100vh; 
    overflow-x: hidden;
    /* Alinhamento do conteúdo principal (content-container) será feito por margem */
}

/* Container Principal do Formulário */
.content-container {
    background-color: var(--form-bg);
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
    width: 100%;
    max-width: 450px;
    text-align: center;
    
    /* ALTERAÇÃO CHAVE: Centra horizontalmente o container e adiciona margem vertical */
    margin: 5vh auto; 
    /* 5vh = 5% da altura da viewport; auto = centrar horizontalmente */
}

.content-container h2 {
    font-family: var(--font-display);
    color: var(--primary-color);
    font-size: 2.2em;
    margin-bottom: 2rem;
    font-weight: 600;
}

/* Grupos de Formulário */
.form-group {
    margin-bottom: 1.5rem;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--light-color);
    font-weight: 500;
}

/* Campos de Input */
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="text"] {
    width: calc(100% - 20px);
    padding: 10px;
    border: 1px solid #444;
    border-radius: 5px;
    background-color: #333;
    color: var(--light-color);
    font-size: 1rem;
    transition: border-color var(--transition-speed);
}

.form-group input[type="email"]:focus,
.form-group input[type="password"]:focus,
.form-group input[type="text"]:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Botões de Ação */
.action-button {
    padding: 12px 25px;
    border: none;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed);
    width: 100%;
    display: inline-block;
    text-align: center;
}

.action-button.primary {
    background-color: var(--primary-color);
    color: var(--dark-color);
}

.action-button.primary:hover {
    background-color: var(--accent-color);
}

/* Mensagens de Erro e Sucesso */
.form-message {
    margin-bottom: 1.5rem;
    font-weight: 500;
    padding: 10px;
    border-radius: 5px;
    text-align: center;
}

.error-message {
    color: #ff6b6b;
    background-color: rgba(255, 107, 107, 0.1);
    border: 1px solid #ff6b6b;
}

.success-message {
    color: #6bff6b;
    background-color: rgba(107, 255, 107, 0.1);
    border: 1px solid #6bff6b;
}

/* Estilos de Links */
.content-container p a {
    color: var(--primary-highlight) !important;
    text-decoration: none;
    font-weight: 500;
    transition: color var(--transition-speed);
}
.content-container p a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline;
}


/* ========================================= */
/* --- 18. checkout (checkout) --- */
/* ========================================= */


.checkout-container {
    max-width: 1000px;
    margin: 50px auto;
    padding: 20px;
    background-color: var(--dark-color); /* Fundo escuro */
    border-radius: 12px;
}

.checkout-title {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 30px;
    font-size: 2.5rem;
    font-family: var(--font-display);
    border-bottom: 1px solid #333;
    padding-bottom: 15px;
}

.checkout-content {
    display: flex;
    gap: 30px;
}

.checkout-form-section, .checkout-summary-section {
    padding: 25px;
    border-radius: 10px;
    background-color: var(--form-bg); /* Fundo do formulário e resumo */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.checkout-form-section {
    flex: 2; /* Ocupa mais espaço para o formulário */
}

.checkout-summary-section {
    flex: 1; /* Ocupa menos espaço para o resumo */
    height: fit-content;
    border: 1px solid #444; /* Borda sutil */
}

.checkout-form-section h3, .checkout-summary-section h3 {
    color: var(--light-color);
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Agrupamento de Código Postal e Cidade (Flex) */
.zip-city-group {
    display: flex;
    gap: 15px;
    margin-bottom: 1.5rem;
}
.zip-city-group .zip-input,
.zip-city-group .city-input {
    flex: 1;
}

/* Estilo do Resumo */
.summary-items {
    margin-bottom: 15px;
    border-bottom: 1px dashed #444;
}
.summary-totals {
    border-top: 1px solid #444;
    padding-top: 15px;
    margin-top: 15px;
}
.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    font-size: 1em;
}

/* Estilos para o IVA e Envio */
.checkout-summary-row strong {
    color: var(--light-color);
    font-weight: 500;
}
.iva-row {
    color: var(--subtle-text);
}
.shipping-row {
    font-weight: bold;
}

/* Total Final */
.checkout-final-total {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    padding: 15px 0 0;
    text-align: right;
    border-top: 2px solid var(--accent-color);
    margin-top: 15px;
}
.checkout-final-total .text-highlight {
    color: var(--primary-highlight);
}

/* Cores de Envio Grátis/Pago */
.text-success { color: var(--color-success); }
.text-danger { color: var(--color-danger); }

/* Responsividade do Checkout */
@media (max-width: 992px) {
    .checkout-content {
        flex-direction: column;
    }
    .checkout-summary-section {
        order: -1; /* Move o resumo para o topo em mobile */
        margin-bottom: 20px;
    }
}
@media (max-width: 600px) {
    /* Estas classes vêm do estilo global, mas afetam o layout do checkout */
    .content-container, .checkout-container { 
        padding: 1.5rem;
    }
    .zip-city-group {
        flex-direction: column;
        gap: 0;
    }
}


/* ------------------------------------------- */
/* --- 19. confirmaçao (confirmaçao encomenda) --- */
/* ------------------------------------------- */

/* --- Container Principal (Garante o tema Dark para o conteúdo) --- */
.checkout-container {
    padding: var(--spacing-lg) var(--spacing-md);
    margin: 0 auto;
    max-width: 800px;
    color: var(--light-text);
}

.checkout-container a {
    color: var(--primary-highlight); /* Links em Ouro */
    text-decoration: none;
    transition: var(--transition-speed);
}
.checkout-container a:hover {
    color: var(--primary-color);
}

.checkout-container h1, 
.checkout-container h2, 
.checkout-container h3, 
.checkout-container h4 {
    color: var(--light-text);
    font-weight: 600;
}

/* --- Confirmação Box --- */
.confirmation-box {
    background-color: var(--dark-bg); /* Fundo do Card: #1e1e1e */
    padding: 40px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.checkout-title {
    color: var(--success-color) !important;
    font-size: 2.4em !important;
    border-bottom: 2px solid var(--success-color) !important;
    padding-bottom: 15px;
    font-weight: 300;
    margin-bottom: 30px; /* Adicionado para separar do texto */
}

/* --- Botão Principal --- */
.action-button {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 8px;
    font-weight: bold;
    text-transform: uppercase;
    transition: var(--transition-speed), transform 0.1s;
    text-align: center;
    border: none;
    cursor: pointer;
}

.primary {
    background-color: var(--primary-color); /* Bronze */
    color: var(--darker-bg); /* Texto escuro no botão de bronze */
    box-shadow: 0 4px 10px rgba(163, 127, 93, 0.4); /* Sombra do Bronze */
}
.primary:hover {
    background-color: var(--primary-highlight); /* Ouro no hover */
    color: var(--darker-bg);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(255, 215, 0, 0.6); /* Sombra do Ouro */
}

/* --- Detalhes de Entrega/Pagamento (Grid) --- */
.confirmation-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 30px;
}

.detail-box {
    background-color: #252525; /* Um pouco mais claro que o dark-bg para contraste */
    padding: 25px;
    border-radius: 10px;
    border-left: 6px solid var(--primary-highlight); /* Destaque em Ouro */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    transition: transform 0.2s;
}
.detail-box:hover {
    transform: translateY(-3px);
}

.detail-box h4 {
    color: var(--primary-highlight); /* Títulos da box em Ouro */
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.25em;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 10px;
}

.detail-box p {
    margin: 5px 0;
    font-size: 1em;
    color: var(--subtle-text);
}
.detail-box p strong {
    color: var(--light-text); /* Texto principal mais destacado */
}

/* --- Tabela de Produtos --- */
.products-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 0.95em;
}
.products-table th, .products-table td {
    padding: 15px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color); /* Alterado para var(--border-color) */
}
.products-table th {
    background-color: #222222; /* Ligeiramente mais escuro que o card */
    color: var(--subtle-text);
    text-transform: uppercase;
    font-weight: 700;
}
.products-table tbody tr:hover {
    background-color: #2a2a2a;
}

/* --- Totais --- */
.products-table tfoot td {
    border-top: 2px solid var(--border-color);
    font-weight: 500;
}

.total-label, .final-total-label {
    text-align: right;
    font-weight: bold;
}

.final-total-row {
    background-color: var(--primary-color); /* Bronze para a linha final */
    color: var(--darker-bg);
    font-weight: bold;
    font-size: 1.2em;
}
.final-total-row td {
    border-bottom: none;
}
.final-total-value {
    font-weight: 900;
    color: var(--darker-bg);
}

.discount-label, .discount-value {
    color: var(--success-color);
}
.iva-label {
    font-size: 0.9em;
    font-style: italic;
    color: var(--subtle-text);
}

/* ------------------------------------------- */
/* Estilos para Badges de Status */
/* ------------------------------------------- */

.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9em;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); 
}

/* Status: Confirmada (VERDE) */
.status-confirmada {
    background-color: var(--success-color); /* Usa o Verde padrão */
    color: var(--darker-bg);           /* Texto escuro no verde */
}

/* Status: Pendente (AMARELO) */
.status-pendente { 
    background-color: #ffc107; 
    color: var(--darker-bg); 
} 

/* Status: Processamento (BRONZE) */
.status-processamento { 
    background-color: var(--primary-color); 
    color: var(--darker-bg);
}

/* Status: Enviado (AZUL) */
.status-enviado { 
    background-color: #007bff; 
    color: var(--light-text);
}

/* Status: Entregue (VERDE ESCURO) */
.status-entregue { 
    background-color: #198754; 
    color: var(--light-text);
}

/* ------------------------------------------- */
/* --- RESPONSIVIDADE --------------------- */
/* ------------------------------------------- */
.desktop-only {
    display: table-cell !important;
}

@media (max-width: 768px) {
    .confirmation-details-grid {
        grid-template-columns: 1fr;
    }
    .confirmation-box {
        padding: 20px;
    }
    
    .desktop-only {
        display: none !important; 
    }
    .products-table th:first-child, .products-table td:first-child {
        width: 60%;
    }
    .products-table th:nth-child(2), .products-table td:nth-child(2) {
        width: 40%;
        text-align: right;
    }
    .total-label, .final-total-label {
        text-align: left;
    }
    .products-table tfoot tr {
        display: flex;
        justify-content: space-between;
        padding: 10px 0;
        border-bottom: 1px solid var(--border-color);
    }
    .products-table tfoot td {
        border-top: none;
        padding: 5px 0;
    }
    .products-table tfoot .total-label,
    .products-table tfoot .total-value {
        width: 50%;
        text-align: left;
    }
    .products-table tfoot .total-value {
        text-align: right;
    }
    .final-total-row {
        flex-direction: row;
    }
}


/* ------------------------------------------- */
/* --- 20. minhas_encomendas (Lista de Encomendas) --- */
/* ------------------------------------------- */

.orders-box {
    background-color: var(--dark-bg); 
    padding: 30px;
    border-radius: 12px;
    box-shadow: var(--shadow-medium);
}

.orders-title {
    color: var(--primary-highlight);
    font-size: 2em;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 15px;
    margin-bottom: 30px;
}

/* --- Tabela de Encomendas --- */
.orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 1em;
}

.orders-table thead th {
    background-color: #252525;
    color: var(--subtle-text);
    padding: 15px 12px;
    text-align: left;
    text-transform: uppercase;
    font-weight: 700;
}

.orders-table tbody td {
    padding: 18px 12px;
    border-bottom: 1px solid var(--border-color);
    color: var(--light-text);
}

.orders-table tbody tr:hover {
    background-color: #2a2a2a;
    cursor: pointer;
}

.order-id {
    color: var(--primary-highlight);
    font-weight: 700;
}

.order-total {
    font-weight: 700;
    color: var(--primary-color);
}

.details-link {
    display: inline-flex;
    align-items: center;
    color: var(--primary-highlight);
    font-weight: 600;
    transition: var(--transition-speed);
}
.details-link:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

/* --- Empty State --- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--subtle-text);
}
.empty-state i {
    font-size: 4em;
    color: var(--primary-color);
    margin-bottom: 20px;
}
.empty-state p {
    font-size: 1.2em;
    margin-bottom: 30px;
}


/* ------------------------------------------- */
/* --- RESPONSIVIDADE (Tabela) --------------------- */
/* ------------------------------------------- */
@media (max-width: 768px) {
    .orders-box {
        padding: 20px;
    }
    .orders-table thead {
        /* Ocultar cabeçalho da tabela no telemóvel */
        display: none; 
    }
    .orders-table, .orders-table tbody, .orders-table tr, .orders-table td {
        display: block;
        width: 100%;
    }
    .orders-table tr {
        margin-bottom: 15px;
        border: 1px solid var(--border-color);
        border-radius: 8px;
        background-color: #252525;
        padding: 10px;
    }
    .orders-table td {
        /* Mostrar rótulo antes do valor */
        text-align: right;
        padding-left: 50%;
        position: relative;
        border-bottom: 1px dashed #333;
    }
    .orders-table td::before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        text-align: left;
        font-weight: bold;
        color: var(--subtle-text);
    }
    .orders-table td:last-child {
        border-bottom: 0;
    }
    .desktop-only {
        /* Ocultar a coluna de estado no telemóvel, se estiver muito apertado */
        display: none;
    }
    /* Estilo específico para o total no telemóvel */
    .orders-table .order-total {
        font-size: 1.1em;
    }
}


/* ------------------------------------------- */
/* --- 21. lista de desejo (Lista de desejo) --- */
/* ------------------------------------------- */

/* Estilo para o estado vazio da lista (usado em minha_lista_desejos.php) */
.empty-state {
    /* CORREÇÃO DE ALINHAMENTO: */
    grid-column: 1 / -1; /* Força o container a ocupar toda a largura da grid */
    display: flex;       /* Ativa Flexbox */
    flex-direction: column; /* Organiza os itens em coluna (um em cima do outro) */
    align-items: center;    /* Centraliza horizontalmente */
    justify-content: center; /* Centraliza verticalmente */
    
    text-align: center;
    padding: 80px 20px; /* Aumentei um pouco o padding para dar mais "ar" */
    color: var(--subtle-text);
    width: 100%;
}

.empty-state i {
    font-size: 5em; /* Ícone um pouco maior para destaque */
    color: var(--primary-color);
    margin-bottom: 25px;
    opacity: 0.8;
}

.empty-state p {
    font-size: 1.4rem;
    margin-bottom: 35px;
    font-family: 'Playfair Display', serif; /* Fonte mais elegante para a mensagem */
    color: var(--light-text);
}

/* Container de ações dos produtos (Carrinho + Wishlist) */
.product-actions-container {
    display: flex;
    gap: 10px; 
    align-items: center;
    margin-top: 15px;
}

/* Form do Carrinho (para layout flexível) */
.add-to-cart-form {
    flex-grow: 1; 
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Botão de Lista de Desejos (Coração) */
.btn-wishlist {
    background-color: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: 10px 12px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.2em;
    transition: var(--transition-speed);
    line-height: 1; 
    height: 44px; /* Garante que tem a mesma altura do botão de carrinho */
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-wishlist:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

/* Estado de ativo (no wishlist) - Coração preenchido */
.btn-wishlist.active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

/* Estilo para o título da página da lista de desejos */
.wishlist-page-container .section-title {
    color: var(--primary-color);
    text-align: center; /* Garante que o título também fica no meio */
    margin-bottom: 40px;
}

/* ------------------------------------------- */
/* --- RESPONSIVIDADE (Ajustes para mobile) -- */
/* ------------------------------------------- */
@media (max-width: 768px) {
    
    /* Mudar o layout de ações para coluna no telemóvel */
    .product-actions-container {
        flex-direction: column;
        gap: 15px;
    }
    .add-to-cart-form {
        width: 100%;
        flex-direction: row; 
        justify-content: space-between;
    }
    .btn-add-to-cart {
        flex-grow: 1;
    }
    
    /* Fazer com que o botão de wishlist ocupe a largura total se estiver sozinho (na página de produtos) */
    .btn-wishlist {
        align-self: flex-start;
        width: 100%; 
    }
}


/* ========================================= */
/* --- 22. ESTILOS DA NEWSLETTER (AJUSTADOS) --- */
/* ========================================= */

.newsletter-section {
    padding: 40px 0;
    background-color: var(--color-dark-2, #1a1a1a);
    color: #fff;
}

.newsletter-signup {
    background-color: #222; 
    padding: 30px;
    border-radius: 8px;
    margin-top: 30px;
    text-align: center;
}

.newsletter-signup h2.section-title {
    color: var(--primary-highlight, #A37F5D); 
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.newsletter-description {
    color: var(--light-text, #ccc);
    margin-bottom: 20px;
}

.newsletter-form {
    display: flex;
    max-width: 450px;
    margin: 15px auto 0;
    /* Retiramos o gap e usamos overflow/border-radius para um look mais coeso */
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    border-radius: 8px;
    overflow: hidden; /* CRÍTICO: Mantém os inputs/botão dentro da borda arredondada */
}

.newsletter-form input[type="email"] {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #666;
    border-radius: 0; /* Remove o arredondamento para se alinhar com o botão */
    background-color: #444;
    color: white;
    font-size: 1rem;
    box-sizing: border-box;
    border-right: none; /* Remove a borda direita para se fundir com o botão */
}

.newsletter-form input[type="email"]:focus {
    border-color: var(--primary-highlight);
    box-shadow: 0 0 0 3px rgba(255,193,7,0.3);
    outline: none;
}

.btn-subscribe {
    background-color: var(--primary-color, #ffc107);
    color: #1a1a1a;
    padding: 12px 20px;
    border: none;
    border-radius: 0; 
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    text-transform: uppercase;
    transition: background-color 0.3s ease, transform 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-subscribe:hover {
    background-color: var(--primary-highlight, #c99c58); 
    transform: translateY(-1px);
}

/* ESTILO PARA O BOTÃO QUANDO JÁ ESTÁ SUBSCRITO (VERDE) */
.btn-subscribed {
    /* Cor de sucesso/verde para indicar subscrição ativa */
    background-color: var(--success-color, #28a745) !important; 
    color: white !important;
    cursor: default !important;
    pointer-events: none; /* Desativa eventos de clique */
    transition: none;
    font-size: 1rem;
}

.btn-subscribed:hover {
    transform: none;
    background-color: var(--success-color, #28a745) !important;
}

/* Opcional: Estilo para o input do email no estado 'Subscrito' */
.newsletter-form.already-subscribed .newsletter-input {
    border-color: var(--success-color, #28a745); 
    border-right: none;
}

/* Estilos de Mensagem (Mantidos) */
.newsletter-feedback {
    max-width: 450px;
    margin: 20px auto; 
    font-weight: bold;
}
.newsletter-signup .message {
    padding: 15px;
    border-radius: 8px;
    text-align: left;
}
.newsletter-signup .message.success {
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}
.newsletter-signup .message.error {
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
}
/* Fim dos Estilos da Newsletter */

/* O CÓDIGO DO LOGIN PROMPT FOI REMOVIDO DO PHP, PORTANTO ESTAS REGRAS CSS JÁ NÃO SÃO NECESSÁRIAS */
/* .newsletter-login-prompt, .login-prompt-text NÃO SÃO MAIS USADAS */

/* ========================================= */
/* --- MELHORIA VISUAL DO INPUT DESATIVADO --- */
/* ========================================= */

.newsletter-form input[type="email"][disabled] {
    /* MUDAR A COR DE FUNDO para algo mais neutro ou transparente */
    background-color: transparent !important; /* Torna o fundo do input transparente */
    border: none !important; /* Remove a borda para não parecer um bloco */
    box-shadow: none !important; /* Remove qualquer sombra forte */
    
    /* Ajusta a cor do texto para ser mais subtil (como um placeholder) */
    color: var(--light-text, #ccc) !important; 
    
    /* Garante que o texto está bem alinhado (ajuste opcional) */
    text-align: left;
    
    /* Remove a opacidade extra se for aplicada noutra regra */
    opacity: 1; 
    
    /* Mantém o padding do campo (12px 15px) para dar espaço ao texto */
    padding: 12px 15px; 
    
    cursor: default;
}

/* Garante que o input desativado (com o placeholder) ocupa o seu espaço correto */
.newsletter-form.already-subscribed input[type="email"][disabled] {
    /* Quando já está subscrito (botão verde) */
    background-color: #444 !important; /* Pode manter um fundo escuro aqui */
    border-color: var(--success-color, #28a745) !important;
}


/* ======================================================= */
/* === CORREÇÕES "MOBILE FIRST" E UX (Adicione no Final) === */
/* ======================================================= */

/* --- 1. MELHORIA DA PESQUISA NO MOBILE (Expansível) --- */
@media (max-width: 992px) {
    .header-content-wrapper {
        position: relative;
    }

    /* Esconder o input por padrão no mobile */
    .search-box {
        position: static; /* Para permitir que o input fique full width se necessário */
    }

    .search-box input#search-input {
        display: none; /* Escondido inicialmente */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        z-index: 1000;
        border-radius: 0;
        border: none;
        border-bottom: 2px solid var(--primary-color);
        background-color: var(--dark-bg);
        padding: 15px;
        box-shadow: 0 5px 10px rgba(0,0,0,0.5);
    }

    /* Classe que o JS vai adicionar para mostrar */
    .search-box.active input#search-input {
        display: block;
        animation: slideDown 0.3s ease;
    }

    /* Ícone de lupa/bússola que serve de gatilho */
    .mobile-search-trigger {
        display: flex !important; /* Força aparecer */
        align-items: center;
        justify-content: center;
        font-size: 1.2rem;
        color: var(--light-text);
        cursor: pointer;
        padding: 10px;
    }
}

/* Ocultar o gatilho no Desktop */
@media (min-width: 993px) {
    .mobile-search-trigger {
        display: none !important;
    }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- 2. FILTRO DE PRODUTOS (GAVETA / OFF-CANVAS) --- */
/* Botão de abrir filtro (Só visível no mobile) */
.mobile-filter-toggle-btn {
    display: none;
    width: 100%;
    padding: 15px;
    background-color: var(--dark-bg);
    color: var(--primary-highlight);
    border: 1px solid var(--primary-color);
    text-align: center;
    font-weight: bold;
    margin-bottom: 20px;
    cursor: pointer;
    border-radius: 8px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-transform: uppercase;
    font-family: 'Montserrat', sans-serif;
}

@media (max-width: 992px) {
    .mobile-filter-toggle-btn {
        display: flex;
    }

    .sidebar-filters {
        position: fixed;
        top: 0;
        left: -100%; /* Escondido à esquerda fora da tela */
        width: 85%;
        max-width: 320px;
        height: 100vh;
        z-index: 2000;
        overflow-y: auto;
        transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        border-radius: 0;
        border-right: 2px solid var(--primary-color);
        margin: 0;
        box-shadow: 10px 0 30px rgba(0,0,0,0.8);
    }

    .sidebar-filters.active {
        left: 0; /* Entra na tela */
    }

    /* Botão de fechar dentro do filtro */
    .close-filter-btn {
        display: block !important;
        position: absolute;
        top: 15px;
        right: 15px;
        font-size: 1.5rem;
        color: var(--error-color);
        cursor: pointer;
        background: none;
        border: none;
    }

    /* Overlay escuro quando o filtro abre */
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.7);
        z-index: 1999;
        display: none;
        backdrop-filter: blur(3px);
    }
    .filter-overlay.active {
        display: block;
    }
}

/* --- 3. CARRINHO EM ESTILO "CARTÃO" (Responsive Table) --- */
@media (max-width: 768px) {
    .cart-table thead {
        display: none; /* Esconde o cabeçalho da tabela */
    }

    .cart-table, .cart-table tbody, .cart-table tr, .cart-table td {
        display: block;
        width: 100%;
    }

    .cart-table tr {
        margin-bottom: 20px;
        background-color: var(--dark-bg);
        border: 1px solid var(--border-color);
        border-radius: 10px;
        padding: 15px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        position: relative;
    }

    .cart-table td {
        text-align: right; /* Alinha o conteúdo à direita */
        padding: 10px 0;
        border-bottom: 1px solid #333;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .cart-table td:last-child {
        border-bottom: none;
        justify-content: flex-end;
    }

    /* Cria os rótulos (Labels) usando o atributo data-label */
    .cart-table td::before {
        content: attr(data-label);
        font-weight: bold;
        text-transform: uppercase;
        color: var(--primary-highlight);
        font-size: 0.8rem;
        float: left;
    }

    /* Ajuste específico para a imagem e nome */
    .cart-table td:first-child {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        text-align: left;
    }
    
    .cart-item-image {
        width: 80px;
        height: 80px;
    }
    
    /* Botões de ação do carrinho empilhados */
    .cart-actions {
        flex-direction: column;
        gap: 10px;
    }
    .btn-checkout, .btn-back-to-shop, .btn-clear-cart {
        width: 100%;
        text-align: center;
    }
}

/* --- 4. AJUSTES FINAIS DE HEADER E FOOTER --- */
@media (max-width: 768px) {
    /* Header Utility Icons */
    .utility-nav {
        gap: 15px;
    }
    .utility-link span {
        display: none; /* Esconde texto "Login", "Carrinho" no mobile, deixa só ícone */
    }
    .utility-link i {
        font-size: 1.4rem;
        color: var(--primary-highlight);
    }
    
    /* Footer Centralizado */
    .footer-content-wrapper {
        text-align: center;
        gap: 40px;
    }
    .footer-section p {
        justify-content: center; /* Centraliza ícones de contato */
    }
    .social-icons {
        justify-content: center;
    }
    .footer-section h3 {
        display: inline-block; /* Para o sublinhado ficar bonito */
    }
}


/* ========================================= */
/* --- 1. CORREÇÕES GERAIS DE LAYOUT --- */
/* ========================================= */

/* Garante que o corpo da página não tem largura excessiva (CORREÇÃO OVERFLOW GERAL) */
body {
    overflow-x: hidden; 
}

/* Opcional: Estilo básico para as mensagens de feedback */
.message {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    font-weight: bold;
}
.message.success {
    background-color: #e6ffe6;
    color: var(--success-color, #4CAF50);
    border: 1px solid var(--success-color, #4CAF50);
}
.message.error {
    background-color: #ffe6e6;
    color: var(--error-color, #F44336);
    border: 1px solid var(--error-color, #F44336);
}

/* ========================================= */
/* --- 2. ESTILOS PARA PRODUTOS.PHP (GRELHA E FILTRO) --- */
/* ========================================= */

.products-page-container {
    display: flex;
    flex-direction: row; 
    gap: 30px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

/* 2.1. Oculta o botão de alternância em TODAS as resoluções por padrão (CORREÇÃO PC) */
.btn-toggle-filters {
    display: none !important; /* Força o ocultamento em desktop */
    padding: 12px 15px;
    background-color: var(--primary-color, #A37F5D); 
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 20px;
    transition: background-color 0.3s;
}

.btn-toggle-filters i {
    margin-right: 8px;
}

/* 2.2. Estilos para o Filtro em Desktop (Sidebar) */
.sidebar-filters {
    flex-shrink: 0;
    width: 250px; 
    padding: 15px;
    background-color: #1C1C1C;
    border-radius: 8px;
    /* Padrão para Desktop: Visível e Estático */
    position: static; 
    transform: none; 
    box-shadow: none;
    transition: none; /* Desativa a transição em desktop */
}

.products-content {
    flex-grow: 1;
}

/* ========================================= */
/* --- 3. CORREÇÕES PARA PRODUTO_DETALHE.PHP (ABAS) --- */
/* ========================================= */

.product-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Correção para o conteúdo das Abas (Descrição, Especificações, Avaliações) */
.tab-content-area {
    max-width: 100%; 
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    box-sizing: border-box; 
}

/* Correção Crítica para texto/elementos longos (Evita OVERFLOW-X) */
.tab-content-area p, 
.tab-content-area ul, 
.tab-content-area ol, 
.tab-content-area table,
.tab-content-area div {
    max-width: 100%; 
    box-sizing: border-box;
    /* ESSENCIAL: Garante que palavras muito longas quebram */
    word-wrap: break-word; 
    overflow-wrap: break-word;
}

/* Imagens dentro do conteúdo (Garante que não excedem a largura) */
.tab-content-area img {
    max-width: 100%; 
    height: auto;
    display: block;
    border-radius: 4px;
}

/* Tabelas (Adiciona scroll horizontal se a tabela for muito larga em mobile) */
.tab-content-area table {
    width: 100%; 
    display: block; 
    overflow-x: auto; 
    word-break: break-all;
}


/* ========================================= */
/* --- 4. MEDIA QUERY PARA DISPOSITIVOS MÓVEIS (RESPONSIVO) --- */
/* ========================================= */

@media (max-width: 850px) {
    
    .products-page-container {
        flex-direction: column; 
        padding: 10px;
    }

    /* O botão de alternância é tornado visível SOMENTE em mobile */
    .btn-toggle-filters {
        display: block !important; 
        width: 100%;
    }

    /* O filtro (sidebar) é escondido por padrão em mobile (efeito gaveta) */
    .sidebar-filters {
        position: fixed; 
        top: 0;
        left: 0;
        width: 80%; 
        height: 100%;
        background-color: #ffffff; 
        z-index: 1000; 
        transform: translateX(-100%); /* Esconde fora do ecrã */
        transition: transform 0.3s ease-in-out;
        overflow-y: auto; 
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3);
    }

    /* Quando a classe 'active' é adicionada pelo JS, o filtro aparece */
    .sidebar-filters.active {
        transform: translateX(0);
    }
    
    .products-content {
        width: 100%;
    }
    
    /* Overlay para fechar ao clicar fora (cobre a parte restante do ecrã) */
    .filter-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999; /* Abaixo do filtro (1000) */
        display: none;
        cursor: pointer; /* Indica que é clicável */
    }
    
    .filter-overlay.active {
        display: block;
    }
}


