* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  
  html, body {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
  }

/* ================= PAGE HERO ================= */
.page-hero {
    padding-top: 140px;
    padding-bottom: 60px;
    background: var(--color-bg-main);
    border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative;
    overflow: hidden;
}

.page-hero h1 { font-size: 3rem; color: var(--color-text-primary); }
.page-hero p { color: var(--color-text-secondary); max-width: 500px; margin-top: 10px; }

/* ================= LAYOUT DO CATÁLOGO ================= */
.catalog-section {
    padding: 60px 0;
    background: var(--color-bg-main);
    min-height: 100vh;
}

.catalog-layout {
    display: grid;
    grid-template-columns: 250px 1fr; /* Sidebar fixa + Conteúdo fluido */
    gap: 40px;
}

/* SIDEBAR DE FILTROS */
.catalog-sidebar {
    position: sticky;
    top: 100px; /* Fica fixo ao rolar */
    height: fit-content;
}

.filter-group h3 {
    color: var(--color-text-primary);
    font-size: 1.1rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(242, 101, 34, 0.35);
}

.filter-list li {
    padding: 12px 15px;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 6px;
    margin-bottom: 5px;
    font-size: 0.95rem;
    position: relative;
}

.filter-list li:hover {
    color: var(--color-accent);
    background: rgba(242, 100, 34, 0.238);
    padding-left: 20px;
}

.filter-list li.active {
    background: linear-gradient(90deg, rgba(242, 100, 34, 0.238), transparent);
    color: var(--color-accent);
    border-left: 3px solid var(--color-accent);
    font-weight: 600;
}

.filter-promo {
    margin-top: 40px;
    background: rgba(255,255,255,0.03);
    padding: 20px;
    border-radius: 10px;
    border: 1px dashed rgba(255,255,255,0.1);
}

.filter-promo h4 { color: var(--color-text-primary); font-size: 0.9rem; }
.filter-promo p { font-size: 0.8rem; color: var(--color-text-secondary); margin: 10px 0; }
.btn-small {
    font-size: 0.8rem;
    color: var(--color-accent);
    text-decoration: underline;
}

/* GRID DE PRODUTOS */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 30px;
}

/* CARD DO PRODUTO */
.prod-card {
    background: var(--color-bg-secondary);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.prod-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-accent);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5);
}

.prod-badge {
    position: absolute;
    top: 15px; right: 15px;
    background: rgba(242, 100, 34, 0.238);
    color: var(--color-accent);
    font-size: 0.7rem;
    padding: 4px 8px;
    border-radius: 4px;
    font-weight: 700;
}

.prod-img-box {
    height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.prod-img-box img {
    max-height: 100%;
    max-width: 100%;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.5));
    transition: transform 0.3s;
}

.prod-card:hover .prod-img-box img { transform: scale(1.1); }

.prod-info h4 { color: var(--color-text-primary); margin-bottom: 5px; }
.prod-spec { display: block; color: var(--color-text-secondary); font-size: 0.85rem; margin-bottom: 15px; }

