/* ============================================================
   1. RESET E ESTRUTURA BASE
   ============================================================ */
* {
    box-sizing: border-box;
}

html, body {
    margin: 0 !important;
    padding: 0 !important;
    background-color: #FFFFFF !important;
    font-family: 'Poppins', sans-serif;
    color: #5A4E3C;
    overflow-x: hidden;
}

/* FAIXA DO TOPO */
.top-bar-slogan {
    background-color: #6F4F37;
    padding: 10px 0;
    text-align: center;
    width: 100%;
}

.slogan-text {
    color: #FFFFFF;
    font-size: 13px;
    font-weight: 300;
}

/* ============================================================
   2. PADRONIZAÇÃO DE ÍCONES (TRAVA DE TAMANHO FIXA)
   ============================================================ */
.header-platforms img {
    height: 20px !important;
    width: auto;
    filter: brightness(0) saturate(100%) invert(64%) sepia(13%) saturate(541%) hue-rotate(338deg) brightness(91%) contrast(88%) !important;
    transition: 0.3s;
}

.cat-icon-box img {
    width: 28px !important;
    height: 28px !important;
    filter: brightness(0) saturate(100%) invert(64%) sepia(13%) saturate(541%) hue-rotate(338deg) brightness(91%) contrast(88%) !important;
    transition: 0.3s;
}

.footer-social img {
    width: 24px !important;
    filter: brightness(0) saturate(100%) invert(64%) sepia(13%) saturate(541%) hue-rotate(338deg) brightness(91%) contrast(88%) !important;
}

.header-platforms a:hover img, 
.category-link:hover img, 
.footer-social a:hover img {
    filter: brightness(0) saturate(100%) invert(34%) sepia(18%) saturate(951%) hue-rotate(338deg) brightness(91%) contrast(92%) !important;
    transform: translateY(-3px);
}

/* ============================================================
   3. HEADER E CATEGORIAS (MANTIDO)
   ============================================================ */
.main-header {
    background: #FFF;
    padding: 15px 0;
}

.header-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between; /* Logo na esquerda, Busca na direita */
    align-items: center;
    padding: 0 20px;
}

#logo-main { height: 70px !important; width: auto; }

.header-platforms { display: flex; gap: 35px; align-items: center; }

.search-form {
    flex: 1;
    max-width: 400px;
    margin: 0 20px;
    position: relative;
}

.category-nav {
    background: #FFF;
    border-top: 1px solid #6F4F37;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.03);
}

.category-wrapper {
    position: relative;
    max-width: 1150px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    padding: 0 45px;
}

.category-scroll-container {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    gap: 15px;
    padding: 20px 0;
    scrollbar-width: none;
    width: 100%;
}

.category-scroll-container::-webkit-scrollbar { display: none; }

.nav-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: #FFFFFF;
    border: 1px solid #A68B77;
    color: #A68B77;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.category-link {
    text-decoration: none;
    color: #636E72;
    font-size: 11px;
    text-align: center;
    min-width: 95px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================================
   4. CONTEÚDO E BOX DA FRASE
   ============================================================ */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 20px;
}

.mid-page-slogan {
    width: 100%;
    max-width: 850px;
    margin: 60px auto !important;
    padding: 30px;
    background-color: #FDFBF9;
    border: 1px solid #A68B77;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(166, 139, 119, 0.05);
}

.mid-page-slogan p {
    font-size: 19px;
    line-height: 1.6;
    color: #8C7361;
    font-weight: 300;
    font-style: italic;
    margin: 0;
}

.section-title {
    font-size: 22px;
    color: #6F4F37;
    font-weight: 700;
    margin: 40px 0 25px 0 !important;
}

/* ============================================================
   5. GRID E CARDS DE PRODUTOS
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr); 
    gap: 20px;
    margin-bottom: 50px;
    width: 100%;
}

.product-card {
    background: #FFFFFF !important;
    border: 1px solid #F2E8DF !important; /* Borda leve para o card */
    border-radius: 12px !important;
    padding: 15px !important;
    text-align: center !important;
    display: flex !important;
    flex-direction: column !important;
    min-height: 240px !important; 
    transition: 0.3s ease !important;
}

.product-card:hover {
    border-color: #A68B77 !important; /* Card destaca ao passar o mouse */
    transform: translateY(-5px) !important;
}

.product-img-box {
    height: 160px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 10px !important;
}

.product-img-box img {
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
}

.product-name {
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #333 !important;
    height: 40px !important;
    overflow: hidden !important;
    line-height: 1.4 !important;
    margin-bottom: 5px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
}

/* Link da Plataforma/Loja */
.product-card a {
    text-decoration: none !important;
    color: #A68B77 !important;
    font-size: 11px !important;
    display: block !important;
    margin-bottom: 10px !important;
    transition: 0.3s ease !important;
}

.product-card a:hover {
    color: #6F4F37 !important;
}

/* Botão Comprar Agora - Estado Normal */
.product-card .btn-buy {
    margin-top: auto !important;
    background: #FFFFFF !important;
    color: #A68B77 !important;
    border: 1px solid #A68B77 !important;
    text-decoration: none !important;
    padding: 8px !important;
    border-radius: 6px !important;
    font-size: 11px !important;
    font-weight: 400 !important; 
    text-transform: none !important; 
    transition: 0.3s ease !important;
    display: inline-block !important;
}

