/* =========================================================
   1. GLOBAL, RESETS E TRAVA DE SEGURANÇA
   ========================================================= */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* Bloqueia qualquer vazamento ou espaço vazio nas laterais */
    background-color: #f8f9fa;
}

body {
    font-family: 'Nunito', sans-serif;
    padding-top: 70px; /* Compensa a altura do header fixo */
}

/* =========================================================
   2. TOPO / HEADER (FIXO)
   ========================================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 40px;
    width: 100%;
    background: rgba(252,245,255,.75);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid rgba(255,255,255,.35);
    box-shadow: 0 8px 25px rgba(0,0,0,.08);
    transition: all .3s ease;
}

.logo { display: flex; align-items: center; gap: 8px; flex: 1; }
.logo img { height: 32px; width: auto; }
.logo-text {
    font-size: 28px;
    font-weight: 900;
    background: linear-gradient(90deg, #a826eb 0%, #ff2a85 100%) !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    background-clip: text !important;
    letter-spacing: -0.5px;
}

.nav-menu { display: flex !important; align-items: center !important; gap: 10px !important; justify-content: center !important; flex: 2; }
.nav-item {
    display: flex; align-items: center; gap: 8px; text-decoration: none;
    color: #475569 !important; font-weight: 700 !important; font-size: 15px;
    padding: 8px 18px; border-radius: 50px; transition: all 0.2s ease;
    position: relative;
}
.nav-item.active { background-color: #f4ebff !important; color: #7b1fa2 !important; }

.header-actions { display: flex !important; align-items: center !important; gap: 12px !important; justify-content: flex-end !important; flex: 1; }

/* =========================================================
   HOVERS DO MENU E BOTÕES DO HEADER
   ========================================================= */
