/* ============================================
   COMPREFÁCIL PRO 2025 - ESTILOS GLOBAIS
   Padrão visual moderno e responsivo
   ============================================ */

/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Variáveis CSS para cores do sistema */
:root {
    --primary-color: #007bff;
    --primary-hover: #0056b3;
    --success-color: #28a745;
    --error-color: #dc3545;
    --info-color: #17a2b8;
    --background-color: #f3f6fa;
    --text-color: #2f2f2f;
    --white: #ffffff;
    --border-radius: 12px;
    --border-radius-small: 8px;
    --shadow-light: 0 4px 10px rgba(0, 0, 0, 0.08);
    --transition: 0.2s ease;
}

/* Configurações do body */
body {
    font-family: 'Inter', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    min-height: 100vh;
}

/* Container principal centralizado */
.container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

/* ============================================
   COMPONENTES - CARDS E CONTAINERS
   ============================================ */

.card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    padding: 20px;
    margin: 10px;
    width: 100%;
    max-width: 400px;
}

/* ============================================
   COMPONENTES - BOTÕES
   ============================================ */

button, .btn {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 12px 24px;
    border-radius: var(--border-radius-small);
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    font-family: inherit;
    transition: background-color 0.3s ease;
    width: 100%;
}

button:hover, .btn:hover {
    background-color: var(--primary-hover);
}

button:active, .btn:active {
    transform: translateY(1px);
}

/* ============================================
   COMPONENTES - FORMULÁRIOS
   ============================================ */

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e1e5e9;
    border-radius: var(--border-radius-small);
    font-size: 16px;
    font-family: inherit;
    transition: border-color var(--transition);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

input:required:invalid {
    border-color: var(--error-color);
}

/* ============================================
   COMPONENTES - TÍTULOS
   ============================================ */

h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 15px;
    text-align: center;
}

h1 {
    font-size: 28px;
}

h2 {
    font-size: 24px;
}

h3 {
    font-size: 20px;
}

/* ============================================
   COMPONENTES - ALERTAS (MENSAGENS FLASK)
   ============================================ */

.alert {
    padding: 12px 16px;
    border-radius: var(--border-radius-small);
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 500;
}

.alert.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert.info {
    background-color: #cce5ff;
    color: #004085;
    border: 1px solid #b3d7ff;
}

/* ============================================
   COMPONENTES - GRID E LAYOUT
   ============================================ */

.grid {
    display: grid;
    gap: 20px;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.flex {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* ============================================
   RESPONSIVIDADE - BREAKPOINT PRINCIPAL: 768px
   ============================================ */

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    .card {
        padding: 15px;
        margin: 5px;
    }
    
    h1 {
        font-size: 24px;
    }
    
    h2 {
        font-size: 20px;
    }
    
    h3 {
        font-size: 18px;
    }
    
    /* Empilhar colunas em telas menores */
    .grid-2,
    .grid-3 {
        grid-template-columns: 1fr;
    }
    
    /* Botões ocupam 100% da largura */
    button, .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    .card {
        padding: 12px;
    }
    
    h1 {
        font-size: 22px;
    }
    
    h2 {
        font-size: 18px;
    }
}

/* ============================================
   UTILITÁRIOS
   ============================================ */

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.hidden {
    display: none;
}

/* ============================================
   PADRONIZAÇÃO DE ÍCONES - COR ÚNICA DO SISTEMA
   ============================================ */

/* Cor padrão para todos os ícones do sistema */
.bi, .bi::before {
    color: #00bfff !important;
    font-weight: 600 !important;
}

/* Ícones específicos com tamanhos padronizados */
.bi-search {
    font-size: 1rem;
}

.bi-funnel {
    font-size: 1.1rem;
}

.bi-cart {
    font-size: 1rem;
}

.bi-cart3 {
    font-size: 1.2rem;
}

.bi-person {
    font-size: 1rem;
}

.bi-box {
    font-size: 1rem;
}

.bi-tag {
    font-size: 1rem;
}

.bi-hash {
    font-size: 1rem;
}

.bi-arrow-repeat {
    font-size: 0.9rem;
}

/* Aplicar cor padrão em todos os contextos */
.catalogo-container .bi,
.filtro-categorias .bi,
.busca-produtos .bi,
.produto-card .bi,
.card .bi,
.btn .bi,
.form-control .bi {
    color: #00bfff !important;
    font-weight: 600 !important;
}

/* Exceções para botões com fundo colorido */
.btn-neon .bi {
    color: #0f172a !important; /* Texto escuro em botão claro */
}

.btn-outline-neon .bi {
    color: #00bfff !important; /* Cor padrão em botão outline */
}

/* Garantir que emojis também sigam o padrão visual */
.emoji-icon {
    filter: hue-rotate(200deg) saturate(1.5) brightness(1.2);
}

/* ============================================
   ANIMAÇÕES E TRANSIÇÕES
   ============================================ */

.fade-in {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Transições suaves em elementos interativos */
button, .btn, input, .card {
    transition: all var(--transition);
}
