/* ============================================================== */
/* --- ARQUIVO: home.css (ESTILOS ESPECÍFICOS DA PÁGINA) --- */
/* ============================================================== */

/* --- VARIÁVEIS DE COR --- */
:root {
    /* Mantidas para os estilos de conteúdo */
    --primary-color: #0097B2; 
    --discount-color: #E74C3C; 
    --dark-color: #01697C; 
    --text-color: #333;
    --light-gray: #f9f9f9;
    --white: #ffffff;
} 

/* --- ESTILOS BÁSICOS GLOBAIS --- */
html {
    overflow-x: hidden; 
}

body {
    font-family: 'Arial', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0; 
    color: var(--text-color);
    background-color: var(--white);
    position: relative; 
}

.container {
    width: 90%; 
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px; 
}

h1, h2, h3 {
    color: var(--dark-color);
    margin-top: 0;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s;
}

a:hover {
    color: var(--dark-color);
}

/* --- FIX: CORREÇÃO PARA TÍTULOS ANCORADOS (EVITA CORTAR O TOPO) --- */
h2[id], section[id] {
    scroll-margin-top: 80px; 
}

/* --- CABEÇALHO E LOGO --- */
.logo-area {
    text-align: center;
    position: relative; 
    margin-top: 20px; 
    margin-bottom: 20px;
}

.logo {
    width: 90px; 
    height: 90px;
    border-radius: 50px;
    object-fit: cover;
    margin-bottom: 10px;
}

.logo-area h1 {
    font-size: 1.8em;
    margin: 0;
    color: var(--dark-color);
}

.subtitle {
    font-size: 0.9em;
    color: #777;
    margin: 5px 0 15px;
}

.social-icons-header a {
    color: var(--primary-color);
    font-size: 1.2em;
    margin: 0 5px;
}

/* --- CAPA E HERO TEXT --- */
.full-width-cover {
    background-image: url('./images/logo_capa.png'); 
    background-size: cover;
    background-position: center;
    height: 250px; 
    width: 100%; 
    
    /* COMPENSAÇÃO CRÍTICA DO MENU FIXO (60px) */
    margin-top: 60px; 
    
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    position: relative;
    margin-bottom: 0px;
}

.hero-text {
    position: relative;
    z-index: 10;
}

.hero-text h2 {
    font-size: 2.0em;
    margin-bottom: 0px;
    margin-top: 15px;
    color: var(--white);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.hero-text p {
    font-size: 1.2em;
    color: #ddd;
}

/* --- SEÇÃO DE PRODUTOS --- */
.products {
    padding: 40px 0;
}

.products h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
}

.product-grid {
    display: grid;
    gap: 30px;
}

.two-items {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); 
}

.three-items {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.product-item {
    display: block;
    background-color: var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: center;
    color: var(--text-color);
    padding-bottom: 0px; 
}

.product-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.product-item img {
    width: 100%;
    height: 150px; 
    object-fit: cover;
    margin-bottom: 10px; 
}

.product-item h3 {
    font-size: 1.2em;
    margin: 0 10px 10px;
    color: var(--primary-color);
}

.destaque-compacto .content-compacto {
    padding: 0px 0px;
    padding-bottom: 25px; 
}

/* --- SEÇÃO DE CONTATO --- */
.contact {
    padding: 60px 0;
    text-align: center;
    position: relative;
}

/* --- ESTILOS DE BOTÃO (CTA) --- */
.cta-button {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--white);
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: bold;
    text-transform: uppercase;
    transition: background-color 0.3s, transform 0.3s;
    border: none;
    cursor: pointer;
    font-size: 1em;
}

.cta-button:hover {
    background-color: var(--dark-color);
    transform: translateY(-2px);
    color: var(--white);
}

/* ------------------------------------------------------------------ */
/* --- ESTILOS DO CARROSSEL DE IMAGENS --- */
/* ------------------------------------------------------------------ */

.product-gallery-container {
    grid-area: gallery; 
    max-width: 100%; 
    margin: auto;
}

.slideshow-container {
    max-width: 100%;
    position: relative;
    margin: auto;
}

.mySlides {
    display: none;
}

.mySlides img {
    width: 100%; 
    max-height: 500px; 
    object-fit: cover; 
    border-radius: 10px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    vertical-align: middle; 
}

