@font-face {
    font-family: 'LipighorFont';
    src: url('fonts/Li Abu J M Akkas Unicode.ttf'); /* আপনার ফন্টের ফাইলের নাম এখানে দিন */
    font-display: swap;
}

@font-face {
    font-family: 'LogoFont';
    src: url('fonts/LiHasanIccheghuriUnicode-Regular.ttf'); /* আপনার লোগোর জন্য নতুন ফন্টের ফাইলের নাম এখানে দিন */
    font-display: swap;
}

:root {
    --bg-color: #000000;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --text-main: #ffffff;
    --text-muted: #a0a0a0;
    --accent-gold: #d4af37;
    --accent-gold-hover: #f3c84b;
    --font-heading: 'Cormorant Garamond', serif;
    --font-body: 'Montserrat', sans-serif;
    /* Performance-tuneable variables */
    --card-blur: 10px;
    --card-saturate: 1.08;
    --card-shadow: 0 18px 42px -14px rgba(3,10,18,0.55), inset 0 6px 20px rgba(0,0,0,0.35);
    --card-sheen-opacity: 0.35;
    --transition-fast: 160ms;
    --transition-normal: 360ms;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Smooth theme transitions */
body {
    transition: background-color 0.35s ease, color 0.35s ease;
}

html {
    /* scroll-behavior: smooth; REMOVED: Lenis handles this now */
    scroll-padding-top: 80px;
}

html.lenis { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* Accessibility: Respect user's motion preference */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* Custom Scrollbar for Dark Theme */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-color); 
}

::-webkit-scrollbar-thumb {
    background: var(--accent-gold); 
    border-radius: 5px;
    border: 2px solid var(--bg-color);
}

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

/* Typography */
h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 600;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }

/* Image Protection (Prevent Dragging & Saving) */
img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    pointer-events: none;
}

/* Glassmorphism Utilities */
.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.2rem 5%;
    padding-top: calc(1.2rem + env(safe-area-inset-top)); /* Handle Notch/Dynamic Island */
    display: flex; /* FIX: This was missing, causing the alignment bug */
    justify-content: space-between;
    align-items: center;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    z-index: 1000; /* Cleaned up duplicate z-index */
}

/* Theme toggle button styling */
.nav-icon-btn {
    background: transparent;
    border: none;
    color: var(--text-main);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
}
.nav-icon-btn:hover { background: rgba(255,255,255,0.03); }

/* Light theme overrides (day mode) */
.light-theme {
    /* Dark-gray day theme as requested */
    --bg-color: #2b2b2b;        /* overall background becomes dark gray */
    --text-main: #f3f3f3;       /* light text for contrast */
    --text-muted: #bdbdbd;      /* muted lighter gray */
    --glass-bg: rgba(255, 255, 255, 0.03); /* subtle glass on dark bg */
    --glass-border: rgba(255,255,255,0.06);
    --accent-gold: #c78f2f;
    --accent-gold-hover: #e0b655;
}

/* Performance tiers: override tunables for low/mid/high */
html.perf-low {
    --card-blur: 0px;
    --card-saturate: 1;
    --card-shadow: 0 6px 16px rgba(0,0,0,0.45);
    --card-sheen-opacity: 0.08;
    --transition-normal: 180ms;
}

html.perf-mid {
    --card-blur: 6px;
    --card-saturate: 1.04;
    --card-shadow: 0 12px 30px rgba(0,0,0,0.55);
    --card-sheen-opacity: 0.2;
    --transition-normal: 260ms;
}

html.perf-high {
    --card-blur: 12px;
    --card-saturate: 1.12;
    --card-shadow: 0 22px 50px -20px rgba(0,0,0,0.6), inset 0 8px 28px rgba(0,0,0,0.45);
    --card-sheen-opacity: 0.45;
    --transition-normal: 360ms;
}

/* Ensure nav icons adapt in light theme */
.light-theme .nav-icon-btn { color: var(--text-main); }


/* Mobile Nav Search (Hidden on Desktop) */
.mobile-nav-search-container {
    display: none;
}

/* Desktop Search (Centered in Nav) */
.desktop-search-container {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    display: none; /* Hidden on mobile */
}

