/* Roof Top Restaurant - Custom Stylesheet with Advanced Animations */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700&family=Hind+Siliguri:wght@400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;0,800;1,600&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-dark: #0b0f19;
    --bg-surface: #111827;
    --bg-card: #161f30;
    --bg-card-hover: #1e293b;
    --primary: #f59e0b;
    --primary-light: #fbbf24;
    --primary-dark: #d97706;
    --primary-glow: rgba(245, 158, 11, 0.4);
    --text-white: #f8fafc;
    --text-muted: #94a3b8;
    --border-subtle: rgba(245, 158, 11, 0.2);
    --border-glass: rgba(255, 255, 255, 0.08);
}

* {
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-white);
    font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, sans-serif;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.font-display {
    font-family: 'Playfair Display', 'Hind Siliguri', serif;
}

.font-handwriting {
    font-family: 'Caveat', cursive;
}

/* ================================================== */
/* 1. SCROLL PROGRESS BAR                             */
/* ================================================== */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3.5px;
    width: 0%;
    background: linear-gradient(90deg, #f59e0b, #fbbf24, #f59e0b);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.8);
    z-index: 100;
    transition: width 0.1s ease-out;
    pointer-events: none;
}

/* ================================================== */
/* 2. GLASSMORPHISM & CARD EFFECTS                    */
/* ================================================== */
.glass-header {
    background: rgba(11, 15, 25, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.glass-card {
    background: rgba(22, 31, 48, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--border-glass);
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s ease, border-color 0.3s ease;
}

.gold-glow-btn {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    box-shadow: 0 4px 20px -2px rgba(245, 158, 11, 0.4);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.gold-glow-btn:hover {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.65);
    transform: translateY(-2px) scale(1.02);
}

.gold-glow-btn:active {
    transform: translateY(1px) scale(0.98);
}

/* Shine Sweep on Golden Button */
.gold-glow-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -60%;
    width: 40%;
    height: 200%;
    background: linear-gradient(
        60deg,
        rgba(255, 255, 255, 0) 20%,
        rgba(255, 255, 255, 0.35) 50%,
        rgba(255, 255, 255, 0) 80%
    );
    transform: rotate(25deg);
    transition: all 0.6s ease;
}

.gold-glow-btn:hover::after {
    left: 120%;
}

/* ================================================== */
/* 3. 3D INTERACTIVE MOUSE MOVEMENT ("মাউস নিয়ে গেলে লড়বে") */
/* ================================================== */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
    transition: transform 0.15s ease-out, box-shadow 0.3s ease;
    cursor: pointer;
    position: relative;
}

.tilt-card:hover {
    box-shadow: 0 20px 40px -15px rgba(245, 158, 11, 0.25);
    border-color: rgba(245, 158, 11, 0.5) !important;
}

/* Pop-out content inside 3D card */
.tilt-card .pop-3d {
    transform: translateZ(28px);
    transition: transform 0.2s ease-out;
}

/* Glare overlay */
.card-glare {
    position: absolute;
    inset: 0;
    pointer-events: none;
    border-radius: inherit;
    background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.12), transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tilt-card:hover .card-glare {
    opacity: 1;
}

/* Card Button Wiggle on Hover */
.add-to-cart-btn:hover {
    animation: btnWiggle 0.4s ease-in-out;
}

@keyframes btnWiggle {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.05) rotate(-3deg); }
    75% { transform: scale(1.05) rotate(3deg); }
}

/* Subtle Floating Badge */
@keyframes floatAnimation {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-8px) rotate(-1deg);
    }
}

.floating-badge {
    animation: floatAnimation 3.5s ease-in-out infinite;
}

.floating-badge-reverse {
    animation: floatAnimation 4.2s ease-in-out infinite reverse;
}

/* ================================================== */
/* 4. CONTINUOUS MARQUEE TICKER ("এনিমেশন আকারে চলবে") */
/* ================================================== */
.marquee-container {
    overflow: hidden;
    position: relative;
    user-select: none;
}

.marquee-container::before,
.marquee-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 60px;
    z-index: 2;
    pointer-events: none;
}

