/* ╔══════════════════════════════════════════════════════════════════╗
   ║                    SISTEMA DE DISEÑO CSS                       ║
   ║  Breakpoints: 480px · 768px · 1024px · 1440px                ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  1. VARIABLES Y CONFIGURACIÓN BASE                            ║
   ╚══════════════════════════════════════════════════════════════════╝ */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --fg-primary: #ffffff;
  --fg-muted: #888888;
  --accent: #ff4d00;
  --accent-hover: #ff6a2c;
  --border: #2a2a2a;
  --bg-Blackpure: #000;
  --sidebar-width: 260px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: 0.3s ease;
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  2. RESET & BASE                                              ║
   ╚══════════════════════════════════════════════════════════════════╝ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 12px;}
body { font-family: 'Inter', sans-serif; background-color: var(--bg-Blackpure); color: var(--fg-primary); overflow-x: hidden; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  3. ANIMACIONES                                               ║
   ╚══════════════════════════════════════════════════════════════════╝ */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pulse-skeleton { 0% { background-position: -200px 0; } 100% { background-position: calc(200px + 100%) 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ripple { to { transform: scale(4); opacity: 0; } }
@keyframes caption-in { to { opacity: 1; transform: translateY(0); } }
@keyframes scroll-brands { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes whatsapp-pulse { 0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5); } 50% { transform: scale(1.1); box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }
@keyframes chatPulse { 0%, 100% { box-shadow: 0 4px 20px rgba(255, 77, 0, 0.4), 0 0 0 0 rgba(255, 77, 0, 0.3); } 50% { box-shadow: 0 4px 20px rgba(255, 77, 0, 0.4), 0 0 0 12px rgba(255, 77, 0, 0); } }
@keyframes chatBadgePop { 0% { transform: scale(0); } 70% { transform: scale(1.2); } 100% { transform: scale(1); } }
@keyframes chatBubbleIn { 0% { opacity: 0; transform: translateY(10px) scale(0.95); } 100% { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes chatTypingDot { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-6px); opacity: 1; } }
@keyframes chatLoadDot { 0%, 100% { opacity: 0.2; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.2); } }
@keyframes chatFlash { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes cajaPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
@keyframes qty-pop { 0% { transform: scale(1); } 50% { transform: scale(1.3); } 100% { transform: scale(1); } }
@keyframes slideUpEfectivo { from { opacity: 0; transform: translateY(30px) scale(0.95); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  4. UTILIDADES GENERALES                                      ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.font-display { font-family: 'Bebas Neue', sans-serif; }
.hidden { display: none; }
.rotate-180 { transform: rotate(180deg); }

/* Ripple */
.btn-primary, .btn-icon { position: relative; overflow: hidden; }
.ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, 0.4); transform: scale(0); animation: ripple 0.6s linear; pointer-events: none; }

/* Animaciones de entrada */
.fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; }
.reveal { opacity: 0; transform: translateY(40px); transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1); }
.reveal.active { opacity: 1; transform: translateY(0); }

/* Skeleton loading */
.skeleton { background-color: #232323; background-image: linear-gradient(to right, #232323 0%, #2e2e2e 20%, #232323 40%, #232323 100%); background-size: 200px 100%; background-repeat: no-repeat; border-radius: 4px; animation: pulse-skeleton 1.5s ease-in-out infinite; }
.skeleton-card { border-radius: 16px; height: 320px; }

/* Spinner */
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-radius: 50%; border-top-color: #fff; animation: spin 1s ease-in-out infinite; }

/* Bloquear scroll con modal */
html.modal-open, body.modal-open { overflow: hidden !important; touch-action: none; position: fixed !important; width: 100%; }
body.modal-open { margin: 0 !important; padding-right: 0 !important; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  5. APP CONTAINERS & LOADER                                  ║
   ╚══════════════════════════════════════════════════════════════════╝ */
#app-tienda, #app-admin { transition: opacity 0.4s ease-in-out; }
#cart-modal.modal-overlay { z-index: 300 !important; }

/* Loader */
#loader-screen {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background-color: #000; z-index: 999999;
  display: flex; justify-content: center; align-items: center;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}
#loader-screen.loader-hidden { opacity: 0; visibility: hidden; }
.loader-content { text-align: center; width: 300px; display: flex; flex-direction: column; align-items: center; }
.loader-logo-container { margin-bottom: 30px; width: 100%; }
.loader-gif { width: 100%; max-width: 250px; height: auto; border-radius: 10px; }
.loader-text { font-family: 'Bebas Neue', sans-serif; font-size: 1.5rem; letter-spacing: 4px; color: #888; margin-top: 15px; text-transform: uppercase; }
.loader-bar-bg { width: 100%; height: 4px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.loader-bar-fill { width: 0%; height: 100%; background: linear-gradient(90deg, var(--accent), #ff6a2c); transition: width 0.3s ease-out; }

/* Noise overlay */
.noise-overlay {
  position: fixed; inset: 0; opacity: 0.03; pointer-events: none; z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  6. NAVEGACIÓN                                                ║
   ╚══════════════════════════════════════════════════════════════════╝ */

/* ── Contenedor nav con WRAP y CENTRADO ── */
#nav-links-container { 
    display: flex; 
    align-items: center; 
    gap: 8px 12px; 
    flex-wrap: wrap; 
    justify-content: center;
}

/* ── Links normales (desktop) ── */
.nav-link {
    font-family: 'Bebas Neue', sans-serif !important;
    letter-spacing: 3px;
    font-size: 1.3rem;
    position: relative;
    color: var(--fg-muted);
    transition: color var(--transition);
    white-space: nowrap;
    padding: 6px 0;
}
.nav-link::after { 
    content: ''; 
    position: absolute; 
    bottom: -4px; 
    left: 0; 
    width: 0; 
    height: 2px; 
    background: var(--accent); 
    transition: width var(--transition); 
}
.nav-link:hover { color: var(--fg-primary); }
.nav-link:hover::after { width: 100%; }

/* ── Dropdown de subcategorías ── */
.nav-item-dropdown { 
    position: relative; 
}
.nav-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 180px;
    padding: 8px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}
.nav-item-dropdown:hover .nav-dropdown-menu { 
    opacity: 1; 
    visibility: visible; 
    transform: translateY(0); 
}
.dropdown-link { 
    display: block; 
    padding: 8px 16px; 
    color: var(--fg-muted); 
    font-size: 13px; 
    transition: all 0.2s; 
}
.dropdown-link:hover { 
    background: rgba(255,255,255,0.05); 
    color: white; 
}

/* ── Badge de notificación ── */
.notification-badge {
    position: absolute;
    top: 5px;
    right: 10px;
    background-color: #ef4444;
    color: white;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    font-size: 11px;
    font-weight: bold;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.5);
    z-index: 10;
    border: 2px solid #1f2937;
}

/* ═══════════════════════════════════════════════════════════════════
   MENÚ MÓVIL - PANEL COMPLETO
   ═══════════════════════════════════════════════════════════════════ */

/* ── Panel trasero ── */
#mobileMenu {
    position: fixed;
    inset: 0;
    background: rgba(10, 10, 10, 0.98);
    z-index: 100;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0;
    overflow-y: auto;
    padding: 100px 30px 40px;
    transform: translateX(100%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                opacity 0.3s ease, 
                visibility 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    pointer-events: none;
}

#mobileMenu.active {
    transform: translateX(0);
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* ── Contenedor de links ── */
#mobile-links-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding-bottom: 30px;
}

/* ── Links principales (Inicio, Categorías) ── */
.mobile-nav-link {
    font-family: 'Bebas Neue', sans-serif;
    letter-spacing: 4px;
    font-size: 1.8rem;
    color: var(--fg-muted);
    text-decoration: none;
    padding: 18px 24px;
    width: 100%;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
    display: block;
    -webkit-tap-highlight-color: transparent;
}

.mobile-nav-link:hover,
.mobile-nav-link:active {
    color: white;
    background: rgba(255, 77, 0, 0.08);
}

/* ── Link secundario (Ver Todas las Marcas) ── */
.mobile-nav-link-secondary {
    font-size: 1.1rem;
    letter-spacing: 3px;
    color: #555;
    margin-top: 12px;
    border-bottom: none;
}

.mobile-nav-link-secondary:hover {
    color: var(--accent);
}

/* ── Separador visual entre secciones ── */
.mobile-separator {
    width: 50px;
    height: 2px;
    background: var(--accent);
    margin: 8px 0;
    border-radius: 2px;
    opacity: 0.3;
    flex-shrink: 0;
}

/* ── Botón X para cerrar menú móvil ── */
.mobile-close-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 120;
    width: 48px;
    height: 48px;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--fg-muted);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    font-family: Arial, sans-serif;
}

/* ── Botón X reutilizable (filtros, modales) ── */
.modal-x-btn {
    width: 40px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.04);
    color: #666;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
    padding: 0;
    font-family: Arial, sans-serif;
    flex-shrink: 0;
}



.modal-x-btn:hover,
.modal-x-btn:active {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.12);
    color: #ef4444;
    transform: rotate(90deg);
}

#mobileMenu.active .mobile-close-btn {
    display: flex;
}

.mobile-close-btn:hover,
.mobile-close-btn:active {
    border-color: #ef4444;
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    transform: rotate(90deg);
}

/* ── ACORDEÓN DE MARCAS ── */
.mobile-accordion {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.mobile-accordion-toggle {
    width: 100%;
    padding: 18px 24px;
    background: none;
    border: none;
    border-bottom: none;
    color: var(--fg-muted);
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.8rem;
    letter-spacing: 4px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-accordion-toggle:hover,
.mobile-accordion-toggle:active {
    color: white;
    background: rgba(255, 77, 0, 0.08);
}

/* Flecha del acordeón */
.mobile-accordion-arrow {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    opacity: 0.5;
}

.mobile-accordion-arrow.rotated {
    transform: rotate(180deg);
    opacity: 1;
}

/* Contenido colapsable */
.mobile-accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(0, 0, 0, 0.25);
}

.mobile-accordion-content.open {
    max-height: 500px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-accordion-content::-webkit-scrollbar { width: 3px; }
.mobile-accordion-content::-webkit-scrollbar-track { background: transparent; }
.mobile-accordion-content::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; }

/* ── Cada link de marca dentro del acordeón ── */
.mobile-brand-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 28px;
    color: #888;
    text-decoration: none;
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.15rem;
    letter-spacing: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.mobile-brand-link:last-child {
    border-bottom: none;
}

.mobile-brand-link:hover,
.mobile-brand-link:active {
    color: var(--accent);
    background: rgba(255, 77, 0, 0.06);
    padding-left: 36px;
}

/* Logo de marca pequeño */
.mobile-brand-logo {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
    opacity: 0.6;
    transition: opacity 0.2s;
}

.mobile-brand-link:hover .mobile-brand-logo {
    opacity: 1;
}

/* ── Hamburguesa ── */
.hamburger {
    width: 32px;
    height: 32px;
    position: relative;
    cursor: pointer;
    background: none;
    border: 2px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    z-index: 110;
    padding: 0;
    transition: all 0.3s ease;
}
.hamburger:hover {
    border-color: var(--accent);
    background: rgba(255, 77, 0, 0.1);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--fg-primary);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 9px; }
.hamburger span:nth-child(3) { bottom: 0; }

.hamburger.active {
    border-color: var(--accent);
    background: rgba(255, 77, 0, 0.15);
}
.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #nav-links-container { display: none; }
    .hamburger { display: flex; }
}


@media (min-width: 769px) {
    .modal-x-btn {
        display: none !important;
    }

    #mobileMenu {
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .hamburger { display: none !important; }
}