@media (min-width: 769px) {
    .desktop-search-container {
        display: block;
    }
    
    .desktop-search-container input {
        width: 100%;
        padding: 0.6rem 2.5rem 0.6rem 1.2rem;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50px;
        color: #fff;
        font-family: var(--font-body);
        font-size: 0.9rem;
        outline: none;
        transition: 0.3s;
    }

    .desktop-search-container input:focus {
        border-color: var(--accent-gold);
        background: rgba(255, 255, 255, 0.15);
        box-shadow: 0 0 15px rgba(212, 175, 55, 0.15);
    }

    .desktop-search-container i {
        position: absolute;
        right: 1rem;
        top: 50%;
        transform: translateY(-50%);
        color: var(--text-muted);
        pointer-events: none;
    }

    /* Hide body search on desktop since it's in nav now */
    .search-wrapper {
        display: none;
    }
}

.logo {
    font-family: 'LogoFont', serif;
    font-size: 1.8rem;
    letter-spacing: 2px;
    color: var(--accent-gold);
    font-weight: 700;
}

.nav-links a {
    margin-left: 2rem;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-main);
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-gold);
}

/* Ensure content sits above embers */
#menu, footer {
    position: relative;
    z-index: 2;
}

/* Menu Section */
#menu {
    padding: 6rem 5%;
    min-height: 100vh;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 3rem;
    color: var(--text-main);
}

.divider {
    width: 60px;
    height: 2px;
    background-color: var(--accent-gold);
    margin: 1rem auto;
}

/* Search Bar */
.search-wrapper {
    position: relative;
    max-width: 500px;
    margin: 0 auto 2rem;
    display: flex;
    align-items: center;
}

#search-input {
    width: 100%;
    padding: 1rem 3rem 1rem 1.5rem;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 50px;
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: 0.3s;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

#search-input:focus {
    border-color: var(--accent-gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.2);
}

.search-icon {
    position: absolute;
    right: 1.5rem;
    color: var(--text-muted);
    pointer-events: none;
}

.filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.filter-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    transition: 0.3s;
    position: relative;
}

.filter-btn.active, .filter-btn:hover {
    color: var(--text-main);
}

.filter-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 5px;
    height: 5px;
    background-color: var(--accent-gold);
    border-radius: 50%;
}

/* Premium Glass Button */
.btn-gold {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.2), rgba(0,0,0,0));
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    padding: 0.8rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    cursor: pointer;
    border-radius: 30px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    position: relative;
    overflow: hidden;
}

.btn-gold::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 100%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: 0.5s;
}

.btn-gold:hover {
    background: var(--accent-gold);
    color: #000;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
    transform: translateY(-2px);
}

.btn-gold:hover::before {
    left: 100%;
}

/* Menu Grid */
.menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 2rem;
}

.menu-card {
    /* Premium glass card (lightened by ~8%) with warm-gold tint and inner depth */
    background: linear-gradient(180deg, rgba(255,230,180,0.04), rgba(255,255,255,0.03));
    border: 1px solid rgba(255,245,220,0.06);
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    backdrop-filter: blur(var(--card-blur)) saturate(var(--card-saturate));
    -webkit-backdrop-filter: blur(var(--card-blur)) saturate(var(--card-saturate));
    overflow: hidden;
    transition: transform var(--transition-normal) cubic-bezier(0.2,0.9,0.3,1), box-shadow var(--transition-normal), background var(--transition-normal);
    opacity: 0;
    animation: fadeInUp 0.7s cubic-bezier(0.5, 0, 0, 1) forwards;
    cursor: pointer;
    position: relative;
    will-change: transform, opacity;
}

/* Allow text selection for better UX */
.card-content, .modal-info, footer, .cart-body {
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.menu-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 15%;
    width: 70%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
    opacity: 0.4;
    box-shadow: 0 -1px 5px rgba(212, 175, 55, 0.2);
}

@media (hover: hover) {
    .menu-card:hover {
        transform: translateY(-6px) scale(1.006);
        border-color: rgba(255,255,255,0.12);
        background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.015));
        box-shadow: 0 28px 60px -18px rgba(3,10,18,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
    }
}

