/* ============================================== */
/* === FICHEIRO: shop.css ======================= */
/* === Estilos da Loja (SHOP) =================== */
/* ============================================== */
:root {
    --primary: #0078d4;
    --primary-dark: #106ebe;
    --secondary: #6c757d;
    --dark: #343a40;
    --border: #dee2e6;
    --light: #f8f9fa;
    --success: #107c10;
    --danger: #d9534f;
    --danger-dark: #c9302c;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 30px rgba(0, 0, 0, 0.1); /* Para o modal */
}

/* ============================================== */
/* === NOVO: Layout Flutuante da Loja =========== */
/* ============================================== */

/* NOVO: Cabeçalho (Título e Subtítulo) */
.shop-header-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto 30px auto; /* Centraliza e adiciona espaço abaixo */
    padding: 0 10px; /* Evita que o texto cole nas bordas */
}
.shop-header-container h1 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--dark); /* Texto Escuro (Padrão Dashboard) */
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.shop-subtitle {
    font-size: 1.1rem;
    color: var(--secondary); /* Texto Secundário Escuro (Padrão) */
}

/* === CORREÇÃO CRÍTICA (PÁGINA PÚBLICA) === */
/* Sobrescreve as cores para a Página Pública (Fundo Escuro) */
body.login-page .shop-header-container h1 {
    color: white !important; /* Texto Claro */
}
body.login-page .shop-subtitle {
    color: var(--text-light) !important; /* Texto Secundário Claro */
}
/* === FIM DA CORREÇÃO === */


/* NOVO: Ajuste do Grid de Produtos */
.product-grid {
    display: grid;
    
    /* === INÍCIO DA MUDANÇA (4 Colunas) ===
     * Alterado de 280px para 250px.
     * (4 * 250px) + (3 * 30px gap) = 1090px.
     * Isso agora cabe dentro do max-width de 1200px,
     * mesmo com a barra lateral do dashboard.
    */
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    /* === FIM DA MUDANÇA === */
    
    gap: 30px;
    padding-top: 10px;
    
    /* NOVO: Centraliza o container do grid */
    max-width: 1200px;
    margin: 0 auto;
    /* REMOVIDO: justify-items: center; (Causador do bug de alinhamento) */
}


/* Estado Vazio */
.empty-state-message {
    text-align: center;
    padding: 50px;
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--secondary);
}

/* Cartão do Produto (Página Pública) */
.product-card {
    background-color: var(--navbar-bg); 
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s;
    border: 1px solid var(--border);
    /* MUDANÇA: O card agora tem largura total (100%) da coluna do grid */
    width: 100%; 
}
.product-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}
.product-image-container {
    height: 200px;
    background-color: var(--light);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
}
.product-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.product-placeholder-icon {
    font-size: 4rem;
    color: var(--secondary);
    opacity: 0.5;
}
.product-details {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; 
}
.product-name {
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 5px;
    color: var(--dark);
}