.marquee-container::before {
    left: 0;
    background: linear-gradient(to right, #0b0f19, transparent);
}

.marquee-container::after {
    right: 0;
    background: linear-gradient(to left, #0b0f19, transparent);
}

.marquee-track {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: marqueeSlide 26s linear infinite;
}

.marquee-track-reverse {
    display: flex;
    gap: 1.5rem;
    width: max-content;
    animation: marqueeSlideReverse 28s linear infinite;
}

.marquee-container:hover .marquee-track,
.marquee-container:hover .marquee-track-reverse {
    animation-play-state: paused;
}

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

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

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 1.2rem;
    border-radius: 9999px;
    background: rgba(22, 31, 48, 0.7);
    border: 1px solid rgba(245, 158, 11, 0.25);
    white-space: nowrap;
    transition: all 0.3s ease;
}

.ticker-item:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.6);
    transform: translateY(-3px) scale(1.04);
}

/* ================================================== */
/* 5. SCROLL REVEAL ANIMATIONS ("স্কল করলে এনিমেশন সিস্টেম") */
/* ================================================== */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

[data-reveal="left"] {
    transform: translateX(-50px);
}

[data-reveal="right"] {
    transform: translateX(50px);
}

[data-reveal="zoom"] {
    transform: scale(0.9);
}

[data-reveal="fade"] {
    transform: translateY(0);
}

/* When revealed into viewport */
[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1);
}

/* Menu Items Transition on Category Switch */
.menu-item-enter {
    animation: cardEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes cardEntrance {
    0% {
        opacity: 0;
        transform: translateY(25px) scale(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ================================================== */
/* 6. HERO & AMBIENCE STYLING                         */
/* ================================================== */
.hero-bg {
    background: linear-gradient(to right, rgba(11, 15, 25, 0.95) 0%, rgba(11, 15, 25, 0.82) 40%, rgba(11, 15, 25, 0.45) 80%, rgba(11, 15, 25, 0.7) 100%),
                url('https://images.unsplash.com/photo-1517248135467-4c7edcad34c4?auto=format&fit=crop&w=2000&q=85') center/cover no-repeat;
    position: relative;
}

/* Floating back to top button */
#backToTopBtn {
    position: fixed;
    bottom: 5.5rem;
    right: 1.5rem;
    z-index: 40;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#backToTopBtn.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

#backToTopBtn:hover {
    transform: translateY(-4px) scale(1.08);
}

/* Toast Notification Animation */
@keyframes slideDownFade {
    0% {
        opacity: 0;
        transform: translate(-50%, -20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translate(-50%, 0) scale(1);
    }
}

.toast-animate {
    animation: slideDownFade 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Soft pulse for cart badge */
@keyframes softPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.25); }
}

.cart-badge-bounce {
    animation: softPulse 0.4s ease-in-out;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: #0b0f19;
}

::-webkit-scrollbar-thumb {
    background: #232e44;
    border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #f59e0b;
}

/* ================================================== */
/* 7. COMPREHENSIVE MOBILE OPTIMIZATIONS (মোবাইল বান্ধব) */
/* ================================================== */

/* Ensure smooth touch scrolling and avoid horizontal overflow */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
    -webkit-tap-highlight-color: transparent;
}

/* Mobile screen spacing: reserve space for the fixed bottom bar */
@media screen and (max-width: 767px) {
    body {
        padding-bottom: calc(4.5rem + env(safe-area-inset-bottom, 0px));
    }

    /* Prevent iOS Safari input auto-zoom by forcing >= 16px */
    input, select, textarea {
        font-size: 16px !important;
    }

    /* Cart drawer full width on mobile */
    #cartDrawer {
        max-width: 100% !important;
    }

    /* Adjust Back to Top button so it doesn't overlap mobile bottom bar */
    #backToTopBtn {
        bottom: 5.25rem !important;
        right: 1rem !important;
        padding: 0.65rem !important;
    }

    /* Mobile bottom navigation bar safe area */
    .mobile-bottom-bar {
        padding-bottom: max(0.6rem, env(safe-area-inset-bottom, 0px));
    }

    /* Marquee ticker items padding on mobile */
    .ticker-item {
        padding: 0.45rem 0.9rem !important;
        font-size: 0.8rem !important;
    }

    /* Lightbox modal size */
    #lightboxModal img {
        max-height: 65vh !important;
    }
}

/* On touch devices, keep cards smooth and responsive to tap without jitter */
@media (hover: none) and (pointer: coarse) {
    .tilt-card {
        transition: transform 0.2s ease !important;
    }
    .tilt-card:active {
        transform: scale(0.97) !important;
    }
}

