/* loja/assets/css/vitrine.css  =====>  Versão Final: Login Resgatado */

:root {
    --page-bg: #f3f4f6;
    --card-bg: #ffffff;
    --primary: #6200ea;
    --primary-hover: #4b00b0;
    --text-main: #333;
    --text-muted: #666;
    --border: #e0e0e0;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-hover: 0 10px 25px rgba(0,0,0,0.12);
}

body {
    background-color: var(--page-bg);
    font-family: 'Inter', sans-serif;
    margin: 0; padding: 0;
    color: var(--text-main);
    overflow-x: hidden;
}

/* 1. ESTRUTURA */
.public-store-container { max-width: 1400px; margin: 0 auto; padding: 40px 20px; min-height: 80vh; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 25px; max-width: 1280px; margin: 0 auto; }

/* 2. HEADER E BUSCA (Visual Archive) */
.shop-header-section { background: transparent; padding: 30px 20px 50px; text-align: center; }
.shop-header-content h1 { font-size: 2.2rem; margin-bottom: 10px; color: var(--text-main); letter-spacing: -1px; }
.shop-header-content p { font-size: 1.1rem; color: var(--text-muted); margin: 0; }

.shop-sticky-wrapper {
    position: -webkit-sticky; 
    position: sticky; 
    /* AUMENTADO DE 20px PARA 90px */
    /* Isso garante que ela fique ABAIXO do menu principal quando você rolar */
    top: 90px; 
    z-index: 900;
    padding: 0 20px; 
    margin-top: -40px; 
    pointer-events: none;
}

