/* ═══════════════════════════════════════════════════════════════
   🎆 PIROTECNIA JOCOTEPEC - ESTILOS PRINCIPALES
   ═══════════════════════════════════════════════════════════════ */

/* 🔧 CORRECCIÓN INMEDIATA: Estilos extraídos de inline */

/* ================== CLASES UTILITARIAS ================== */
.display-none {
    display: none !important;
}

.display-block {
    display: block !important;
}

.display-flex {
    display: flex !important;
}

/* ================== LAYOUT HELPERS ================== */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.gap-1 { gap: 1rem; }
.gap-half { gap: 0.5rem; }

/* ================== HEADER STYLES ================== */
.logo-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    padding: 1rem;
    min-width: 200px;
    z-index: 1000;
}

.user-info {
    align-items: center;
    gap: 0.5rem;
}

.user-info .btn-header {
    padding: 0.3rem 0.8rem;
    margin-left: 0.5rem;
}

.admin-user-selector {
    background: rgba(255,255,255,0.2);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    align-items: center;
    gap: 0.5rem;
}

.admin-user-selector span {
    font-size: 0.9rem;
    font-weight: bold;
}

.admin-user-selector select {
    background: white;
    color: var(--azul);
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: bold;
}

.admin-user-selector .btn-header {
    padding: 0.3rem 0.8rem;
    background: var(--dorado);
    border-color: var(--dorado);
}

/* ================== CART STYLES ================== */
.cart-count {
    background: #dc2626;
    color: white;
    border-radius: 50%;
    padding: 0.2rem 0.5rem;
    font-size: 0.8rem;
    margin-left: 0.5rem;
}

.btn-finalizar {
    margin-top: 1.5rem;
}

.btn-vaciar-carrito {
    margin-top: 0.5rem;
}

/* ================== VENDEDOR SELECTOR ================== */
.vendedor-selector {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
    color: white;
}

.vendedor-selector .header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.vendedor-selector .info-group {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.vendedor-selector .info-group span {
    font-size: 1.2rem;
}

.vendedor-selector h4 {
    margin: 0;
    font-size: 1.1rem;
}

.vendedor-selector p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.vendedor-selector .controls {
    display: flex;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.vendedor-selector select {
    background: white;
    color: #333;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    min-width: 200px;
}

.vendedor-selector button {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
}

/* ================== DESCUENTOS ================== */
.carrito-incentivos {
    margin: 1rem 0;
}

.incentivo-2000 {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(255,107,107,0.3);
}

.incentivo-2000 .title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.incentivo-2000 .details {
    font-size: 0.9rem;
    opacity: 0.9;
}

.incentivo-2000 .faltante {
    font-weight: bold;
}

.incentivo-2000 .ahorro {
    font-weight: bold;
}

.incentivo-2000 .footer {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    opacity: 0.8;
}

.felicitacion-2000 {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 1rem;
    border-radius: 10px;
    margin-bottom: 0.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(16,185,129,0.3);
}

.felicitacion-2000 .title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.felicitacion-2000 .amount {
    font-weight: bold;
    font-size: 1.2rem;
}

.incentivo-mas {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    color: white;
    padding: 0.8rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 10px rgba(139,92,246,0.2);
    font-size: 0.9rem;
}

/* ================== STATS GRID ================== */
.stats-grid {
    display: grid;
    gap: 1.5rem;
}

.stats-grid.auto-fit {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.stats-grid.single-column {
    grid-template-columns: 1fr;
}

.stats-grid.two-columns {
    grid-template-columns: 1fr 1fr;
}

.stats-grid.three-columns {
    grid-template-columns: 2fr 1fr;
}

/* ================== ADMIN PANELS ================== */
.admin-tab {
    display: none;
}

.admin-tab.active {
    display: block;
}

.productos-admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.productos-admin-header h3 {
    margin: 0;
}

.productos-filtros-card {
    margin-bottom: 1.5rem;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
}

.filtros-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
    justify-content: space-between;
}

.filtros-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.filtros-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filtros-label label {
    font-weight: 600;
    color: #0891b2;
}

/* ================== RESPONSIVE UTILITIES ================== */
@media (max-width: 768px) {
    .stats-grid.auto-fit {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .vendedor-selector .header-flex {
        flex-direction: column;
        align-items: stretch;
    }
    
    .productos-admin-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filtros-flex {
        flex-direction: column;
        align-items: stretch;
    }
}

/* ================== SECURITY INDICATORS ================== */
.security-indicator {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: bold;
    font-size: 0.9rem;
    display: inline-block;
    margin-top: 0.5rem;
}

.security-indicator.secure {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.security-indicator.warning {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fbbf24;
}

.security-indicator.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

/* =======================
   📦 COMPONENTES ESPECIALIZADOS
   ======================= */

/* Selects personalizados */
.select-admin {
    background: white;
    color: var(--azul);
    border: none;
    padding: 0.3rem 0.8rem;
    border-radius: 6px;
    font-weight: bold;
    cursor: pointer;
}

.select-vendor {
    background: white;
    color: #333;
    border: none;
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-weight: bold;
    cursor: pointer;
    min-width: 200px;
}

/* Botones especializados */
.btn-transparent {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.6rem;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-transparent:hover {
    background: rgba(255,255,255,0.3);
}

.btn-gradient {
    background: linear-gradient(135deg,#7c3aed 0%,#5b21b6 100%);
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: transform 0.2s ease;
}

.btn-gradient:hover {
    transform: translateY(-2px);
}

.btn-header-action {
    padding: 0.3rem 0.8rem;
    background: var(--dorado);
    border-color: var(--dorado);
}

.btn-large {
    padding: 1rem;
    font-size: 1.1rem;
    font-weight: bold;
}

/* Panels informativos con colores específicos */
.panel-info-blue {
    background: #dbeafe;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.panel-light-blue {
    background: #f0f9ff;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    animation: fadeIn 0.5s ease;
}

.panel-success {
    background: #e8f5e8;
    border: 2px solid #4CAF50;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.panel-warning {
    background: #fff3e0;
    border: 2px solid #FF9800;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.panel-purple {
    background: #f3e5f5;
    border: 2px solid #9C27B0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.5s ease;
}

.panel-gray {
    background: var(--gris-claro);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

/* Inputs con estilo consistente */
.input-styled {
    padding: 0.5rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    transition: border-color 0.3s ease;
}

.input-styled:focus {
    border-color: var(--azul);
    outline: none;
}

.input-medium {
    width: 200px;
}

/* Área de subida de imágenes */
.image-upload-area {
    padding: 1rem;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
    text-align: center;
    transition: border-color 0.3s ease;
}

.image-upload-area:hover {
    border-color: var(--azul);
}

/* Tabla headers sin bordes */
.table-header-clean {
    padding: 1rem;
    border: none;
}

.table-header-center {
    text-align: center;
}

/* =======================
   🎯 RESPONSIVE Y MOBILE
   ======================= */
@media (max-width: 768px) {
    .flex-wrap-mobile {
        flex-wrap: wrap;
    }
    
    .full-width-mobile {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn-large {
        padding: 0.8rem;
        font-size: 1rem;
    }
    
    .panel-info-blue,
    .panel-light-blue,
    .panel-success,
    .panel-warning,
    .panel-purple {
        padding: 1rem;
    }
}

/* =======================
   🎨 ANIMACIONES GLOBALES
   ======================= */
@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}