.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px; 
    color: white;
    font-weight: bold;
    font-size: 18px;
    transition: 0.6s ease;
    user-select: none;
    background-color: rgba(0,0,0,0.4);
    border: none; 
}

.prev {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.next {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev:hover, .next:hover {
    background-color: rgba(0,0,0,0.8);
}

.dot {
    cursor: pointer;
    height: 12px;
    width: 12px;
    margin: 0 3px;
    background-color: #bbb;
    border-radius: 50%;
    display: inline-block;
    transition: background-color 0.6s ease;
}

.active, .dot:hover {
    background-color: var(--primary-color); 
}

.fade {
    animation-name: fade;
    animation-duration: 1.5s;
}

@keyframes fade {
    from {opacity: .4} 
    to {opacity: 1}
}


/* ------------------------------------------------------------------ */
/* --- MEDIA QUERIES (RESPONSIVIDADE DA HOME) --- */
/* ------------------------------------------------------------------ */
@media (max-width: 768px) {
    
    /* COMPENSAÇÕES DO LAYOUT MOBILE */
    body {
        padding-top: 0; 
    }
    
    /* APLICAÇÃO CRÍTICA: Zera o padding horizontal do container para liberar largura total */
    .container {
        padding: 0; 
        /*width: 100%; */
    }
    
    /* CABEÇALHO/LOGO */
    .logo-area {
        display: flex; 
        flex-direction: column;
        align-items: center; 
        margin-top: 80px; 
        position: static; 
        margin-bottom: 15px; 
    }
    .logo {
        width: 60px; 
        height: 60px;
        margin-bottom: 5px; 
    }
    .logo-area h1 {
        font-size: 1.4em; 
    }
    .subtitle {
        margin: 0 0 5px; 
    }
    .full-width-cover {
        height: 250px; 
        margin-top: 60px; 
        padding-top: 0px; 
        padding-bottom: 0px;
    }
    
    /* CORREÇÃO DO DESTAQUE (1 LINK POR LINHA) */
    .product-grid.two-items {
        flex-direction: column; /* Força empilhamento */
        align-items: center; 
        padding: 0 15px; /* Respiro lateral para a grade */
    }

    /* SOBRESCRITA DA LARGURA: Força 100% */
    .product-grid.two-items .product-item {
        width: 100%; /* Ocupa 100% do espaço disponível (dentro do padding de 15px) */
        max-width: none; 
        margin-bottom: 20px; 
    }
    
    /* Garante que outros grids também tenham respiro */
    .product-grid.three-items {
        padding: 0 15px;
    }
    
    .product-grid.two-items .destaque-compacto {
        min-height: auto; 
    }
}

@media (min-width: 800px) {
    /* Garante que a galeria (agora o carrossel) se comporte como no código anterior */
    .product-gallery-container {
        flex: 0 0 30%; 
    }
}

/* ============================================================== */
/* --- AJUSTE: LAYOUT DE DESTAQUE (2 ITENS COM LARGURA DE 3) --- */
/* ============================================================== */

/* 1. Altera a grade de destaques para FLEX para melhor controle de largura e centralização */
.product-grid.two-items {
    display: flex; /* Mude de grid para flex */
    /*flex-wrap: wrap; */
    gap: 30px; 
    justify-content: center; /* Centraliza os 2 itens, dando a sensação de "colunas vazias" nas laterais */
}

/* 2. Força a largura dos itens para o tamanho que teriam em uma grade de 3 */
.product-grid.two-items .product-item {
    /* 100% dividido por 3, menos o espaço para as margens/gap */
    /*width: calc(33.33% - 20px); */
    max-width: 380px; /* Limite máximo para evitar que fiquem muito largos em telas grandes */
    
    /* Garantir que os botões fiquem alinhados */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* 3. Garante que o item de destaque tenha uma altura mínima para igualar */
/* Use um valor fixo (ex: 450px) ou adapte conforme a altura da segunda box */
.product-grid.two-items .destaque-compacto {
    min-height: 450px; 
    padding: 15px;
}

/* 4. Corrige o box model para a imagem dentro do item de destaque */
.product-grid.two-items .product-item img {
    height: 180px; /* Aumentar um pouco a altura da imagem para preencher melhor */
    object-fit: cover;
    margin-bottom: 0px;
}