/* ------- Light-theme specific premium adjustments ------- */
.light-theme .menu-card {
    /* Keep warm gold tint but increase contrast for dark-gray day background */
    background: linear-gradient(180deg, rgba(255,230,180,0.03), rgba(20,20,20,0.04));
    border: 1px solid rgba(255,245,220,0.08);
    box-shadow: 0 22px 50px -20px rgba(0,0,0,0.6), inset 0 8px 28px rgba(0,0,0,0.45), inset 0 1px 0 rgba(255,255,255,0.02);
    backdrop-filter: blur(12px) saturate(1.1);
    -webkit-backdrop-filter: blur(12px) saturate(1.1);
}

@media (hover: hover) {
    .light-theme .menu-card:hover {
        transform: translateY(-8px) scale(1.01);
        border-color: rgba(255,245,220,0.14);
        background: linear-gradient(180deg, rgba(255,245,220,0.04), rgba(35,35,35,0.06));
        box-shadow: 0 40px 90px -30px rgba(0,0,0,0.65), inset 0 1px 0 rgba(255,255,255,0.03);
    }
}

.light-theme .menu-card::before {
    /* Slightly stronger sheen for premium daytime feel */
    background: linear-gradient(120deg, rgba(255,255,255,0.08), rgba(255,255,255,0.03));
    opacity: 0.45;
}

.light-theme .menu-card::after {
    background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.45), transparent);
    opacity: 0.7;
}

.light-theme .card-img { filter: brightness(0.95); }
.light-theme .menu-card:hover .card-img { transform: scale(1.03); filter: brightness(1); }

/* Slightly brighter glass nav for day-theme */
.light-theme .glass-nav {
    background: rgba(40,40,40,0.6);
    border-bottom-color: rgba(255,245,220,0.06);
}

/* Buttons and gold accents tuning for light-theme */
.light-theme .btn-gold { background: linear-gradient(135deg, var(--accent-gold), var(--accent-gold-hover)); color: #000; }

/* Performance indicator at bottom */
.perf-indicator {
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 12px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.9rem;
    z-index: 11000;
    box-shadow: 0 6px 18px rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    opacity: 0;
    transition: opacity 0.35s ease;
    white-space: nowrap;
    max-width: calc(100% - 32px);
    overflow: hidden;
    text-overflow: ellipsis;
}
.light-theme .perf-indicator { background: rgba(255,255,255,0.06); color: var(--text-main); }

/* Mobile: make indicator span single line and use full available width */
@media (max-width: 480px) {
    .perf-indicator {
        left: 8px;
        right: 8px;
        transform: none;
        max-width: none;
        width: auto;
        padding: 7px 10px;
        font-size: 0.85rem;
        white-space: nowrap;
    }
}


.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.menu-card::before {
    /* subtle sheen */
    content: '';
    position: absolute;
    top: -30%;
    left: -30%;
    width: 60%;
    height: 120%;
    background: linear-gradient(120deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
    transform: rotate(-18deg);
    opacity: var(--card-sheen-opacity);
    pointer-events: none;
    mix-blend-mode: overlay;
}

/* (Glint effect removed) */

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
    transition: transform var(--transition-normal) cubic-bezier(0.25, 0.46, 0.45, 0.94), filter 0.4s ease;
}

@media (hover: hover) {
    .menu-card:hover .card-img {
        transform: scale(1.02);
        filter: brightness(1);
    }
}

.view-hint {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 8px 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    transition: 0.3s;
    z-index: 2;
}

.card-category {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(51, 51, 51, 0.6);
    backdrop-filter: blur(4px);
    color: var(--accent-gold);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border: 1px solid rgba(212, 175, 55, 0.3);
    z-index: 2;
}

/* Badges */
.badges-container {
    position: absolute;
    top: 12px;
    left: 12px;
    display: flex;
    flex-direction: row;
    gap: 6px;
    z-index: 2;
}

.badge {
    background: rgba(0, 0, 0, 0.75);
    color: var(--accent-gold);
    border: 1px solid var(--accent-gold);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    width: fit-content;
    backdrop-filter: blur(4px);
}

.card-content {
    padding: 1.5rem;
    position: relative;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.5rem;
}

.title-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
}