.shop-search-bar { pointer-events: auto; background: #fff; border-radius: 16px; padding: 10px 20px; box-shadow: 0 10px 30px rgba(0,0,0,0.08); border: 1px solid #e5e7eb; max-width: 800px; margin: 0 auto; display: flex; align-items: center; gap: 15px; position: relative; z-index: 902; }
.modern-search-box { flex: 1; display: flex; align-items: center; gap: 12px; background: #f9fafb; border: 2px solid transparent; border-radius: 12px; padding: 8px 15px; transition: all 0.3s ease; min-width: 150px; }
.modern-search-box:focus-within { background: #fff; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(98, 0, 234, 0.1); }
.modern-search-box i { color: #9ca3af; font-size: 1.1rem; transition: 0.3s; }
.modern-search-box:focus-within i { color: var(--primary); }
.modern-search-box input { border: none; background: transparent; outline: none; width: 100%; font-size: 1rem; color: #374151; height: 30px; }
.bar-divider { width: 1px; height: 24px; background: #e5e7eb; }
.btn-toggle-filters { background: #f3f4f6; border: 1px solid transparent; color: #4b5563; padding: 10px 20px; border-radius: 10px; cursor: pointer; font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 8px; transition: 0.2s; white-space: nowrap; }
.btn-toggle-filters:hover { background: #e5e7eb; color: #111; }
.btn-toggle-filters.active-state { background: #111; color: #fff; }

.shop-filter-drawer { pointer-events: auto; max-width: 800px; margin: 0 auto; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); border: 1px solid #e5e7eb; border-top: none; border-radius: 0 0 16px 16px; overflow: hidden; max-height: 0; opacity: 0; transform: translateY(-10px); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); box-shadow: 0 15px 30px rgba(0,0,0,0.05); }
.shop-filter-drawer.open { max-height: 400px; opacity: 1; transform: translateY(0); margin-top: -5px; padding-top: 15px; }
.drawer-content { padding: 25px; border-top: 1px dashed #e5e7eb; }
.drawer-label { display: block; font-size: 0.75rem; color: #9ca3af; font-weight: 800; margin-bottom: 15px; text-transform: uppercase; letter-spacing: 0.5px; }
.chips-grid { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-cat { background: #f3f4f6; border: 1px solid transparent; color: #4b5563; padding: 8px 18px; border-radius: 50px; font-size: 0.9rem; font-weight: 600; cursor: pointer; transition: all 0.2s ease; }
.btn-cat:hover { background: #e5e7eb; transform: translateY(-1px); }
.btn-cat.active { background: var(--primary); color: #fff; box-shadow: 0 4px 12px rgba(98, 0, 234, 0.25); border-color: var(--primary); }


/* 3. CARDS DE PRODUTO (ATUALIZADO: IMAGEM FULL) */
.product-card { 
    background: var(--card-bg); 
    border-radius: 12px; 
    border: 1px solid rgba(0,0,0,0.05); 
    box-shadow: var(--shadow-sm); 
    transition: transform 0.2s, box-shadow 0.2s; 
    display: flex; flex-direction: column; 
    height: 100%; 
    overflow: hidden; 
}
.product-card:hover { 
    transform: translateY(-5px); 
    box-shadow: var(--shadow-hover); 
}

/* Container da Imagem sem Borda */
.product-image-container { 
    height: 260px; /* Aumentei um pouco para dar destaque */
    padding: 0;    /* REMOVIDO o padding para a imagem encostar na borda */
    background: #fff; 
    display: flex; align-items: center; justify-content: center; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    transition: background-color 0.3s;
    overflow: hidden; /* Importante para o zoom não sair do card */
}

/* Imagem Preenchendo Tudo */
.product-image-container img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; /* 'cover' preenche tudo sem deformar (pode cortar pontas) */
    transition: transform 0.5s ease; /* Suavidade para o zoom */
}

/* Efeito de Zoom Elegante */
.product-card:hover .product-image-container img {
    transform: scale(1.08);
}

.product-details { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; color: var(--text-main); }


/* 4. MODAL DE PRODUTO (FLEXBOX RÍGIDO 40/60) */
.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.8) !important; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.active { display: flex; }

#product-modal { background: var(--card-bg); width: 100%; max-width: 900px; border-radius: 12px; display: flex !important; flex-direction: row !important; align-items: stretch !important; overflow: hidden; position: relative; box-shadow: 0 20px 50px rgba(0,0,0,0.5); padding: 0 !important; }
.modal-close-btn { position: absolute; top: 15px; right: 15px; background: rgba(0,0,0,0.1); border: none; width: 35px; height: 35px; border-radius: 50%; cursor: pointer; z-index: 10; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--text-main); }
.modal-close-btn:hover { background: rgba(0,0,0,0.2); }
.modal-image-container { flex: 0 0 40% !important; width: 40% !important; min-width: 40% !important; background: #f8f9fa; padding: 0 !important; border-right: 1px solid var(--border); position: relative; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.modal-image-container img { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block; z-index: 1; }
.modal-youtube-btn { position: absolute; bottom: 20px; right: 20px; width: 45px; height: 45px; border-radius: 50%; background-color: #FF0000; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; text-decoration: none; box-shadow: 0 4px 10px rgba(0,0,0,0.3); transition: transform 0.2s; z-index: 5; }
.modal-youtube-btn:hover { transform: scale(1.1); }
.modal-details { flex: 1 !important; width: 60% !important; min-width: 60% !important; padding: 40px !important; display: flex; flex-direction: column; color: var(--text-main); overflow: hidden; }
.modal-title { font-size: 1.8rem; margin: 0 0 15px 0; color: var(--text-main); font-weight: 700; line-height: 1.2; }
.modal-description { font-size: 1rem; color: var(--text-muted); line-height: 1.6; flex-grow: 1; overflow-y: auto; max-height: 300px; padding-right: 5px; }
.modal-footer { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.modal-price { font-size: 1.8rem; font-weight: 700; color: var(--text-main); }
.modal-footer .modal-action-btn { padding: 0 40px; height: 50px; font-size: 1rem; border-radius: 8px; display: flex; align-items: center; gap: 8px; border:none; color:white; }

/* 5. BARRA FLUTUANTE ZAP */
@keyframes pulse-whatsapp { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(37, 211, 102, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
.floating-bar { position: fixed; bottom: 30px; right: 30px; z-index: 100; display: flex; flex-direction: column; gap: 15px; }
.floating-whatsapp, .floating-youtube { width: 55px; height: 55px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; color: white; text-decoration: none; box-shadow: 0 4px 12px rgba(0,0,0,0.3); transition: transform 0.3s ease; }
.floating-whatsapp { background: #25D366; animation: pulse-whatsapp 2s infinite; }
.floating-youtube { background: #FF0000; }
.floating-bar i { margin: 0; }

/* 6. MOBILE */
@media (max-width: 900px) {
    #product-modal { flex-direction: column !important; max-height: 90vh; overflow-y: auto; }
    .modal-image-container { flex: none !important; width: 100% !important; height: auto; min-height: 250px; border-right: none; border-bottom: 1px solid var(--border); }
    .modal-details { flex: none !important; width: 100% !important; padding: 25px !important; }
    /* Mobile Search */
    .shop-search-bar { flex-direction: column; align-items: stretch; border-radius: 20px; gap: 10px; }
    .bar-divider { display: none; }
    .btn-toggle-filters { justify-content: center; }
}

/* 7. DARK MODE */
html.dark-mode, body.dark-mode { --page-bg: #151521; --card-bg: #1e1e2d; --text-main: #e0e0e0; --text-muted: #a0a0a0; --border: #333; }
html.dark-mode .modal-content, html.dark-mode #product-modal { background-color: #1e1e2d !important; color: #ffffff !important; border: 1px solid #333; }
html.dark-mode .modal-title, html.dark-mode .modal-price, html.dark-mode .product-name, html.dark-mode .price-value { color: #ffffff !important; }
html.dark-mode .modal-description, html.dark-mode .product-description { color: #b0b0b0 !important; }
html.dark-mode .modal-image-container, html.dark-mode .product-image-container { background-color: #2b2b36 !important; border-color: #3f3f46 !important; }
html.dark-mode .modal-close-btn { color: #fff !important; background: rgba(255,255,255,0.1); }
html.dark-mode .modal-footer { border-top-color: #3f3f46 !important; }
html.dark-mode #shop-search-input { background: #2b2b36; color: #fff; border-color: #444; }

/* Dark Mode Search Bar */
html.dark-mode .shop-search-bar,
html.dark-mode .shop-filter-drawer { background: #1e1e2d !important; border-color: #333; }
html.dark-mode .modern-search-box { background: #2b2b36; border-color: #333; }
html.dark-mode .modern-search-box input { color: #fff; }
html.dark-mode .modern-search-box i { color: #888; }
html.dark-mode .btn-toggle-filters { background: #2b2b36; color: #ccc; border-color: #333; }
html.dark-mode .btn-toggle-filters:hover { background: #333; color: #fff; }
html.dark-mode .btn-cat { background: #2b2b36; color: #ccc; border-color: #333; }
html.dark-mode .btn-cat:hover { background: #333; color: #fff; }
html.dark-mode .btn-cat.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 8. CORREÇÃO CRÍTICA SWEETALERT */
div.swal2-container { z-index: 5000 !important; }

/* ========================================================= */
/* 9. CORREÇÃO FINAL: MODAL DE LOGIN (RECUPERAÇÃO DE FUNDO) */
/* ========================================================= */

/* Garante que o Modal de Login tenha fundo Branco no Tema Claro */
#login-modal-overlay .modal-content {
    background-color: #ffffff !important;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
    border-radius: 12px;
    color: #333333;
}

/* Ajuste do Modal de Login para Dark Mode */
html.dark-mode #login-modal-overlay .modal-content {
    background-color: #1e1e2d !important;
    color: #ffffff !important;
    border: 1px solid #333;
}

/* ========================================================= */
/* 10. RESGATE DO BOTÃO "ENTRAR" (LOGIN)                     */
/* ========================================================= */

/* Força o estilo do botão dentro do formulário de login/registro */
#login-modal-overlay .btn-buy {
    background: linear-gradient(45deg, #6200ea, #4361ee) !important;
    color: #ffffff !important; /* Texto Branco Obrigatório */
    border: none !important;
    border-radius: 6px !important;
    height: 45px !important;
    width: 100%;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(98, 0, 234, 0.3);
    margin-top: 10px;
}

#login-modal-overlay .btn-buy:hover {
    background: linear-gradient(45deg, #7c3aed, #4f46e5) !important;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(98, 0, 234, 0.4);
}

/* ========================================================= */
/* 11. NOVO RODAPÉ (FOOTER) & MODAIS LEGAIS                  */
/* ========================================================= */

.shop-footer {
    background-color: #fff;
    border-top: 1px solid var(--border);
    margin-top: 60px;
    padding-top: 60px;
}

.footer-content {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
    display: grid; grid-template-columns: 2fr 1fr 1fr; /* Coluna da marca maior */
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 { font-size: 1.5rem; font-weight: 800; margin-bottom: 15px; color: var(--text-main); }
.footer-brand h3 span { color: var(--primary); }
.footer-brand p { color: var(--text-muted); line-height: 1.6; font-size: 0.95rem; max-width: 300px; }

.footer-social { margin-top: 20px; display: flex; gap: 15px; }
.footer-social a {
    color: var(--text-muted); font-size: 1.2rem; transition: 0.2s;
    background: #f3f4f6; width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--primary); color: white; transform: translateY(-3px); }

.footer-links h4 { font-size: 1rem; font-weight: 700; margin-bottom: 20px; color: var(--text-main); }
.footer-links ul { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 12px; }
.footer-links a, .footer-links button {
    text-decoration: none; color: var(--text-muted); font-size: 0.95rem; transition: 0.2s;
    background: none; border: none; padding: 0; cursor: pointer; font-family: inherit;
}
.footer-links a:hover, .footer-links button:hover { color: var(--primary); padding-left: 5px; }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 25px 20px; text-align: center;
    color: var(--text-muted); font-size: 0.9rem;
}

/* Modais de Texto (Legal) */
.legal-modal .modal-content {
    display: block !important; /* Texto corrido, não grid */
    max-width: 800px !important;
}
.text-content {
    line-height: 1.8; color: var(--text-muted);
}
.text-content h3 { margin-top: 20px; margin-bottom: 10px; color: var(--text-main); }
.text-content p { margin-bottom: 15px; }

/* Botão Secundário (Fechar) */
.btn-secondary {
    background: #f3f4f6; color: var(--text-main); border: 1px solid var(--border);
    padding: 10px 25px; border-radius: 6px; cursor: pointer; font-weight: 600;
}
.btn-secondary:hover { background: #e5e7eb; }

/* RESPONSIVO */
@media (max-width: 768px) {
    .footer-content { grid-template-columns: 1fr; text-align: center; gap: 30px; }
    .footer-brand p { margin: 0 auto; }
    .footer-social { justify-content: center; }
}

/* DARK MODE FOOTER */
html.dark-mode .shop-footer { background-color: #1e1e2d; border-color: #333; }
html.dark-mode .footer-social a { background-color: #2b2b36; }
html.dark-mode .footer-social a:hover { background-color: var(--primary); }
html.dark-mode .footer-bottom { border-color: #333; }
html.dark-mode .btn-secondary { background: #2b2b36; border-color: #444; color: #fff; }
html.dark-mode .btn-secondary:hover { background: #333; }

/* ========================================================= */
/* 12. CORREÇÃO FINAL: MODAIS LEGAIS (TERMOS/PRIVACIDADE)    */
/* ========================================================= */

/* Container Principal do Modal Legal */
.legal-modal .modal-content {
    background-color: #ffffff !important; /* Fundo Branco Obrigatório */
    color: #333333 !important;            /* Texto Escuro */
    display: flex !important;             /* Flex para organizar header/body/footer */
    flex-direction: column !important;
    width: 100% !important;
    max-width: 800px !important;
    height: 85vh !important;              /* Altura fixa para caber na tela */
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
    padding: 0 !important;
    position: relative;
}

/* Área de Detalhes (Ocupa tudo) */
.legal-modal .modal-details {
    padding: 40px !important;
    width: 100% !important;
    height: 100% !important;
    display: flex;
    flex-direction: column;
}

/* Título */
.legal-modal .modal-title {
    font-size: 1.8rem;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
    flex-shrink: 0; /* Não encolhe */
}

/* Área de Texto com Rolagem */
.legal-modal .modal-scroll-area {
    flex-grow: 1;           /* Ocupa o espaço restante */
    overflow-y: auto;       /* Barra de rolagem aqui */
    padding-right: 15px;    /* Espaço para a barra não colar no texto */
    line-height: 1.8;
    font-size: 1rem;
    color: #555;
    text-align: justify;
}

/* Rodapé do Modal */
.legal-modal .modal-footer {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    justify-content: flex-end; /* Botão Fechar à direita */
}

/* Botão Fechar (X) */
.legal-modal .modal-close-btn {
    top: 15px;
    right: 15px;
    background: #f3f4f6;
    color: #333;
}

/* --- DARK MODE PARA MODAIS LEGAIS --- */
html.dark-mode .legal-modal .modal-content {
    background-color: #1e1e2d !important;
    color: #e0e0e0 !important;
    border: 1px solid #333;
}

html.dark-mode .legal-modal .modal-title {
    color: #fff !important;
    border-bottom-color: #444;
}

html.dark-mode .legal-modal .modal-scroll-area {
    color: #b0b0b0 !important;
}

html.dark-mode .legal-modal .modal-footer {
    border-top-color: #444 !important;
}

html.dark-mode .legal-modal .modal-close-btn {
    background: rgba(255,255,255,0.1);
    color: #fff;
}

html.dark-mode .legal-modal .btn-secondary {
    background: #2b2b36;
    color: #fff;
    border-color: #444;
}
html.dark-mode .legal-modal .btn-secondary:hover {
    background: #444;
}

/* Botão de Afiliado (Oferta Hotmart/Kiwify) */
.btn-affiliate {
    background: linear-gradient(45deg, #ff9f43, #ee5253) !important; /* Laranja Vibrante */
    color: white !important;
    border: none !important;
    box-shadow: 0 4px 15px rgba(238, 82, 83, 0.4) !important;
    font-weight: 700;
}
.btn-affiliate:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(238, 82, 83, 0.5) !important;
}

/* Modal: Ajuste para botão de Afiliado */
#product-modal .btn-affiliate {
    width: 100%;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 1.1rem;
}

/* ========================================================= */
/* 13. BADGES / ETIQUETAS DE PRODUTO (CORREÇÃO DE POSIÇÃO)   */
/* ========================================================= */

/* Garante que o card seja a referência */
.product-card {
    position: relative !important; 
    overflow: visible !important; /* Permite que sombras saiam, mas badge fica dentro */
}

/* Badge Flutuante no Canto Superior Direito */
.product-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 50; /* Garante que fique acima da imagem */
    
    background: linear-gradient(135deg, #ff0080 0%, #ff4757 100%);
    color: #ffffff;
    
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    
    padding: 6px 12px;
    border-radius: 6px;
    
    /* Sombra para destacar do fundo (seja branco ou imagem) */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); 
    border: 1px solid rgba(255, 255, 255, 0.3);
    
    pointer-events: none; /* Não atrapalha o clique no card */
}

/* Ajuste Fino para quando passar o mouse */
.product-card:hover .product-badge {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 0, 128, 0.4);
}

/* Modo Escuro */
html.dark-mode .product-badge {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    border-color: rgba(255, 255, 255, 0.1);
}