/* ========================================
   LIQUARY 24 HRS - Mobile First FULL BLACK
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #000000;
    --bg-dark: #000000;
    --bg-card: #0a0a0a;
    --bg-elevated: #111111;
    --text: #ffffff;
    --text-secondary: #888888;
    --text-muted: #555555;
    --border: #1a1a1a;
    --primary: #8b5cf6;
    --primary-dark: #7c3aed;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --shadow: 0 2px 8px rgba(0,0,0,0.5);
    --shadow-lg: 0 4px 20px rgba(0,0,0,0.8);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Inter', -apple-system, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    min-height: 100%;
    height: 100%;
    padding-bottom: 80px;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
img { max-width: 100%; height: auto; }

/* ========================================
   SPLASH SCREEN - EPIC VERSION
   ======================================== */
.splash {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.splash.hide {
    animation: splashExit 0.8s ease-in-out forwards;
}

@keyframes splashExit {
    0% { 
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.1);
    }
    100% { 
        opacity: 0;
        transform: scale(1.5);
        visibility: hidden;
    }
}

/* Fondo animado con partículas */
.splash-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.splash-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 3s ease-in-out infinite;
}

.splash-particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.splash-particle:nth-child(2) { left: 20%; animation-delay: 0.2s; }
.splash-particle:nth-child(3) { left: 30%; animation-delay: 0.4s; }
.splash-particle:nth-child(4) { left: 40%; animation-delay: 0.6s; }
.splash-particle:nth-child(5) { left: 50%; animation-delay: 0.8s; }
.splash-particle:nth-child(6) { left: 60%; animation-delay: 1s; }
.splash-particle:nth-child(7) { left: 70%; animation-delay: 1.2s; }
.splash-particle:nth-child(8) { left: 80%; animation-delay: 1.4s; }
.splash-particle:nth-child(9) { left: 90%; animation-delay: 1.6s; }

@keyframes particleFloat {
    0% {
        bottom: -10px;
        opacity: 0;
        transform: translateX(0) scale(1);
    }
    10% {
        opacity: 0.8;
    }
    90% {
        opacity: 0.8;
    }
    100% {
        bottom: 100%;
        opacity: 0;
        transform: translateX(20px) scale(0.5);
    }
}

/* Glow circular detrás del logo */
.splash-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    border-radius: 50%;
    animation: glowPulse 2s ease-in-out infinite;
}

@keyframes glowPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.8;
    }
}

.splash-content {
    position: relative;
    text-align: center;
    z-index: 2;
}

.splash-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    margin-bottom: 50px;
}

.splash-icon {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, #8b5cf6 0%, #a78bfa 50%, #c4b5fd 100%);
    border-radius: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 60px;
    animation: iconEntry 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards, iconFloat 3s ease-in-out 0.6s infinite;
    transform: scale(0) rotate(-180deg);
    box-shadow: 
        0 0 60px rgba(139, 92, 246, 0.5),
        0 20px 60px rgba(0, 0, 0, 0.5),
        inset 0 -5px 20px rgba(0, 0, 0, 0.2);
}

@keyframes iconEntry {
    0% {
        transform: scale(0) rotate(-180deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

@keyframes iconFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-10px) rotate(2deg);
    }
}

.splash-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    opacity: 0;
    animation: textEntry 0.5s ease-out 0.3s forwards;
}