.food-type {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    border: 1px solid rgba(255,255,255,0.2);
}

.food-type.veg {
    background-color: #4caf50;
    box-shadow: 0 0 6px rgba(76, 175, 80, 0.4);
}

.food-type.non-veg {
    background-color: #e53935;
    box-shadow: 0 0 6px rgba(229, 57, 53, 0.4);
}

.card-title {
    font-family: 'LipighorFont', sans-serif;
    font-size: 1.4rem;
    color: var(--text-main);
    font-weight: normal;
}

.card-price {
    color: var(--accent-gold);
    font-weight: 600;
    font-size: 1.1rem;
}

.card-spice {
    color: #ff4d4d;
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.card-desc {
    color: var(--text-muted);
    font-family: 'LipighorFont', sans-serif;
    font-size: 0.9rem;
    font-weight: normal;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 5% 2rem;
    background: #050505;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-col h3 {
    color: var(--accent-gold);
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-col p {
    color: var(--text-muted);
}

.copyright {
    text-align: center;
    color: #444;
    font-size: 0.8rem;
    margin-top: 2rem;
}

/* Scroll Reveal Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 1s cubic-bezier(0.5, 0, 0, 1);
    will-change: transform, opacity;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

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

/* Mobile Bottom Nav (Hidden on Desktop) - Smart Glassed Design */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 2rem);
    max-width: 820px;
    background: linear-gradient(180deg, rgba(255,255,255,0.03), rgba(255,255,255,0.02));
    color: #fff;
    backdrop-filter: blur(10px) saturate(1.1);
    -webkit-backdrop-filter: blur(10px) saturate(1.1);
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.06);
    justify-content: space-around;
    padding: 0.45rem;
    box-shadow: 0 12px 30px rgba(6,18,34,0.45), inset 0 1px 0 rgba(255,255,255,0.02);
    z-index: 9999;
    transition: transform 240ms cubic-bezier(.2,.9,.3,1), opacity 180ms;
}
 
/* RGB Glow Animation for Cart Add */
@keyframes rgbGlow {
    0% { box-shadow: 0 0 20px rgba(255,0,0,0.8); border-color: rgba(255,0,0,0.8); }
    20% { box-shadow: 0 0 20px rgba(255,255,0,0.8); border-color: rgba(255,255,0,0.8); }
    40% { box-shadow: 0 0 20px rgba(0,255,0,0.8); border-color: rgba(0,255,0,0.8); }
    60% { box-shadow: 0 0 20px rgba(0,255,255,0.8); border-color: rgba(0,255,255,0.8); }
    80% { box-shadow: 0 0 20px rgba(0,0,255,0.8); border-color: rgba(0,0,255,0.8); }
    100% { box-shadow: 0 0 20px rgba(255,0,255,0.8); border-color: rgba(255,0,255,0.8); }
}

