/* ============================================================
   ROOT VARIABLES
   ============================================================ */
:root {
    --gold: #C9A050;
    --gold-dark: #B8923F;
    --gold-light: #DAB866;
    --bg-dark: #060608;
    --ease-smooth: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-premium: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: #060608;
    color: #fff;
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ============================================================
   CINEMATIC OVERLAY
   ============================================================ */

#cinematic-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: #060608;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 1.2s var(--ease-premium), 
                transform 1.2s var(--ease-premium),
                visibility 1.2s ease;
    pointer-events: all;
    visibility: visible;
}

#cinematic-overlay.hidden {
    opacity: 0;
    transform: scale(1.08) rotate(2deg);
    visibility: hidden;
    pointer-events: none;
}

.cinematic-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    animation: cinematicFloat 3s ease-in-out infinite;
    will-change: transform;
}

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

.cinematic-logo {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cinematic-logo-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    z-index: 2;
    position: relative;
    animation: logoZoom 1s var(--ease-spring) forwards;
    filter: drop-shadow(0 0 30px rgba(201, 160, 80, 0.2));
}

@keyframes logoZoom {
    0% { 
        opacity: 0; 
        transform: scale(0.3) rotate(-15deg);
    }
    60% {
        transform: scale(1.1) rotate(2deg);
    }
    100% { 
        opacity: 1; 
        transform: scale(1) rotate(0deg);
    }
}

.cinematic-logo-ring {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--gold);
    border-right-color: rgba(201, 160, 80, 0.15);
    animation: ringSpin 2.5s linear infinite;
    will-change: transform;
}

.cinematic-logo-ring::after {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 1px solid transparent;
    border-bottom-color: rgba(201, 160, 80, 0.1);
    animation: ringSpin 4s linear infinite reverse;
}

@keyframes ringSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.cinematic-title {
    font-family: 'Playfair Display', serif;
    font-size: 30px;
    font-weight: 900;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff 30%, #C9A050 70%, #fff);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 0;
    animation: titleGradient 3s ease-in-out infinite, titleSlide 0.8s var(--ease-spring) 0.2s both;
}

@keyframes titleGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@keyframes titleSlide {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.cinematic-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.4em;
    color: var(--gold);
    text-transform: uppercase;
    margin: -4px 0 0 0;
    animation: subtitleGlow 2s ease-in-out infinite, subtitleFade 0.8s ease 0.5s both;
}

@keyframes subtitleGlow {
    0%, 100% { opacity: 0.8; text-shadow: 0 0 10px rgba(201, 160, 80, 0.1); }
    50% { opacity: 1; text-shadow: 0 0 30px rgba(201, 160, 80, 0.3); }
}

@keyframes subtitleFade {
    0% { opacity: 0; letter-spacing: 0.8em; transform: scale(0.8); }
    100% { opacity: 1; letter-spacing: 0.4em; transform: scale(1); }
}

.cinematic-loader {
    width: 120px;
    height: 2px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 6px;
    position: relative;
    animation: loaderAppear 0.6s ease 0.7s both;
}

.cinematic-loader::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
    animation: loaderShine 1.5s ease-in-out infinite;
}

@keyframes loaderShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes loaderAppear {
    0% { opacity: 0; transform: scaleX(0.5); }
    100% { opacity: 1; transform: scaleX(1); }
}

.cinematic-loader-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--gold), var(--gold-light), var(--gold));
    border-radius: 4px;
    animation: loaderProgress 2s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    will-change: width;
    position: relative;
    z-index: 1;
}

@keyframes loaderProgress {
    0% { width: 0%; }
    20% { width: 15%; }
    40% { width: 35%; }
    60% { width: 55%; }
    80% { width: 80%; }
    100% { width: 100%; }
}

/* ============================================================
   ANIMACIONES DE ENTRADA PARA PRODUCTOS
   ============================================================ */

.product-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 12px;
    transition: all 0.4s var(--ease-spring);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    will-change: transform, box-shadow, border-color;
    backface-visibility: hidden;
    opacity: 0;
    animation: cardReveal 0.7s var(--ease-spring) forwards;
}

.product-card:nth-child(1) { animation-delay: 0.05s; }
.product-card:nth-child(2) { animation-delay: 0.10s; }
.product-card:nth-child(3) { animation-delay: 0.15s; }
.product-card:nth-child(4) { animation-delay: 0.20s; }
.product-card:nth-child(5) { animation-delay: 0.25s; }
.product-card:nth-child(6) { animation-delay: 0.30s; }
.product-card:nth-child(7) { animation-delay: 0.35s; }
.product-card:nth-child(8) { animation-delay: 0.40s; }
.product-card:nth-child(9) { animation-delay: 0.45s; }
.product-card:nth-child(10) { animation-delay: 0.50s; }
.product-card:nth-child(11) { animation-delay: 0.55s; }
.product-card:nth-child(12) { animation-delay: 0.60s; }

