/* --- GLOBAIS E VARIÁVEIS --- */
:root {
    --cor-primaria: #1a1a1a; /* Preto/Cinza bem escuro */
    --cor-secundaria: #ffffff; /* Branco */
    --cor-destaque: #e63946;  /* Vermelho para promoções */
    --cor-texto: #333;
    --cor-cinza-claro: #f4f4f4;
    --header-height: 120px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: var(--cor-texto);
    background-color: var(--cor-secundaria);
}

img {
    max-width: 100%;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

.cta-button, .btn-comprar {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--cor-primaria);
    color: var(--cor-secundaria);
    font-weight: bold;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.cta-button:hover, .btn-comprar:hover {
    background-color: #555;
}

/* --- 1. CABEÇALHO --- */
header {
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    background-color: var(--cor-secundaria);
    z-index: 1000;
    height: var(--header-height);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
}

.logo a {
    font-size: 2rem;
    font-weight: bold;
    letter-spacing: -1px;
    color: var(--cor-primaria);
}

.search-bar {
    display: flex;
    width: 40%;
}

.search-bar input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-right: none;
    border-radius: 4px 0 0 4px;
    outline: none;
}

.search-bar button {
    padding: 0.75rem 1rem;
    border: none;
    background-color: var(--cor-primaria);
    color: var(--cor-secundaria);
    cursor: pointer;
    border-radius: 0 4px 4px 0;
}

.header-icons {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.cart-icon {
    font-size: 1.5rem;
    position: relative;
}

.cart-count {
    position: absolute;
    top: -8px;
    right: -10px;
    background-color: var(--cor-destaque);
    color: var(--cor-secundaria);
    font-size: 0.75rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mobile-menu-toggle {
    display: none; /* Só aparece em telas pequenas */
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* Menu de Navegação */
.main-nav {
    background-color: var(--cor-primaria);
    color: var(--cor-secundaria);
}

.nav-container {
    display: flex;
    align-items: center;
    padding: 0 5%;
    gap: 2rem;
}

.main-nav a {
    padding: 1rem 0;
    font-weight: bold;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #aaa;
}

.main-nav a.nav-sale {
    color: var(--cor-destaque);
}

/* Menu Categoria (Dropdown) */
.category-menu {
    position: relative;
}

.category-toggle {
    background-color: #333; /* Um pouco mais claro que o fundo */
    color: var(--cor-secundaria);
    padding: 1rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.category-dropdown {
    display: none; /* Escondido por padrão */
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--cor-secundaria);
    color: var(--cor-primaria);
    border: 1px solid #ddd;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 250px;
    z-index: 1001;
}

.category-dropdown a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--cor-primaria);
}

.category-dropdown a:hover {
    background-color: var(--cor-cinza-claro);
    color: var(--cor-primaria);
}

/* Mostra o dropdown ao passar o mouse */
.category-menu:hover .category-dropdown {
    display: block;
}

/* --- 2. HERO VÍDEO (Página Inicial) --- */
.hero-slideshow {
    height: calc(100vh - var(--header-height)); /* Ocupa o resto da tela APÓS o cabeçalho */
    position: relative; 
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--cor-secundaria);
    overflow: hidden; 
}

/* O vídeo que cobre todo o fundo (versão mais limpa e eficaz) */
.hero-video {
    position: absolute;
    top: 0; /* Alinha o vídeo ao topo da seção */
    left: 0; /* Alinha o vídeo à esquerda da seção */
    width: 100%;
    height: 100%;
    object-fit: cover; /* Garante que o vídeo preencha e "corte" se necessário */
    z-index: 1; 
}

/* * Sobreposição escura para legibilidade do texto.
 * Isso substitui o 'linear-gradient' que estava na animação.
*/
.hero-slideshow::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5); /* Ajuste a opacidade (0.5 = 50% escuro) */
    z-index: 2; /* Fica entre o vídeo e o texto */
}

/* Conteúdo de texto */
.hero-content {
    /* Removemos o 'background' pois agora ele está no '::before' */
    padding: 2rem 3rem;
    border-radius: 5px;
    position: relative; /* Garante que o z-index funcione */
    z-index: 3; /* Garante que fique na frente de tudo */
}