.mobile-bottom-nav.rgb-glow {
    animation: rgbGlow 1s linear infinite;
    background: rgba(20, 20, 20, 0.9); /* Slightly darker bg to make glow pop */
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.7rem;
    gap: 4px;
    position: relative;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.nav-item i {
    font-size: 1.3rem;
    margin-bottom: 2px;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.nav-item.active, 
.nav-item:hover {
    color: var(--accent-gold);
    background: rgba(255, 255, 255, 0.08);
}

.nav-item.active i {
    transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .nav-links { display: none; } /* Simplified for demo */
    .footer-content { flex-direction: column; text-align: center; }

    /* Mobile Search in Nav */
    .mobile-nav-search-container {
        display: flex;
        align-items: center;
        gap: 12px;
    }

    .nav-icon-btn {
        background: none;
        border: none;
        color: var(--accent-gold);
        font-size: 1.4rem;
        padding: 5px;
        cursor: pointer;
    }

    .nav-search-box {
        display: none;
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.95); /* High contrast background */
        backdrop-filter: blur(15px);
        align-items: center;
        padding: 0 1rem;
        z-index: 20;
    }

    .nav-search-box.active {
        display: flex;
    }

    #nav-search-input {
        flex: 1;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: #fff;
        padding: 8px 15px;
        font-size: 1rem;
        margin-right: 10px;
        border-radius: 50px; /* Rounded like original */
        font-family: var(--font-body);
    }

    #nav-search-input:focus {
        outline: none;
        border-color: var(--accent-gold);
    }

    /* Hide body search wrapper on mobile */
    .search-wrapper {
        display: none;
    }
    
    /* Show Bottom Nav */
    .mobile-bottom-nav { display: flex; }
    
    /* Adjust Layout for Mobile */
    .menu-grid { 
        grid-template-columns: 1fr; 
        gap: 1.2rem; 
    }

    .menu-card {
        border: 1px solid rgba(255, 255, 255, 0.04);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
        background: rgba(255, 255, 255, 0.02);
    }

    /* Compact Card Design for Mobile */
    .card-image-wrapper {
        height: auto;
        aspect-ratio: 4 / 3;
    }

    .card-image-wrapper::after {
        content: '';
        position: absolute;
        top: 0; left: 0; width: 100%; height: 100%;
        background: rgba(0, 0, 0, 0.2);
        z-index: 1;
    }

    .card-img {
        filter: contrast(1.1) brightness(1.05);
    }

    .card-content {
        padding: 1rem 0.8rem;
    }

    .card-header {
        margin-bottom: 0.2rem;
        flex-direction: row; /* Keep title left, price right */
        align-items: center;
    }

    .card-title {
        font-family: 'LipighorFont', sans-serif;
        font-size: 0.95rem;
        line-height: 1.2;
        letter-spacing: 0.02em;
        font-weight: normal;
    }

    .card-price {
        font-size: 0.85rem;
        font-weight: 200;
        color: var(--accent-gold);
        flex: 0 0 20%;
        max-width: 20%;
        text-align: right;
        white-space: nowrap;
    }

    .card-desc {
        display: none;
    }

/* Reduce heavy glass effects on very small screens for performance */
@media (max-width: 420px) {
    .menu-card {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
        /* Slightly lighter fallback on very small screens */
        background: rgba(28,28,28,0.5);
        box-shadow: 0 8px 22px -10px rgba(0,0,0,0.55);
    }
    .menu-card::before { display: none; }
}

    .card-category {
        font-size: 0.55rem;
        padding: 3px 8px;
        letter-spacing: 0.5px;
    }

    .badge {
        font-size: 0.5rem;
        padding: 2px 5px;
    }

    .food-type {
        width: 8px;
        height: 8px;
    }

    .card-spice {
        font-size: 0.65rem;
        margin-bottom: 0;
    }

    /* Reduce shadows for cleaner look */
    .menu-card:hover {
        box-shadow: none;
        transform: none;
    }

    /* Marquee Title Styles */
    .title-wrapper {
        flex: 0 0 80%;
        max-width: 80%;
    }

    .marquee-wrapper {
        display: block;
    }

    .card-title {
        display: block;
        white-space: normal;
    }

    /* Details Row & Timer */
    .card-details-row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 4px;
        font-size: 0.7rem;
        color: var(--text-muted);
    }

    .detail-category {
        text-transform: capitalize;
    }

    .availability-timer, .availability-status {
        font-size: 0.65rem;
        font-weight: 600;
        margin-left: auto;
    }

    .availability-status {
        color: #4caf50;
    }

    .rush-mode {
        color: #ff4d4d;
        animation: rushPulse 1s infinite alternate;
    }

    .closed-mode {
        color: var(--text-muted);
        font-weight: 400;
    }

    .glass-nav { padding: 1rem 5%; }
    
    /* Horizontal Scroll Categories */
    .filters {
        flex-wrap: nowrap;
        overflow-x: auto;
        justify-content: flex-start;
        gap: 12px;
        margin: 0 auto 2rem;
        padding: 0.8rem 1rem;
        width: 100%;
        max-width: 100%;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .filters::-webkit-scrollbar { display: none; }
    
    /* Touch Friendly Targets */
    .filter-btn { padding: 0.4rem 0.8rem; margin-bottom: 0; flex-shrink: 0; white-space: nowrap; font-size: 12px; }
    
    /* Spacing adjustments */
    #menu { padding-top: 4rem; }
    footer { padding-bottom: 80px; } /* Space for bottom nav */
    
    /* Modal Mobile */
    .modal-content { width: 95%; margin: 0 auto; }
    .modal-image-wrapper { height: 200px; }
    .modal-info { padding: 1.5rem; }
    #modal-title { font-size: 2rem; }
}

