/* Food Corner Nepal — Modern UI/UX Pro Max Animations & Micro-interactions */

:root {
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Keyframes */
@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeScaleIn {
    from {
        opacity: 0;
        transform: scale(0.92) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes popBounce {
    0% { transform: scale(0.88); }
    45% { transform: scale(1.12); }
    75% { transform: scale(0.96); }
    100% { transform: scale(1); }
}

@keyframes flameWiggle {
    0%, 100% { transform: rotate(0deg) scale(1); }
    20% { transform: rotate(-14deg) scale(1.2); }
    40% { transform: rotate(10deg) scale(1.25); }
    60% { transform: rotate(-8deg) scale(1.15); }
    80% { transform: rotate(4deg) scale(1.05); }
}

@keyframes cartPulseRing {
    0% {
        box-shadow: 0 4px 14px rgba(225, 29, 72, 0.45), 0 0 0 0 rgba(225, 29, 72, 0.5);
    }
    70% {
        box-shadow: 0 4px 14px rgba(225, 29, 72, 0.45), 0 0 0 12px rgba(225, 29, 72, 0);
    }
    100% {
        box-shadow: 0 4px 14px rgba(225, 29, 72, 0.45), 0 0 0 0 rgba(225, 29, 72, 0);
    }
}

@keyframes radarPulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

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

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

/* Utility Animation Classes */
.animate-slide-up {
    animation: slideUp 0.45s var(--ease-spring) forwards;
}

.animate-fade-in {
    animation: fadeIn 0.35s ease forwards;
}

.animate-pop-bounce {
    animation: popBounce 0.35s var(--ease-bounce);
}

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

.success-checkmark {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: #10b981;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 2rem;
    animation: popBounce 0.5s var(--ease-bounce);
}

/* Playful Physics: Cart Bump Bounce on Item Arrival */
@keyframes cartBump {
    0% { transform: scale(1); }
    30% { transform: scale(1.28) rotate(-4deg); box-shadow: 0 0 25px rgba(225, 29, 72, 0.7); }
    60% { transform: scale(0.94) rotate(2deg); }
    80% { transform: scale(1.08) rotate(-1deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.cart-bump {
    animation: cartBump 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
}

/* Flying Food Particle (Physics Arc Animation) */
.flying-food-particle {
    position: fixed;
    z-index: 100000;
    pointer-events: none;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(225, 29, 72, 0.45), 0 0 0 2px #ffffff;
    will-change: transform, opacity;
    transition: transform 0.65s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.65s ease;
}

.flying-food-particle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Scroll Reveal System */
.reveal-on-scroll {
    opacity: 1;
    transform: none;
    transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

html.js-reveal .reveal-on-scroll:not(.is-visible) {
    opacity: 0;
    transform: translateY(24px);
}

html.js-reveal .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-stagger > *:nth-child(1) { transition-delay: 0.05s; }
.reveal-stagger > *:nth-child(2) { transition-delay: 0.12s; }
.reveal-stagger > *:nth-child(3) { transition-delay: 0.19s; }
.reveal-stagger > *:nth-child(4) { transition-delay: 0.26s; }
.reveal-stagger > *:nth-child(5) { transition-delay: 0.33s; }
.reveal-stagger > *:nth-child(6) { transition-delay: 0.40s; }

/* Micro-Interactions & Hover Shine */
.glass-shine-card {
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.glass-shine-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 200%;
    height: 200%;
    background: linear-gradient(60deg, transparent 40%, rgba(255, 255, 255, 0.18) 50%, transparent 60%);
    transform: rotate(25deg) translateY(-100%);
    transition: transform 0.8s ease-in-out;
    pointer-events: none;
    z-index: 5;
}

.glass-shine-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 36px -10px rgba(0, 0, 0, 0.15), 0 0 20px rgba(225, 29, 72, 0.12);
}

.glass-shine-card:hover::after {
    transform: rotate(25deg) translateY(100%);
}

/* Floating Badge Animation */
.floating-pill {
    animation: floatingPillAnim 3.5s ease-in-out infinite;
}

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

/* Radiant Gold Shimmer */
.gold-shimmer-glow {
    background: linear-gradient(90deg, #f59e0b 0%, #fef08a 50%, #f59e0b 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerWave 3s linear infinite;
}

/* Heat Gauge Dots */
.heat-gauge-bar {
    display: flex;
    gap: 3px;
    margin-top: 4px;
    justify-content: center;
}

.heat-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #cbd5e1;
    transition: all 0.2s ease;
}

.spice-btn.active .heat-dot.lvl-1 { background: #22c55e; box-shadow: 0 0 6px #22c55e; }
.spice-btn.active .heat-dot.lvl-2 { background: #eab308; box-shadow: 0 0 6px #eab308; }
.spice-btn.active .heat-dot.lvl-3 { background: #f97316; box-shadow: 0 0 6px #f97316; }
.spice-btn.active .heat-dot.lvl-4 { background: #ef4444; box-shadow: 0 0 6px #ef4444; }

/* Upsell Card Checkbox */
.upsell-checkbox-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--bg-canvas);
    border: 1.5px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    user-select: none;
}

.upsell-checkbox-card:hover {
    border-color: var(--brand-primary);
    background: var(--bg-surface);
    transform: translateX(4px);
}

.upsell-checkbox-card.checked {
    border-color: var(--brand-primary);
    background: rgba(225, 29, 72, 0.06);
    box-shadow: 0 0 0 1px var(--brand-primary);
}

.upsell-checkbox-card input[type="checkbox"] {
    accent-color: var(--brand-primary);
    width: 17px;
    height: 17px;
    cursor: pointer;
}

/* ==========================================================================
   Ultra-Smooth Button Polish & Soft Radiant Glow
   ========================================================================== */
.btn,
.btn-primary,
.btn-checkout,
.btn-card-cta,
.btn-bundle-buy-all,
.btn-rec-quick-add,
.cart-trigger-pill,
#heroBtnDelivery,
#heroBtnTakeaway,
.preset-chip-btn {
    white-space: nowrap !important;
}

/* Soft Radiant Glow on Important Actions */
.btn-soft-glow,
.btn-primary,
.btn-modal-add-order,
.cart-trigger-pill {
    box-shadow: 0 4px 16px rgba(225, 29, 72, 0.32), 0 0 24px rgba(225, 29, 72, 0.15) !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.btn-soft-glow:hover,
.btn-primary:hover,
.btn-modal-add-order:hover,
.cart-trigger-pill:hover {
    box-shadow: 0 8px 24px rgba(225, 29, 72, 0.45), 0 0 32px rgba(225, 29, 72, 0.25) !important;
    transform: translateY(-2px) !important;
}

.btn-soft-glow:active,
.btn-primary:active,
.btn-modal-add-order:active,
.cart-trigger-pill:active {
    transform: scale(0.97) !important;
}

/* Special Note Preset Chips */
.preset-chip-btn {
    background: var(--bg-surface-elevated, #f8fafc);
    border: 1.5px solid var(--border-subtle, #e2e8f0);
    color: var(--text-secondary, #475569);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.76rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    user-select: none;
}

.preset-chip-btn:hover {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: rgba(225, 29, 72, 0.06);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(225, 29, 72, 0.14);
}

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

/* WhatsApp Direct Modal Button */
.btn-modal-whatsapp {
    background: #25d366;
    color: #ffffff;
    border: none;
    border-radius: var(--radius-pill);
    font-weight: 800;
    font-size: 0.85rem;
    padding: 12px 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    cursor: pointer;
    flex-shrink: 0;
    white-space: nowrap !important;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
}

.btn-modal-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45), 0 0 16px rgba(37, 211, 102, 0.25);
}

.btn-modal-whatsapp:active {
    transform: scale(0.96);
}

/* Modal Sticky Footer Single-Line Flex */
.modal-sticky-footer {
    flex-wrap: nowrap !important;
}

@media (max-width: 575.98px) {
    .modal-sticky-footer {
        padding: 10px 14px calc(12px + env(safe-area-inset-bottom, 0px)) 14px !important;
        gap: 8px !important;
        flex-wrap: nowrap !important;
    }
    .btn-modal-whatsapp {
        padding: 10px 12px !important;
        font-size: 0.78rem !important;
    }
    .btn-modal-add-order {
        padding: 11px 14px !important;
        font-size: 0.92rem !important;
    }
}

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