@keyframes cardReveal {
    0% { 
        opacity: 0; 
        transform: translateY(40px) scale(0.92) rotateX(5deg);
    }
    60% {
        transform: translateY(-8px) scale(1.01) rotateX(0deg);
    }
    100% { 
        opacity: 1; 
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.product-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(201, 160, 80, 0.05), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.product-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(201, 160, 80, 0.03), transparent 60%);
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
    transform: scale(0.5);
    pointer-events: none;
}

.product-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: rgba(201, 160, 80, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 
                0 0 0 1px rgba(201, 160, 80, 0.15),
                0 0 40px rgba(201, 160, 80, 0.05);
    background: rgba(255, 255, 255, 0.07);
    transition: all 0.3s var(--ease-spring);
}

.product-card:hover::before {
    opacity: 1;
}

.product-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

.product-card .img-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    border-radius: 12px;
    overflow: hidden;
    background: #0a0a0f;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

.product-card .img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.7s var(--ease-premium), filter 0.4s ease;
    will-change: transform;
    padding: 8px;
}

.product-card:hover .img-wrap img {
    transform: scale(1.1) rotate(-1deg);
    filter: brightness(1.05) contrast(1.05);
}

/* ============================================================
   BOTÓN DE AGREGAR - ANIMADO
   ============================================================ */

.product-card .add-btn {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(201, 160, 80, 0.12);
    color: var(--gold);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s var(--ease-spring);
    cursor: pointer;
    flex-shrink: 0;
    will-change: transform, background, color, box-shadow;
    position: relative;
    overflow: hidden;
}

.product-card .add-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    opacity: 0;
    transition: opacity 0.4s ease;
}

.product-card .add-btn i {
    position: relative;
    z-index: 1;
    transition: transform 0.4s var(--ease-spring);
}

.product-card .add-btn:hover {
    background: var(--gold);
    color: #000;
    transform: scale(1.12) rotate(90deg);
    box-shadow: 0 8px 30px rgba(201, 160, 80, 0.35);
}

.product-card .add-btn:hover::before {
    opacity: 1;
}

.product-card .add-btn:hover i {
    transform: rotate(-90deg) scale(1.1);
}

.product-card .add-btn:active {
    transform: scale(0.9) rotate(0deg);
}

/* ============================================================
   CATEGORÍAS - ANIMADAS
   ============================================================ */

.cat-btn-custom {
    flex-shrink: 0;
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: #8E8E93;
    transition: all 0.4s var(--ease-spring);
    white-space: nowrap;
    cursor: pointer;
    user-select: none;
    position: relative;
    overflow: hidden;
    animation: categoryFade 0.5s var(--ease-spring) backwards;
}

.cat-btn-custom:nth-child(1) { animation-delay: 0.05s; }
.cat-btn-custom:nth-child(2) { animation-delay: 0.08s; }
.cat-btn-custom:nth-child(3) { animation-delay: 0.11s; }
.cat-btn-custom:nth-child(4) { animation-delay: 0.14s; }
.cat-btn-custom:nth-child(5) { animation-delay: 0.17s; }
.cat-btn-custom:nth-child(6) { animation-delay: 0.20s; }
.cat-btn-custom:nth-child(7) { animation-delay: 0.23s; }
.cat-btn-custom:nth-child(8) { animation-delay: 0.26s; }

@keyframes categoryFade {
    0% { opacity: 0; transform: scale(0.8) translateX(-10px); }
    100% { opacity: 1; transform: scale(1) translateX(0); }
}