/* Marquee Animation */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-100%); }
}

/* Rush Animation */
@keyframes rushPulse {
    from { opacity: 1; transform: scale(1); text-shadow: 0 0 5px rgba(255, 77, 77, 0.2); }
    to { opacity: 0.7; transform: scale(1.05); text-shadow: 0 0 10px rgba(255, 77, 77, 0.5); }
}

/* Modal Styles */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    /* Place modal above the mobile nav (nav has z-index ~9999). Use higher z-index */
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    align-items: flex-end; /* Align to bottom like mobile */
    justify-content: center;
    opacity: 0;
    transition: opacity 0.5s ease;
    will-change: opacity;
}

.modal.show {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: linear-gradient(145deg, #1a1a1a, #050505);
    border: 1px solid rgba(212, 175, 55, 0.2);
    width: 100%;
    max-width: 600px; /* Limit width on desktop for better look */
    border-radius: 24px 24px 0 0;
    position: relative;
    box-shadow: 0 30px 60px rgba(0,0,0,0.8);
    overflow: hidden;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1);
    transition-delay: 0s; /* No delay on close */
    will-change: transform;
    display: flex;
    flex-direction: column;
    max-height: 90vh;
    cursor: grab; /* Show grab cursor on desktop */
}

.modal.show .modal-content {
    transform: translateY(0);
    transition-delay: 0.1s; /* Slight delay on open for premium feel */
}

/* Removed margin-bottom rule to revert modal behavior */

.modal-body {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-image-wrapper {
    width: 100%;
    height: 200px;
    flex-shrink: 0;
    position: relative;
}

.modal-content:active {
    cursor: grabbing;
}

.modal-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 1.5rem;
    color: var(--text-main);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.modal-info::-webkit-scrollbar { display: none; }

/* Hide close button globally (use swipe/drag) */
.close-modal {
    display: none;
}

/* Handle bar for swipe gesture */
.modal-content::before {
    content: '';
    display: block;
    width: 50px;
    height: 5px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    margin: 12px auto 5px;
    flex-shrink: 0;
    opacity: 0.5;
}

#modal-title { font-size: 1.8rem; margin-bottom: 0.2rem; color: var(--accent-gold); font-family: 'LipighorFont', sans-serif; font-weight: normal; }

#modal-price { 
    font-size: 1.3rem; 
    font-weight: 500; 
    display: inline-block; 
    margin-bottom: 1rem; 
    color: #fff;
    border-bottom: none;
    padding-bottom: 0;
}

#modal-desc { 
    color: var(--text-muted); 
    margin-bottom: 1.5rem; 
    font-family: 'LipighorFont', sans-serif;
    font-size: 0.9rem; 
    line-height: 1.5;
}

