/* styles.css - SISTEMA SARMII ERP FINAL (PREMIUM MOBILE EDITION) */
:root {
    --primary: #111827;
    --primary-hover: #374151;
    --secondary: #f3f4f6;
    --accent: #4f46e5;
    --text-main: #1f2937;
    --text-muted: #6b7280;
    --bg-main: #ffffff;
    --bg-body: #f9fafb;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --border: #e5e7eb;
    --radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    /* Sombras modernas premium para elementos flotantes */
    --shadow-floating: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --font: 'Inter', sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; font-family: var(--font); }
body { background-color: var(--bg-body); color: var(--text-main); line-height: 1.5; overflow-x: hidden; }

.hidden { display: none !important; }
.text-center { text-align: center; }
.text-gray { color: var(--text-muted); }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning) !important; }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.875rem; }
.text-md { font-size: 1.125rem; }
.text-xl { font-size: 1.5rem; font-weight: 700; }
.w-100 { width: 100%; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.block { display: block; }
.d-flex { display: flex; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.items-center { align-items: center; }
.flex-wrap { flex-wrap: wrap; }

button { cursor: pointer; font-family: var(--font); border: none; transition: var(--transition); border-radius: var(--radius); font-weight: 500; }
.btn-primary { background: var(--primary); color: white; padding: 0.75rem 1.5rem; font-size: 1rem; }
.btn-primary:hover { background: var(--primary-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border: 1px solid var(--primary); color: var(--primary); padding: 0.5rem 1rem; }
.btn-outline:hover { background: var(--primary); color: white; }
.btn-sm { padding: 0.4rem 0.8rem; font-size: 0.875rem; }
.btn-icon { background: transparent; color: var(--primary); font-size: 1.5rem; position: relative; padding: 0.5rem; }
.btn-close { background: transparent; color: var(--text-muted); font-size: 1.25rem; transition: color 0.2s; }
.btn-close:hover { color: var(--danger); }
.btn-text { background: transparent; color: var(--text-muted); padding: 0.75rem; text-decoration: underline; }
.btn-text:hover { color: var(--primary); }
.badge { position: absolute; top: 0; right: 0; background: var(--danger); color: white; font-size: 0.7rem; padding: 0.15rem 0.4rem; border-radius: 50%; font-weight: bold; transform: translate(25%, -25%); }

.btn-close-register { background-color: var(--success); color: white; border: none; padding: 0.4rem 0.8rem; font-size: 0.875rem; border-radius: var(--radius); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; transition: all 0.3s ease; cursor: pointer; box-shadow: var(--shadow-sm); }
.btn-close-register:hover { background-color: var(--danger); transform: translateY(-1px); box-shadow: var(--shadow-md); }

.form-group { margin-bottom: 1rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-size: 0.875rem; font-weight: 500; color: var(--text-main); }
input, select, textarea { width: 100%; padding: 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 1rem; outline: none; transition: var(--transition); font-family: var(--font); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1); }
.form-row { display: flex; gap: 1rem; }
.form-row .form-group { flex: 1; }

.store-header { background: var(--bg-main); box-shadow: var(--shadow-sm); position: sticky; top: 0; z-index: 100; }
.header-container { max-width: 1200px; margin: 0 auto; padding: 1rem 1.5rem; display: flex; justify-content: space-between; align-items: center; }
.brand h1 { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.5px; }
.brand span { font-size: 0.75rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }
.header-actions { display: flex; align-items: center; gap: 1.5rem; }

.hero { max-width: 1200px; margin: 2rem auto; padding: 0 1.5rem; text-align: center; }
.hero h2 { font-size: 2.5rem; font-weight: 700; margin-bottom: 0.5rem; }
.hero p { color: var(--text-muted); font-size: 1.1rem; }

.catalog { max-width: 1200px; margin: 0 auto 4rem; padding: 0 1.5rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2.5rem; }
.product-card { background: var(--bg-main); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow-sm); transition: var(--transition); display: flex; flex-direction: column; border: 1px solid var(--border); }
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: #d1d5db; }
.product-img { width: 100%; height: 320px; object-fit: cover; background: var(--secondary); border-bottom: 1px solid var(--border); }
.product-info { padding: 1.5rem; flex-grow: 1; display: flex; flex-direction: column; }

/* =========================================
   ESTÉTICA PREMIUM PARA LA TIENDA WEB
   ========================================= */
.product-category { font-size: 0.75rem; color: #4f46e5; text-transform: uppercase; font-weight: 800; margin-bottom: 0.4rem; letter-spacing: 0.5px; }
.product-title { font-size: 1.25rem; font-weight: 800; color: #111827; margin-bottom: 0.3rem; line-height: 1.2; }
.product-meta { font-size: 0.85rem; color: #6b7280; margin-bottom: 1rem; }

.price-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.4rem; font-size: 0.95rem; }
.price-mayor-pill { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.8rem; background-color: #ecfdf5; border: 1px solid #10b981; border-radius: 6px; font-weight: 700; font-size: 1.05rem; color: #111827; margin-bottom: 1.2rem; }
.price-mayor-pill span:last-child { color: #047857; font-size: 1.15rem; }

.section-title { font-size: 0.9rem; font-weight: 700; color: #111827; margin-bottom: 0.8rem; margin-top: 0.5rem; }

/* Tallas (Botones blancos que se pintan de negro) */
.size-selector { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.btn-size { background: #ffffff; border: 1px solid #d1d5db; padding: 0.6rem; border-radius: 8px; cursor: pointer; font-weight: 700; flex: 1; text-align: center; color: #374151; font-size: 0.9rem; transition: var(--transition); min-width: 45px; }
.btn-size:hover { border-color: #9ca3af; background: #f9fafb; }
.btn-size.selected { background: #111827; color: #ffffff; border-color: #111827; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }

/* Botón de Agregar Talla (Negro) */
.btn-cart-unit { background: #111827; color: #ffffff; border: none; padding: 0.9rem; border-radius: 8px; width: 100%; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: var(--transition); margin-bottom: 0.5rem; display: flex; justify-content: center; align-items: center; gap: 8px; }
.btn-cart-unit:hover { background: #374151; transform: translateY(-2px); box-shadow: 0 4px 6px rgba(0,0,0,0.1); }

.divider-dashed { border-top: 1px dashed #e5e7eb; margin: 1.5rem 0; }

/* BOTONES DE PAQUETES CON EFECTO DE SOMBREADO MAGNÍFICO */
.pack-buttons-container { display: flex; flex-direction: column; gap: 0.8rem; }

.btn-pack-outline { display: flex; justify-content: space-between; align-items: center; background: #ffffff; border: 1px solid #111827; color: #111827; padding: 0.9rem 1rem; border-radius: 10px; font-weight: 700; font-size: 0.95rem; cursor: pointer; transition: var(--transition); width: 100%; }
.btn-pack-outline span:last-child { color: #4b5563; font-weight: 600; }

/* Efecto Hover: Se pinta de azul claro, borde azul fuerte, sube y da sombra */
.btn-pack-outline:hover { background-color: #eff6ff; border-color: #3b82f6; color: #1d4ed8; transform: translateY(-3px); box-shadow: 0 6px 12px rgba(59, 130, 246, 0.15); }
.btn-pack-outline:hover span:last-child { color: #1d4ed8; }

.btn-pack-green { border-color: #059669; color: #059669; }
.btn-pack-green span:last-child { color: #047857; }

/* Efecto Hover: Se pinta de verde claro, borde verde fuerte, sube y da sombra */
.btn-pack-green:hover { background-color: #ecfdf5; border-color: #047857; color: #047857; transform: translateY(-3px); box-shadow: 0 6px 12px rgba(5, 150, 105, 0.15); }
.btn-pack-green:hover span:last-child { color: #047857; }

/* Efecto clic activo */
.btn-pack-outline:active, .btn-pack-green:active, .btn-cart-unit:active { transform: translateY(0); box-shadow: none; }

/* ========================================= */

.sidebar-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; display: flex; justify-content: flex-end; opacity: 1; transition: opacity 0.3s; }
.sidebar-overlay.hidden { opacity: 0; pointer-events: none; }
.sidebar-content { width: 100%; max-width: 420px; background: var(--bg-main); height: 100%; display: flex; flex-direction: column; transform: translateX(0); transition: transform 0.3s ease-in-out; box-shadow: -5px 0 15px rgba(0,0,0,0.1); }
.sidebar-overlay.hidden .sidebar-content { transform: translateX(100%); }
.sidebar-header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.sidebar-body { padding: 1.5rem; flex-grow: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 1rem; }
.sidebar-footer { padding: 1.5rem; border-top: 1px solid var(--border); background: #f8fafc; }

.cart-item { display: flex; gap: 1rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; transition: var(--transition); }
.cart-item:hover { background-color: #f9fafb; border-radius: 8px; padding: 0.5rem; margin: -0.5rem; border-bottom: 1px solid transparent; }
.cart-item-img { width: 75px; height: 75px; object-fit: cover; border-radius: 8px; }
.cart-item-info { flex-grow: 1; }
.cart-item-title { font-weight: 700; font-size: 0.95rem; color: #111827; }
.cart-item-meta { font-size: 0.8rem; color: var(--accent); font-weight: 600; margin-bottom: 0.5rem; }
.cart-item-price { font-weight: 800; color: var(--primary); font-size: 1.05rem; }
.cart-qty-control { display: flex; align-items: center; gap: 0.5rem; background: var(--secondary); padding: 0.25rem; border-radius: var(--radius); width: fit-content; }
.cart-qty-btn { background: white; border: 1px solid var(--border); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; cursor: pointer; font-weight: bold; transition: 0.2s; }
.cart-qty-btn:hover { background: var(--primary); color: white; border-color: var(--primary); }
.qty-display { font-size: 0.95rem; font-weight: 700; min-width: 24px; text-align: center; }

.cart-summary .summary-row { display: flex; justify-content: space-between; margin-bottom: 0.5rem; font-size: 1rem; font-weight: 500; }
.cart-summary .total { font-size: 1.35rem; font-weight: 800; margin-top: 1rem; border-top: 2px dashed var(--border); padding-top: 1rem; color: #111827; }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 1100; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 1; transition: opacity 0.2s; backdrop-filter: blur(4px); }
.modal-overlay.hidden { opacity: 0; pointer-events: none; }
.modal-content { background: var(--bg-main); width: 100%; border-radius: 16px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto; position: relative; transform: scale(1); transition: transform 0.2s; }
.modal-overlay.hidden .modal-content { transform: scale(0.95); }
.checkout-flow { max-width: 500px; }
.login-box { max-width: 400px; padding: 2rem; }
.modal-header { padding: 1.5rem; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--bg-main); z-index: 10; border-radius: 16px 16px 0 0; }
.modal-body { padding: 1.5rem; }

.checkout-step h3 { margin-bottom: 1rem; font-size: 1.2rem; color: var(--primary); border-bottom: 2px solid var(--secondary); padding-bottom: 0.5rem; }
.checkout-summary-box { background: var(--secondary); padding: 1rem; border-radius: var(--radius); text-align: center; border: 1px dashed var(--border); }

.toast-container { position: fixed; bottom: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast { background: var(--primary); color: white; padding: 1rem 1.5rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 10px; animation: slideIn 0.3s ease forwards; min-width: 250px; font-weight: 500; }
.toast.success { background: var(--success); }
.toast.error { background: var(--danger); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; } }

.global-loader { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255,255,255,0.9); z-index: 3000; display: flex; justify-content: center; align-items: center; }
.spinner { width: 50px; height: 50px; border: 4px solid var(--secondary); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* RESTO DEL DASHBOARD ADMIN */
.admin-layout { display: flex; height: 100vh; background: var(--bg-body); overflow: hidden; }
.admin-sidebar { width: 250px; background: var(--primary); color: white; display: flex; flex-direction: column; flex-shrink: 0; }
.admin-brand { padding: 1.5rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-brand h2 { font-size: 1.25rem; font-weight: 700; letter-spacing: 1px; }
.admin-nav { display: flex; flex-direction: column; padding: 1rem 0; flex-grow: 1; }
.nav-item { padding: 1rem 1.5rem; color: #d1d5db; text-decoration: none; display: flex; align-items: center; gap: 0.75rem; transition: var(--transition); border-left: 3px solid transparent; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,0.05); color: white; border-left-color: var(--accent); }
.admin-content { flex-grow: 1; display: flex; flex-direction: column; overflow: hidden; }
.admin-topbar { background: var(--bg-main); padding: 1rem 2rem; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.admin-body { padding: 2rem; overflow-y: auto; flex-grow: 1; }

.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.stat-card { background: var(--bg-main); padding: 1.5rem; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.stat-card h3 { font-size: 0.875rem; color: var(--text-muted); text-transform: uppercase; margin-bottom: 0.5rem; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-card.bg-primary { background-color: var(--primary) !important; color: white !important; }
.stat-card.bg-primary h3, .stat-card.bg-primary .stat-value { color: white !important; }

.orders-tabs { display: flex; gap: 1.5rem; border-bottom: 2px solid var(--border); padding-bottom: 0px; }
.order-tab-btn { background: transparent; border: none; padding: 0.75rem 1rem; font-size: 1.05rem; font-weight: 600; color: var(--text-muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; }
.order-tab-btn:hover { color: var(--text-main); }
.order-tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.order-tab-content { display: none; animation: fadeIn 0.3s ease; }
.order-tab-content.active { display: block; }

.sub-tabs-container { background: var(--secondary); padding: 5px; border-radius: 8px; display: inline-flex; border: 1px solid var(--border); margin-bottom: 1.5rem; }
.sub-tab-btn { background: transparent; border: none; padding: 8px 20px; font-size: 0.95rem; font-weight: 600; color: var(--text-muted); border-radius: 6px; transition: all 0.2s ease; display: flex; align-items: center; gap: 8px; }
.sub-tab-btn:hover { color: var(--text-main); }
.sub-tab-btn.active { background: var(--bg-main); color: var(--primary); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.sub-tab-content { display: none; animation: fadeIn 0.3s ease; }
.sub-tab-content.active { display: block; }

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

.table-responsive { overflow-x: auto; background: var(--bg-main); border-radius: var(--radius); }
.table { width: 100%; border-collapse: separate; border-spacing: 0; text-align: left; }
.table th { font-weight: 600; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 1.2rem 1rem; border-bottom: 2px solid var(--secondary); background: var(--bg-main); }
.table td { font-size: 0.95rem; vertical-align: middle; padding: 1.2rem 1rem; border-bottom: 1px solid var(--border); color: var(--text-main); }
.table tbody tr { transition: background-color 0.2s ease; }
.table tbody tr:hover { background-color: #f8fafc; } 
.table tbody tr:last-child td { border-bottom: none; }

.modern-select { appearance: none; -webkit-appearance: none; -moz-appearance: none; background: transparent url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22292.4%22%20height%3D%22292.4%22%3E%3Cpath%20fill%3D%22%236b7280%22%20d%3D%22M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-12.9%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2012.9l128%20127.9c3.6%203.6%207.8%205.4%2012.8%205.4s9.2-1.8%2012.8-5.4L287%2095c3.5-3.5%205.4-7.8%205.4-12.8%200-5-1.9-9.2-5.5-12.8z%22%2F%3E%3C%2Fsvg%3E") no-repeat right .8rem top 50%; background-size: .65rem auto; padding: 0.4rem 2rem 0.4rem 1rem; border-radius: 9999px; font-size: 0.85rem; font-weight: 600; border: 1px solid var(--border); cursor: pointer; transition: all 0.2s ease; outline: none; }
.modern-select.pending { color: #b45309; background-color: #fffbeb; border-color: #fde68a; }
.modern-select.prepared { color: #065f46; background-color: #d1fae5; border-color: #a7f3d0; }
.modern-select:focus { box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2); }

.btn-action { background: #f3f4f6; color: #4b5563; border: none; width: 32px; height: 32px; border-radius: 6px; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }
.btn-action:hover { background: #e5e7eb; color: var(--primary); }
.btn-action.danger:hover { background: #fee2e2; color: var(--danger); }

.empty-state { padding: 3rem 1rem; text-align: center; color: var(--text-muted); }
.empty-state i { font-size: 2.5rem; color: #d1d5db; margin-bottom: 1rem; display: block; }
.status-badge { padding: 0.25rem 0.6rem; border-radius: 9999px; font-size: 0.75rem; font-weight: 600; }

.order-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; background: var(--secondary); padding: 1.5rem; border-radius: var(--radius); margin-bottom: 1.5rem; border: 1px solid var(--border); }
.order-detail-grid p { font-size: 0.95rem; margin-bottom: 0.4rem; color: var(--text-main); }
.order-detail-grid p i { color: var(--primary); width: 20px; text-align: center; margin-right: 5px; }
.order-notes-box { background: #fffbeb; border: 1px solid #fde68a; padding: 1rem; border-radius: var(--radius); margin-bottom: 1.5rem; color: #92400e; }
.order-notes-box p { font-size: 0.9rem; margin-top: 0.5rem; }
.order-detail-items { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; border: 1px solid var(--border); }
.order-detail-items th, .order-detail-items td { padding: 1rem; border-bottom: 1px solid var(--border); text-align: left; font-size: 0.9rem; }
.order-detail-items th { background: var(--secondary); font-weight: 600; color: var(--text-muted); text-transform: uppercase; font-size: 0.8rem; }
.order-detail-items tbody tr:last-child td { border-bottom: none; }

.print-only { display: none; }
@media print {
    body * { visibility: hidden; }
    #print-section, #print-section * { visibility: visible; }
    #print-section { position: absolute; left: 0; top: 0; width: 100%; padding: 20px; background: white; }
    .modal-overlay, #store-view, #admin-view, #toast-container, header, aside { display: none !important; }
    @page { margin: 0.5cm; }
}

/* =========================================
   LA "GALLETITA" FLOTANTE (ESTILO UBER/APPLE)
   ========================================= */
.mobile-floating-cart { 
    display: none; 
    position: fixed; 
    bottom: 25px; /* Separado del borde inferior */
    left: 50%; /* Centrado en pantalla */
    transform: translateX(-50%) translateY(150%); /* Oculto inicialmente hacia abajo */
    width: 90%; 
    max-width: 360px; /* Tamaño máximo tipo píldora */
    background: var(--primary); 
    color: white; 
    padding: 1rem 1.25rem; 
    z-index: 99; 
    justify-content: space-between; 
    align-items: center; 
    box-shadow: var(--shadow-floating); 
    cursor: pointer; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* Animación tipo rebote suave */
    border-radius: 9999px; /* Forma de Píldora/Galletita total */
}

/* Estado activo de la galletita */
.mobile-floating-cart.active { 
    display: flex; 
    transform: translateX(-50%) translateY(0); 
}

.floating-cart-info { display: flex; align-items: center; gap: 0.75rem; }
.floating-badge { background: var(--success); color: white; font-size: 0.9rem; font-weight: 800; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; box-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }
.floating-text { font-weight: 600; font-size: 0.95rem; letter-spacing: 0.5px; }
.floating-cart-total { font-weight: 800; font-size: 1.15rem; background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 9999px;}

@media (min-width: 769px) { .mobile-floating-cart { display: none !important; } }

/* =========================================
   ADAPTACIONES PREMIUM PARA MÓVIL
   ========================================= */
@media (max-width: 768px) {
    /* Header del catálogo más limpio */
    .store-header { padding: 0.5rem 0; }
    .header-container { flex-direction: row; justify-content: space-between; gap: 0; padding: 0.5rem 1rem; }
    .header-actions { gap: 1rem; }
    .brand h1 { font-size: 1.3rem; }
    
    .hero { margin: 1.5rem auto; padding: 0 1rem; }
    .hero h2 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; }
    
    /* Grid de tarjetas a 1 columna grande con márgenes sutiles */
    .catalog { grid-template-columns: 1fr; gap: 1.5rem; padding: 0 1rem; margin-bottom: 110px; /* Espacio para la galletita */ }
    
    /* Tarjetas de producto más premium en móvil */
    .product-card { border-radius: 20px; box-shadow: var(--shadow-md); border: none; }
    .product-img { height: 280px; border-radius: 20px 20px 0 0; }
    .product-info { padding: 1.25rem; }
    .product-title { font-size: 1.35rem; }
    
    /* Botones más grandes para dedazos cómodos */
    .btn-cart-unit { padding: 1rem; font-size: 1rem; border-radius: 12px; }
    .btn-pack-outline { padding: 1rem; border-radius: 12px; }
    .btn-size { padding: 0.75rem; font-size: 0.95rem; border-radius: 10px; }
    
    /* Adaptaciones del Panel Admin en celular */
    .admin-layout { flex-direction: column; }
    .admin-sidebar { width: 100%; height: auto; flex-direction: row; align-items: center; justify-content: space-between; padding: 0.5rem 1rem; background: var(--primary); }
    .admin-nav { flex-direction: row; padding: 0; overflow-x: auto; gap: 0.5rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
    .admin-nav::-webkit-scrollbar { display: none; }
    .nav-item { padding: 0.6rem 1rem; font-size: 0.85rem; background: rgba(255,255,255,0.1); border-radius: 8px; border-left: none; white-space: nowrap; }
    .nav-item.active { background: var(--accent); border-left: none; }
    .admin-brand { border: none; padding: 0; }
    .admin-brand h2 { font-size: 1.1rem; }
    .admin-topbar { padding: 1rem; flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    
    .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
    .toast-container { bottom: 100px; z-index: 9999; left: 50%; transform: translateX(-50%); width: 90%; max-width: 350px;}
    
    .pos-layout { grid-template-columns: 1fr !important; height: auto !important; }
    .pos-grid { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
    .pos-item-card { border-radius: 12px; }
    .pos-img-wrapper { height: 80px; }
    .pos-info-wrapper h4 { font-size: 0.75rem; }
    .pos-btn { padding: 5px; font-size: 0.7rem; }
}

@keyframes cartFlash { 0% { transform: scale(1); color: var(--primary); } 50% { transform: scale(1.3); color: var(--success); } 100% { transform: scale(1); color: var(--primary); } }
.cart-bump i { animation: cartFlash 0.4s ease; }
.cart-bump .badge { background: var(--success); transition: 0.3s; }

/* Animación flash de la galletita al agregar al carrito */
@keyframes mobileFlash { 0% { transform: translateX(-50%) scale(1); background: var(--primary); } 50% { transform: translateX(-50%) scale(1.05); background: var(--success); box-shadow: 0 0 20px rgba(16, 185, 129, 0.6); } 100% { transform: translateX(-50%) scale(1); background: var(--primary); } }
.mobile-bump { animation: mobileFlash 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

.border-l-warning { border-left: 5px solid var(--warning); border-radius: var(--radius); padding-left: 2rem !important; }
.border-l-success { border-left: 5px solid var(--success); border-radius: var(--radius); padding-left: 2rem !important; }
.input-active { border-color: var(--success) !important; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important; background-color: #f0fdf4; }

.toggle-switch-container { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 0.75rem 0; border-bottom: 1px solid var(--border); width: 100%; }
.toggle-switch-container:last-child { border-bottom: none; }
.toggle-label { flex: 1; font-size: 0.95rem; font-weight: 500; color: var(--text-main); margin-right: 15px; }
.toggle-switch { position: relative; display: inline-block; width: 44px; height: 24px; flex-shrink: 0; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background-color: #ccc; transition: .4s; border-radius: 34px; }
.slider:before { position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px; background-color: white; transition: .4s; border-radius: 50%; box-shadow: 0 2px 4px rgba(0,0,0,0.2); }
input:checked + .slider { background-color: var(--success); }
input:checked + .slider:before { transform: translateX(20px); }

/* POS LAYOUT */
.pos-layout { display: grid; grid-template-columns: 2.3fr 1fr; gap: 1.5rem; height: calc(100vh - 150px); min-height: 0; }
.pos-container-relative { position: relative; height: 100%; border-radius: 16px; }
.pos-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.85); backdrop-filter: blur(8px); z-index: 50; display: flex; align-items: center; justify-content: center; transition: opacity 0.3s ease; opacity: 1; }
.pos-overlay.hidden { opacity: 0; pointer-events: none; }
.pos-overlay-content { background: #fff; padding: 2.5rem; border-radius: 16px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); text-align: center; max-width: 380px; width: 90%; border: 1px solid var(--border); }

.pos-products-area { background: var(--bg-main); border-radius: 16px; border: 1px solid #e5e7eb; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); padding: 1.25rem !important; display: flex; flex-direction: column; height: 100%; min-height: 0; }
.pos-cart-area { background: var(--bg-main); border-radius: 16px; border: 1px solid #e5e7eb; display: flex; flex-direction: column; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); padding: 1.25rem !important; height: 100%; min-height: 0; }
.pos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; flex: 1 1 auto; align-content: start; overflow-y: auto; min-height: 0; padding-right: 5px; }

.pos-item-card { display: flex; flex-direction: column; border: 1px solid #e5e7eb; border-radius: 12px; overflow: hidden; background: #ffffff; transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; }
.pos-item-card:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: var(--shadow-md); }
.pos-img-wrapper { height: 90px; overflow: hidden; background: #f8fafc; border-bottom: 1px solid #f1f5f9; }
.pos-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }

.pos-info-wrapper { padding: 0.5rem; display: flex; flex-direction: column; flex-grow: 1; text-align: center; }
.pos-info-wrapper h4 { font-size: 0.85rem; font-weight: 600; margin-bottom: 0.1rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--primary); }
.pos-stock-badge { display: inline-block; padding: 2px 8px; border-radius: 9999px; font-size: 0.65rem; font-weight: 700; margin: 4px auto 6px auto; }
.pos-buttons-grid { display: flex; flex-direction: column; gap: 4px; margin-top: auto; }

.pos-btn { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 6px; padding: 4px; font-size: 0.75rem; font-weight: 600; color: #334155; transition: all 0.2s ease; cursor: pointer; }
.pos-btn:hover { background: #e0e7ff; border-color: #818cf8; color: #3730a3; }
.pos-btn-pack { background: #ecfdf5; border-color: #6ee7b7; color: #047857; }
.pos-btn-pack:hover { background: #d1fae5; border-color: #34d399; color: #065f46; }

.pos-cart-items-container { flex: 1 1 auto; overflow-y: auto; min-height: 0; padding-right: 8px; margin-bottom: 10px; }
.pos-cart-row { background: var(--bg-main); border: 1px solid var(--border); border-radius: 8px; display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; margin-bottom: 6px; }
.pos-cart-row:last-child { margin-bottom: 0; }

.pos-pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--border); flex-shrink: 0; }
.page-btn { background: #ffffff; border: 1px solid var(--border); border-radius: 6px; padding: 6px 12px; font-size: 0.8rem; font-weight: 600; color: var(--primary); cursor: pointer; transition: all 0.2s; display: flex; align-items: center; gap: 6px; }
.page-btn:hover:not(:disabled) { background: var(--secondary); border-color: var(--primary); }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; background: #f1f5f9; }

.inline-price-input { width: 75px; padding: 2px; font-size: 0.95rem; font-weight: 700; color: var(--primary); border: 1px solid transparent; border-radius: 4px; background: transparent; text-align: right; transition: all 0.2s; cursor: pointer; }
.inline-price-input:hover, .inline-price-input:focus { border-color: var(--accent); background: #ffffff; cursor: text; box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2); }