/* Não precisamos mais do @keyframes slideShow */

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}

.hero-content p {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
}

/* --- 3. CORPO - CARROSSÉIS (Página Inicial) --- */
.product-carousel {
    padding: 3rem 5%;
}

.product-carousel h2 {
    font-size: 2rem;
    margin-bottom: 1.5rem;
}

.carousel-container {
    display: flex;
    overflow-x: auto; /* Habilita o scroll horizontal */
    gap: 1.5rem;
    padding-bottom: 1rem; /* Espaço para a barra de scroll */
    
    /* Esconde a barra de scroll (mas mantém funcional) */
    -ms-overflow-style: none;  /* IE e Edge */
    scrollbar-width: none;  /* Firefox */
}
.carousel-container::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.product-card {
    flex: 0 0 280px; /* Não encolhe, não estica, base de 280px */
    border: 1px solid #eee;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.product-card img {
    width: 100%;
    height: 350px;
    object-fit: cover;
}

.product-card h3 {
    font-size: 1.1rem;
    margin-top: 1rem;
    padding: 0 1rem;
}

.product-card .price {
    font-size: 1.2rem;
    font-weight: bold;
    padding: 0.5rem 1rem;
}

.product-card .btn-comprar {
    display: block;
    margin: 1rem;
    text-align: center;
}

.product-card.on-sale .price {
    color: var(--cor-destaque);
}

.product-card .old-price {
    font-size: 0.9rem;
    text-decoration: line-through;
    color: #999;
    margin-right: 0.5rem;
}

/* --- 4. RODAPÉ (Usado em todas as páginas) --- */
footer {
    background-color: var(--cor-primaria);
    color: var(--cor-cinza-claro);
    padding-top: 3rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap; /* Para telas menores */
    padding: 0 5%;
    gap: 2rem;
}

.footer-section {
    flex: 1;
    min-width: 250px;
}

.footer-section h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--cor-secundaria);
}

.footer-section p {
    line-height: 1.8;
}

.newsletter-form {
    display: flex;
    margin-top: 1rem;
}

.newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: none;
    border-radius: 4px 0 0 4px;
}

.newsletter-form button {
    padding: 0.75rem 1rem;
    border: none;
    background-color: var(--cor-destaque);
    color: var(--cor-secundaria);
    cursor: pointer;
    font-weight: bold;
    border-radius: 0 4px 4px 0;
}

.social-icons a {
    font-size: 1.5rem;
    margin-right: 1rem;
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--cor-destaque);
}

.footer-bottom {
    text-align: center;
    padding: 1.5rem 5%;
    margin-top: 2rem;
    border-top: 1px solid #444;
    font-size: 0.9rem;
}

/* ---
   INÍCIO DOS ESTILOS DA PÁGINA DE PRODUTO (PDP)
--- */

.pdp-main-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 5%;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    margin-bottom: 2rem;
    color: #666;
}

.breadcrumbs a {
    color: var(--cor-texto);
}
.breadcrumbs a:hover {
    text-decoration: underline;
}
.breadcrumbs .fa-chevron-right {
    font-size: 0.7rem;
    margin: 0 0.5rem;
}

/* Layout Principal do Produto */
.product-details-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 3rem;
}

/* Coluna da Esquerda: Galeria */
.product-gallery {
    display: flex;
    flex-direction: column;
}

.main-image-container {
    border: 1px solid var(--cor-cinza-claro);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 1rem;
}

.main-image-container img {
    width: 100%;
    height: auto;
}

.thumbnail-container {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-start;
}

.thumbnail {
    width: 80px;
    height: 106px;
    object-fit: cover;
    border: 2px solid var(--cor-cinza-claro);
    border-radius: 4px;
    cursor: pointer;
    transition: border-color 0.3s ease, opacity 0.3s ease;
    opacity: 0.7;
}

.thumbnail:hover {
    opacity: 1;
}

.thumbnail.active {
    border-color: var(--cor-primaria);
    opacity: 1;
}

/* Coluna da Direita: Informações */
.product-info {
    display: flex;
    flex-direction: column;
}