@keyframes textEntry {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.splash-name {
    font-size: 48px;
    font-weight: 800;
    color: white;
    letter-spacing: -2px;
    text-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
}

.splash-name span {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.splash-tag {
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 8px;
    text-transform: uppercase;
    margin-top: 8px;
    opacity: 0;
    animation: tagEntry 0.4s ease-out 0.5s forwards;
}

@keyframes tagEntry {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.splash-loader {
    width: 180px;
    height: 3px;
    background: #1a1a1a;
    border-radius: 2px;
    overflow: hidden;
    margin: 0 auto 30px;
    opacity: 0;
    animation: loaderEntry 0.3s ease-out 0.6s forwards;
}

@keyframes loaderEntry {
    to { opacity: 1; }
}

.splash-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #8b5cf6, #a78bfa, #8b5cf6);
    border-radius: 2px;
    animation: loadProgress 1s ease-out 0.7s forwards;
    box-shadow: 0 0 20px rgba(139, 92, 246, 0.8);
}

@keyframes loadProgress {
    0% { width: 0%; }
    100% { width: 100%; }
}

.splash-status {
    font-size: 12px;
    color: #888;
    margin-top: 12px;
    opacity: 0;
    animation: sloganEntry 0.4s ease-out 0.6s forwards;
}

.splash-slogan {
    font-size: 14px;
    color: #666;
    opacity: 0;
    animation: sloganEntry 0.4s ease-out 0.8s forwards;
    margin-top: 8px;
}

@keyframes sloganEntry {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Líneas decorativas animadas */
.splash-lines {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.splash-line {
    position: absolute;
    width: 1px;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--primary), transparent);
    opacity: 0.3;
    animation: lineMove 2s ease-in-out infinite;
}

.splash-line:nth-child(1) { left: 15%; animation-delay: 0s; }
.splash-line:nth-child(2) { left: 85%; animation-delay: 0.5s; }
.splash-line:nth-child(3) { left: 25%; animation-delay: 1s; }
.splash-line:nth-child(4) { left: 75%; animation-delay: 1.5s; }

@keyframes lineMove {
    0% {
        top: -100px;
        opacity: 0;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        top: 100%;
        opacity: 0;
    }
}

/* ========================================
   HEADER
   ======================================== */
.header {
    position: sticky;
    top: 0;
    background: #000000;
    color: white;
    padding: 16px 20px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
}

.header-back {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.header-back svg {
    width: 24px;
    height: 24px;
}

.header-title {
    font-size: 18px;
    font-weight: 600;
}

.header-actions {
    display: flex;
    gap: 8px;
}

.header-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.header-btn svg {
    width: 22px;
    height: 22px;
}

/* Header Home */
.header-home {
    background: #000000;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
}

.header-home .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 55%;
}

.header-home .logo-img {
    height: 48px;
    max-width: 100%;
    width: auto;
    object-fit: contain;
}

.header-home .logo-icon {
    width: 44px;
    height: 44px;
    background: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.header-home .logo-text {
    font-size: 20px;
    font-weight: 700;
    color: white;
}

.header-home .logo-text span {
    color: var(--primary);
}

/* Splash Logo Imagen */
.splash-logo-img {
    width: 140px;
    height: auto;
    animation: logoEntry 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    transform: scale(0);
    filter: drop-shadow(0 0 40px rgba(139, 92, 246, 0.5));
}

@keyframes logoEntry {
    0% {
        transform: scale(0) rotate(-10deg);
        opacity: 0;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}

.badge-open {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--success);
}

.badge-open .dot {
    width: 6px;
    height: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   SEARCH BAR
   ======================================== */
.search-bar {
    padding: 20px 20px 9px 20px;
    background: var(--bg);
    position: sticky;
    top: 76px;
    z-index: 90;
    display: flex;
    justify-content: center;
}

.search-input-wrap {
    position: relative;
    width: 100%;
    max-width: 500px;
}

.search-input-wrap svg {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: var(--text-muted);
}

.search-input {
    width: 100%;
    padding: 14px 16px 14px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    color: var(--text);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-elevated);
}

.search-input::placeholder {
    color: var(--text-muted);
}

/* ========================================
   BANNER / HERO
   ======================================== */
.banner {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.banner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0,0,0,0.7), transparent);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 24px;
}

.banner-logo {
    font-family: 'Georgia', serif;
    font-size: 28px;
    font-style: italic;
    color: #d4a574;
    margin-bottom: 8px;
}

.banner-text {
    font-size: 14px;
    color: rgba(255,255,255,0.8);
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* ========================================
   CATEGORIES
   ======================================== */
.categories {
    padding: 20px;
    background: var(--bg);
    position: relative;
}

.categories-scroll {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.categories-scroll::-webkit-scrollbar {
    display: none;
}

/* Indicador de scroll */
.scroll-indicator {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 60px;
    background: linear-gradient(to right, transparent, var(--bg) 60%);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    pointer-events: none;
    transition: opacity 0.3s;
}

.scroll-indicator svg {
    width: 20px;
    height: 20px;
    color: var(--text-muted);
    animation: scrollHint 1.5s ease-in-out infinite;
}

.scroll-indicator.hidden {
    opacity: 0;
}

@keyframes scrollHint {
    0%, 100% { transform: translateX(0); opacity: 0.5; }
    50% { transform: translateX(4px); opacity: 1; }
}

.cat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 72px;
    scroll-snap-align: start;
}

.cat-icon-btn {
    width: 60px;
    height: 60px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.cat-icon-btn svg {
    width: 28px;
    height: 28px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

/* Colores por categoría */
.cat-icon-btn.combos svg { color: #ef4444; }
.cat-icon-btn.whisky svg { color: #fbbf24; }
.cat-icon-btn.ron svg { color: #f97316; }
.cat-icon-btn.vodka svg { color: #3b82f6; }
.cat-icon-btn.cerveza svg { color: #eab308; }
.cat-icon-btn.vino svg { color: #ec4899; }
.cat-icon-btn.bebidas svg { color: #06b6d4; }
.cat-icon-btn.extras svg { color: #a855f7; }
.cat-icon-btn.default svg { color: #71717a; }

/* Icono personalizado de categoría */
.cat-icon-btn.custom {
    background: transparent;
    border: none;
    padding: 0;
}

.cat-icon-btn.custom img {
    width: 44px;
    height: 44px;
    object-fit: contain;
}

.cat-item.active .cat-icon-btn,
.cat-item:hover .cat-icon-btn {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.15);
}

.cat-item.active .cat-icon-btn.custom,
.cat-item:hover .cat-icon-btn.custom {
    background: transparent;
    border: none;
}

.cat-item.active .cat-icon-btn svg,
.cat-item:hover .cat-icon-btn svg {
    color: var(--primary);
}

.cat-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    text-align: center;
}

.cat-item.active .cat-name {
    color: var(--primary);
    font-weight: 600;
}

/* ========================================
   SUBCATEGORIES INLINE (círculos al lado de categoría)
   ======================================== */
.categories-scroll.showing-subcats {
    justify-content: center;
    padding: 0 20px;
}

.subcats-inline {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.cat-item.subcat {
    min-width: 48px;
    gap: 4px;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

.cat-item.subcat .cat-icon-btn {
    width: 44px;
    height: 44px;
}

.cat-item.subcat .cat-icon-btn svg,
.cat-item.subcat .cat-icon-btn img {
    width: 22px;
    height: 22px;
}

.cat-item.subcat .cat-name {
    max-width: 60px;
    font-size: 10px;
    line-height: 1.2;
}

.cat-item.subcat-close-btn {
    min-width: 32px;
    gap: 0;
    animation: fadeIn 0.3s ease 0.1s both;
    align-self: center;
}

.cat-item.subcat-close-btn .cat-icon-btn.close {
    width: 32px;
    height: 32px;
    background: rgba(239, 68, 68, 0.15);
    border-color: var(--danger);
}

.cat-item.subcat-close-btn .cat-icon-btn.close svg {
    width: 14px;
    height: 14px;
    color: var(--danger);
}

.cat-item.subcat-close-btn:hover .cat-icon-btn.close {
    background: var(--danger);
}

.cat-item.subcat-close-btn:hover .cat-icon-btn.close svg {
    color: white;
}

/* Animación al volver a categorías normales */
.categories-scroll:not(.showing-subcats) .cat-item {
    animation: fadeIn 0.25s ease;
}

/* ========================================
   SECTION
   ======================================== */
.section {
    padding: 20px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.section-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
}

.section-link {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
}

/* ========================================
   PRODUCTS GRID
   ======================================== */
.products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Grupos de subcategorías */
.subcat-group {
    grid-column: 1 / -1;
    margin-bottom: 8px;
}

.subcat-group-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.subcat-group-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ========================================
   PRODUCT CARD
   ======================================== */
.product-card {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.product-card:active {
    transform: scale(0.98);
}

.product-image {
    position: relative;
    aspect-ratio: 1;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
}

.product-image-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.product-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.product-icon {
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-icon svg {
    width: 36px;
    height: 36px;
}

/* Colores de iconos por categoría */
.product-icon.combos { background: rgba(239,68,68,0.15); color: #ef4444; }
.product-icon.whisky { background: rgba(251,191,36,0.15); color: #fbbf24; }
.product-icon.ron { background: rgba(249,115,22,0.15); color: #f97316; }
.product-icon.vodka { background: rgba(59,130,246,0.15); color: #3b82f6; }
.product-icon.cerveza { background: rgba(234,179,8,0.15); color: #eab308; }
.product-icon.vino { background: rgba(236,72,153,0.15); color: #ec4899; }
.product-icon.bebidas { background: rgba(6,182,212,0.15); color: #06b6d4; }
.product-icon.extras { background: rgba(168,85,247,0.15); color: #a855f7; }
.product-icon.default { background: rgba(113,113,122,0.15); color: #71717a; }

.product-card:hover .product-image img {
    transform: scale(1.03);
}

.product-image img {
    transition: transform 0.3s;
}

.product-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 10px;
    background: var(--danger);
    color: white;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    z-index: 10;
}

.product-badge.promo {
    background: var(--primary);
}

.product-badge.nuevo {
    background: var(--success);
}

.product-badge.popular {
    background: #eab308;
    color: #000;
}

.product-badge.oferta {
    background: #3b82f6;
}

.product-badge.agotado {
    background: #333;
}

.product-card.agotado {
    opacity: 0.6;
}

.product-card.agotado .product-image {
    filter: grayscale(50%);
}

.product-info {
    padding: 14px;
}

.product-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.3;
}

.product-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.product-price-old {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
    margin-left: 6px;
}

/* ========================================
   PRODUCT DETAIL MODAL
   ======================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-radius: 24px 24px 0 0;
    z-index: 10001;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-overlay.active + .modal,
.modal.active {
    transform: translateY(0);
}

.modal-scrollable {
    flex: 1;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.modal-scrollable::-webkit-scrollbar {
    width: 4px;
}

.modal-scrollable::-webkit-scrollbar-track {
    background: transparent;
}

.modal-scrollable::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

/* Indicador de más contenido */
.modal-scroll-indicator {
    text-align: center;
    padding: 8px;
    font-size: 11px;
    color: var(--text-muted);
    background: linear-gradient(to top, var(--bg-card) 50%, transparent);
    position: sticky;
    bottom: 0;
    pointer-events: none;
    animation: bounceArrow 1.5s infinite;
}

@keyframes bounceArrow {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.modal-header-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px 4px;
    position: relative;
}

.modal-handle {
    width: 40px;
    height: 4px;
    background: #333;
    border-radius: 2px;
}

.modal-close-btn {
    position: absolute;
    right: 16px;
    top: 8px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    transition: all 0.2s;
    z-index: 100;
}

.modal-close-btn:active {
    background: #222;
    transform: scale(0.95);
}

.modal-close-btn svg {
    width: 20px;
    height: 20px;
}

.modal-image {
    height: 220px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    position: relative;
}

.modal-image-inner {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-image img {
    max-width: 95%;
    max-height: 95%;
    object-fit: contain;
}

.modal-image .product-icon {
    width: 100px;
    height: 100px;
    border-radius: 24px;
}

.modal-image .product-icon svg {
    width: 56px;
    height: 56px;
}

.modal-content {
    padding: 20px 20px 16px;
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
    color: var(--text);
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.4;
}

/* Preguntas del producto */
.modal-section {
    background: var(--bg-elevated);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}

.modal-section:last-child {
    margin-bottom: 0;
}

.modal-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.modal-section-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.modal-section-badge {
    font-size: 10px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

.modal-section-badge.ok {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
}

.modal-section-badge.pending {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
}

.modal-section-badge.optional {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
}

.pregunta-group {
    margin-bottom: 12px;
}

.pregunta-group:last-child {
    margin-bottom: 0;
}

.pregunta-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.pregunta-options {
    display: flex;
    gap: 8px;
}

.pregunta-option {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.pregunta-option:hover {
    border-color: var(--primary);
}

.pregunta-option.selected {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
}

/* Variantes */
.variante-group {
    margin-bottom: 16px;
}

.variante-group:last-child {
    margin-bottom: 0;
}

.variante-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    width: 100%;
}

.variante-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.variante-required {
    font-size: 11px;
    font-weight: 500;
}

.variante-required.ok {
    color: var(--success);
}

.variante-required.error {
    color: var(--danger);
}

.variante-options {
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 100%;
}

.variante-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 2px solid #333;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    width: 100%;
}

.variante-option:hover {
    border-color: #555;
}

.variante-option.selected {
    border-color: var(--success);
    background: rgba(16, 185, 129, 0.1);
}

.variante-option-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.variante-radio {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #555;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.variante-checkbox {
    width: 18px;
    height: 18px;
    min-width: 18px;
    border: 2px solid #555;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.variante-option.selected .variante-radio,
.variante-option.selected .variante-checkbox {
    border-color: var(--success);
    background: var(--success);
}

.variante-option.selected .variante-radio::after {
    content: '';
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
}

.variante-option.selected .variante-checkbox::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: 700;
}

.variante-name {
    font-size: 13px;
    color: var(--text);
    font-weight: 500;
    line-height: 1.3;
}

.variante-price {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    white-space: nowrap;
    margin-left: 8px;
}

.variante-option.selected .variante-price {
    color: var(--success);
}

.variante-option.agotado {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
}

.variante-agotado {
    font-size: 11px;
    color: #ef4444;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 8px;
}

/* Adicionales Modal */
.adicionales-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.adicionales-overlay.active {
    opacity: 1;
    visibility: visible;
}

.adicionales-modal {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #0a0a0a;
    border-radius: 24px 24px 0 0;
    z-index: 10002;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    max-height: 75vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.adicionales-modal.active {
    transform: translateY(0);
}

.adicionales-header {
    text-align: center;
    padding: 24px 20px 16px;
    border-bottom: 1px solid #1a1a1a;
}

.adicionales-icon {
    font-size: 40px;
    margin-bottom: 12px;
}

.adicionales-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 4px;
}

.adicionales-header p {
    font-size: 13px;
    color: var(--text-secondary);
}

.adicionales-list {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: #444 transparent;
}

.adicionales-list::-webkit-scrollbar {
    width: 4px;
}

.adicionales-list::-webkit-scrollbar-track {
    background: transparent;
}

.adicionales-list::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 2px;
}

.adicional-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #111;
    border: 2px solid #222;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.adicional-card:hover {
    border-color: #333;
}

.adicional-card.selected {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.adicional-card-check {
    width: 24px;
    height: 24px;
    min-width: 24px;
    border: 2px solid #444;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    transition: all 0.2s;
}

.adicional-card.selected .adicional-card-check {
    background: var(--primary);
    border-color: var(--primary);
}

.adicional-card-img {
    width: 50px;
    height: 50px;
    min-width: 50px;
    border-radius: 10px;
    overflow: hidden;
    background: #222;
}

.adicional-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.adicional-card-info {
    flex: 1;
    min-width: 0;
}

.adicional-card-nombre {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 2px;
}

.adicional-card-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.adicional-card-precio {
    text-align: right;
}

.adicional-card-precio-actual {
    font-size: 16px;
    font-weight: 700;
    color: var(--success);
}

.adicional-card-precio-original {
    font-size: 12px;
    color: var(--text-muted);
    text-decoration: line-through;
}

/* Nuevo layout para precio + cantidad */
.adicional-card-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto;
}

.adicional-card-right .adicional-card-precio {
    font-size: 15px;
    font-weight: 700;
    color: var(--success);
}

.adicional-qty-controls {
    display: flex;
    align-items: center;
    gap: 4px;
    background: #1a1a1a;
    border-radius: 8px;
    padding: 2px;
}

.adicional-qty-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #333;
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.adicional-qty-btn:hover {
    background: #444;
}

.adicional-qty-btn:active {
    background: var(--primary);
}

.adicional-qty-value {
    width: 24px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: white;
}

.adicionales-footer {
    padding: 16px 20px;
    padding-bottom: max(20px, env(safe-area-inset-bottom));
    border-top: 1px solid #1a1a1a;
    display: flex;
    gap: 12px;
    background: #0a0a0a;
    flex-shrink: 0;
}

.btn-skip {
    flex: 1;
    padding: 14px;
    background: transparent;
    border: 2px solid #333;
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-skip:hover {
    border-color: #555;
    color: var(--text);
}

.btn-add-adicionales {
    flex: 1.5;
    padding: 14px;
    background: var(--primary);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-adicionales:hover {
    background: var(--primary-dark);
}

/* Botón disabled */
.btn-add-cart.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.modal-details {
    padding: 20px 0;
    border-top: 1px solid var(--border);
}

.modal-details:empty {
    display: none;
}

/* Grid solo para detalles simples, no variantes */
.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.modal-detail {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.modal-detail-label {
    font-size: 12px;
    color: var(--text-muted);
}

.modal-detail-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

.modal-price {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    margin: 8px 0 0 0;
    padding: 0;
}

/* Indicador de más contenido (fade en la parte inferior del scroll) */
.modal-scrollable::after {
    content: '';
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 30px;
    background: linear-gradient(to top, var(--bg-card), transparent);
    pointer-events: none;
    display: block;
}

.modal-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    flex-shrink: 0;
}

.qty-selector {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.qty-btn {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: var(--text);
    transition: background 0.2s;
}

.qty-btn:hover {
    background: var(--border);
}

.qty-value {
    width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.btn-add-cart {
    flex: 1;
    padding: 12px 16px;
    background: var(--primary);
    color: white;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.btn-add-cart:hover {
    background: var(--primary-dark);
}

/* ========================================
   BOTTOM NAV
   ======================================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 9999;
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-muted);
    transition: color 0.2s;
    position: relative;
    flex: 1;
}

.nav-item svg {
    width: 24px;
    height: 24px;
}

.nav-item span {
    font-size: 11px;
    font-weight: 500;
}

.nav-item.active {
    color: var(--primary);
}

/* ========================================
   WHATSAPP FAB
   ======================================== */
.wa-fab {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 56px;
    height: 56px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
    z-index: 99;
    transition: transform 0.2s;
}

.wa-fab:active {
    transform: scale(0.95);
}

.wa-fab svg {
    width: 28px;
    height: 28px;
    color: white;
}

/* ========================================
   LOADING SKELETON
   ======================================== */
.skeleton {
    background: linear-gradient(90deg, var(--bg-dark) 25%, #e8e8e8 50%, var(--bg-dark) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========================================
   EMPTY STATE
   ======================================== */
.empty-state {
    grid-column: 1 / -1;
    text-align: center;
    padding: 48px 24px;
}

.empty-state svg,
.empty-icon svg {
    width: 64px;
    height: 64px;
    color: var(--border);
    margin-bottom: 16px;
}

.empty-icon {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.empty-state p {
    font-size: 16px;
    color: var(--text-muted);
}

/* ========================================
   CART
   ======================================== */
.cart-badge {
    position: absolute;
    top: 2px;
    right: 50%;
    transform: translateX(18px);
    min-width: 18px;
    height: 18px;
    background: var(--danger);
    color: white;
    border-radius: 9px;
    font-size: 11px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.cart-empty {
    display: none;
}

/* Cart Panel */
.cart-panel {
    position: fixed;
    bottom: 70px;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    border-radius: 24px 24px 0 0;
    z-index: 200;
    transform: translateY(calc(100% + 70px));
    transition: transform 0.3s ease-out;
    max-height: calc(100vh - 70px);
    display: flex;
    flex-direction: column;
}

.cart-panel.active {
    transform: translateY(0);
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    background: var(--bg-elevated);
    z-index: 10;
}

.cart-header h3 {
    font-size: 18px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-header h3 span {
    background: var(--primary);
    color: white;
    font-size: 12px;
    padding: 2px 8px;
    border-radius: 10px;
}

.cart-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--bg-elevated);
    border-radius: 50%;
    flex-shrink: 0;
}

.cart-close svg {
    width: 20px;
    height: 20px;
}

.cart-items {
    flex: 1;
    overflow-y: auto;
    padding: 16px 20px;
}

.cart-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}

.cart-item:last-child {
    border-bottom: none;
}

.cart-item-img {
    width: 70px;
    height: 70px;
    background: var(--bg-elevated);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.cart-item-img img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
}

.cart-item-info {
    flex: 1;
    min-width: 0;
}

.cart-item-name {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.cart-item-variants {
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 6px;
    line-height: 1.4;
}

.cart-item-price {
    font-size: 15px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 8px;
}

.cart-item-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cart-item-qty {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border-radius: 8px;
    overflow: hidden;
}

.cart-item-qty button {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    font-size: 16px;
}

.cart-item-qty button:hover {
    background: var(--border);
}

.cart-item-qty span {
    width: 32px;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

.cart-item-remove {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
    border-radius: 8px;
}

.cart-item-remove svg {
    width: 18px;
    height: 18px;
}

.cart-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-secondary);
}

.cart-empty-state svg {
    width: 64px;
    height: 64px;
    color: var(--border);
    margin-bottom: 16px;
}

.cart-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    background: var(--bg-card);
    flex-shrink: 0;
}

.cart-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.cart-total-label {
    font-size: 14px;
    color: var(--text-secondary);
}

.cart-total-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.btn-checkout {
    width: 100%;
    padding: 16px;
    background: var(--success);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.btn-checkout:hover,
.btn-checkout:active {
    background: #0d9668;
    transform: scale(0.98);
}

.btn-checkout svg {
    width: 22px;
    height: 22px;
}

/* Cart Overlay */
.cart-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cart-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Toast notification */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: var(--bg-card);
    border: 1px solid var(--border);
    padding: 14px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    z-index: 300;
    opacity: 0;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 10px;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.toast svg {
    width: 20px;
    height: 20px;
    color: var(--success);
}

/* ========================================
   CHECKOUT MODAL
   ======================================== */
.checkout-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    z-index: 299;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.checkout-overlay.active {
    opacity: 1;
    visibility: visible;
}

.checkout-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-card);
    z-index: 300;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.checkout-modal.active {
    transform: translateY(0);
}

.checkout-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 16px;
    padding-top: max(20px, env(safe-area-inset-top));
    border-bottom: 1px solid var(--border);
    flex-shrink: 0;
}

.checkout-header h3 {
    font-size: 18px;
    font-weight: 600;
}

.checkout-close {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border-radius: 50%;
    color: var(--text-secondary);
}

.checkout-close svg {
    width: 20px;
    height: 20px;
}

.checkout-body {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    -webkit-overflow-scrolling: touch;
}

.checkout-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.checkout-field label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.checkout-field input,
.checkout-field textarea {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 16px;
    color: var(--text);
    outline: none;
    transition: border-color 0.2s;
    font-family: inherit;
    resize: none;
    -webkit-appearance: none;
    appearance: none;
}

.checkout-field input:focus,
.checkout-field textarea:focus {
    border-color: var(--primary);
}

.checkout-field input::placeholder,
.checkout-field textarea::placeholder {
    color: var(--text-muted);
}

.checkout-footer {
    padding: 16px 20px;
    padding-bottom: max(100px, calc(80px + env(safe-area-inset-bottom)));
    border-top: 1px solid var(--border);
    flex-shrink: 0;
    background: var(--bg-card);
}

.btn-send-order {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px;
    background: #25D366;
    color: white;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 14px;
    transition: all 0.2s;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.btn-send-order:hover,
.btn-send-order:active {
    background: #20bd5a;
    transform: scale(0.98);
}

.btn-send-order svg {
    width: 22px;
    height: 22px;
}

.checkout-error {
    color: var(--danger);
    font-size: 12px;
    margin-top: 4px;
}

/* ========================================
   SEARCH MODAL
   ======================================== */
.search-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.8);
    z-index: 199;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.search-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.search-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg);
    z-index: 200;
    transform: translateY(100%);
    transition: transform 0.3s ease-out;
    display: flex;
    flex-direction: column;
}

.search-modal.active {
    transform: translateY(0);
}

.search-modal-header {
    padding: 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
}

.search-modal-input-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-elevated);
    border-radius: 12px;
    padding: 12px 16px;
}

.search-modal-input-wrap svg {
    width: 22px;
    height: 22px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.search-modal-input-wrap input {
    flex: 1;
    background: none;
    border: none;
    font-size: 16px;
    color: var(--text);
    outline: none;
}

.search-modal-input-wrap input::placeholder {
    color: var(--text-muted);
}

.search-modal-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.search-modal-close svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

.search-modal-results {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.search-results-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.search-empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.search-empty svg {
    width: 48px;
    height: 48px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.search-categories {
    margin-bottom: 24px;
}

.search-categories-title {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-categories-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.search-cat-btn {
    padding: 10px 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 14px;
    color: var(--text);
    transition: all 0.2s;
}

.search-cat-btn:hover {
    border-color: var(--primary);
    background: rgba(139, 92, 246, 0.1);
}

.search-back-btn {
    padding: 8px 0;
    background: transparent;
    border: none;
    font-size: 13px;
    color: var(--primary);
    cursor: pointer;
    margin-bottom: 12px;
    display: block;
}

.search-back-btn:hover {
    text-decoration: underline;
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 32px 20px;
    text-align: center;
    border-top: 1px solid var(--border);
    margin-top: 24px;
}

.footer-brand {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.footer-brand span {
    color: var(--primary);
}

.footer p {
    font-size: 13px;
    color: var(--text-muted);
}

/* ========================================
   DESKTOP STYLES
   ======================================== */
@media (min-width: 768px) {
    body {
        padding-bottom: 0;
    }
    
    .bottom-nav {
        display: none;
    }
    
    .wa-fab {
        bottom: 24px;
    }
    
    .header-home {
        padding: 20px 40px;
    }
    
    .search-bar {
        padding: 20px 40px;
        top: 88px;
    }
    
    .categories {
        padding: 24px 40px;
    }
    
    .section {
        padding: 24px 40px;
    }
    
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .product-card {
        border-radius: 20px;
    }
    
    .product-card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
    }
    
    .modal {
        max-width: 500px;
        left: 50%;
        transform: translateX(-50%) translateY(100%);
        border-radius: 24px;
        bottom: auto;
        top: 50%;
        max-height: 85vh;
    }
    
    .modal.active {
        transform: translateX(-50%) translateY(-50%);
    }
}

@media (min-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .container {
        max-width: 1200px;
        margin: 0 auto;
    }
}

@media (min-width: 1280px) {
    .products-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* ========================================
   SCROLLBAR (Desktop)
   ======================================== */
@media (min-width: 768px) {
    ::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }
    
    ::-webkit-scrollbar-track {
        background: var(--bg-dark);
    }
    
    ::-webkit-scrollbar-thumb {
        background: var(--border);
        border-radius: 4px;
    }
    
    ::-webkit-scrollbar-thumb:hover {
        background: var(--text-muted);
    }
}

/* ========================================
   DESKTOP BLOCK SCREEN
   ======================================== */
.desktop-block {
    display: none;
}

@media (min-width: 768px) {
    .desktop-block {
        position: fixed;
        inset: 0;
        background: #000;
        z-index: 999999;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 40px;
    }
    
    .desktop-block-icon {
        width: 80px;
        height: 80px;
        background: linear-gradient(135deg, var(--primary), #a78bfa);
        border-radius: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 32px;
        box-shadow: 0 0 60px rgba(139, 92, 246, 0.4);
    }
    
    .desktop-block-icon svg {
        width: 40px;
        height: 40px;
        color: white;
    }
    
    .desktop-block h2 {
        font-size: 28px;
        font-weight: 700;
        margin-bottom: 12px;
        color: white;
    }
    
    .desktop-block p {
        font-size: 16px;
        color: var(--text-secondary);
        max-width: 400px;
        line-height: 1.6;
        margin-bottom: 32px;
    }
    
    .desktop-block-qr {
        width: 160px;
        height: 160px;
        background: white;
        border-radius: 16px;
        padding: 12px;
        margin-bottom: 16px;
    }
    
    .desktop-block-qr img {
        width: 100%;
        height: 100%;
    }
    
    .desktop-block-hint {
        font-size: 13px;
        color: var(--text-muted);
    }
    
    /* Ocultar todo el contenido */
    .header,
    .banner,
    .search-bar,
    .categories,
    .section,
    .footer,
    .bottom-nav,
    .wa-fab,
    .modal,
    .modal-overlay,
    .cart-panel,
    .cart-overlay,
    .search-modal,
    .search-modal-overlay,
    .checkout-modal,
    .checkout-overlay,
    .adicionales-modal,
    .adicionales-overlay,
    .toast,
    .splash {
        display: none !important;
    }
}