.cat-btn-custom::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: 100px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark), var(--gold));
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.cat-btn-custom::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 100px;
    background: linear-gradient(135deg, rgba(201, 160, 80, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.cat-btn-custom:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateY(-3px) scale(1.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.cat-btn-custom:hover::before {
    opacity: 0.15;
}

.cat-btn-custom:hover::after {
    opacity: 1;
}

.cat-btn-custom.active {
    background: linear-gradient(135deg, #C9A050, #B8923F);
    color: #000;
    border-color: transparent;
    box-shadow: 0 8px 30px rgba(201, 160, 80, 0.3);
    transform: translateY(-3px) scale(1.06);
}

.cat-btn-custom.active::before {
    opacity: 0;
}

/* ============================================================
   CATEGORÍA OFERTAS - ESTILO ESPECIAL
   ============================================================ */

.cat-btn-custom.oferta-cat {
    background: linear-gradient(135deg, #D4AF37, #B8923F);
    color: #000;
    border-color: #D4AF37;
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

.cat-btn-custom.oferta-cat:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 30px rgba(212, 175, 55, 0.4);
}

.cat-btn-custom.oferta-cat.active {
    background: linear-gradient(135deg, #ff6b00, #e65100);
    color: #fff;
    border-color: #ff6b00;
    box-shadow: 0 8px 30px rgba(255, 107, 0, 0.4);
    transform: translateY(-3px) scale(1.06);
}

/* ============================================================
   SKELETON LOADING
   ============================================================ */

.skeleton {
    background: linear-gradient(90deg, #121216 0%, #1e1e26 30%, #121216 60%, #1e1e26 100%);
    background-size: 300% 100%;
    animation: shimmer 2.8s ease-in-out infinite;
    border-radius: 16px;
    aspect-ratio: 1;
    will-change: background-position;
}

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

/* ============================================================
   TOAST
   ============================================================ */

#toast-notification {
    transition: all 0.6s var(--ease-spring);
    will-change: transform, opacity;
}

#toast-notification.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* ============================================================
   CARRITO
   ============================================================ */

#cart-sheet {
    background: rgba(6, 6, 8, 0.98);
    backdrop-filter: blur(20px);
    will-change: transform;
}

#cart-items-container .cart-item {
    animation: cartSlide 0.5s var(--ease-spring) backwards;
    will-change: transform, opacity;
}

.cart-item:nth-child(1) { animation-delay: 0.05s; }
.cart-item:nth-child(2) { animation-delay: 0.10s; }
.cart-item:nth-child(3) { animation-delay: 0.15s; }
.cart-item:nth-child(4) { animation-delay: 0.20s; }
.cart-item:nth-child(5) { animation-delay: 0.25s; }

@keyframes cartSlide {
    0% { opacity: 0; transform: translateX(40px) scale(0.9); }
    100% { opacity: 1; transform: translateX(0) scale(1); }
}

/* ============================================================
   DAILY DRINK
   ============================================================ */

#daily-drink-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s var(--ease-premium);
    will-change: transform;
}

#daily-drink-image:hover {
    transform: scale(1.08);
}

/* ============================================================
   HEADER
   ============================================================ */

#main-header {
    transition: all 0.5s var(--ease-smooth);
    will-change: background, border-color, backdrop-filter;
}

#main-header.scrolled {
    background: rgba(6, 6, 8, 0.92);
    border-bottom-color: rgba(201, 160, 80, 0.12);
    backdrop-filter: blur(20px) saturate(180%);
}

/* ============================================================
   SCROLLBAR
   ============================================================ */

::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: #060608;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 10px;
    transition: all 0.3s;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gold-light);
}

/* ============================================================
   HIDE SCROLLBAR
   ============================================================ */

.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
}

#categories-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* ============================================================
   BADGE OFERTA
   ============================================================ */

.badge-vaso {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 5;
    background: linear-gradient(135deg, #2d7d46, #1a5a33);
    color: #fff;
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    padding: 3px 12px;
    border-radius: 100px;
    letter-spacing: 0.05em;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    animation: badgePop 0.5s var(--ease-spring) backwards;
}

.badge-vaso:nth-child(1) { animation-delay: 0.3s; }
.badge-vaso:nth-child(2) { animation-delay: 0.4s; }

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

.badge-vaso.oferta {
    background: linear-gradient(135deg, #D4AF37, #B8923F);
    color: #000;
    animation: badgePop 0.5s var(--ease-spring) 0.2s backwards;
}

/* ============================================================
   ANIMACIONES GENERALES
   ============================================================ */

@keyframes pulse-slow {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.04); }
}

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

@keyframes glow-pulse {
    0%, 100% { box-shadow: 0 0 20px rgba(201, 160, 80, 0.1); }
    50% { box-shadow: 0 0 50px rgba(201, 160, 80, 0.2); }
}

.animate-pulse-slow {
    animation: pulse-slow 8s ease-in-out infinite;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

.animate-glow {
    animation: glow-pulse 3s ease-in-out infinite;
}

/* ============================================================
   BOTONES DE MÉTODO DE PAGO
   ============================================================ */

.payment-btn {
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.payment-btn:hover {
    transform: scale(1.02);
}

.payment-btn:active {
    transform: scale(0.95);
}

.payment-btn.border-gold-400 {
    border-color: #D4AF37 !important;
}

.payment-btn.bg-gold-400\/10 {
    background-color: rgba(212, 175, 55, 0.1) !important;
}

.payment-btn i {
    transition: transform 0.3s ease;
}

.payment-btn:hover i {
    transform: scale(1.1);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 640px) {
    .product-card {
        padding: 10px;
        border-radius: 14px;
    }
    .product-card .product-name {
        font-size: 11px;
        min-height: 28px;
    }
    .product-card .price {
        font-size: 12px;
    }
    .product-card .add-btn {
        width: 28px;
        height: 28px;
        border-radius: 8px;
    }
    .product-card .add-btn:hover {
        transform: scale(1.08) rotate(90deg);
    }
    .product-card .img-wrap {
        border-radius: 10px;
        margin-bottom: 8px;
    }
    .product-card .img-wrap img {
        padding: 4px;
    }
    .cat-btn-custom {
        padding: 6px 14px;
        font-size: 10px;
    }
    .cinematic-title {
        font-size: 24px;
    }
    .cinematic-logo {
        width: 50px;
        height: 50px;
    }
    .cinematic-logo-img {
        width: 50px;
        height: 50px;
    }
    .cinematic-loader {
        width: 80px;
    }
    .cinematic-subtitle {
        font-size: 8px;
    }
}

@media (min-width: 641px) and (max-width: 1024px) {
    .product-card {
        padding: 14px;
    }
    .product-card .product-name {
        font-size: 13px;
        min-height: 34px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