/* ── Pantallas muy pequeñas ── */
@media (max-width: 380px) {
    .mobile-nav-link {
        font-size: 1.5rem;
        padding: 14px 20px;
        letter-spacing: 3px;
    }
    .mobile-accordion-toggle {
        font-size: 1.5rem;
        padding: 14px 20px;
        letter-spacing: 3px;
    }
    .mobile-brand-link {
        font-size: 1rem;
        padding: 12px 20px;
        gap: 10px;
    }
    .mobile-brand-logo {
        width: 22px;
        height: 22px;
    }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  7. BOTONES                                                   ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.btn-primary {
  background: var(--accent); color: white;
  padding: 14px 32px; font-weight: 600; border-radius: 4px;
  transition: all var(--transition);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; border: none; cursor: pointer;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); box-shadow: 0 10px 30px rgba(255, 77, 0, 0.3); }
.btn-primary:active { transform: translateY(0); }

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 4px; border: none; cursor: pointer; transition: all 0.2s; }
.btn-success { background: #10b981; color: white; } .btn-success:hover { background: #059669; }
.btn-danger { background: #ef4444; color: white; } .btn-danger:hover { background: #dc2626; }
.btn-secondary { background: #4b5563; color: white; } .btn-secondary:hover { background: #374151; }

.btn-icon {
  width: 36px; height: 36px; border-radius: 6px; border: none;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05); color: white; transition: all 0.2s;
}
.btn-icon:hover { background: rgba(255,255,255,0.15); }
.btn-icon.delete:hover { background: rgba(239, 68, 68, 0.2); color: #ef4444; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  8. HERO SLIDER                                               ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.slideshow-container { position: relative; width: 100%; height: 100vh; overflow: hidden; }
.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1s ease-in-out; z-index: 1; }
.slide.active { opacity: 1; z-index: 2; }
.slide-bg { width: 100%; height: 100%; object-fit: cover; filter: brightness(0.4); }
.slide-overlay { position: absolute; inset: 0; background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.2) 100%); }
.slideshow-caption { position: absolute; top: 50%; left: 10%; transform: translateY(-50%); z-index: 3; max-width: 600px; width: 90%; }
.slideshow-caption__heading {
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2.5rem, 8vw, 6rem); line-height: 1; color: white;
  margin-bottom: 1rem; opacity: 0; transform: translateY(30px);
  animation: caption-in 0.8s ease forwards; animation-delay: 0.3s;
}
.slideshow-caption__subheading {
  font-size: clamp(1rem, 2vw, 1.25rem); color: #ccc;
  margin-bottom: 2rem; opacity: 0; transform: translateY(30px);
  animation: caption-in 0.8s ease forwards; animation-delay: 0.5s;
}
.slideshow-caption .btn-primary { opacity: 0; transform: translateY(30px); animation: caption-in 0.8s ease forwards; animation-delay: 0.7s; }
.slider-dots { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); display: flex; gap: 10px; z-index: 10; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: rgba(255,255,255,0.3); cursor: pointer; transition: all var(--transition); border: none; }
.dot.active { background: var(--accent); transform: scale(1.2); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  9. CATEGORÍAS                                                ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.category-card-large {
  position: relative; height: 400px; border-radius: 18px;
  overflow: hidden; border: 2px solid #fff;
  transition: all 0.4s ease; cursor: pointer;
  flex: 0 0 320px; max-width: 100%;
}
.category-card-large:hover { border-color: var(--accent); transform: translateY(-5px); box-shadow: 0 15px 30px rgba(0,0,0,0.3); }
.category-card-large img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.category-card-large:hover img { transform: scale(1.05); }
.category-card-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  display: flex; flex-direction: column; justify-content: flex-end; padding: 20px; text-align: center;
}

/* ── Modal categoría: título no se tape con botón Filtros en móvil ── */
@media (max-width: 768px) {
    #category-modal .sticky.top-0 {
        padding-top: 52px !important;
    }
    /* Botón Filtros: fijo al hacer scroll */
    #mobile-filter-toggle {
        position: fixed !important;
        z-index: 65 !important;
    }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  10. MARCAS (CARRUSEL)                                        ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.brands-track {
  display: flex;
  animation: scroll-brands 30s linear infinite;
  animation-play-state: paused;
}
.brands-track.visible { animation-play-state: running; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  11. TARJETA DE PRODUCTO (.card)                              ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.card {
  width: 100%;
  background: linear-gradient(180deg, #111, #080808);
  border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid #fff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .7);
  position: relative; font-family: 'Poppins', sans-serif;
  transition: transform 0.25s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(255, 120, 0, .45); box-shadow: 0 16px 50px rgba(0, 0, 0, .8), 0 0 25px rgba(255, 120, 0, .12), 0 0 60px rgba(255, 120, 0, .06); }

/* Imagen */
.top {
  position: relative; height: 220px; margin: 10px;
  border-radius: 12px; overflow: hidden; background: #0a0a0a;
  display: flex; justify-content: center; align-items: center;
}
.top::before { content: ''; position: absolute; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 120, 0, .25), transparent 70%); right: -40px; top: -20px; pointer-events: none; }
.top::after { content: ''; position: absolute; width: 120px; height: 120px; border-radius: 50%; background: radial-gradient(circle, rgba(0, 140, 255, .12), transparent 70%); left: -30px; bottom: -20px; pointer-events: none; }
.product {
  width: 100%; height: 100%; max-width: 180px; max-height: 180px;
  object-fit: contain; position: relative; z-index: 2; cursor: pointer;
  transition: transform 0.3s ease, opacity 0.2s ease;
  filter: drop-shadow(0 10px 15px rgba(0, 0, 0, .7)); padding: 10px; box-sizing: border-box;
}
.card:hover .product { transform: scale(1.06); }