.nav-item:hover {
    transform: translateY(-3px) scale(1.05);
    background: linear-gradient(90deg,#9333ea,#ec4899);
    color: #fff !important;
    box-shadow: 0 10px 25px rgba(147,51,234,.25);
}
.nav-item:hover i { color: #fff; }

.btn-carrinho { 
    display: flex; align-items: center; gap: 8px; 
    background: linear-gradient(90deg, #9333ea 0%, #ec4899 100%) !important; 
    color: #ffffff !important; text-decoration: none; 
    font-weight: 800; font-size: 15px; padding: 10px 24px; 
    border-radius: 50px; border: none; cursor: pointer; 
    transition: all .25s ease;
}
.btn-carrinho:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 28px rgba(236,72,153,.35);
}

.btn-admin { 
    display: flex; align-items: center; gap: 8px; 
    background-color: #f4ebff !important; color: #7b1fa2 !important; 
    text-decoration: none; font-weight: 800; font-size: 15px; 
    padding: 10px 24px; border-radius: 50px; border: none; 
    cursor: pointer; transition: all .25s ease;
}
.btn-admin:hover {
    transform: translateY(-3px) scale(1.05);
    background: #7b1fa2 !important;
    color: #fff !important;
    box-shadow: 0 12px 28px rgba(123,31,162,.25);
}

/* =========================================================
   3. SEÇÃO HERO
   ========================================================= */
.hero { background: linear-gradient(180deg, #581c87 0%, #2e1065 100%); color: #ffffff; text-align: center; padding: 55px 20px; display: flex; flex-direction: column; align-items: center; width: 100%; }
.hero-badge { background: rgba(0, 0, 0, 0.25); border: 1px solid rgba(255, 255, 255, 0.12); padding: 6px 20px; border-radius: 50px; font-size: 12px; font-weight: 800; color: #f472b6; margin-bottom: 25px; }
.hero h1 { font-size: 46px; font-weight: 800; line-height: 1.15; margin-bottom: 20px; }
.hero h1 .destaque-rosa { color: #f472b6; }
.hero-subtitle { font-size: 16px; font-weight: 600; color: rgba(255, 255, 255, 0.75); margin-bottom: 35px; }
.search-wrapper { background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.15); padding: 6px 6px 6px 20px; border-radius: 50px; display: flex; align-items: center; width: 100%; max-width: 820px; margin-bottom: 35px; }
.search-wrapper input { background: transparent; border: none; color: #ffffff; width: 100%; outline: none; }
.category-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-bottom: 45px; }
.pill-btn { background: rgba(0, 0, 0, 0.25); color: rgba(255, 255, 255, 0.85); border: none; padding: 10px 24px; border-radius: 50px; font-size: 14px; font-weight: 700; cursor: pointer; transition: 0.2s; }
.pill-btn.active { background-color: #ffffff; color: #3b0764; }

/* =========================================================
   4. VITRINE DE PRODUTOS
   ========================================================= */
.vitrine-section { padding: 50px 40px; background-color: #f8f9fa; max-width: 1200px; margin: 0 auto; width: 100%; }
.products-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 20px; }
.product-card { background: #ffffff; border: 1px solid #fae8ff; border-radius: 20px; padding: 16px; box-shadow: 0 4px 18px rgba(123, 31, 162, 0.03); display: flex; flex-direction: column; }
.product-image-wrapper { position: relative; width: 100%; border-radius: 16px; overflow: hidden; margin-bottom: 16px; background-color: #f1f5f9; }
.product-image-wrapper img { width: 100%; height: 140px; object-fit: cover; display: block; }

.badge-tag { position: absolute; top: 12px; left: 12px; color: #ffffff; font-size: 10px; font-weight: 800; padding: 4px 10px; border-radius: 50px; text-transform: uppercase; display: flex; align-items: center; gap: 4px; }
.badge-amazon { background: #6d28d9; }
.badge-estoque { background: #ec4899; }

.product-title { font-size: 16px; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.product-desc { font-size: 12px; color: #64748b; margin-bottom: 12px; }
.stock-pill { background: #f1f5f9; color: #64748b; font-size: 10px; font-weight: 800; padding: 4px 8px; border-radius: 6px; }
.price-value { font-size: 18px; font-weight: 900; color: #3b0764; }

.btn-product-action { width: 100%; padding: 10px; border-radius: 50px; font-weight: 800; font-size: 13px; text-align: center; text-decoration: none; border: none; cursor: pointer; }
.btn-amazon-style { background: #3b1180; color: #ffffff; }
.btn-cart-style { background: linear-gradient(90deg, #ec4899 0%, #9333ea 100%); color: #ffffff; }

/* =========================================================
   5. BARRA DE INFO
   ========================================================= */
.info-bar-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; max-width: 1200px; margin: 40px auto; padding: 0 40px; width: 100%; }
.info-card { background: #ffffff; border: 1px solid #f1f5f9; padding: 20px; border-radius: 16px; display: flex; align-items: center; gap: 15px; box-shadow: 0 2px 8px rgba(0,0,0,0.03); }
.info-card i { font-size: 24px; color: #7b1fa2; }
.info-card h4 { font-size: 14px; color: #3b0764; margin-bottom: 4px; }
.info-card p { font-size: 11px; color: #64748b; line-height: 1.3; }

/* =========================================================
   6. MODAL LOGIN
   ========================================================= */
#modal-container { position:fixed; top:0; left:0; width:100%; height:100%; background:rgba(0,0,0,0.6); display:none; align-items:center; justify-content:center; z-index:9999; }
#modal-content { background:#fff; padding:30px; border-radius:12px; width:90%; max-width:400px; position:relative; box-shadow: 0 10px 25px rgba(0,0,0,0.2); }
.close-modal { position:absolute; top:10px; right:15px; cursor:pointer; font-size:20px; color:#666; }
.modal-actions { margin-top:15px; font-size:14px; display:flex; justify-content:space-between; }
.btn-submit { width:100%; padding:12px; background:#ff4db8; color:white; border:none; border-radius:6px; margin-top:15px; cursor:pointer; }

/* =========================================================
   7. MENU DROPDOWN USUÁRIO
   ========================================================= */
.user-menu-wrapper { position: relative; display: inline-block; }

.dropdown-content { 
    display: none; 
    position: absolute; 
    right: 0; 
    top: 100%; 
    background: #fff; 
    box-shadow: 0 8px 16px rgba(0,0,0,0.15); 
    border-radius: 12px; 
    min-width: 180px; 
    z-index: 1000; 
    padding: 10px 0;
    margin-top: 10px; /* Mantém o recuo visual elegante */
}

/* PONTE INVISÍVEL: Preenche o vão de 10px para o mouse não perder o foco */
.dropdown-content::before {
    content: '';
    position: absolute;
    top: -10px; /* Ocupa exatamente o espaço do margin-top */
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent; /* Fica invisível para o usuário, mas funcional para o ponteiro */
}

.dropdown-content a { 
    color: #475569; 
    padding: 10px 20px; 
    text-decoration: none; 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    font-size: 14px; 
    transition: 0.2s;
}

.dropdown-content a:hover { 
    background: #f8f9fa; 
    color: #7b1fa2; 
}

/* Comportamento Hover (Desktop) */
.user-menu-wrapper:hover .dropdown-content { display: block; }

/* Comportamento Click (Mobile) */
.user-menu-wrapper.active .dropdown-content { display: block; }

/* =========================================================
   8. RODAPÉ 
   ========================================================= */
footer { background-color: #4a0e78; color: white; padding: 50px 20px; margin-top: 50px; width: 100%; }
.footer-container { display: flex; justify-content: space-between; max-width: 1200px; margin: 0 auto; gap: 40px; }
.footer-info, .footer-nav, .footer-legal { flex: 1; }
.footer-container h3 { margin-bottom: 15px; font-size: 16px; text-transform: uppercase; }
.footer-nav a { color: white; text-decoration: none; font-size: 13px; opacity: 0.8; line-height: 2; }
.footer-legal p { font-size: 12px; opacity: 0.8; border: 1px solid rgba(255,255,255,0.2); padding: 12px; border-radius: 8px; line-height: 1.4; }



/* =========================================================
   9. RESPONSIVO (MOBILE / TABLET)
   ========================================================= */

/* Esconde o botão do menu por padrão (no Desktop) */
.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 26px;
    color: #7b1fa2;
    cursor: pointer;
    padding: 5px;
}

/* Regras aplicadas quando a tela for de celular/tablet */
@media (max-width: 850px) {
    /* Ajusta o header para permitir quebra de linha */
    .main-header {
        flex-wrap: wrap;
        padding: 15px 20px;
    }

    /* O logo tira o "flex" para dividir espaço certinho com o botão */
    .logo { flex: unset; }
    
    /* Mostra o botão e empurra ele para a direita */
    .mobile-menu-toggle {
        display: block;
        margin-left: auto;
    }

    /* Esconde os menus por padrão no Mobile */
    .nav-menu, .header-actions {
        display: none !important;
        width: 100%;
        flex-direction: column;
        align-items: flex-start !important;
    }

    /* QUANDO O MENU É CLICADO (CLASSE .menu-open inserida pelo JS) */
    .main-header.menu-open {
        background: #ffffff; /* Deixa o fundo sólido para facilitar leitura */
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    }
    
    .main-header.menu-open .nav-menu {
        display: flex !important;
        margin-top: 20px;
        gap: 5px !important;
    }
    
    .main-header.menu-open .header-actions {
        display: flex !important;
        margin-top: 15px;
        padding-top: 15px;
        border-top: 1px solid #f1f5f9; /* Linha separadora do Carrinho/Usuário */
        justify-content: flex-start !important;
    }

    /* Estica todos os botões para 100% da largura da tela */
    .nav-item, .btn-carrinho {
        width: 100%;
        justify-content: flex-start;
        padding: 12px 18px;
    }

    /* =======================================
       AJUSTES DO DROPDOWN USUÁRIO (MOBILE)
       ======================================= */
    .user-menu-wrapper { width: 100%; }
    
    .dropdown-content {
        position: static; /* Tira o efeito flutuante */
        box-shadow: none;
        border-left: 2px solid #ec4899; /* Barrinha decorativa lateral */
        border-radius: 0;
        margin-top: 0;
        margin-left: 20px;
        padding-left: 10px;
        width: calc(100% - 20px);
    }
    
    /* Esconde a ponte invisível do mouse pois no toque não precisamos dela */
    .dropdown-content::before { display: none; } 
}