.btn-details {
    margin-top: auto;
    width: 100%;
    padding: 10px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.2);
    color: var(--color-text-primary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.btn-details:hover {
    background: var(--color-accent);
    color: var(--color-bg-main);
    border-color: var(--color-accent);
}

/* Animação de Hide/Show */
.product-item.hidden {
    display: none;
}
.product-item.fade-in {
    animation: fadeIn 0.5s ease forwards;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ================= MODAL AVANÇADO ================= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(2, 12, 27, 0.9);
    backdrop-filter: blur(8px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    background: #0a192f;
    width: 90%; max-width: 800px;
    border-radius: 16px;
    border: 1px solid var(--color-accent);
    box-shadow: 0 0 50px rgba(242, 100, 34, 0.238);
    position: relative;
    padding: 40px;
    transform: scale(0.9);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.modal-overlay.active .modal-content { transform: scale(1); }

.close-modal {
    position: absolute;
    top: 20px; right: 20px;
    background: none; border: none;
    color: var(--color-text-secondary);
    font-size: 2rem; cursor: pointer;
}
.close-modal:hover { color: var(--color-accent); }

.modal-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

/* Efeito Scanline na Imagem do Modal */
.modal-visual {
    position: relative;
    height: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
    background: radial-gradient(circle, rgba(242, 100, 34, 0.238) 0%, transparent 70%);
}

.modal-visual img { max-height: 100%; z-index: 1; }

.scan-line {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: var(--color-accent);
    box-shadow: 0 0 10px var(--color-accent);
    opacity: 0.5;
    animation: scan 3s linear infinite;
    z-index: 2;
}
@keyframes scan {
    0% { top: 0%; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.m-brand { color: var(--color-accent); text-transform: uppercase; letter-spacing: 2px; font-size: 0.8rem; }
.modal-text h2 { font-size: 2rem; margin: 10px 0; color: white; }
.modal-text p { color: var(--color-text-secondary); font-size: 1rem; margin-bottom: 25px; }

/* Barras de Estatísticas */
.spec-bar {
    margin-bottom: 12px;
}
.spec-bar span { font-size: 0.85rem; color: var(--color-text-primary); display: block; margin-bottom: 5px; }
.bar-bg { width: 100%; height: 6px; background: rgba(255,255,255,0.1); border-radius: 3px; }
.bar-fill { height: 100%; background: var(--color-accent); border-radius: 3px; box-shadow: 0 0 10px var(--color-accent); }


/* ============================================================
   CORREÇÃO DE LAYOUT MOBILE: HERO + CATÁLOGO
   Transforma Sidebar em Menu Horizontal Deslizante
   ============================================================ */

   @media (max-width: 1024px) {

    /* --- 1. AJUSTE DO HERO (.page-hero) --- */
    .page-hero {
        /* Espaço para não ficar atrás do menu fixo */
        padding-top: 130px !important; 
        padding-bottom: 40px !important;
        height: auto !important;
        min-height: auto !important;
        text-align: center !important;
    }

    .page-hero .container {
        padding: 0 20px !important;
    }

    .page-hero h1 {
        font-size: 2rem !important; /* Título menor */
        line-height: 1.2 !important;
        margin-bottom: 10px !important;
    }

    .page-hero p {
        font-size: 0.95rem !important;
        margin-bottom: 0 !important;
    }

    /* --- 2. LAYOUT DO CATÁLOGO (.catalog-layout) --- */
    .catalog-section {
        padding-top: 0 !important; /* Cola no Hero */
    }

    .catalog-layout {
        display: block !important; /* Remove o Grid Lateral (250px) */
    }

    /* --- 3. TRANSFORMAÇÃO DA SIDEBAR (Filtros) --- */
    .catalog-sidebar {
        width: 100vw !important; /* Largura total da tela */
        height: auto !important;
        margin-left: -20px !important; /* Compensa o padding do container */
        padding: 15px 20px !important;
        
        position: sticky !important; /* Gruda no topo */
        top: 70px !important; /* Abaixo do Header (ajuste se seu header for maior) */
        z-index: 90 !important;
        
        background: var(--color-bg-main); /* Fundo sólido para cobrir os produtos */
        border-bottom: 1px solid rgba(255,255,255,0.1);
        box-shadow: 0 10px 20px -10px rgba(0,0,0,0.5);
    }

    /* Esconde título "Filtrar por" para economizar espaço */
    .filter-group h3 { display: none !important; }
    .filter-promo { display: none !important; } /* Esconde banner promo */

    /* LISTA HORIZONTAL (Scroll Lateral) */
    .filter-list {
        display: flex !important;
        flex-direction: row !important;
        gap: 10px !important;
        overflow-x: auto !important; /* Permite arrastar para o lado */
        padding-bottom: 5px !important; /* Espaço para scrollbar não colar */
        
        /* Esconde a barra de rolagem feia */
        scrollbar-width: none; 
        -ms-overflow-style: none;
    }
    .filter-list::-webkit-scrollbar { display: none; }

    /* ESTILO DOS BOTÕES DE FILTRO (Pílulas) */
    .filter-list li {
        white-space: nowrap !important; /* Texto não quebra linha */
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        border-radius: 20px !important;
        padding: 8px 16px !important;
        margin: 0 !important;
        font-size: 0.9rem !important;
        flex-shrink: 0 !important; /* Impede que o botão amasse */
    }

    .filter-list li.active {
        background: var(--color-accent) !important;
        color: #000 !important;
        border-color: var(--color-accent) !important;
        font-weight: 700 !important;
    }

    /* --- 4. GRID DE PRODUTOS --- */
    .product-grid {
        margin-top: 30px !important;
        display: grid !important;
        /* Cria 2 colunas se couber, ou 1 se for muito pequeno */
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
        gap: 15px !important;
    }

    /* Ajuste do Card para Mobile */
    .prod-card {
        padding: 15px !important;
    }

    .prod-img-box {
        height: 140px !important; /* Imagem menor */
    }

    .prod-info h4 {
        font-size: 1rem !important;
    }
}

/* --- AJUSTE PARA TELAS MUITO PEQUENAS (320px) --- */
@media (max-width: 360px) {
    /* Em telas minúsculas, força 1 coluna para não quebrar o card */
    .product-grid {
        grid-template-columns: 1fr !important;
    }
}




/* ============================================================
   RESPONSIVIDADE GERAL E CORREÇÕES (MOBILE)
   ============================================================ */

/* 1. CONFIGURAÇÃO PADRÃO DO HAMBURGUER (Desktop) */
.mobile-menu-trigger { display: none; } 

@media (max-width: 1024px) {

    /* --- CABEÇALHO MOBILE --- */
    .header-cta { display: none !important; }
    
    .mobile-menu-trigger {
        display: flex !important;
        flex-direction: column;
        justify-content: space-between;
        width: 28px;
        height: 20px;
        cursor: pointer;
        z-index: 2000;
        margin-left: auto;
    }

    .mobile-menu-trigger .bar {
        width: 100%; height: 2px; background: var(--color-accent); transition: 0.3s;
    }

    /* Animação do Ícone */
    .mobile-menu-trigger.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 6px); }
    .mobile-menu-trigger.active .bar:nth-child(2) { opacity: 0; }
    .mobile-menu-trigger.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -6px); }

    /* MENU GAVETA */
    .main-nav {
        position: fixed; top: 0; right: -100%;
        width: 80%; height: 100vh;
        background: #020610;
        border-left: 1px solid var(--color-accent);
        padding: 90px 20px;
        transition: right 0.3s ease;
        display: flex !important; flex-direction: column;
        z-index: 1500;
        box-shadow: -10px 0 50px rgba(0,0,0,0.9);
    }
    .main-nav.menu-open { right: 0; }
    
    .nav-list { flex-direction: column; width: 100%; gap: 0; }
    .nav-link { 
        font-size: 1.1rem; padding: 15px 0; 
        border-bottom: 1px solid rgba(255,255,255,0.05); width: 100%; display: block;
    }
    
    .dropdown-menu { display: none; padding-left: 20px; border: none; background: transparent; }
    .dropdown-item.active-mobile .dropdown-menu { display: block; animation: fadeIn 0.3s; }

    /* --- HERO (.page-hero) --- */
    .page-hero {
        padding-top: 130px !important;
        padding-bottom: 40px !important;
        height: auto !important;
        min-height: auto !important;
        text-align: center !important;
    }

    .page-hero h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin-bottom: 10px !important;
    }

    /* --- LAYOUT DO CATÁLOGO (.catalog-layout) --- */
    .catalog-section { padding-top: 0 !important; }

    .catalog-layout {
        display: block !important; /* Remove o Grid Lateral */
    }

    /* BARRA HORIZONTAL DE FILTROS */
    .catalog-sidebar {
        width: 100vw !important;
        height: auto !important;
        margin-left: -20px !important; /* Compensa padding */
        padding: 15px 20px !important;
        position: sticky !important;
        top: 70px !important; /* Abaixo do header */
        z-index: 90 !important;
        background: var(--color-bg-main);
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }

    .filter-group h3 { display: none !important; }
    .filter-promo { display: none !important; }

    /* Lista Horizontal */
    .filter-list {
        display: flex !important;
        gap: 10px !important;
        overflow-x: auto !important;
        padding-bottom: 5px !important;
        scrollbar-width: none;
    }
    .filter-list::-webkit-scrollbar { display: none; }

    .filter-list li {
        white-space: nowrap !important;
        background: rgba(255,255,255,0.05) !important;
        border: 1px solid rgba(255,255,255,0.1) !important;
        border-radius: 20px !important;
        padding: 8px 16px !important;
        margin: 0 !important;
        font-size: 0.9rem !important;
    }

    .filter-list li.active {
        background: var(--color-accent) !important;
        color: #000 !important;
    }

    /* --- GRID DE PRODUTOS (CORREÇÃO DOS BLOCOS) --- */
    .product-grid {
        margin-top: 30px !important;
        display: grid !important;
        
        /* AQUI ESTAVA O ERRO: Mudamos para 1 coluna (1fr) para ficar bonito no celular */
        grid-template-columns: 1fr !important; 
        
        gap: 20px !important;
    }

    .product-item {
        width: 100%; /* Garante que o wrapper ocupe a coluna toda */
    }

    .prod-card {
        padding: 20px !important;
        height: auto !important; /* Altura automática */
    }

    .prod-img-box {
        height: 200px !important; /* Imagem maior e mais visível */
    }

    /* --- MODAL MOBILE --- */
    .modal-content {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        padding: 20px !important;
        overflow-y: auto !important;
    }
    .modal-grid { grid-template-columns: 1fr !important; gap: 20px !important; }
    .modal-visual { height: 200px !important; }
    .close-modal { top: 10px; right: 10px; }
}