/* HOVER FINAL: Fundo bronze e Letras Brancas Obrigatórias */
.product-card .btn-buy:hover {
    background-color: #A68B77 !important;
    color: #FFFFFF !important; /* Letras ficam brancas com prioridade total */
    text-decoration: none !important;
}

/* ============================================================
   6. FOOTER (NEWSLETTER E ÍCONES FINALIZADOS)
   ============================================================ */
.footer {
    background-color: #FDFBF9 !important;
    padding: 60px 0 30px 0 !important;
    margin-top: 80px;
    border-top: 1px solid #F2E8DF;
}

/* Ajuste do Formulário Newsletter */
.footer form {
    display: flex !important;
    align-items: stretch !important;
    gap: 8px !important;
    margin-top: 15px;
}

.footer form input[type="email"] {
    padding: 12px 15px !important;
    border: 1px solid #A68B77 !important;
    border-radius: 6px !important;
    font-size: 14px !important;
    flex: 1 !important;
    background: #FFFFFF !important;
    color: #5A4E3C !important;
    outline: none !important;
}

/* Botão OK - Estilo "Comprar Agora" */
.footer form button.btn-buy {
    background: #FFFFFF !important;
    color: #A68B77 !important;
    border: 1px solid #A68B77 !important;
    border-radius: 6px !important;
    padding: 0 25px !important;
    font-size: 11px !important; /* Mesma fonte dos cards */
    font-weight: 400 !important; /* SEM NEGRITO conforme solicitado */
    text-transform: none !important;
    cursor: pointer !important;
    transition: 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin: 0 !important;
    height: auto !important;
}

/* Hover idêntico ao "Comprar Agora" */
.footer form button.btn-buy:hover {
    background: #A68B77 !important;
    color: #FFFFFF !important;
    text-decoration: none !important;
}

/* --- Blocos de Ícones e Títulos --- */
.footer-bottom-links {
    max-width: 850px !important; 
    margin: 40px auto 30px auto !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding: 0 20px !important;
}

.footer-section {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important; 
    text-align: center !important;
}

.footer-title {
    color: #6F4F37 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    margin: 0 0 20px 0 !important;
    white-space: nowrap !important;
}

.footer-platforms, .footer-social {
    display: flex !important;
    gap: 22px !important; 
    justify-content: center !important;
    align-items: center !important;
    flex-wrap: wrap !important;
}

/* Ícones em Bronze */
.footer-platforms img, .footer-social img {
    width: 28px !important;
    filter: brightness(0) saturate(100%) invert(64%) sepia(13%) saturate(541%) hue-rotate(338deg) brightness(91%) contrast(88%) !important;
    transition: 0.3s ease !important;
}

/* Ajuste proporcional para marcas específicas */
.footer-platforms img[alt*="Magalu"], 
.footer-platforms img[alt*="Magazine"],
.footer-platforms img[alt*="Estante"],
.footer-platforms img[alt*="Mercado"] {
    width: 45px !important; 
}

.footer-copy {
    text-align: center !important;
    font-size: 12px !important;
    color: #A68B77 !important;
    margin-top: 40px !important;
}

/* ============================================================
   7. RESPONSIVIDADE (MOBILE)
   ============================================================ */
@media (max-width: 768px) {
    
    /* HEADER: Logo em destaque e busca abaixo */
    .header-container {
        flex-direction: column !important;
        gap: 20px !important;
        padding: 20px 10px !important;
    }

    #logo-main {
        height: 100px !important; /* Marca bem visível */
        width: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }

    .search-form {
        max-width: 100% !important;
        width: 100% !important;
        margin: 0 !important;
    }

    /* CATEGORIAS: Remove setas e barra de rolagem no celular */
    .nav-arrow {
        display: none !important; /* Remove as setas de navegação */
    }

    .category-scroll-container {
        overflow-x: auto !important;
        padding-bottom: 5px !important;
        -webkit-overflow-scrolling: touch; /* Rolagem suave no iOS */
        scrollbar-width: none !important; /* Esconde barra no Firefox */
    }

    .category-scroll-container::-webkit-scrollbar {
        display: none !important; /* Esconde barra no Chrome/Safari */
    }

    /* GRID DE PRODUTOS: 2 colunas perfeitas */
    .products-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
        padding: 0 10px !important;
    }

    /* Ajuste dos Cards para Mobile */
    .product-card {
        padding: 10px !important;
        min-height: auto !important;
    }

    .product-img-box {
        height: 130px !important; /* Ajusta altura da imagem no card menor */
    }

    .product-name {
        font-size: 12px !important;
        height: 35px !important;
    }

    /* FOOTER: Empilhamento dos blocos bronze */
    .footer-bottom-links {
        flex-direction: column !important;
        gap: 40px !important;
        align-items: center !important;
        text-align: center !important;
    }

    .footer-section {
        align-items: center !important;
    }

    .footer-platforms, .footer-social {
        justify-content: center !important;
    }
}