.modal-details {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.modal-details h4 { 
    color: var(--accent-gold); 
    font-size: 0.7rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    margin-bottom: 0.3rem; 
}

.detail-row p, .detail-meta p { font-size: 0.9rem; color: #fff; }

.detail-row { margin-bottom: 0; }
.detail-meta { 
    display: flex; 
    gap: 2rem; 
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

.spice-icons { color: #ff4d4d; font-size: 1.1rem; }

.chef-note {
    background: transparent;
    padding: 0.8rem;
    border-left: 2px solid var(--accent-gold);
    border-radius: 0;
    margin-bottom: 1rem;
    margin-top: 0;
}
.chef-note h4 { color: var(--accent-gold); margin-bottom: 0.5rem; font-size: 0.8rem; letter-spacing: 1px; text-transform: uppercase; }
.chef-note p { font-size: 0.85rem; font-style: italic; color: rgba(255, 255, 255, 0.8); }

/* Sticky Add to Cart Button in Modal */
#add-to-cart-modal-btn {
    position: sticky;
    bottom: 0;
    z-index: 5;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8);
    margin-top: auto;
    width: 100%;
    border-radius: 12px;
    background: linear-gradient(135deg, #d4af37, #b8860b); /* Solid Gold Gradient */
    color: #000;
    border: none;
    padding: 0.8rem;
}

#add-to-cart-modal-btn:hover {
    background: linear-gradient(135deg, #f3c84b, #d4af37);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(212, 175, 55, 0.4);
}

/* Mobile Modal Overrides (Bottom Sheet) */
@media (max-width: 768px) {
    .modal-image-wrapper { height: 160px; }
    
    #modal-title { font-size: 1.4rem; margin-bottom: 0.2rem; }
    #modal-price { font-size: 1.1rem; margin-bottom: 0.8rem; padding-bottom: 0.3rem; }
    #modal-desc { font-size: 0.8rem; margin-bottom: 1rem; line-height: 1.3; }
    
    .modal-details h4 { font-size: 0.7rem; margin-bottom: 0.3rem; }
    .detail-row { margin-bottom: 0.8rem; }
    .detail-meta { gap: 1rem; margin-bottom: 1rem; padding-top: 0.8rem; }
    
    .chef-note { padding: 0.5rem 0.8rem; margin-bottom: 1rem; }
    .chef-note h4 { font-size: 0.8rem; }
    .chef-note p { font-size: 0.8rem; }

    /* Hide cart close button on mobile too (consistency) */
    .close-cart { display: none; }
}

/* =========================================
   13. SKELETON LOADER
   ========================================= */
.skeleton-card {
    animation: none !important;
    opacity: 1 !important;
    pointer-events: none;
    cursor: default;
    border-color: rgba(255, 255, 255, 0.02);
}

.skeleton {
    background: rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
    border-radius: 4px;
}

.skeleton::after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    transform: translateX(-100%);
    background-image: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0,
        rgba(255, 255, 255, 0.05) 20%,
        rgba(255, 255, 255, 0.1) 60%,
        rgba(255, 255, 255, 0)
    );
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

.skeleton-title { height: 1.2rem; width: 60%; margin-bottom: 0.5rem; border-radius: 4px; }
.skeleton-price { height: 1rem; width: 20%; border-radius: 4px; }
.skeleton-details { height: 0.6rem; width: 40%; margin-top: 0.5rem; border-radius: 4px; }
.skeleton-desc { height: 0.8rem; width: 90%; margin-top: 1rem; border-radius: 4px; }


/* =========================================
   15. CART & CHECKOUT STYLES
   ========================================= */
.cart-badge {
    background: var(--accent-gold);
    color: #000;
    border-radius: 50%;
    padding: 2px 6px;
    font-size: 0.7rem;
    font-weight: bold;
    position: absolute;
    top: 2px;
    right: 15px;
}

.cart-modal-content {
    max-width: 500px;
    height: auto;
    max-height: 90vh;
    overflow-y: auto;
}

.cart-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--glass-border);
    text-align: center;
}

.cart-body {
    padding: 1.5rem;
}

.cart-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

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

.qty-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid var(--accent-gold);
    color: var(--accent-gold);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: 0.3s;
}

.qty-btn:hover {
    background: var(--accent-gold);
    color: #000;
}

.cart-item-info h4 {
    font-size: 1rem;
    color: var(--text-main);
}

.cart-item-price {
    color: var(--accent-gold);
    font-size: 0.9rem;
}

.remove-item {
    color: #ff4d4d;
    cursor: pointer;
    font-size: 0.9rem;
}

.cart-summary {
    text-align: right;
    margin: 1.5rem 0;
    font-size: 1.2rem;
    color: var(--accent-gold);
}

.checkout-section h3 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.checkout-input {
    width: 100%;
    padding: 0.8rem;
    margin-bottom: 1rem;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: #fff;
    font-family: var(--font-body);
}

.location-btn {
    background: rgba(255, 255, 255, 0.05);
    border: 1px dashed var(--accent-gold);
    color: var(--text-muted);
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
    transition: 0.3s;
}

.location-btn:hover {
    background: rgba(212, 175, 55, 0.1);
    color: var(--accent-gold);
}