/* ============================================================
   AJUSTE DE MODAL MOBILE (ESTILO POP-UP FLUTUANTE 70-80%)
   ============================================================ */

   @media (max-width: 1024px) {

    /* 1. O FUNDO ESCURO (Overlay) */
    .modal-overlay {
        /* Centraliza o card na tela */
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 20px !important; /* Margem de segurança para não colar na borda */
        z-index: 9999 !important;
        backdrop-filter: blur(5px); /* Desfoque leve no fundo */
    }

    /* 2. O CARTÃO (Pop-up) */
    .modal-content {
        /* Tamanho controlado: 90% da largura, mas não gigante */
        width: 90% !important;
        max-width: 380px !important; 
        
        /* Altura: Ocupa no máximo 80% da tela. Se o conteúdo for menor, ele encolhe */
        height: auto !important;
        max-height: 85vh !important; 
        
        /* Estética de Card Flutuante */
        background: #0a192f !important;
        border-radius: 16px !important; /* Bordas redondas */
        border: 1px solid var(--color-accent) !important;
        box-shadow: 0 10px 40px rgba(0,0,0,0.6) !important;
        
        margin: 0 !important;
        padding: 20px !important;
        
        /* Scroll Interno: Se o texto for grande, rola DENTRO do card */
        overflow-y: auto !important; 
        display: flex !important;
        flex-direction: column !important;
        transform: none !important;
    }

    /* 3. LAYOUT INTERNO (Empilhado) */
    .modal-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 15px !important;
    }

    /* 4. IMAGEM (Topo do Card) */
    .modal-visual {
        width: 100% !important;
        height: 160px !important; /* Imagem compacta para sobrar espaço pro texto */
        min-height: 160px !important;
        margin-top: 10px !important;
        background: radial-gradient(circle, rgba(242, 100, 34, 0.1) 0%, transparent 70%) !important;
        border-radius: 8px !important;
    }

    .modal-visual img {
        max-height: 90% !important;
        max-width: 90% !important;
        object-fit: contain !important;
    }

    /* Remove scanline pra limpar o visual */
    .scan-line { display: none !important; }

    /* 5. BOTÃO FECHAR (X) */
    .close-modal {
        position: absolute !important; /* Fixo no canto do CARD, não da tela */
        top: 10px !important;
        right: 10px !important;
        
        width: 30px !important;
        height: 30px !important;
        background: rgba(255,255,255,0.1) !important;
        border-radius: 50% !important;
        
        font-size: 1.5rem !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        z-index: 10 !important;
        color: #fff !important;
    }

    /* 6. TEXTO E CONTEÚDO */
    .modal-text {
        text-align: left !important;
        padding-bottom: 0 !important;
    }

    .modal-text h2 {
        font-size: 1.3rem !important; /* Título equilibrado */
        line-height: 1.2 !important;
        margin: 10px 0 !important;
    }

    .modal-text p {
        font-size: 0.6rem !important;
        line-height: 1.5 !important;
        color: #a8b2d1 !important;
        margin-bottom: 15px !important;
    }

    /* Botão de Ação (WhatsApp) */
    .modal-text .btn {
        width: 100% !important;
        padding: 12px !important;
        font-size: 0.95rem !important;
        margin-top: 10px !important;
        margin-bottom: 10px !important;
    }
}