/* Labels */
.label { position: absolute; z-index: 5; color: white; font-weight: 700; font-size: 10px; padding: 5px 12px; letter-spacing: 0.3px; }
.best { top: 8px; left: 0; border-radius: 0 8px 8px 0; background: linear-gradient(90deg, #ff7a00, #b44b00); }
.hot { right: 0; top: 8px; border-radius: 8px 0 0 8px; background: linear-gradient(90deg, #ff3300, #d60000); }

/* Contenido */
.content { padding: 0 12px 14px; text-align: center; }
.brand { color: #ff7a00; font-size: 11px; font-weight: 700; margin-bottom: 2px; letter-spacing: 1.5px; text-transform: uppercase; }
.title { color: white; font-size: 15px; line-height: 1.2; font-weight: 700; margin-top: 4px; text-transform: uppercase; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 36px; }

/* Precio */
.price-box { margin-top: 5px; display: flex; align-items: center; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 120, 0, .2); background: rgba(255, 120, 0, .03); padding: 8px 5px; gap: 0px; }
.old { flex: 1; color: #555; text-decoration: line-through; font-size: 12px; font-weight: 600; padding: 8px 6px; }
.discount { background: #0d0d0d; padding: 6px 10px; border-radius: 8px; box-shadow: 0 0 12px rgba(255, 120, 0, .3); flex-shrink: 0; }
.discount .num { color: #ff7a00; font-size: 15px; line-height: 1; font-weight: 800; }
.discount .txt { color: white; font-size: 9px; font-weight: 700; }
.new { flex: 1; padding: 6px 6px; }
.new .ahora { color: #ff7a00; font-size: 9px; font-weight: 700; }
.new .value { color: white; font-size: 13px; line-height: 1; font-weight: 800; }

/* Colores */
.color-circles-row { display: flex; justify-content: center; gap: 8px; margin-top: 8px; }
.color-circle {
  width: 28px; height: 28px; border-radius: 50%; cursor: pointer;
  border: 2.5px solid rgba(255, 255, 255, .12); transition: all 0.2s ease; flex-shrink: 0;
}
.color-circle:hover { transform: scale(1.2); border-color: rgba(255, 255, 255, .5); }
.color-circle.active { border-color: #ff7a00; box-shadow: 0 0 12px rgba(255, 120, 0, .5); transform: scale(1.15); }
.color { color: #666; font-size: 11px; font-weight: 600; min-height: 16px; transition: color 0.2s ease; }
.color.active-label { color: #ccc; }

/* Tallas */
.sizes { display: flex; justify-content: center; gap: 5px; margin-top: 8px; flex-wrap: wrap; }
.size {
  width: 36px; height: 28px; border-radius: 7px; border: 1px solid rgba(255, 255, 255, .1);
  background: #101827; color: white; font-size: 11px; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
  display: flex; align-items: center; justify-content: center; font-family: 'Poppins', sans-serif;
}
.size:hover { background: rgba(255, 255, 255, 0.08); border-color: rgba(255, 120, 0, .4); }
.size.active { background: white; color: black; box-shadow: 0 0 8px rgba(255, 120, 0, .3); }

/* Info */
.info {
  margin-top: 8px; border-radius: 10px; padding: 10px 12px;
  border: 1px solid rgba(255, 120, 0, .15);
  background: linear-gradient(90deg, rgba(255, 120, 0, .08), rgba(255, 120, 0, .02));
  display: flex; align-items: center; gap: 10px; text-align: left;
}
.info .icon { font-size: 22px; flex-shrink: 0; }
.info h3 { color: white; font-size: 11px; font-weight: 700; }
.info p { color: #777; margin-top: 1px; font-size: 10px; line-height: 1.2; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* Botón agregar */
.btn-add-card {
  width: 100%; margin-top: 10px; padding: 10px;
  background: linear-gradient(135deg, #ff7a00, #e06500); color: white;
  border: none; border-radius: 10px; font-family: 'Poppins', sans-serif;
  font-size: 12px; font-weight: 700; cursor: pointer;
  transition: all 0.2s ease; letter-spacing: 0.5px; text-transform: uppercase;
}
.btn-add-card:hover { background: linear-gradient(135deg, #ff8c1a, #ff7a00); box-shadow: 0 4px 20px rgba(255, 122, 0, .35); }
.btn-add-card:active { transform: scale(0.97); }

/* Precio PC - sin corte ni desborde */
@media (min-width: 769px) {
  .price-box { max-width: 100%; box-sizing: border-box; flex-wrap: nowrap; justify-content: center; }
  .old { flex: 0 0 auto; white-space: nowrap; padding: 8px 8px; min-width: 0; }
  .discount { flex: 0 0 auto; margin: 0 4px; padding: 6px 10px; min-width: 0; }
  .new { flex: 0 0 auto; white-space: nowrap; padding: 6px 8px; min-width: 0; }
  .old, .new .value { overflow: hidden; text-overflow: ellipsis; }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  12. LIGHTBOX PREMIUM                                         ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.lightbox-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0, 0, 0, 0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  display: none; align-items: center; justify-content: center; padding: 20px;
  opacity: 0; transition: opacity 0.3s ease;
}
.lightbox-overlay.active { display: flex; opacity: 1; }
.lightbox-content-new {
  display: flex; max-width: 960px; width: 100%; max-height: 88vh;
  background: linear-gradient(165deg, #0f0f0f 0%, #080808 50%, #0c0c0c 100%);
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 40px 120px rgba(0, 0, 0, .8), 0 0 80px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .04);
  transform: scale(0.95) translateY(10px);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.lightbox-overlay.active .lightbox-content-new { transform: scale(1) translateY(0); }

/* Columna imagen */
.lightbox-img-col {
  flex: 1.3; position: relative; background: #050505;
  display: flex; align-items: center; justify-content: center;
  padding: 30px; min-height: 400px; overflow: hidden;
}
.lightbox-img-col::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at 20% 80%, rgba(255, 120, 0, .06), transparent 50%), radial-gradient(ellipse at 80% 20%, rgba(0, 100, 255, .04), transparent 50%);
  pointer-events: none;
}
.lightbox-main-img { max-width: 100%; max-height: 72vh; object-fit: contain; position: relative; z-index: 2; border-radius: 8px; transition: opacity 0.25s ease; }
.product.variant-fade { opacity: 0.15; }

/* Flechas */
.lb-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 10;
  width: 42px; height: 42px; border-radius: 50%;
  background: rgba(10, 10, 10, .8); border: 1px solid rgba(255, 255, 255, .08);
  color: white; cursor: pointer; display: none; align-items: center; justify-content: center;
  transition: all 0.25s ease; backdrop-filter: blur(10px);
}
.lb-arrow:hover { background: rgba(255, 120, 0, .2); border-color: rgba(255, 120, 0, .4); transform: translateY(-50%) scale(1.1); }
.lb-arrow-left { left: 16px; }
.lb-arrow-right { right: 16px; }
.lb-arrow svg { width: 18px; height: 18px; }

/* Dots */
.lb-dots-nav {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 8px; z-index: 10; padding: 8px 14px;
  background: rgba(0, 0, 0, .6); border-radius: 20px; backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, .05);
}
.lb-dot { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,0.2); cursor: pointer; transition: all 0.3s ease; }
.lb-dot.active { background: #ff7a00; box-shadow: 0 0 8px rgba(255, 120, 0, .5); transform: scale(1.3); }
.lb-dot:hover:not(.active) { background: rgba(255,255,255,0.4); }

/* Columna info */
.lightbox-info-col { flex: 1; display: flex; flex-direction: column; border-left: 1px solid rgba(255, 255, 255, .04); position: relative; min-width: 0; }
.lightbox-close-new {
  position: absolute; top: 16px; right: 16px; z-index: 10;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255, .05); border: 1px solid rgba(255, 255,255, .08);
  color: #666; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: 20px; transition: all 0.2s ease; line-height: 1;
}
.lightbox-close-new:hover { background: rgba(239, 68, 68, .15); border-color: rgba(239, 68, 68, .3); color: #ef4444; transform: rotate(90deg); }
.lightbox-info-scroll { flex: 1; overflow-y: auto; padding: 28px 24px 24px; }
.lightbox-info-scroll::-webkit-scrollbar { width: 3px; }
.lightbox-info-scroll::-webkit-scrollbar-track { background: transparent; }
.lightbox-info-scroll::-webkit-scrollbar-thumb { background: rgba(255, 120, 0, .2); border-radius: 10px; }

/* Info detalle */
.lb-badge { display: inline-block; padding: 4px 14px; background: linear-gradient(135deg, rgba(255, 120, 0, .15), rgba(255, 120, 0, .05)); border: 1px solid rgba(255, 120, 0, .2); border-radius: 20px; color: #ff7a00; font-size: 11px; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; font-family: 'Poppins', sans-serif; margin-bottom: 6px; }
.lb-title { color: white; font-size: 22px; font-weight: 800; line-height: 1.2; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 16px; font-family: 'Poppins', sans-serif; }
.lb-prices { display: flex; align-items: baseline; gap: 12px; margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.lb-price-current { color: #ff7a00; font-size: 28px; font-weight: 800; font-family: 'Poppins', sans-serif; line-height: 1; }
.lb-price-old { color: #444; font-size: 15px; text-decoration: line-through; font-weight: 500; }
.lb-desc { color: #777; font-size: 13px; line-height: 1.6; margin-bottom: 20px; }

/* Badges info */
.lb-info-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.lb-info-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 8px; font-size: 12px; font-weight: 600; }
.lb-info-badge.color-badge { background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .08); color: #ccc; }
.lb-info-badge.size-badge { background: rgba(255, 120, 0, .08); border: 1px solid rgba(255, 120, 0, .15); color: #ff7a00; }
.lb-info-badge-label { font-size: 9px; text-transform: uppercase; letter-spacing: 1px; color: #555; margin-right: 2px; }
.lb-info-badge-values { display: flex; gap: 4px; }
.lb-info-badge-values span { padding: 2px 8px; background: rgba(255,255,255,0.06); border-radius: 4px; font-size: 11px; }

/* Features */
.lb-features { margin-top: 4px; }
.feature-list-item { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255, 255, 255, .03); }
.feature-list-item:last-child { border-bottom: none; }
.feature-icon { color: #ff7a00; font-size: 12px; margin-top: 3px; flex-shrink: 0; width: 16px; text-align: center; }
.feature-list-item strong { color: #888; font-size: 12px; font-weight: 600; margin-right: 4px; white-space: nowrap; }
.feature-list-item span { color: #ccc; font-size: 12px; line-height: 1.4; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  13. FILTROS LATERALES                                        ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.filter-sidebar {
  background: linear-gradient(180deg, #0f0f0f, #0a0a0a);
  border-right: 1px solid rgba(255, 255, 255, .06);
  padding: 20px 16px; width: 240px; flex-shrink: 0; overflow-y: auto;
}
.filter-sidebar::-webkit-scrollbar { width: 3px; }
.filter-sidebar::-webkit-scrollbar-track { background: transparent; }
.filter-sidebar::-webkit-scrollbar-thumb { background: rgba(255, 120, 0, .3); border-radius: 10px; }
.filter-section { margin-bottom: 24px; padding-bottom: 20px; border-bottom: 1px solid rgba(255, 255, 255, .05); }
.filter-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.filter-title {
  font-family: 'Bebas Neue', sans-serif; font-size: 13px; color: #ff7a00;
  letter-spacing: 3px; margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.filter-title::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, rgba(255, 120, 0, .3), transparent); }
.filter-checkbox { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; margin-bottom: 2px; }
.filter-checkbox:hover { background: rgba(255, 255, 255, .04); }
.filter-checkbox input[type="checkbox"] { display: none; }
.filter-checkbox .check-box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid rgba(255, 255, 255, .15); background: #0d0d0d; flex-shrink: 0; display: flex; align-items: center; justify-content: center; transition: all 0.2s ease; }
.filter-checkbox .check-box svg { width: 10px; height: 10px; opacity: 0; transform: scale(0.5); transition: all 0.15s ease; }
.filter-checkbox input:checked + .check-box { background: #ff7a00; border-color: #ff7a00; box-shadow: 0 0 10px rgba(255, 120, 0, .3); }
.filter-checkbox input:checked + .check-box svg { opacity: 1; transform: scale(1); }
.filter-checkbox .check-label { font-size: 13px; color: #999; font-weight: 500; transition: color 0.2s ease; }
.filter-checkbox:hover .check-label { color: #ccc; }
.filter-checkbox input:checked ~ .check-label { color: #fff; font-weight: 600; }

/* Select */
.filter-sidebar select.form-input {
  background: #0d0d0d; border: 1px solid rgba(255, 255, 255, .08); border-radius: 8px;
  color: #ccc; font-size: 13px; padding: 10px 12px; cursor: pointer; transition: border-color 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.filter-sidebar select.form-input:hover { border-color: rgba(255, 120, 0, .3); }
.filter-sidebar select.form-input:focus { border-color: rgba(255, 120, 0, .5); outline: none; box-shadow: 0 0 0 2px rgba(255, 120, 0, .1); }

/* Range slider */
.range-slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px; border-radius: 4px; background: linear-gradient(90deg, #ff7a00, #333); outline: none; cursor: pointer; }
.range-slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 18px; height: 18px; border-radius: 50%; background: #ff7a00; border: 3px solid #0a0a0a; box-shadow: 0 0 10px rgba(255, 120, 0, .4); cursor: pointer; transition: transform 0.15s ease; }
.range-slider::-webkit-slider-thumb:hover { transform: scale(1.2); }
.range-slider::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: #ff7a00; border: 3px solid #0a0a0a; box-shadow: 0 0 10px rgba(255, 120, 0, .4); cursor: pointer; }
.price-filter-label { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding: 6px 0; }
.price-filter-label span { font-size: 11px; color: #666; text-transform: uppercase; letter-spacing: 1px; }
.price-filter-label .price-value { font-size: 14px; color: #ff7a00; font-weight: 700; font-family: 'Poppins', sans-serif; }
#mobile-filter-toggle { background: linear-gradient(135deg, #ff7a00, #e06500); border: none; border-radius: 10px; box-shadow: 0 4px 15px rgba(255, 120, 0, .3); }

/* Botón cerrar filtros mobile */
.mobile-filter-close-btn { position: sticky; bottom: 0; left: 0; right: 0; z-index: 5; padding: 0 4px; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  14. CARRITO                                                   ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.cart-item { display: flex; gap: 15px; padding: 15px 0; border-bottom: 1px solid var(--border); }
.cart-item img { width: 60px; height: 60px; object-fit: contain; border-radius: 6px; background: #111; padding: 4px; }
.qty-control { display: flex; align-items: center; gap: 10px; margin-top: 5px; }
.qty-btn { width: 24px; height: 24px; border-radius: 4px; background: rgba(255,255,255,0.1); border: none; color: white; cursor: pointer; }
.qty-btn:hover { background: var(--accent); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  15. CHECKOUT                                                  ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.split-layout { display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; align-items: flex-start; }
.summary-container-checkout { margin-top: 20px; }
.option-card {
  background: var(--bg-card); border: 1px solid var(--border);
  padding: 15px; border-radius: 8px; cursor: pointer;
  transition: all 0.2s ease; display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.option-card:hover { border-color: rgba(255, 77, 0, 0.5); }
.option-card.selected { border-color: var(--accent); background: rgba(255, 77, 0, 0.1); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  16. FACTURA / INVOICE                                        ║
   ╚══════════════════════════════════════════════════════════════════╝ */
/* Oculto en pantalla */
#invoice-wrapper { display: none !important; }

/* Header */
.inv-header { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #000; padding-bottom: 12px; margin-bottom: 12px; }
.inv-logo-area h1 { font-size: 18px; font-weight: 800; margin-bottom: 6px; text-transform: uppercase; color: #000; }
.inv-logo-area p { font-size: 9px; color: #333; margin: 2px 0; }
.inv-factura-data { display: block; text-align: right; }
.inv-factura-data h2 { font-size: 16px; font-weight: 800; color: #000; border-bottom: 1px solid #000; padding-bottom: 4px; margin-bottom: 6px; }
.inv-factura-data p { font-size: 10px; color: #333; margin: 2px 0; }

/* Cliente */
.inv-client-info { display: block; background: #f4f4f4; padding: 8px; margin-bottom: 12px; border: 1px solid #ddd; }
.inv-client-info h3 { font-size: 10px; font-weight: 700; text-transform: uppercase; margin-bottom: 5px; padding-bottom: 4px; border-bottom: 1px solid #ccc; color: #000; }
.inv-grid { display: flex; justify-content: space-between; }
.inv-grid p { font-size: 9px; color: #333; margin: 2px 0; }
.inv-grid strong { color: #000; font-weight: 700; }

/* Tabla */
.inv-table { display: table; width: 100%; border-collapse: collapse; margin-bottom: 12px; }
.inv-table th { display: table-cell; background: #000; color: #fff; padding: 6px 4px; font-size: 8px; font-weight: 700; text-transform: uppercase; text-align: left; border: 1px solid #000; }
.inv-table th.text-center, .inv-table th[style*="text-align: center"] { text-align: center !important; }
.inv-table th.text-right, .inv-table th[style*="text-align: right"] { text-align: right !important; }
.inv-table td { display: table-cell; padding: 6px 4px; font-size: 9px; color: #000; border-bottom: 1px solid #eee; }
.inv-table td.text-right, .inv-table td[style*="text-align: right"] { text-align: right !important; }
.inv-table td.text-center, .inv-table td[style*="text-align: center"] { text-align: center !important; }

/* Totales */
.inv-totals { display: flex; flex-direction: column; align-items: flex-end; margin-top: 10px; border-top: 1px solid #000; padding-top: 8px; }
.inv-row { display: flex; justify-content: space-between; width: 100%; max-width: 220px; padding: 3px 8px; font-size: 10px; color: #000; }
.inv-row span { color: #000; }
.inv-row.grand-total { background: #000; color: #fff; font-size: 14px; font-weight: 800; padding: 6px 10px; margin-top: 4px; border-radius: 3px; }
.inv-row.grand-total span { color: #fff; }

/* Footer */
.inv-footer { display: block; text-align: center; margin-top: 20px; padding-top: 8px; border-top: 1px dashed #999; }
.inv-footer p { font-size: 8px; color: #666; margin: 2px 0; }
.inv-footer strong { color: #000; }

/* Factura standalone */
#factura-standalone { padding: 15px !important; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  17. CÓDIGOS DE BARRAS / QR / ETIQUETAS                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.barcode-item { display: flex; align-items: center; gap: 15px; padding: 10px; border-bottom: 1px solid var(--border); }

/* Grid de códigos */
#view-barcodes .grid { display: grid; gap: 16px; }

/* Etiqueta de impresión */
.print-label { width: 4.5cm; height: 2.5cm; padding: 6px; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  18. SCANNER                                                   ║
   ╚══════════════════════════════════════════════════════════════════╝ */
#reader { width: 100%; min-height: 300px; height: 300px; background: #000; border-radius: 8px; overflow: hidden; position: relative; }
#reader video { width: 100% !important; height: 100% !important; object-fit: cover !important; border-radius: 8px; }
#scanner-product-detail { padding: 10px; }

/* Scan size modal */
.scan-size-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.8); z-index: 2000;
  display: none; justify-content: center; align-items: center; backdrop-filter: blur(5px);
}
.scan-size-modal-overlay.active { display: flex; animation: fadeIn 0.3s ease; }
.scan-size-modal-content {
  background: #1a1a1a; border: 1px solid var(--accent); border-radius: 16px;
  padding: 30px; text-align: center; box-shadow: 0 20px 50px rgba(0,0,0,0.5); max-width: 400px; width: 90%;
}
.scan-size-btn {
  background: #333; border: 1px solid #444; color: white;
  padding: 15px; border-radius: 10px; font-size: 24px; font-weight: bold;
  cursor: pointer; transition: all 0.2s;
  display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 80px;
}
.scan-size-btn:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-3px); }
.scan-size-btn small { font-size: 12px; margin-top: 5px; font-weight: normal; text-transform: uppercase; color: #ccc; }
.scan-size-btn:hover small { color: white; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  19. MODALS - BASE                                            ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.85); z-index: 200;
  display: flex; justify-content: center; align-items: center;
  opacity: 0; visibility: hidden; transition: all 0.3s ease; padding: 10px;
}
.modal-overlay.active { opacity: 1; visibility: visible; }
.modal-container {
  background: var(--bg-secondary); border: 1px solid var(--border);
  width: 100%; max-width: 800px; max-height: 90vh;
  border-radius: var(--radius-md); overflow: hidden;
  display: flex; flex-direction: column;
  transform: scale(0.9); transition: transform 0.3s ease;
}
.modal-overlay.active .modal-container { transform: scale(1); }
.modal-small { max-width: 400px; }
.modal-header {
  padding: 20px; border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center; flex-shrink: 0;
}
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer {
  display: flex; justify-content: flex-end; align-items: center; gap: 10px;
  padding: 20px; border-top: 1px solid var(--border);
  background: var(--bg-card); flex-shrink: 0;
}
.modal-footer .btn-primary, .modal-footer button { flex: 1; margin: 0; }

/* Form inputs */
.form-input {
  width: 100%; padding: 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-primary);
  color: white; margin-bottom: 12px; transition: border-color 0.2s; font-size: 16px;
}
.form-input:focus { border-color: var(--accent); outline: none; }

/* Category modal */
.category-modal-container { width: 100vw; height: 100vh; max-width: 100%; border-radius: 0; display: grid; grid-template-columns: 280px 1fr; }
#product-modal .modal-container { max-width: 550px !important; width: 100%; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  20. MODAL EFECTIVO (POS)                                     ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.btn-billete {
  padding: 12px 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc; font-size: 13px; font-weight: 700;
  font-family: monospace; border-radius: 8px;
  cursor: pointer; transition: all 0.15s;
}
.btn-billete:hover { background: rgba(255, 77, 0, 0.15); border-color: #ff4d00; color: #ff4d00; transform: translateY(-2px); }
.btn-billete:active { transform: translateY(0); }
.btn-billete.btn-exacto { background: rgba(76, 175, 80, 0.1); border-color: rgba(76, 175, 80, 0.3); color: #4caf50; font-size: 12px; }
.btn-billete.btn-exacto:hover { background: rgba(76, 175, 80, 0.25); border-color: #4caf50; }

.cambio-positivo { background: rgba(76, 175, 80, 0.1) !important; border: 2px solid rgba(76, 175, 80, 0.3) !important; }
.cambio-positivo p:first-child { color: #4caf50 !important; }
.cambio-positivo p:last-child { color: #66bb6a !important; }

#efectivo-modal .modal-content { animation: slideUpEfectivo 0.25s ease-out; }

.desglose-billete {
  display: flex; align-items: center; justify-content: space-between;
  padding: 6px 10px; border-radius: 6px; margin-bottom: 4px; font-size: 13px;
}
.desglose-billete:nth-child(odd) { background: rgba(255,255,255,0.02); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  21. TOAST                                                     ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: #333; color: white; padding: 12px 20px; border-radius: 8px;
  border-left: 4px solid var(--accent); box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  opacity: 0; transform: translateX(100%); transition: all 0.3s ease;
}
.toast.show { opacity: 1; transform: translateX(0); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  22. WHATSAPP FLOTANTE                                         ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.whatsapp-float {
  position: fixed; width: 60px; height: 60px; bottom: 25px; right: 25px;
  background-color: #25D366; border-radius: 50%; text-align: center;
  box-shadow: 2px 2px 10px rgba(0, 0, 0, 0.4); z-index: 150;
  display: flex; align-items: center; justify-content: center;
  animation: whatsapp-pulse 2.5s infinite; transition: transform 0.3s ease;
}
.whatsapp-float:hover { transform: scale(1.1); animation: none; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  23. CHAT FLOW STUDIO - WIDGET FLOTANTE                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
/* Botón flotante */
.chat-float-btn {
  position: fixed; bottom: 105px; right: 24px; z-index: 150;
  width: 70px; height: 70px; border-radius: 50%;
  box-shadow: 0 1px 1px rgba(255, 77, 0, 0.4), 0 0 0 0 rgba(255, 77, 0, 0.3);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 2px solid rgba(255, 255, 255, 0.2);
  animation: chatPulse 3s ease-in-out infinite;
}
.chat-float-btn:hover { transform: scale(1.1); box-shadow: 0 6px 30px rgba(255, 77, 0, 0.6); }
.chat-float-btn:active { transform: scale(0.95); }
.chat-badge {
  position: absolute; top: -4px; right: -4px;
  width: 22px; height: 22px; background: #ff0000; color: white;
  font-size: 11px; font-weight: 700; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #0f0f0f; animation: chatBadgePop 0.3s ease-out;
}

/* Widget contenedor */
.chat-widget {
  position: fixed; bottom: 170px; right: 24px; z-index: 150;
  width: 380px; max-width: calc(100vw - 48px); height: 520px; max-height: calc(100vh - 200px);
  background: #141414; border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 77, 0, 0.1);
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right;
  transition: all 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.chat-widget.hidden { opacity: 0; transform: scale(0.5) translateY(20px); pointer-events: none; }
.chat-widget:not(.hidden) { opacity: 1; transform: scale(1) translateY(0); pointer-events: all; }

/* Header */
.chat-header {
  background: linear-gradient(135deg, #ff4d00 0%, #cc3d00 100%);
  padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0;
}
.chat-header-left { display: flex; align-items: center; gap: 12px; }
.chat-header-title { margin: 0; font-size: 16px; font-weight: 700; color: white; letter-spacing: 0.5px; }
.chat-header-sub { margin: 2px 0 0; font-size: 11px; color: rgba(255, 255, 255, 0.8); display: flex; align-items: center; gap: 5px; }
.chat-header-sub::before { content: ''; width: 6px; height: 6px; background: #4ade80; border-radius: 50%; display: inline-block; }
.chat-close-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.15); color: white; font-size: 20px;
  cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.chat-close-btn:hover { background: rgba(255, 255, 255, 0.3); transform: rotate(90deg); }

/* Body */
.chat-body { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: #0f0f0f; }
.chat-screen { flex: 1; display: flex; flex-direction: column; padding: 24px; overflow-y: auto; }
.chat-screen.hidden { display: none !important; }

/* Welcome */
.chat-welcome { text-align: center; padding: 20px 0; }
.chat-welcome-icon { margin: 0 auto 16px; width: 70px; height: 70px; border-radius: 50%; background: rgba(255, 77, 0, 0.1); display: flex; align-items: center; justify-content: center; border: 2px solid rgba(255, 77, 0, 0.2); }
.chat-welcome-title { margin: 0 0 8px; font-size: 20px; font-weight: 700; color: white; }
.chat-welcome-text { margin: 0; font-size: 13px; color: #888; line-height: 1.5; }

/* Form */
.chat-form-group { display: flex; gap: 10px; margin-top: 20px; }
.chat-input {
  flex: 1; padding: 14px 18px; background: #1a1a1a;
  border: 1px solid #333; border-radius: 12px; color: white; font-size: 14px; outline: none; transition: border-color 0.2s;
}
.chat-input::placeholder { color: #555; }
.chat-input:focus { border-color: #ff4d00; box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.1); }
.chat-send-btn {
  width: 48px; height: 48px; border-radius: 12px; border: none;
  background: #ff4d00; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0;
}
.chat-send-btn:hover { background: #ff6a2a; transform: scale(1.05); }
.chat-send-btn:active { transform: scale(0.95); }
.chat-send-btn:disabled { background: #333; cursor: not-allowed; transform: none; }
.chat-disclaimer { text-align: center; font-size: 11px; color: #555; margin-top: 16px; padding-top: 16px; border-top: 1px solid #222; }

/* Mensajes */
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-messages::-webkit-scrollbar { width: 4px; }
.chat-messages::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.chat-bubble { max-width: 82%; padding: 10px 14px; border-radius: 16px; font-size: 13px; line-height: 1.5; word-wrap: break-word; animation: chatBubbleIn 0.3s ease-out; }
.chat-bubble-user { align-self: flex-end; background: linear-gradient(135deg, #ff4d00, #ff6a2a); color: white; border-bottom-right-radius: 4px; }
.chat-bubble-asesor { align-self: flex-start; background: #1e1e1e; color: #e0e0e0; border: 1px solid #2a2a2a; border-bottom-left-radius: 4px; }
.chat-bubble-time { font-size: 10px; color: rgba(255, 255, 255, 0.5); margin-top: 4px; text-align: right; }
.chat-bubble-asesor .chat-bubble-time { color: #666; }

/* Typing */
.chat-typing { align-self: flex-start; padding: 12px 18px; background: #1e1e1e; border: 1px solid #2a2a2a; border-radius: 16px; border-bottom-left-radius: 4px; display: none; }
.chat-typing.active { display: flex; gap: 4px; align-items: center; }
.chat-typing-dot { width: 7px; height: 7px; background: #666; border-radius: 50%; animation: chatTypingDot 1.4s ease-in-out infinite; }
.chat-typing-dot:nth-child(2) { animation-delay: 0.2s; }
.chat-typing-dot:nth-child(3) { animation-delay: 0.4s; }

/* System msg */
.chat-system-msg { align-self: center; font-size: 11px; color: #555; background: rgba(255, 255, 255, 0.03); padding: 6px 14px; border-radius: 20px; margin: 8px 0; }

/* Input area (chat activo) */
.chat-input-area { padding: 12px 16px; background: #141414; border-top: 1px solid #222; display: flex; gap: 10px; flex-shrink: 0; }

/* Loading */
.chat-loading { display: flex; align-items: center; justify-content: center; padding: 20px; gap: 8px; }
.chat-loading-dot { width: 8px; height: 8px; background: #ff4d00; border-radius: 50%; animation: chatLoadDot 1s ease-in-out infinite; }
.chat-loading-dot:nth-child(2) { animation-delay: 0.15s; }
.chat-loading-dot:nth-child(3) { animation-delay: 0.3s; }

/* Flash */
.chat-flash { animation: chatFlash 0.5s ease-in-out 3; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  24. CHAT ADMIN - PANEL DE ADMINISTRACIÓN                      ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.chat-admin-layout {
  display: grid; grid-template-columns: 320px 1fr;
  height: calc(100vh - 100px); gap: 0;
  background: #0a0a0a; border-radius: 12px; overflow: hidden; border: 1px solid #222;
}

/* Sidebar */
.chat-admin-sidebar { background: #111; border-right: 1px solid #222; display: flex; flex-direction: column; overflow: hidden; }
.chat-admin-sidebar-header { padding: 20px; border-bottom: 1px solid #222; display: flex; align-items: center; justify-content: space-between; }
.chat-admin-sidebar-title { margin: 0; font-size: 16px; font-weight: 700; color: white; display: flex; align-items: center; gap: 8px; }
.chat-admin-sidebar-title::before { content: ''; width: 8px; height: 8px; background: #4ade80; border-radius: 50%; }
.chat-admin-count { background: #ff4d00; color: white; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 10px; }

/* Search */
.chat-admin-search { padding: 12px 16px; border-bottom: 1px solid #1a1a1a; display: flex; align-items: center; gap: 8px; background: #0d0d0d; }
.chat-admin-search-input { flex: 1; background: transparent; border: none; color: white; font-size: 13px; outline: none; }
.chat-admin-search-input::placeholder { color: #555; }

/* Lista */
.chat-admin-list { flex: 1; overflow-y: auto; padding: 8px; }
.chat-admin-list::-webkit-scrollbar { width: 4px; }
.chat-admin-list::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }
.chat-admin-item {
  display: flex; align-items: center; gap: 12px; padding: 12px;
  border-radius: 10px; cursor: pointer; transition: all 0.15s;
  border: 1px solid transparent; margin-bottom: 4px;
}
.chat-admin-item:hover { background: rgba(255, 255, 255, 0.03); border-color: #2a2a2a; }
.chat-admin-item.active { background: rgba(255, 77, 0, 0.08); border-color: rgba(255, 77, 0, 0.3); }
.chat-admin-item-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #1e1e1e;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; color: #ff4d00; flex-shrink: 0; border: 2px solid #333;
}
.chat-admin-item-info { flex: 1; min-width: 0; }
.chat-admin-item-name { font-size: 14px; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-admin-item-last { font-size: 12px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.chat-admin-item-badge { width: 10px; height: 10px; background: #4ade80; border-radius: 50%; flex-shrink: 0; }
.chat-admin-item-badge.pending { background: #ff4d00; }
.chat-admin-item-time { font-size: 10px; color: #555; flex-shrink: 0; }
.chat-admin-empty { text-align: center; padding: 40px 20px; }
.chat-admin-badge {
  position: absolute; top: -2px; right: 8px; min-width: 18px; height: 18px;
  background: #ff0000; color: white; font-size: 10px; font-weight: 700;
  border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}

/* Type badges */
.chat-admin-item-type-badge { font-size: 9px; padding: 1px 6px; border-radius: 4px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.3px; }
.chat-admin-item-type-badge.staff { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.chat-admin-item-type-badge.cliente { background: rgba(168, 85, 247, 0.15); color: #c084fc; }
.chat-admin-item-type-badge.chat { background: rgba(255, 77, 0, 0.1); color: #ff7a33; }

/* Columna derecha */
.chat-admin-main { display: flex; flex-direction: column; overflow: hidden; background: #0f0f0f; }
.chat-admin-no-selected { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 40px; }

/* Header chat */
.chat-admin-header { padding: 16px 20px; background: #111; border-bottom: 1px solid #222; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.chat-admin-header-info { display: flex; align-items: center; gap: 12px; }
.chat-admin-avatar { width: 42px; height: 42px; border-radius: 50%; background: linear-gradient(135deg, #ff4d00, #ff7a33); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; color: white; }
.chat-admin-user-name { margin: 0; font-size: 15px; font-weight: 600; color: white; }
.chat-admin-user-phone { margin: 2px 0 0; font-size: 12px; color: #666; font-family: monospace; }
.chat-admin-header-actions { display: flex; align-items: center; gap: 10px; }
.chat-admin-user-type { font-size: 10px; font-weight: 600; padding: 3px 10px; border-radius: 20px; text-transform: uppercase; letter-spacing: 0.5px; }
.chat-admin-user-type.staff { background: rgba(59, 130, 246, 0.15); color: #60a5fa; border: 1px solid rgba(59, 130, 246, 0.3); }
.chat-admin-user-type.cliente { background: rgba(168, 85, 247, 0.15); color: #c084fc; border: 1px solid rgba(168, 85, 247, 0.3); }
.chat-admin-user-type.chat { background: rgba(255, 77, 0, 0.15); color: #ff4d00; border: 1px solid rgba(255, 77, 0, 0.3); }
.chat-admin-delete-btn {
  width: 36px; height: 36px; border-radius: 8px; border: 1px solid #333;
  background: transparent; color: #666; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.chat-admin-delete-btn:hover { background: rgba(239, 68, 68, 0.15); border-color: rgba(239, 68, 68, 0.3); color: #ef4444; }

/* Mensajes admin */
.chat-admin-messages { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.chat-admin-messages::-webkit-scrollbar { width: 4px; }
.chat-admin-messages::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

/* Input respuesta */
.chat-admin-input-area { padding: 16px 20px; background: #111; border-top: 1px solid #222; display: flex; gap: 10px; flex-shrink: 0; }
.chat-admin-reply-input {
  flex: 1; padding: 14px 18px; background: #1a1a1a;
  border: 1px solid #333; border-radius: 12px; color: white; font-size: 14px; outline: none; transition: border-color 0.2s;
}
.chat-admin-reply-input::placeholder { color: #555; }
.chat-admin-reply-input:focus { border-color: #ff4d00; box-shadow: 0 0 0 3px rgba(255, 77, 0, 0.1); }
.chat-admin-reply-btn {
  width: 48px; height: 48px; border-radius: 12px; border: none;
  background: #ff4d00; color: white; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: all 0.2s; flex-shrink: 0;
}
.chat-admin-reply-btn:hover { background: #ff6a2a; }
.chat-admin-reply-btn:disabled { background: #333; cursor: not-allowed; }

/* Mobile toggle */
.chat-admin-mobile-toggle {
  display: none; position: fixed; bottom: 20px; left: 20px; z-index: 99;
  width: 44px; height: 44px; border-radius: 50%; background: #1e1e1e;
  border: 1px solid #333; color: white; align-items: center; justify-content: center; cursor: pointer;
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  25. CAJA / CIERRE                                            ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.caja-card {
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 20px; transition: all 0.2s ease;
}
.caja-card:hover { border-color: rgba(255,255,255,0.1); background: rgba(255,255,255,0.05); }
.caja-card-estado { border-left: 4px solid #22c55e; }
.caja-card-inicial { border-left: 4px solid #3b82f6; }
.caja-card-cajero { border-left: 4px solid #a855f7; }
.caja-card-ventas { border-left: 4px solid #22c55e; }
.caja-card-ingresos { border-left: 4px solid #14b8a6; }
.caja-card-egresos { border-left: 4px solid #ef4444; }
.caja-card-esperado { border-left: 4px solid #f59e0b; }

.caja-card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.caja-icon-green { background: rgba(34,197,94,0.15); color: #4ade80; }
.caja-icon-blue { background: rgba(59,130,246,0.15); color: #60a5fa; }
.caja-icon-purple { background: rgba(168,85,247,0.15); color: #c084fc; }

/* Métodos de pago */
.caja-card-metodo { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06); border-radius: 16px; padding: 20px; }
.caja-metodo-bar { height: 4px; background: rgba(255,255,255,0.05); border-radius: 999px; overflow: hidden; }
.caja-metodo-bar-fill { height: 100%; border-radius: 999px; transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1); min-width: 0; }

/* Acciones */
.caja-accion-card {
  border: 2px solid rgba(255,255,255,0.06); border-radius: 16px;
  padding: 20px 24px; cursor: pointer; transition: all 0.25s ease;
  background: rgba(255,255,255,0.02); text-align: left; width: 100%;
}
.caja-accion-corte:hover { border-color: rgba(245,158,11,0.4); background: rgba(245,158,11,0.05); transform: translateY(-2px); }
.caja-accion-cerrar:hover { border-color: rgba(239,68,68,0.4); background: rgba(239,68,68,0.05); transform: translateY(-2px); }

/* Movimientos */
.caja-movimiento-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); transition: background 0.2s;
}
.caja-movimiento-item:hover { background: rgba(255,255,255,0.05); }
.caja-movimiento-ingreso { border-left: 3px solid #14b8a6; }
.caja-movimiento-egreso { border-left: 3px solid #ef4444; }

/* Historial */
.caja-historial-card {
  background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px; padding: 20px; cursor: pointer; transition: all 0.2s ease;
}
.caja-historial-card:hover { border-color: rgba(249,115,22,0.3); background: rgba(255,255,255,0.04); }
.caja-historial-mini { border: 1px solid rgba(255,255,255,0.06); border-radius: 12px; padding: 16px; margin-top: 12px; transition: all 0.2s; }
.caja-historial-mini:hover { border-color: rgba(255,255,255,0.12); }

/* Badges caja */
.caja-badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: 0.05em; }
.caja-badge-abierta { background: rgba(34,197,94,0.15); color: #4ade80; border: 1px solid rgba(34,197,94,0.3); }
.caja-badge-cerrada { background: rgba(107,114,128,0.15); color: #9ca3af; border: 1px solid rgba(107,114,128,0.3); }
.caja-diferencia-ok { color: #4ade80; background: rgba(34,197,94,0.1); border: 1px solid rgba(34,197,94,0.2); padding: 6px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.caja-diferencia-alerta { color: #f87171; background: rgba(239,68,68,0.1); border: 1px solid rgba(239,68,68,0.2); padding: 6px 14px; border-radius: 10px; font-weight: 700; font-size: 14px; }
.caja-sede-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 6px; background: rgba(249,115,22,0.1); color: #fb923c; border: 1px solid rgba(249,115,22,0.2); }

/* Billetes */
.billete-input-group { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.04); }
.billete-input-group:last-child { border-bottom: none; }
.billete-input { width: 70px; text-align: center; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.1); color: #fff; font-weight: 700; font-size: 16px; padding: 6px 8px; border-radius: 8px; outline: none; transition: border-color 0.2s; }
.billete-input:focus { border-color: #f97316; }
.billete-subtotal { font-weight: 700; font-size: 14px; min-width: 90px; text-align: right; }

/* Gráfico */
#caja-grafico-horas { border-radius: 12px; background: rgba(0,0,0,0.2); }

/* Pulse */
.caja-pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; display: inline-block; animation: cajaPulse 2s ease-in-out infinite; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  26. POS (PUNTO DE VENTA)                                     ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.pos-item-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border-bottom: 1px solid #333; cursor: pointer; transition: background 0.2s; }
.pos-item-row:hover { background: rgba(255, 77, 0, 0.1); }
.pos-item-row .flex-col { display: flex; flex-direction: column; gap: 1px; }
.variant-item:hover { border-color: #ff4d00 !important; background: rgba(255, 77, 0, 0.05); }
.variant-item:active { transform: scale(0.98); }

/* Controles de cantidad POS */
.qty-pos-btn {
  width: 20px; height: 20px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.05); color: #fff; font-size: 14px; font-weight: bold;
  border-radius: 8px; cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s ease; line-height: 1; padding: 0; user-select: none; -webkit-user-select: none;
}
.qty-pos-btn:hover:not(:disabled):not(.opacity-30) { background: #ff4d00; border-color: #ff4d00; transform: scale(1.15); box-shadow: 0 0 12px rgba(255, 77, 0, 0.4); }
.qty-pos-btn:active:not(:disabled):not(.opacity-30) { transform: scale(0.9); }
.qty-pos-btn:disabled, .qty-pos-btn.opacity-30 { cursor: not-allowed; pointer-events: none; }
.pos-qty-number {
  font-family: 'Courier New', monospace; font-weight: 900; font-size: 14px;
  min-width: 20px; text-align: center; cursor: pointer; transition: all 0.15s;
  padding: 2px 4px; border-radius: 6px; text-shadow: 0 0 8px rgba(255, 77, 0, 0.2);
}
.pos-qty-number:hover { background: rgba(255, 77, 0, 0.1); color: #ff4d00 !important; }
.qty-changed { animation: qty-pop 0.2s ease; }

/* Carrito POS */
#pos-cart-container { scrollbar-width: thin; scrollbar-color: #333 transparent; }
#pos-cart-container::-webkit-scrollbar { width: 4px; }
#pos-cart-container::-webkit-scrollbar-track { background: transparent; }
#pos-cart-container::-webkit-scrollbar-thumb { background: #333; border-radius: 4px; }

.pos-item-card {
  position: relative; background: rgba(0,0,0,0.3);
  border: 1px solid rgba(255,255,255,0.06); border-radius: 10px;
  margin-bottom: 10px; padding: 12px; transition: border-color 0.2s;
}
.pos-item-card:hover { border-color: rgba(255,255,255,0.12); }
.pos-item-close {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px;
  border: none; background: transparent; color: #555; font-size: 16px;
  cursor: pointer; border-radius: 6px; display: flex; align-items: center;
  justify-content: center; transition: all 0.15s; z-index: 2; line-height: 1; padding: 0;
}
.pos-item-close:hover { background: rgba(255,50,50,0.2); color: #ff5555; }
.pos-item-main { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; padding-right: 28px; }
.pos-item-img { width: 48px; height: 48px; border-radius: 8px; object-fit: cover; background: #1a1a1a; flex-shrink: 0; }
.pos-item-info { flex: 1; min-width: 0; }
.pos-item-name { display: block; font-weight: 700; font-size: 13px; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-item-price { font-size: 11px; color: #888; margin-top: 2px; }
.pos-item-stock { font-size: 10px; margin-top: 2px; }
.pos-item-subtotal { flex-shrink: 0; text-align: right; min-width: 70px; padding-top: 4px; }
.pos-item-controls { display: flex; align-items: center; justify-content: center; gap: 14px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.05); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  27. ABONOS                                                    ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.progress-bar-bg { background-color: #374151; border-radius: 9999px; height: 10px; width: 100%; overflow: hidden; position: relative; }
.progress-bar-fill { height: 100%; border-radius: 9999px; transition: width 0.5s ease-in-out; }
.progress-low { background-color: #ef4444; }
.progress-mid { background-color: #f59e0b; }
.progress-high { background-color: #10b981; }
.progress-full { background-color: #059669; }
.status-badge-abono { display: inline-block; padding: 4px 10px; border-radius: 12px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  28. RECUPERACIÓN DE CONTRASEÑA                               ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.recup-modal-input {
  width: 100%; padding: 12px 16px;
  border: 2px solid rgba(255, 255, 255, 0.1); border-radius: 10px;
  background: rgba(0,0,0,0.3); color: #fff; font-size: 16px;
  text-align: center; letter-spacing: 2px; outline: none; transition: border-color 0.3s;
}
.recup-modal-input:focus { border-color: rgba(255, 77, 0, 0.5); }
.recup-codigo-row { display: flex; gap: 8px; align-items: center; justify-content: center; margin-top: 16px; }
.recup-codigo-input { width: 160px; text-align: center; font-family: 'Courier New', monospace; font-size: 28px; letter-spacing: 8px; text-transform: uppercase; }
.recup-timer { text-align: center; font-size: 13px; color: #ff4d00; font-weight: 700; margin-top: 8px; font-variant-numeric: tabular-nums; }
.recup-step { display: none; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  29. USER UI                                                   ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.user-icon-btn { background: none; border: none; cursor: pointer; padding: 8px; border-radius: 50%; display: flex; align-items: center; justify-content: center; transition: background 0.3s; }
.user-icon-btn:hover { background: rgba(255,255,255,0.1); }
.user-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 14px; color: white; }
.user-dropdown {
  position: absolute; top: 100%; right: 0; margin-top: 10px; width: 200px;
  background: var(--bg-secondary); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5); z-index: 300;
  opacity: 0; visibility: hidden; transform: translateY(-10px); transition: all 0.2s ease;
}
.user-dropdown.active { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown-item { display: block; width: 100%; padding: 12px 16px; text-align: left; background: none; border: none; color: var(--fg-primary); cursor: pointer; transition: background 0.2s; font-size: 14px; }
.dropdown-item:hover { background: rgba(255,255,255,0.05); }
.dropdown-item.logout { color: #ef4444; border-top: 1px solid var(--border); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  30. BADGES                                                    ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.badge { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.badge-pending { background: #fbbf24; color: black; }
.badge-process { background: #3b82f6; color: white; }
.badge-ready { background: #10b981; color: white; }
.badge-sent { background: #8b5cf6; color: white; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  31. TAGS & FEATURES                                          ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.tags-container { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; min-height: 10px; }
.tag-item {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255, 77, 0, 0.15); color: #ff4d00;
  padding: 4px 10px; border-radius: 20px; font-size: 12px; font-weight: 600;
  border: 1px solid rgba(255, 77, 0, 0.3); transition: all 0.2s;
}
.tag-item:hover { background: rgba(255, 77, 0, 0.25); }
.tag-remove { cursor: pointer; opacity: 0.7; font-size: 14px; line-height: 1; }
.tag-remove:hover { opacity: 1; color: white; }
.btn-add-details { width: 100%; margin-top: 15px; background: transparent; border: 1px dashed var(--border); color: var(--fg-muted); padding: 10px; border-radius: 6px; cursor: pointer; transition: all 0.2s; font-size: 13px; }
.btn-add-details:hover { border-color: var(--accent); color: var(--accent); }
.product-details-section { display: none; margin-top: 15px; padding-top: 15px; border-top: 1px solid var(--border); }
.product-details-section.active { display: block; }
.feature-row { display: flex; gap: 10px; margin-bottom: 8px; align-items: center; }
.feature-row input { margin-bottom: 0; flex: 1; }
.feature-row button { background: #333; border: none; color: #aaa; padding: 8px; border-radius: 4px; cursor: pointer; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  32. HELPERS (Upload, Password, etc.)                          ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.image-upload-zone {
  border: 2px dashed var(--border); border-radius: 8px; padding: 20px;
  text-align: center; cursor: pointer; transition: all 0.3s;
  margin-bottom: 15px; min-height: 150px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.image-upload-zone:hover { border-color: var(--accent); background: rgba(255,77,0,0.05); }
.image-upload-zone img { max-height: 120px; margin-bottom: 10px; border-radius: 4px; object-fit: contain; }
.password-input-container { position: relative; width: 100%; }
.password-input-container .form-input { padding-right: 40px; }
.password-toggle-btn { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #666; }
.password-toggle-btn:hover { color: var(--accent); }

/* Animaciones JS dinámicas */
#prod-codigo-container { animation: fadeIn 0.3s ease; }
#prod-codigo-aviso { animation: fadeIn 0.3s ease; }

/* Scrollbars personalizados para listas JS */
#productos-disponibles-lista::-webkit-scrollbar,
#detalle-productos-lista::-webkit-scrollbar { width: 6px; }
#productos-disponibles-lista::-webkit-scrollbar-track,
#detalle-productos-lista::-webkit-scrollbar-track { background: #1a1a1a; border-radius: 3px; }
#productos-disponibles-lista::-webkit-scrollbar-thumb,
#detalle-productos-lista::-webkit-scrollbar-thumb { background: #444; border-radius: 3px; }
#productos-disponibles-lista::-webkit-scrollbar-thumb:hover,
#detalle-productos-lista::-webkit-scrollbar-thumb:hover { background: #666; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  33. ADMIN - LAYOUT                                            ║
   ╚══════════════════════════════════════════════════════════════════╝ */
#app-admin { display: none; height: 100vh; }
.admin-layout { display: flex; height: 100%; position: relative; }
.admin-sidebar { width: var(--sidebar-width); background: var(--bg-secondary); border-right: 1px solid var(--border); padding: 24px; display: flex; flex-direction: column; overflow-y: auto; transition: transform 0.3s ease; z-index: 50; }
.admin-main { flex: 1; padding: 40px; overflow-y: auto; background: var(--bg-primary); transition: filter 0.3s; position: relative; }
.admin-mobile-toggle { display: none; position: fixed; top: 20px; left: 20px; z-index: 60; background: var(--accent); border: none; padding: 10px; border-radius: 8px; color: white; cursor: pointer; }
.admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 24px; margin-bottom: 20px; }
.admin-overlay { position: fixed; inset: 0; background: black/50; z-index: 40; }

/* Nav items */
.admin-nav-item { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; color: #9ca3af; cursor: pointer; transition: all 0.2s; font-size: 14px; margin-bottom: 4px; }
.admin-nav-item:hover { background: rgba(255,255,255,0.05); color: white; }
.admin-nav-item.active-tab { background: rgb(255 255 255 / 15%); color: #ffffff; font-weight: 600; }

/* Admin Section Headers (Acordeones) */
.admin-section-header {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 12px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: rgba(255, 77, 0, 0.1);
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
  border-left: 3px solid var(--accent);
}

.admin-section-header:hover {
  background: rgba(255, 77, 0, 0.2);
}

.admin-section-header span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.admin-section-arrow {
  transition: transform 0.3s ease;
}

.admin-section-arrow.rotated {
  transform: rotate(180deg);
}

.admin-section-content {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.3s ease-out;
}

.admin-section-content.open {
  max-height: 1000px;
}

/* Ocultar secciones sin permisos */
.admin-section-header[style*="display: none"],
.admin-section-content[style*="display: none"] {
  display: none !important;
}

/* Tables */
.admin-table { width: 100%; border-collapse: collapse; margin-top: 15px; }
.admin-table th, .admin-table td { padding: 12px; text-align: left; border-bottom: 1px solid var(--border); }
.admin-table th { color: var(--accent); font-weight: 600; text-transform: uppercase; font-size: 12px; letter-spacing: 1px; }

/* Grids */
.slides-grid, .products-admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; }
.dashboard-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.dashboard-grid .admin-card:last-child { grid-column: 1 / -1; }

/* View title */
.view-title { font-size: 1.5rem; margin-bottom: 20px; color: var(--accent); font-family: 'Bebas Neue', sans-serif; letter-spacing: 2px; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  34. ADMIN - ROLES                                             ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.role-badge { padding: 4px 8px; border-radius: 4px; font-size: 10px; font-weight: 700; text-transform: uppercase; }
.role-ingeniero { background: #ff4d00; color: white; }
.role-administrador { background: #2563eb; color: white; }
.role-colaborador { background: #6b7280; color: white; }
.role-selector { display: flex; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.role-option { padding: 8px 16px; border-radius: 20px; background: #333; cursor: pointer; font-size: 12px; border: 1px solid transparent; transition: all 0.2s; }
.role-option.active { border-color: var(--accent); background: rgba(255, 77, 0, 0.2); color: var(--accent); font-weight: bold; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  35. ADMIN - PRODUCT CARDS                                     ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.product-admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: all 0.3s; }
.product-admin-card:hover { border-color: var(--accent); }
.product-admin-card img { width: 100%; height: 140px; object-fit: contain; background: #111; padding: 8px; box-sizing: border-box; }
.product-admin-info { padding: 12px; }
.product-admin-actions { display: flex; justify-content: flex-end; gap: 5px; margin-top: 10px; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  36. ADMIN - SLIDE CARDS                                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.slide-admin-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }
.slide-admin-card img { width: 100%; height: 140px; object-fit: cover; }
.slide-admin-info { padding: 12px; }
.slide-admin-actions { display: flex; justify-content: flex-end; gap: 5px; margin-top: 10px; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  37. ADMIN - ORDER ITEMS                                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.order-item-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.order-item-row:last-child { border-bottom: none; }
.order-item-img { width: 44px; height: 44px; object-fit: contain; border-radius: 6px; background: #111; padding: 3px; box-sizing: border-box; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  38. APP CLIENTE (Panel del cliente)                           ║
   ╚══════════════════════════════════════════════════════════════════╝ */
#app-cliente { display: none; height: 100vh; overflow: hidden; }
#app-cliente .admin-layout { height: 100%; }
#app-cliente .admin-main { height: 100%; overflow-y: auto; overflow-x: hidden; }
.cliente-profile-card { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cliente-profile-avatar {
  width: 100px; height: 100px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #ff6a2c);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; font-family: 'Bebas Neue', sans-serif; color: white;
  margin-bottom: 1rem; box-shadow: 0 10px 25px rgba(255, 77, 0, 0.2);
}
.cliente-info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.cliente-info-item { background: rgba(255,255,255,0.03); padding: 12px 16px; border-radius: 6px; border: 1px solid var(--border); }
.cliente-info-label { display: block; font-size: 11px; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; letter-spacing: 1px; }
.cliente-info-value { color: white; font-weight: 500; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  39. SCROLLBARS PERSONALIZADOS                                ║
   ╚══════════════════════════════════════════════════════════════════╝ */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb { background: #333; border-radius: 10px; border: 2px solid #0a0a0a; }
::-webkit-scrollbar-thumb:hover { background: var(--accent); }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  40. SWEETALERT OVERRIDES                                      ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.swal2-popup { background-color: #141414 !important; color: #fff !important; border: 1px solid #2a2a2a; border-radius: 12px !important; }
.swal2-title { color: #fff !important; }
.swal2-confirm { background-color: var(--accent) !important; border-radius: 4px !important; }
.swal2-cancel { background-color: #333 !important; border-radius: 4px !important; color: #fff !important; }

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  41. IMPRESIÓN - FACTURA                                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
@media print {
  * { -webkit-print-color-adjust: exact !important; print-color-adjust: exact !important; color-adjust: exact !important; }
  @page { size: 80mm auto; margin: 3mm; }

  body > *:not(#invoice-wrapper) { display: none !important; }
  #invoice-wrapper {
    display: block !important; position: static !important; width: 100% !important;
    background: white !important; color: black !important; padding: 5mm !important;
    margin: 0 !important; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important; font-size: 11px !important;
  }
  #invoice-wrapper * { visibility: visible !important; display: block !important; color: black !important; background: transparent !important; border: none !important; box-shadow: none !important; margin: 0 !important; padding: 0 !important; }

  #invoice-wrapper .inv-header { display: flex !important; justify-content: space-between !important; align-items: flex-start !important; border-bottom: 2px solid #000 !important; padding-bottom: 12px !important; margin-bottom: 12px !important; }
  #invoice-wrapper .inv-logo-area { display: block !important; }
  #invoice-wrapper .inv-logo-area h1 { font-size: 18px !important; font-weight: 800 !important; margin-bottom: 6px !important; text-transform: uppercase !important; color: #000 !important; }
  #invoice-wrapper .inv-logo-area p { font-size: 9px !important; color: #333 !important; margin: 2px 0 !important; }
  #invoice-wrapper .inv-factura-data { display: block !important; text-align: right !important; }
  #invoice-wrapper .inv-factura-data h2 { font-size: 16px !important; font-weight: 800 !important; color: #000 !important; border-bottom: 1px solid #000 !important; padding-bottom: 4px !important; margin-bottom: 6px !important; }
  #invoice-wrapper .inv-factura-data p { font-size: 10px !important; color: #333 !important; margin: 2px 0 !important; }

  #invoice-wrapper > div:nth-child(2) { display: block !important; font-size: 8px !important; color: #555 !important; margin-bottom: 10px !important; border: 1px solid #ccc !important; padding: 5px !important; background: #f9f9f9 !important; }
  #invoice-wrapper > div:nth-child(2) p { margin: 1px 0 !important; }

  #invoice-wrapper .inv-client-info { display: block !important; background: #f4f4f4 !important; padding: 8px !important; margin-bottom: 12px !important; border: 1px solid #ddd !important; }
  #invoice-wrapper .inv-client-info h3 { font-size: 10px !important; font-weight: 700 !important; text-transform: uppercase !important; margin-bottom: 5px !important; padding-bottom: 4px !important; border-bottom: 1px solid #ccc !important; color: #000 !important; }
  #invoice-wrapper .inv-grid { display: flex !important; justify-content: space-between !important; }
  #invoice-wrapper .inv-grid div { display: block !important; }
  #invoice-wrapper .inv-grid p { font-size: 9px !important; color: #333 !important; margin: 2px 0 !important; }
  #invoice-wrapper .inv-grid strong { color: #000 !important; font-weight: 700 !important; }

  #invoice-wrapper .inv-table { display: table !important; width: 100% !important; border-collapse: collapse !important; margin-bottom: 12px !important; }
  #invoice-wrapper .inv-table thead { display: table-header-group !important; }
  #invoice-wrapper .inv-table tbody { display: table-body-group !important; }
  #invoice-wrapper .inv-table tr { display: table-row !important; }
  #invoice-wrapper .inv-table th { display: table-cell !important; background: #000 !important; color: #fff !important; padding: 6px 4px !important; font-size: 8px !important; font-weight: 700 !important; text-transform: uppercase !important; text-align: left !important; border: 1px solid #000 !important; }
  #invoice-wrapper .inv-table th.text-center, #invoice-wrapper .inv-table th[style*="text-align: center"] { text-align: center !important; }
  #invoice-wrapper .inv-table th.text-right, #invoice-wrapper .inv-table th[style*="text-align: right"] { text-align: right !important; }
  #invoice-wrapper .inv-table td { display: table-cell !important; padding: 6px 4px !important; font-size: 9px !important; color: #000 !important; border-bottom: 1px solid #eee !important; }
  #invoice-wrapper .inv-table td.text-right, #invoice-wrapper .inv-table td[style*="text-align: right"] { text-align: right !important; }
  #invoice-wrapper .inv-table td.text-center, #invoice-wrapper .inv-table td[style*="text-align: center"] { text-align: center !important; }

  #invoice-wrapper .inv-totals { display: flex !important; flex-direction: column !important; align-items: flex-end !important; margin-top: 10px !important; border-top: 1px solid #000 !important; padding-top: 8px !important; }
  #invoice-wrapper .inv-row { display: flex !important; justify-content: space-between !important; width: 100% !important; max-width: 220px !important; padding: 3px 8px !important; font-size: 10px !important; color: #000 !important; }
  #invoice-wrapper .inv-row span { color: #000 !important; }
  #invoice-wrapper .inv-row.grand-total { background: #000 !important; color: #fff !important; font-size: 14px !important; font-weight: 800 !important; padding: 6px 10px !important; margin-top: 4px !important; border-radius: 3px !important; }
  #invoice-wrapper .inv-row.grand-total span { color: #fff !important; }

  #invoice-wrapper .inv-footer { display: block !important; text-align: center !important; margin-top: 20px !important; padding-top: 8px !important; border-top: 1px dashed #999 !important; }
  #invoice-wrapper .inv-footer p { font-size: 8px !important; color: #666 !important; margin: 2px 0 !important; }
  #invoice-wrapper .inv-footer strong { color: #000 !important; }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  42. IMPRESIÓN - ETIQUETAS QR                                  ║
   ╚══════════════════════════════════════════════════════════════════╝ */
.print-container { display: none; }
@media print {
  body * { visibility: hidden; }
  .print-container, .print-container * { visibility: visible; }
  .print-container {
    position: absolute; left: 0; top: 0; width: 100%;
    display: flex; flex-wrap: wrap; justify-content: flex-start; padding: 10mm;
  }
  .print-label {
    width: 5cm; height: 2.5cm; padding: 2mm; margin: 2mm;
    border: 1px dashed #ccc; page-break-inside: avoid;
    display: flex; align-items: center; gap: 3mm;
    background: white; border-radius: 16px; overflow: hidden; box-sizing: border-box;
  }
  .print-label img { height: 100%; object-fit: contain; }
  .print-label svg { width: 100%; height: 30px; }
  .print-label .label-text { text-align: center; width: 100%; color: black; font-size: 10px; font-weight: bold; }
  .print-label .label-name { font-size: 8px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .btn-print { display: none !important; }
}

/* ╔══════════════════════════════════════════════════════════════════╗
   ║  43. IMPRESIÓN - GENERAL                                       ║
   ╚══════════════════════════════════════════════════════════════════╝ */
@media print {
  * { color: #000000 !important; }
  body { background: #ffffff !important; }
}

/* ╔══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════
   ║  44. RESPONSIVE - PROFESIONAL COMPLETO                                                                                         ║
   ╚══════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════════ */

/* ----- DESKTOP GRANDE (1441px+) ----- */
@media (min-width: 1441px) {
  .slideshow-caption { max-width: 700px; }
  .admin-main { padding: 48px; }
  #top-ventas-grid { grid-template-columns: repeat(4, 1fr); }
  .lightbox-content-new { max-width: 1020px; }
  #view-barcodes .grid { grid-template-columns: repeat(4, 1fr); }
  #efectivo-modal .modal-content { max-width: 360px !important; }
}

/* ----- TABLET (769px - 1024px) ----- */
@media (max-width: 1024px) {
  .admin-sidebar { width: 220px; padding: 18px 14px; }
  .admin-main { padding: 24px; }
  .category-modal-container { grid-template-columns: 240px 1fr; }
  .filter-sidebar { width: 240px; padding: 16px 12px; }
  .lightbox-content-new { max-width: 880px; }
  .lightbox-img-col { padding: 20px; min-height: 340px; }
  .lightbox-info-scroll { padding: 20px 18px; }
  .lb-title { font-size: 20px; }
  .lb-price-current { font-size: 24px; }
  #view-barcodes .grid { grid-template-columns: repeat(2, 1fr); }
  .products-admin-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  .slides-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
  #stock-table-body td { font-size: 13px; }
  /* Modal efectivo tablets */
  #efectivo-modal .modal-content { max-width: 400px !important; margin: 8vh auto !important; }
}

/* ----- MOBILE (hasta 768px) ----- */
@media (max-width: 768px) {
  /* General */
  .py-24 { padding-top: 2rem; padding-bottom: 2rem; }
  section .max-w-7xl { padding-left: 1rem; padding-right: 1rem; }

  /* Header */
  .hamburger { display: flex; }
  #nav-links-container { display: none; }

  /* Hero */
  .slideshow-caption { left: 0; width: 100%; padding: 0 20px; text-align: center; }
  .slide-overlay { background: rgba(0,0,0,0.7); }
  .slider-dots { bottom: 20px; }

  /* Modals - Bottom sheet */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal-container { border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 92vh; width: 100%; transform: translateY(100%); }
  .modal-overlay.active .modal-container { transform: translateY(0); }
  .modal-small { max-width: 100%; }
  .modal-footer { flex-direction: column; gap: 8px; }
  .modal-footer .btn-primary, .modal-footer button { width: 100%; }

  /* Category Modal */
  .category-modal-container { grid-template-columns: 1fr; }

  /* Filtros - Drawer lateral */
  .filter-sidebar {
    position: fixed; left: 0; top: 0; height: 100%; z-index: 60;
    transform: translateX(-100%); box-shadow: 0 0 30px rgba(0,0,0,0.5);
    width: 280px; padding-top: 60px;
  }
  .filter-sidebar.active { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,0.5); }

  /* Checkout */
  .split-layout { grid-template-columns: 1fr; gap: 20px; }
  .summary-container-checkout { margin-top: 20px; }

  /* Categorías */
  .category-card-large { flex: 0 0 100%; min-width: 100%; height: 250px; }

  /* Product Cards */
  .btn-add-card { opacity: 1; transform: translateY(0); pointer-events: all; }
  .card:hover { border-color: rgba(255, 255, 255, .06); box-shadow: 0 10px 40px rgba(0, 0, 0, .7); }

  /* Precio vertical mobile */
  .price-box { flex-direction: column; align-items: center; text-align: center; gap: 1px; padding: 8px 6px; }
  .old { order: 1; padding: 2px 6px; width: 100%; text-align: center; border-bottom: 1px solid rgba(255, 255, 255, 0.06); margin-bottom: 4px; }
  .discount { order: 2; margin: 4px 0; padding: 6px 16px; width: auto; display: inline-flex; }
  .new { order: 3; padding: 4px 6px; width: 100%; text-align: center; border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 6px; margin-top: 2px; }
  .new .ahora { font-size: 8px; letter-spacing: 2px; margin-bottom: 0; }
  .new .value { font-size: 18px; line-height: 1.1; }

  /* Grids */
  .grid-cols-2 { grid-template-columns: 1fr; }
  #top-ventas-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }

  /* Admin Layout - Drawer */
  .admin-layout { flex-direction: column; }
  .admin-sidebar {
    position: fixed; left: 0; top: 0; height: 100%;
    transform: translateX(-100%); box-shadow: none; width: 280px; z-index: 100;
  }
  .admin-sidebar.active { transform: translateX(0); box-shadow: 0 0 30px rgba(0,0,0,0.5); }
  .admin-main { width: 100%; padding: 20px; padding-top: 60px; margin-left: 0; }
  .admin-mobile-toggle { display: block; }
  .admin-card { padding: 16px; }

  /* Responsive Tables - Cards */
  .responsive-table { display: block; }
  .responsive-table thead { display: none; }
  .responsive-table tbody { display: block; width: 100%; }
  .responsive-table tr {
    display: flex; flex-direction: column; margin-bottom: 15px;
    border: 1px solid var(--border); border-radius: 8px; padding: 15px; background: var(--bg-card);
  }
  .responsive-table td {
    display: flex; justify-content: space-between; align-items: center;
    text-align: right; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,0.05);
    position: relative; padding-left: 0; padding-right: 0;
  }
  .responsive-table td:before {
    content: attr(data-label); font-weight: bold; text-transform: uppercase;
    font-size: 11px; color: var(--accent); margin-right: auto; padding-right: 10px; text-align: left;
  }
  .responsive-table td:last-child { border-bottom: none; }

  /* Dashboard */
  .dashboard-grid { grid-template-columns: 1fr; }
  .dashboard-grid .admin-card:last-child { grid-column: auto; }

  /* Lightbox - Vertical */
  .lightbox-overlay { padding: 0; }
  .lightbox-content-new { flex-direction: column; max-height: 95vh; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .lightbox-img-col { min-height: 280px; padding: 20px; border-bottom: 1px solid rgba(255,255,255, .04); }
  .lightbox-info-col { border-left: none; border-top: 1px solid rgba(255,255,255, .04); }
  .lightbox-main-img { max-height: 45vh; }
  .lb-arrow { width: 36px; height: 36px; }
  .lb-arrow-left { left: 10px; }
  .lb-arrow-right { right: 10px; }
  .lb-title { font-size: 18px; }
  .lb-price-current { font-size: 24px; }
  .lb-dots-nav { bottom: 14px; padding: 6px 12px; gap: 6px; }
  .lb-dot { width: 6px; height: 6px; }
  .lightbox-close-new { top: 10px; right: 10px; width: 32px; height: 32px; font-size: 18px; }
  .lightbox-info-scroll { padding: 20px 16px 24px; }

  /* Footer */
  footer .grid { grid-template-columns: 1fr !important; }

  /* Barcodes */
  #view-barcodes .grid { grid-template-columns: 1fr !important; }
  #view-barcodes > .flex {
    flex-direction: row;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
  }
  #view-barcodes > .flex > .flex { width: 100%; justify-content: space-between; }
  .admin-card input[type="number"] { width: 60px !important; height: 40px !important; font-size: 18px !important; }

  /* Scanner */
  #view-inventario .grid { grid-template-columns: 1fr; }
  #view-inventario button.bg-green-500, #view-inventario button.bg-red-500 { width: 50px; height: 50px; font-size: 24px; }

  /* Stock table */
  #stock-table-body td { font-size: 12px; padding: 8px 6px; }

  /* Cliente */
  .cliente-info-grid { grid-template-columns: 1fr; }

  /* POS */
  #view-pos .grid { grid-template-columns: 1fr; }

  /* Caja */
  .caja-card { padding: 14px; }
  .caja-card-icon { width: 40px; height: 40px; }
  .caja-card-icon svg { width: 20px; height: 20px; }
  .caja-accion-card { padding: 16px; }

  /* Chat widget - fullscreen */
  .chat-widget {
    bottom: 0; right: 0;
    width: 100%; max-width: 100%;
    height: 100%; max-height: 100%;
    border-radius: 0;
  }
  .chat-float-btn { bottom: 90px; right: 16px; width: 52px; height: 52px; }

  /* Chat admin - mobile */
  .chat-admin-layout { grid-template-columns: 1fr; height: calc(100vh - 60px); }
  .chat-admin-sidebar { display: none; }
  .chat-admin-sidebar.mobile-open {
    display: flex; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    z-index: 100; width: 100%; border-right: none;
  }
  .chat-admin-mobile-toggle { display: flex !important; }

  /* Modal efectivo - mobile */
  #efectivo-modal .modal-content {
    margin: 5vh auto !important; max-height: 92vh; border-radius: 16px !important;
  }
  #efectivo-modal .modal-content > div:first-child { padding: 16px 18px !important; }
  #efectivo-total { font-size: 26px !important; }
  #efectivo-paga-con { font-size: 20px !important; padding: 12px 12px 12px 32px !important; }
  .btn-billete { padding: 10px 6px !important; font-size: 12px !important; }
  #efectivo-cambio-valor { font-size: 28px !important; }

  /* POS cart items mobile */
  .pos-item-img { width: 42px; height: 42px; }
  .pos-item-name { font-size: 12px; }
  .pos-item-subtotal span { font-size: 15px !important; }
  .pos-item-subtotal { min-width: 60px; }
  .qty-pos-btn { width: 32px; height: 32px; font-size: 18px; }
  .pos-qty-number { font-size: 18px; min-width: 40px; }
}

/* ----- MODAL EFECTIVO: Desktop grande ----- */
@media (min-width: 1024px) {
  #efectivo-modal .modal-content { max-width: 380px !important; margin: 12vh auto !important; }
  #efectivo-total { font-size: 28px !important; }
  #efectivo-cambio-valor { font-size: 30px !important; }
  #efectivo-paga-con { font-size: 22px !important; padding: 14px 14px 14px 36px !important; }
}

/* ----- POS CART: Portátil pequeño ----- */
@media (min-width: 1024px) and (max-width: 1279px) {
  .pos-item-img { width: 40px; height: 40px; }
  .pos-item-name { font-size: 12px; }
  .pos-item-subtotal span { font-size: 16px !important; }
  .qty-pos-btn { width: 20px; height: 20px; font-size: 14px; }
  .pos-qty-number { font-size: 8px; min-width: 25px; }
  .pos-item-controls { gap: 5px; }
}

/* ----- POS CART: Desktop grande ----- */
@media (min-width: 1280px) {
  .pos-item-card { gap: 14px; }
}

/* ======================================================================
   MOBILE CHICO (hasta 480px)
   ====================================================================== */
@media (max-width: 480px) {
  /* WhatsApp */
  .whatsapp-float { width: 50px; height: 50px; bottom: 15px; right: 15px; }
  .whatsapp-float svg { width: 28px; height: 28px; }

  /* User */
  .user-avatar { width: 32px; height: 32px; font-size: 12px; }
  .user-dropdown { width: 180px; }

  /* Admin general */
  .admin-main { padding: 15px; padding-top: 50px; }

  /* Hero captions */
  .slideshow-caption__heading { font-size: clamp(2rem, 10vw, 3.5rem); }
  .slideshow-caption__subheading { font-size: clamp(0.85rem, 2.5vw, 1rem); }
  .slideshow-caption .btn-primary { padding: 12px 24px; font-size: 13px; }

  /* Categorías */
  .category-card-large { height: 200px; }
  .category-card-overlay h3 { font-size: clamp(1.5rem, 6vw, 2.5rem); }
  .category-card-overlay p { font-size: 12px; }
  .category-card-overlay .btn-primary { padding: 8px 20px; font-size: 12px; }

  /* Product Cards */
  .top { height: 180px; margin: 8px; border-radius: 10px; }
  .product { max-height: 150px; }
  .title { font-size: 13px; min-height: 32px; }
  .new .value { font-size: 16px; }
  .discount .num { font-size: 15px; }
  .size { width: 30px; height: 24px; font-size: 10px; }
  .brand { font-size: 10px; }
  .color { font-size: 10px; }
  .info { padding: 8px 10px; gap: 8px; }
  .info .icon { font-size: 18px; }
  .info h3 { font-size: 10px; }
  .info p { font-size: 9px; }
  .btn-add-card { padding: 8px; font-size: 11px; }
  .color-circle { width: 24px; height: 24px; }
  .color-circles-row { gap: 6px; }

  /* Precio mobile chico */
  .new .value { font-size: 16px; }
  .discount { padding: 5px 14px; }
  .discount .num { font-size: 14px; }

  /* Top ventas */
  #top-ventas-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }

  /* Brands */
  .brands-track > div { padding-left: 24px; padding-right: 24px; }

  /* Admin cards */
  .admin-card { padding: 12px; margin-bottom: 14px; }
  .admin-card h1, .admin-card h4 { font-size: 1.1rem; }
  .product-admin-card img { height: 110px; }
  .product-admin-info { padding: 10px; }
  .product-admin-info h4 { font-size: 12px; }

  /* Lightbox */
  .lightbox-img-col { min-height: 220px; padding: 14px; }
  .lb-title { font-size: 16px; }
  .lb-price-current { font-size: 20px; }
  .lb-price-old { font-size: 13px; }
  .lb-desc { font-size: 12px; }
  .lb-badge { font-size: 10px; padding: 3px 10px; }
  .lb-info-badge { padding: 4px 10px; font-size: 11px; }
  .lb-info-badge-values span { padding: 1px 6px; font-size: 10px; }
  .feature-list-item { padding: 6px 0; gap: 6px; }
  .feature-list-item strong { font-size: 11px; }
  .feature-list-item span { font-size: 11px; }
  .feature-icon { font-size: 10px; width: 14px; }
  .lb-dots-nav { bottom: 10px; padding: 5px 10px; gap: 5px; }
  .lb-dot { width: 5px; height: 5px; }
  .lightbox-close-new { top: 8px; right: 8px; width: 28px; height: 28px; font-size: 16px; }
  .lightbox-info-scroll { padding: 16px 12px 20px; }

  /* Cart */
  .qty-btn { width: 28px; height: 28px; }

  /* Form inputs */
  .form-input { padding: 10px; font-size: 14px; }

  /* Modal */
  .modal-header { padding: 16px; }
  .modal-header h3 { font-size: 1.3rem; }
  .modal-body { padding: 16px; }

  /* Botones */
  .btn-primary { padding: 12px 20px; font-size: 14px; width: 100%; }
  .btn-sm { padding: 8px 12px; }
  .btn-icon { width: 40px; height: 40px; }

  /* Factura standalone */
  #factura-standalone { padding: 15px !important; }

  /* Scan size modal */
  .scan-size-modal-content { padding: 20px; }
  .scan-size-btn { padding: 12px; font-size: 20px; min-height: 65px; }

  /* Filtros */
  .filter-checkbox { padding: 6px 8px; }
  .filter-checkbox .check-box { width: 16px; height: 16px; }
  .filter-checkbox .check-label { font-size: 12px; }

  /* Print label */
  .print-label { width: 4.5cm; height: 2.5cm; padding: 6px; }

  /* Historial */
  .historial-producto-card { padding: 12px; }

  /* Modal efectivo - fullscreen */
  #efectivo-modal .modal-content {
    margin: 0 !important; max-height: 100vh; border-radius: 0 !important;
  }
  #efectivo-paga-con { font-size: 18px !important; }
  #efectivo-cambio-valor { font-size: 24px !important; }
  .btn-billete { padding: 9px 4px !important; font-size: 11px !important; }
}  