.close-history {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

.close-cart {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

/* History Styles */
.history-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.live-timer {
    color: #ff9800; /* Orange for active delivery */
    font-size: 0.9rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-done {
    color: #4caf50; /* Green for delivered */
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.history-total {
    color: var(--accent-gold);
    font-weight: bold;
}

.history-details {
    font-size: 0.9rem;
    color: var(--text-main);
    line-height: 1.4;
}

/* =========================================
   16. LIGHTBOX (IPHONE STYLE PREVIEW)
   ========================================= */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10001;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.lightbox.show img {
    transform: scale(1);
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 3001;
    background: rgba(255, 255, 255, 0.1);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tutorial Modal Styles */
.tutorial-step {
    display: flex;
    gap: 15px;
    margin-bottom: 1.2rem;
    align-items: flex-start;
    background: rgba(255, 255, 255, 0.03);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.step-number {
    background: var(--accent-gold);
    color: #000;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 0.9rem;
}

.step-text h4 {
    color: var(--accent-gold);
    font-size: 1rem;
    margin-bottom: 4px;
    font-family: 'LipighorFont', sans-serif;
}

.step-text p {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.4;
    font-family: 'LipighorFont', sans-serif;
}

.close-tutorial {
    position: absolute;
    top: 15px;
    right: 20px;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    z-index: 10;
}

/* Floating Tutorial Widget */
.tutorial-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9998; /* Below mobile nav (9999) but high enough */
    display: none; /* Hidden by default, shown by JS */
    animation: floatUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

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

.tutorial-glass {
    background: rgba(20, 20, 20, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 8px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
}

.t-btn-main {
    background: var(--accent-gold);
    color: #000;
    border: none;
    padding: 8px 16px;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'LipighorFont', sans-serif;
    white-space: nowrap;
    text-decoration: none; /* For anchor tags */
}

.t-btn-dismiss {
    background: transparent;
    border: none;
    color: #aaa;
    font-size: 0.75rem;
    cursor: pointer;
    padding: 5px 10px;
    font-family: 'LipighorFont', sans-serif;
    transition: 0.3s;
}

.t-btn-dismiss:hover { color: #fff; }

/* Professional Print Styles */
@media print {
    .glass-nav, .mobile-bottom-nav, .filters, .search-wrapper, #ember-canvas, .btn-gold {
        display: none !important;
    }
    body, .menu-card {
        background: #fff !important;
        color: #000 !important;
        box-shadow: none !important;
    }
    .menu-grid {
        display: block;
    }
    .menu-card {
        border: 1px solid #ddd;
        margin-bottom: 20px;
        page-break-inside: avoid;
    }
}

/* =========================================
   17. NOTIFICATION TOAST (Professional Popup)
   ========================================= */
.notification-toast {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px); /* Start hidden above */
    background: rgba(10, 10, 10, 0.95); /* Deep dark background */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--accent-gold);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.6);
    z-index: 10002; /* Above everything */
    transition: transform 0.5s cubic-bezier(0.19, 1, 0.22, 1), opacity 0.5s ease;
    opacity: 0;
    pointer-events: none;
    font-family: var(--font-body);
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

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

.notification-toast i {
    color: var(--accent-gold);
    font-size: 1.2rem;
}

/* =========================================
   18. CART ICON ANIMATION (Attention Grabber)
   ========================================= */
@keyframes cartPulseAnimation {
    0% { color: var(--text-muted); transform: scale(1); }
    50% { color: var(--accent-gold); transform: scale(1.2); text-shadow: 0 0 10px var(--accent-gold); }
    100% { color: var(--text-muted); transform: scale(1); }
}

.cart-has-items i, .history-active i {
    animation: cartPulseAnimation 1.5s infinite ease-in-out;
}

/* Mobile Adjustment for Tutorial Widget */
@media (max-width: 768px) {
    .tutorial-widget {
        left: 0;
        right: 0;
        margin: 0 auto;
        bottom: 15%; /* Raised higher */
        width: max-content;
    }
}

/* ===================================
   New User Detection Modal Styles
   =================================== */
/* New user modal styles removed */