.product-title {
    font-size: 2.25rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.product-price {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.product-price .current-price {
    font-size: 2rem;
    font-weight: bold;
    color: var(--cor-primaria);
}

.product-price .old-price {
    font-size: 1.25rem;
    color: #999;
    text-decoration: line-through;
    margin-left: 0.75rem;
}

.product-price .discount-badge {
    font-size: 0.9rem;
    font-weight: bold;
    background-color: var(--cor-destaque);
    color: var(--cor-secundaria);
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 0.75rem;
}

.installments {
    color: #555;
    margin-bottom: 1.5rem;
}

/* Opções de Variantes */
.product-options {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.option-group label {
    font-weight: bold;
    font-size: 1rem;
}

.option-group #size-select {
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-width: 250px;
}

.size-guide-link {
    font-size: 0.9rem;
    color: var(--cor-primaria);
    text-decoration: underline;
}

.color-swatches {
    display: flex;
    gap: 0.5rem;
}

.color-swatch {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--cor-cinza-claro);
    cursor: pointer;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.color-swatch:hover {
    transform: scale(1.1);
}

.color-swatch.active {
    border-color: var(--cor-primaria);
    box-shadow: 0 0 0 2px var(--cor-secundaria), 0 0 0 4px var(--cor-primaria);
}

/* Ações de Compra */
.product-actions {
    margin-top: 1rem;
    display: grid;
    gap: 1rem;
}

.quantity-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.quantity-selector label {
    font-weight: bold;
}

.quantity-selector input {
    width: 60px;
    padding: 0.5rem;
    text-align: center;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.btn-add-to-cart, .btn-buy-now {
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-add-to-cart {
    background-color: var(--cor-primaria);
    color: var(--cor-secundaria);
    border: 2px solid var(--cor-primaria);
}

.btn-add-to-cart:hover {
    background-color: #333;
}

.btn-buy-now {
    background-color: var(--cor-secundaria);
    color: var(--cor-primaria);
    border: 2px solid var(--cor-primaria);
}

.btn-buy-now:hover {
    background-color: var(--cor-cinza-claro);
}

/* Calculadora de Frete */
.shipping-calculator {
    margin-top: 2rem;
}
.shipping-calculator label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}
.shipping-input {
    display: flex;
}
.shipping-input input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 4px 0 0 4px;
}
.shipping-input button {
    padding: 0.75rem 1rem;
    border: none;
    background: #666;
    color: var(--cor-secundaria);
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

/* Descrição Completa */
.product-full-description {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}
.product-full-description h2 {
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}
.description-content {
    font-size: 1rem;
    line-height: 1.8;
    max-width: 800px;
}
.description-content ul {
    margin-top: 1rem;
    margin-left: 1.5rem;
}

/* --- RESPONSIVIDADE (Usado em todas as páginas) --- */
@media (max-width: 900px) {
    .search-bar {
        display: none;
    }
    .main-nav .nav-container {
        display: none;
    }
    .mobile-menu-toggle {
        display: block;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .newsletter-form {
        justify-content: center;
    }
    
    /* Responsividade específica da PDP */
    .product-details-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .product-gallery {
        flex-direction: column-reverse;
    }

    .thumbnail-container {
        justify-content: center;
    }

    .product-title {
        font-size: 1.75rem;
    }
}

/* ---
   ESTILOS DA PÁGINA DE CATEGORIA (categoria.html)
   (Adicionar ao final de ljroupa.css)
--- */

.category-main-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 2rem 5%;
}

.category-main-container h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--cor-cinza-claro);
    padding-bottom: 1rem;
}

/*
 * Esta é a principal diferença da Home:
 * Em vez de um 'flex' (carrossel), usamos 'grid' 
 * para que os produtos quebrem a linha automaticamente.
*/
.product-grid {
    display: grid;
    /* * Cria colunas automáticas:
     * - Tenta criar colunas de no mínimo 280px (o tamanho do seu card).
     * - '1fr' diz para ele esticar e ocupar o espaço que sobrar.
     * - Isso cuida da responsividade da grade "de graça".
    */
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem; /* Espaço entre os cards */
}

/* * O .product-card já está estilizado!
 * Como o 'flex: 0 0 280px' dele é ignorado dentro de um 'grid',
 * não precisamos mudar nada. Ele se adapta perfeitamente.
*/