/* Truncar Texto */
.product-description {
    color: var(--secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
    
    flex-grow: 0; 
    
    height: 4.32rem; 
    
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
}

.product-price {
    font-size: 1.2rem;
    color: var(--primary-dark);
    margin-bottom: 15px;
    margin-top: auto; 
}

/* Grupo de Botões */
.product-button-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.product-button-group .btn-details i {
    margin-right: 5px;
}
.product-button-group .btn-buy i {
    margin-right: 5px;
}

/* Altera o estilo do botão para menos arredondado e menos padding */
.product-button-group .btn,
.modal-footer .btn-buy {
    border-radius: 6px !important; 
    padding: 10px 15px !important;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.product-button-group .btn-details i {
    margin-right: 5px; 
}
.product-button-group .btn-buy i {
    margin-right: 5px; 
}


/* ============================================== */
/* === ESTILOS DO PAINEL ADMIN (SHOP-ADMIN) ===== */
/* ============================================== */

/* Grid de 4 Colunas para o Formulário */
.form-grid-shop {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    align-items: flex-start; 
}
.form-grid-shop .span-1 { grid-column: span 1; }
.form-grid-shop .span-2 { grid-column: span 2; }
.form-grid-shop .span-3 { grid-column: span 3; }
.form-grid-shop .span-4 { grid-column: span 4; }

.form-grid-shop input[type="text"],
.form-grid-shop input[type="number"],
.form-grid-shop select,
.form-grid-shop textarea {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1rem;
}

/* Estilo do Botão de Upload Customizado */
.custom-file-upload {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background-color: var(--navbar-bg); 
    cursor: pointer;
    transition: all 0.2s ease;
}
.custom-file-upload:hover {
    background-color: var(--light);
    border-color: var(--primary);
}
.custom-file-upload i {
    color: var(--primary);
    margin-right: 12px;
    font-size: 1.1rem;
}
.custom-file-upload #file-upload-text {
    font-size: 0.9rem;
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-grid-shop .btn-group {
    display: flex;
    gap: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    grid-column: span 4;
}

/* Preview da Imagem (Admin) */
.image-preview-box {
    position: relative;
    width: 150px; 
    height: 150px;
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
    margin-top: 5px;
    background-color: var(--light);
}
.image-preview-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.remove-image-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.8rem;
    z-index: 10;
    transition: background 0.2s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.remove-image-btn:hover {
    background: var(--danger-dark);
}

/* Tabela de Produtos (Admin) */
.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.status-active {
    background: #e6ffed;
    color: var(--success);
    border: 1px solid #c8e6c9;
}
.status-draft {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

/* Media Queries (Ajuste para telas menores) */
@media (max-width: 900px) {
    .form-grid-shop {
        grid-template-columns: 1fr;
    }
    .form-grid-shop .span-1,
    .form-grid-shop .span-2,
    .form-grid-shop .span-3,
    .form-grid-shop .span-4 {
        grid-column: span 1;
    }
    
    .product-grid {
        grid-template-columns: 1fr;
    }
}


/* ============================================== */
/* === 7. ESTILOS DO MODAL DE DETALHES (FIX) ======= */
/* ============================================== */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%; 
    height: 100%; 
    background: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    padding: 20px;
    
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--navbar-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    display: flex;
    width: 100%;
    max-width: 800px;
    position: relative;
    overflow: hidden; 
    
    transform: scale(0.95);
    transition: transform 0.3s ease;
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.8rem;
    color: var(--secondary);
    cursor: pointer;
    z-index: 10;
    padding: 5px;
    line-height: 1;
}
.modal-close-btn:hover {
    color: var(--dark);
}

.modal-image-container {
    width: 45%;
    flex-shrink: 0;
    background: var(--light);
    display: flex;
    align-items: center;
    justify-content: center;
    border-right: 1px solid var(--border);
}
.modal-image-container img {
    width: 100%;
    height: 100%;
    min-height: 400px;
    object-fit: cover;
}
.modal-image-container .modal-placeholder-icon {
    font-size: 6rem;
    color: var(--secondary);
    opacity: 0.5;
}

.modal-details {
    width: 55%;
    padding: 30px;
    display: flex;
    flex-direction: column;
}

.modal-title {
    font-size: 1.8rem;
    color: var(--dark);
    margin-bottom: 15px;
}

.modal-description {
    font-size: 1rem;
    color: var(--secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1; 
    max-height: 300px; 
    overflow-y: auto; 
}

.modal-footer {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    margin-top: auto; 
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-price {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary);
}
.modal-footer .btn-buy i {
    margin-right: 5px;
}

/* Modal Responsivo (Mobile) */
@media (max-width: 768px) {
    .modal-content {
        flex-direction: column;
        max-width: 400px; 
        max-height: 90vh; 
    }
    .modal-image-container {
        width: 100%;
        height: 200px; 
        border-right: none;
        border-bottom: 1px solid var(--border);
    }
    .modal-image-container img {
        min-height: 0; 
    }
    .modal-details {
        width: 100%;
        padding: 20px;
        overflow-y: auto; 
    }
    .modal-description {
        max-height: none; 
    }
    .modal-footer {
        flex-direction: column;
        gap: 15px;
        align-items: stretch; 
    }
    .modal-price {
        text-align: center;
    }
}


/* ============================================== */
/* === 8. NOVO: ESTILOS DA PÁGINA DE FERRAMENTAS (FIX) ===== */
/* ============================================== */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.tool-card-portrait {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background-color: var(--navbar-bg);
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
    height: 100%; 
    overflow: hidden; 
}
.tool-card-portrait:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    border-color: var(--primary);
}

.tool-card-portrait::before {
    content: '';
    display: block;
    width: calc(100% + 40px); 
    height: 8px; 
    position: relative;
    top: -30px; 
    left: -20px; 
    margin-bottom: 10px;
    border-radius: 8px 8px 0 0; 
}

/* Aplicação dos gradientes (o ícone real vai para o título) */
.tools-grid .tool-card-portrait:nth-child(1)::before {
    background: linear-gradient(90deg, #108dc7, #ef8e38);
}
.tools-grid .tool-card-portrait:nth-child(2)::before {
    background: linear-gradient(90deg, #FF6F61, #6B5B95);
}
.tools-grid .tool-card-portrait:nth-child(3)::before {
    background: linear-gradient(90deg, #00C9FF, #92FE9D);
}
.tools-grid .tool-card-portrait:nth-child(4)::before {
    background: linear-gradient(90deg, #4cc9f0, #4361ee);
}
.tools-grid .tool-card-portrait:nth-child(5)::before {
    background: linear-gradient(90deg, #2a9d8f, #e9c46a);
}
.tools-grid .tool-card-portrait:nth-child(6)::before {
    background: linear-gradient(90deg, #f4a261, #e76f51);
}
.tools-grid .tool-card-portrait:nth-child(7)::before {
    background: linear-gradient(90deg, #9b59b6, #3498db);
}
.tools-grid .tool-card-portrait:nth-child(8)::before {
    background: linear-gradient(90deg, #5dade2, #2e86c1);
}


/* Estilo: Ícone inserido no Título */
.tool-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.tool-title i {
    margin-right: 10px;
    font-size: 1.2em; 
}


.tool-description {
    font-size: 1rem;
    color: var(--secondary);
    margin-bottom: 20px;
    flex-grow: 1; /* Para alinhar o botão */
}

.tool-cta {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary);
    transition: color 0.3s ease;
    margin-top: auto; /* Empurra para o fundo */
}
.tool-card-portrait:hover .tool-cta {
    color: var(--primary-dark);
}
.tool-cta i {
    margin-left: 8px;
    transition: margin-left 0.3s ease;
}
.tool-card-portrait:hover .tool-cta i {
    margin-left: 12px;
}

/* Mockups de Componentes (para a seção Ferramentas) */
.search-bar-mock {
    max-width: 500px;
    margin: 0 auto 30px;
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--light);
    display: flex;
    align-items: center;
    color: var(--secondary);
}
.search-bar-mock input {
    border: none;
    background: transparent;
    width: 100%;
    padding: 0 0 0 10px;
    font-size: 1rem;
    color: var(--dark);
}
.filter-tabs-mock {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}
.filter-tabs-mock .tab {
    padding: 8px 15px;
    border-radius: 50px;
    background: var(--light);
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: default;
    transition: background 0.2s;
}
.filter-tabs-mock .tab.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
}


/* ============================================== */
/* === 11. NOVO: BARRA DE FERRAMENTAS LATERAL ======= */
/* ============================================== */
.floating-bar {
    position: fixed;
    right: 20px;
    bottom: 100px; /* Acima do footer */
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.floating-bar a {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.8rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease;
    text-decoration: none;
}
.floating-bar a:hover {
    transform: scale(1.1);
}

.floating-whatsapp {
    background-color: #25d366; /* Verde WhatsApp */
}

.floating-instagram {
    /* Gradiente típico do Instagram */
    background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}


/* ============================================== */
/* === 12. RESPONSIVO (extraído do digyo.css) ========= */
/* ============================================== */
@media (max-width: 900px) { /* (Ponto de quebra para o grid) */
    .hero-grid {
        grid-template-columns: 1fr; /* Coluna única */
    }
    .hero-content {
        order: 2; /* Marketing vem depois do login */
    }
    .login-box-wrapper {
        order: 1; /* Login vem primeiro */
        width: 100%;
        max-width: 420px; 
        margin: 0 auto;
    }
    .mission-grid {
        grid-template-columns: 1fr;
    }
    
    /* Move a barra flutuante para baixo em telas pequenas */
    .floating-bar {
        bottom: 70px; 
        right: 15px;
        gap: 10px;
    }
    .floating-bar a {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
  header nav ul {
    display: none; /* Esconde menu desktop */
  }
  .menu-toggle {
    display: block; /* Mostra menu hambúrguer */
  }
  .public-main {
    padding-top: 100px; /* Menos padding no mobile */
  }
}

/* =================================================== */
/* === NOVO: ESTILOS DO BOTÃO GRADIENTE (LOJA INTERNA) == */
/* =================================================== */
.product-button-group .btn-gradient,
.modal-footer .btn-gradient {
    /* Cores (hardcoded) da vitrine pública */
    background: linear-gradient(45deg, #f72585, #4361ee);
    color: white;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    
    /* Garante que o texto e ícone fiquem brancos (override) */
    color: white !important;
}

.product-button-group .btn-gradient:hover,
.modal-footer .btn-gradient:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background-position: right center;
}

/* ========================================================= */
/* === ATUALIZAÇÃO v5.1: CORREÇÃO DE LEGIBILIDADE (MODAL) === */
/* ========================================================= */

/* 1. BARRA DE PESQUISA (Ajuste de Cor para Tema Claro) */
.shop-header-section { background: transparent; padding: 10px 0 40px; text-align: center; }
.shop-header-content h1 { font-size: 1.8rem; margin-bottom: 5px; color: var(--dark); } /* Texto escuro */
.shop-header-content p { font-size: 1rem; color: var(--secondary); }

.shop-sticky-wrapper {
    position: -webkit-sticky; 
    position: sticky; 
    /* AUMENTADO PARA 80px (Para não esconder atrás do menu do Dashboard) */
    top: 80px; 
    z-index: 10;
    margin-top: -30px; 
    pointer-events: none;
}

.shop-search-bar {
    pointer-events: auto;
    /* Fundo Branco Puro no Modo Claro */
    background: #ffffff; 
    border-radius: 12px; padding: 10px 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #e0e0e0;
    max-width: 800px; margin: 0 auto;
    display: flex; align-items: center; gap: 15px;
}

.modern-search-box {
    flex: 1; display: flex; align-items: center; gap: 12px;
    background: #f3f4f6; /* Cinza bem clarinho */
    border: 1px solid transparent; border-radius: 8px; padding: 8px 15px; transition: all 0.3s ease;
}
.modern-search-box input { border: none; background: transparent; outline: none; width: 100%; font-size: 0.95rem; color: #333; }
.modern-search-box i { color: #666; }

.btn-toggle-filters {
    background: #f3f4f6; border: 1px solid transparent; color: #555;
    padding: 8px 15px; border-radius: 8px; cursor: pointer;
    font-size: 0.9rem; font-weight: 600; display: flex; align-items: center; gap: 8px;
}

/* Gaveta de Filtros */
.shop-filter-drawer {
    pointer-events: auto; max-width: 800px; margin: 0 auto;
    background: #ffffff; /* Branco puro */
    border: 1px solid #e0e0e0; border-top: none; border-radius: 0 0 12px 12px;
    overflow: hidden; max-height: 0; opacity: 0;
    transform: translateY(-10px); transition: all 0.3s ease;
}
.shop-filter-drawer.open { max-height: 400px; opacity: 1; transform: translateY(0); }
.drawer-content { padding: 20px; }
.chips-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-cat {
    background: #f3f4f6; border: 1px solid #e0e0e0; color: #555;
    padding: 6px 14px; border-radius: 50px; font-size: 0.85rem; font-weight: 600; cursor: pointer;
}
.btn-cat.active { background: var(--primary); color: #fff; border-color: var(--primary); }


/* 2. MODAL DE PRODUTO - CORREÇÃO DE CORES (LIGHT MODE) */
/* Aqui forçamos Branco e Preto para garantir leitura */

.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 {
    /* Fundo BRANCO OBRIGATÓRIO no modo claro */
    background-color: #ffffff !important; 
    color: #333333 !important;
    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: #333333 !important; /* X escuro no modo claro */
}

.modal-image-container {
    flex: 0 0 40% !important; width: 40% !important; min-width: 40% !important;
    background-color: #f8f9fa !important; /* Fundo cinza claro */
    padding: 0 !important; border-right: 1px solid #e0e0e0 !important;
    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; }

.modal-details {
    flex: 1 !important; width: 60% !important; padding: 30px !important;
    display: flex; flex-direction: column; 
    color: #333333 !important; /* Texto Escuro */
    overflow: hidden;
}

.modal-title { font-size: 1.5rem; margin-bottom: 10px; font-weight: 700; color: #000000 !important; }
.modal-description { font-size: 0.95rem; color: #555555 !important; flex-grow: 1; overflow-y: auto; max-height: 300px; }
.modal-price { color: #000000 !important; font-weight: 800; font-size: 1.5rem; }

.modal-footer { margin-top: 20px; padding-top: 15px; border-top: 1px solid #e0e0e0 !important; display: flex; justify-content: space-between; align-items: center; }
.modal-action-btn { padding: 0 30px; height: 45px; border-radius: 6px; background: linear-gradient(45deg, #6200ea, #4361ee); color: white; border: none; font-weight: 600; display: flex; align-items: center; gap: 8px; }


/* 3. MODO ESCURO (DARK MODE) - REGRAS ESPECÍFICAS */
/* Quando o body tem .dark-mode, invertemos as cores do modal */

body.dark-mode .shop-search-bar,
body.dark-mode .shop-filter-drawer { background: #1e1e2d !important; border-color: #333; }
body.dark-mode .modern-search-box { background: #2b2b36; }
body.dark-mode .modern-search-box input { color: #fff; }
body.dark-mode .btn-cat { background: #2b2b36; border-color: #444; color: #ccc; }
body.dark-mode .btn-toggle-filters { background: #2b2b36; border-color: #444; color: #ccc; }

body.dark-mode #product-modal {
    background-color: #1e1e2d !important; /* Fundo Escuro */
    border: 1px solid #333;
}
body.dark-mode #product-modal .modal-title, 
body.dark-mode #product-modal .modal-price { color: #fff !important; }
body.dark-mode #product-modal .modal-description { color: #aaa !important; }
body.dark-mode #product-modal .modal-close-btn { color: #fff !important; }
body.dark-mode .modal-image-container { background-color: #2b2b36 !important; border-right-color: #444 !important; }
body.dark-mode .modal-footer { border-top-color: #444 !important; }

/* Z-Index Fix */
div.swal2-container { z-index: 10000 !important; }

/* Responsividade 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: 250px; border-right: none; border-bottom: 1px solid #e0e0e0; }
    .modal-details { padding: 20px !important; height: auto; }
    .shop-search-bar { flex-direction: column; align-items: stretch; }
}

/* ========================================================= */
/* 13. BADGES / ETIQUETAS DE PRODUTO                         */
/* ========================================================= */

.product-card {
    position: relative; /* Necessário para posicionar a badge */
}

.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #ff0080; /* Rosa Magenta Vibrante */
    color: white;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(255, 0, 128, 0.4);
    z-index: 10;
    letter-spacing: 0.5px;
    pointer-events: none; /* Deixa clicar no card atrás dela */
}

/* Ajuste Dark Mode (Opcional, pois rosa já contrasta bem) */
html.dark-mode .product-badge {
    box-shadow: 0 4px 15px rgba(255, 0, 128, 0.2);
}