        /* --- 1. TURATH PALETTE & CORE --- */
        :root {
            --turath-teal: #6c1c1e;   /* maroon — ink / brand dark */
            --turath-gold: #c8641d;   /* terracotta accent (deepened for contrast on cream) */
            --turath-light: #9a3f18;  /* warm dark accent for small labels (was cream) */
            --dark-bg: #fbe9b7;       /* cream — the canvas */
            --text-grey: #8a6647;     /* warm brown secondary text */
            --cream: #fbe9b7;
        }

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

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

        @keyframes glow-pulse {
            0%, 100% {
                filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6));
            }
            50% {
                filter: drop-shadow(0 20px 35px rgba(0,0,0,0.7));
            }
        }

        body {
            background-color: var(--dark-bg);
            color: #6c1c1e;
            font-family: 'Segoe UI', sans-serif;
            overflow: hidden;
            height: 100vh;
            display: flex;
            flex-direction: column;
        }

        body.lang-ar { font-family: 'Tajawal', sans-serif; direction: rtl; }

        /* --- 2. GLOBAL BACKGROUND & HEADER --- */
        .bg-backdrop {
            position: absolute; top: 0; left: 0; width: 100%; height: 100%;
            background: radial-gradient(circle at 50% 32%, rgba(200, 100, 29, 0.14) 0%, transparent 62%);
            z-index: -1; opacity: 0.6;
            transition: background 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        header {
            position: absolute; top: 0; left: 0; width: 100%; height: 110px;
            padding: 15px 25px; z-index: 50; display: flex; align-items: center;
            justify-content: space-between; background: linear-gradient(to bottom, rgba(251,233,183,0.96) 0%, rgba(251,233,183,0) 100%);
            overflow: visible;
        }

        .brand-logos {
            display: flex;
            align-items: center;
            gap: 15px;
            flex: 1;
        }

        .brand-center {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 2px;
            flex: 1;
            justify-content: center;
            margin-top: 15px;
        }

        .header-controls {
            display: flex;
            gap: 10px;
            flex: 1;
            justify-content: flex-end;
        }

        .turath-name {
            font-size: 2.2rem;
            font-weight: 900;
            letter-spacing: 4px;
            background: linear-gradient(135deg, var(--turath-teal) 0%, var(--turath-gold) 50%, var(--turath-light) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            display: block;
            text-align: center;
            position: relative;
            transition: all 0.3s ease;
            filter: drop-shadow(0 2px 8px rgba(213, 128, 65, 0.4));
            line-height: 1;
            padding-top: 5px;
        }

        .turath-name:hover {
            filter: drop-shadow(0 4px 12px rgba(213, 128, 65, 0.6));
            transform: scale(1.05);
        }

        body.lang-ar .turath-name {
            font-family: 'Tajawal', sans-serif;
            letter-spacing: 1px;
        }

        .branch-name {
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--turath-light);
            letter-spacing: 2px;
            text-transform: uppercase;
            opacity: 0.9;
            text-align: center;
            line-height: 1;
            margin-top: 4px;
        }

        body.lang-ar .branch-name {
            font-family: 'Tajawal', sans-serif;
            letter-spacing: 1px;
        }
        .btn-glass {
            background: rgba(108,28,30,0.08); backdrop-filter: blur(10px);
            border: 1px solid rgba(108,28,30,0.15); padding: 6px 14px;
            border-radius: 20px; cursor: pointer; font-weight: bold;
            font-size: 0.8rem; color: #6c1c1e; transition: 0.3s;
        }
        .btn-glass:hover { border-color: var(--turath-gold); color: var(--turath-gold); }
        .hidden { display: none !important; }

        /* Alatrakchy company logo */
        .company-logo-link {
            display: inline-flex;
            align-items: center;
            padding: 5px 9px;
            background: rgba(108,28,30,0.1);
            border-radius: 8px;
            transition: background 0.3s;
        }
        .company-logo-link:hover { background: rgba(108,28,30,0.15); }
        #companyLogo {
            height: 30px;
            width: auto;
            filter: brightness(0) saturate(100%) invert(12%) sepia(60%) saturate(2000%) hue-rotate(340deg);
            display: block;
        }

        /* Header icon buttons (cart + language) */
        .hdr-icon-btn {
            position: relative;
            width: 40px;
            height: 40px;
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            background: rgba(108,28,30,0.08);
            border: 1px solid rgba(108,28,30,0.15);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            color: #6c1c1e;
            cursor: pointer;
            transition: all 0.3s ease;
            padding: 0;
        }
        .hdr-icon-btn svg { width: 21px; height: 21px; }
        .hdr-icon-btn:hover { border-color: var(--turath-gold); color: var(--turath-gold); transform: translateY(-1px); }
        .hdr-icon-btn:active { transform: scale(0.92); }

        /* Smaller badge for the header cart */
        .cart-btn .orders-badge {
            top: -4px;
            right: -4px;
            width: 18px;
            height: 18px;
            font-size: 0.6rem;
            border-width: 2px;
        }
        body.lang-ar .cart-btn .orders-badge { right: auto; left: -4px; }

        @keyframes hdr-cart-pulse {
            0% { transform: scale(1); }
            35% { transform: scale(1.25); }
            100% { transform: scale(1); }
        }
        .hdr-icon-btn.pulse { animation: hdr-cart-pulse 0.5s ease-out; }

        /* Floating back arrow (3D dish navigation) */
        .sr-only {
            position: absolute;
            width: 1px; height: 1px;
            padding: 0; margin: -1px;
            overflow: hidden;
            clip: rect(0, 0, 0, 0);
            white-space: nowrap;
            border: 0;
        }
        .back-fab {
            position: fixed;
            top: 122px;
            inset-inline-start: 16px;
            z-index: 60;
            width: 42px;
            height: 42px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            background: rgba(255, 246, 227, 0.82);
            border: 1px solid rgba(108, 28, 30, 0.18);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            color: #6c1c1e;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 16px rgba(0, 0, 0, 0.45);
        }
        .back-fab svg { width: 22px; height: 22px; }
        .back-fab:hover { border-color: var(--turath-gold); color: var(--turath-gold); }
        .back-fab:active { transform: scale(0.92); }
        body.lang-ar .back-fab svg { transform: scaleX(-1); }
        @media (max-width: 768px) { .back-fab { top: 112px; } }

        /* Turath logo — faint fixed background watermark */
        .turath-watermark {
            position: fixed;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: min(72vw, 460px);
            height: auto;
            opacity: 0.08;
            z-index: -1;
            pointer-events: none;
            -webkit-mask-image: radial-gradient(ellipse 80% 92% at 50% 46%, #000 74%, transparent 99%);
            mask-image: radial-gradient(ellipse 80% 92% at 50% 46%, #000 74%, transparent 99%);
        }

        /* --- 3. UNIFIED STACK VIEW --- */
        .view-section {
            position: absolute; top: 110px; left: 0; width: 100%; height: calc(100vh - 110px);
            padding: 0; overflow: hidden; /* No scrolling for this view */
        }
        
        .carousel-container {
            width: 100%; height: 100%;
            margin-top: 0;
            perspective: 1200px;
            display: flex; align-items: center; justify-content: center;
            cursor: pointer;
            transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }

        /* --- 4. CARDS (APPLIED TO BOTH CATS AND DISHES) --- */
        .card {
            position: absolute; top: 35%; left: 50%;
            width: auto; height: auto;
            max-width: 260px;
            background: none;
            border: none;
            outline: none;
            box-shadow: none;
            overflow: visible;
            transform-origin: center center;
            transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
            will-change: transform, opacity;
            cursor: pointer;
            display: inline-block;
            line-height: 0;
        }

        /* CATEGORY SPECIFIC STYLES (Simple background for now) */
        .card.is-category {
            background: none;
        }

        .card img {
            width: auto; height: auto;
            max-width: 260px;
            max-height: 400px;
            object-fit: contain;
            display: block;
            filter: none;
            opacity: 0.3;
            transition: filter 0.3s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
            border: none;
            outline: none;
            background: none;
            will-change: filter, transform, opacity;
            backface-visibility: hidden;
            transform: translateZ(0);
        }

        /* Image loading state */
        .card img[data-loading="true"] {
            opacity: 0;
        }

        .card img[data-loaded="true"] {
            opacity: 0.3;
            transition: opacity 0.3s ease;
        }

        /* Category Name Overlay - Bottom of Screen */
        .card-title-overlay {
            position: fixed;
            bottom: 10vh;
            left: 0;
            right: 0;
            padding: 20px;
            background: linear-gradient(to top, rgba(251,233,183,0.92) 0%, rgba(251,233,183,0.55) 100%);
            backdrop-filter: blur(20px) saturate(150%);
            -webkit-backdrop-filter: blur(20px) saturate(150%);
            border-top: 1px solid rgba(108, 28, 30, 0.1);
            border-bottom: none;
            box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
            text-align: center;
            color: #6c1c1e;
            z-index: 20;
            opacity: 0;
            transform: translate3d(0, 20px, 0);
            transition: opacity 0.3s ease, transform 0.3s ease;
            pointer-events: none;
            will-change: opacity, transform;
        }

        .card-title-overlay.visible {
            opacity: 1;
            transform: translate3d(0, 0, 0);
        }

        .card-title-overlay .category-name {
            font-size: 1.4rem;
            font-weight: 700;
            margin-bottom: 10px;
            text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
        }

        .card-title-overlay .category-desc {
            font-size: 0.9rem;
            font-weight: 400;
            line-height: 1.5;
            color: rgba(108, 28, 30, 0.82);
            opacity: 0.95;
            max-width: 600px;
            margin: 0 auto;
            text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
        }

        /* Active State */
        .card.active img {
            filter: none;
            opacity: 1;
            transform: scale(1.05) translateZ(0);
        }

        /* Out of stock styling */
        .card.out-of-stock img {
            filter: grayscale(70%);
            opacity: 0.5;
        }
        .card.out-of-stock.active img {
            filter: grayscale(50%);
            opacity: 0.7;
            transform: scale(1.05) translateZ(0);
        }
        .out-of-stock-badge {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%) rotate(-15deg);
            background: rgba(220, 53, 69, 0.9);
            color: #6c1c1e;
            padding: 8px 20px;
            border-radius: 8px;
            font-size: 0.9rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            z-index: 10;
            white-space: nowrap;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
            border: 2px solid rgba(108, 28, 30, 0.3);
        }
        body.lang-ar .out-of-stock-badge {
            font-family: 'Tajawal', sans-serif;
        }

        /* Hover effect removed - no hover animation for cards */

        /* --- 5. INFO PANEL (Only visible for Dishes) --- */
        .info-panel {
            position: fixed;
            top: 105px;
            bottom: auto;
            left: 10px;
            right: 10px;
            width: calc(100% - 20px);
            padding: 12px 15px;
            background: linear-gradient(to bottom, rgba(251,233,183,0.9) 0%, rgba(251,233,183,0.6) 100%);
            backdrop-filter: blur(20px) saturate(150%);
            -webkit-backdrop-filter: blur(20px) saturate(150%);
            border: 1px solid rgba(108, 28, 30, 0.15);
            border-radius: 15px;
            display: flex; flex-direction: column; justify-content: flex-start;
            z-index: 20;
            opacity: 0;
            transform: translate3d(0, 20px, 0);
            transition: opacity 0.3s ease, transform 0.3s ease;
            max-height: 35vh;
            overflow-y: auto;
            will-change: opacity, transform;
            box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
        }
        .info-panel.visible { opacity: 1; transform: translate3d(0, 0, 0); }
        body.lang-ar .info-panel { text-align: right; }

        /* Info Text Styles (same as before) */
        .dish-category { font-size: 0.8rem; font-weight: 600; color: var(--turath-light); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 15px; opacity: 0.95; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
        .dish-name { font-size: 1.2rem; font-weight: 900; text-transform: uppercase; line-height: 1.1; margin-bottom: 3px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6); }
        .dish-price { font-size: 1rem; color: var(--turath-gold); font-weight: 700; margin-bottom: 4px; text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
        .dish-desc { font-size: 0.82rem; color: rgba(108, 28, 30, 0.82); margin-bottom: 8px; line-height: 1.45; max-height: 3.6em; overflow: hidden; font-weight: 500; }

        /* Stats Grid (same as before) */
        .stats-grid { display: flex; gap: 8px; margin-top: 3px; }
        .stat-item { flex: 1; }
        .stat-label { font-size: 0.65rem; text-transform: uppercase; color: #6c1c1e; margin-bottom: 3px; display: block; font-weight: 600; text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5); }
        .bar-track { width: 100%; height: 3px; background: rgba(108,28,30,0.15); border-radius: 2px; }
        .bar-fill {
            height: 100%;
            background: var(--turath-gold);
            width: 0%;
            transition: width 0.5s ease;
            will-change: width;
        }

        /* Loading Indicator */
        .loading-spinner {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%, -50%);
            width: 50px;
            height: 50px;
            border: 3px solid rgba(213, 128, 65, 0.2);
            border-top: 3px solid var(--turath-gold);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            z-index: 200;
        }

        @keyframes spin {
            0% { transform: translate(-50%, -50%) rotate(0deg); }
            100% { transform: translate(-50%, -50%) rotate(360deg); }
        }

        /* --- DISH DETAIL VIEW (floating dish + scrollable list + fixed CTA) --- */
        .ingredients-container {
            position: fixed;
            left: 0;
            right: 0;
            bottom: 0;
            top: 56%;
            z-index: 998;
            display: flex;
            flex-direction: column;
            max-width: 620px;
            margin: 0 auto;
            opacity: 0;
            transform: translateY(24px);
            transition: opacity 0.5s ease, transform 0.5s ease;
            pointer-events: none;
        }

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

        /* Ingredients list — scrollable, merged softly into the background */
        .dish-contents-list {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            list-style: none;
            margin: 0;
            padding: 26px 30px 12px;
            background: linear-gradient(to bottom, rgba(251,233,183,0) 0%, rgba(251,233,183,0.55) 30%, rgba(251,233,183,0.9) 100%);
            border: none;
            border-radius: 0;
            box-shadow: none;
            -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 8%);
            mask-image: linear-gradient(to bottom, transparent 0, #000 8%);
            position: relative;
        }
        .dish-contents-list::-webkit-scrollbar { width: 5px; }
        .dish-contents-list::-webkit-scrollbar-thumb { background: rgba(213, 128, 65, 0.45); border-radius: 4px; }

        .contents-item {
            color: rgba(108, 28, 30, 0.95);
            font-size: 1.05rem;
            font-weight: 500;
            margin-bottom: 16px;
            opacity: 0;
            transform: translateX(30px);
            transition: all 0.5s cubic-bezier(0.4, 0.0, 0.2, 1);
            padding-left: 0;
            letter-spacing: 0.3px;
            line-height: 1.6;
            position: relative;
            padding-left: 25px;
        }

        body.lang-ar .contents-item {
            transform: translateX(-30px);
            padding-left: 0;
            padding-right: 25px;
            font-family: 'Tajawal', sans-serif;
        }

        .contents-item:last-child {
            margin-bottom: 0;
        }

        .ingredients-container.visible .contents-item {
            opacity: 1;
            transform: translateX(0);
        }

        /* Stagger animation for list items */
        .ingredients-container.visible .contents-item:nth-child(1) { transition-delay: 0.05s; }
        .ingredients-container.visible .contents-item:nth-child(2) { transition-delay: 0.1s; }
        .ingredients-container.visible .contents-item:nth-child(3) { transition-delay: 0.15s; }
        .ingredients-container.visible .contents-item:nth-child(4) { transition-delay: 0.2s; }
        .ingredients-container.visible .contents-item:nth-child(5) { transition-delay: 0.25s; }
        .ingredients-container.visible .contents-item:nth-child(6) { transition-delay: 0.3s; }
        .ingredients-container.visible .contents-item:nth-child(7) { transition-delay: 0.35s; }
        .ingredients-container.visible .contents-item:nth-child(8) { transition-delay: 0.4s; }

        .contents-item::before {
            content: '';
            position: absolute;
            left: 0;
            top: 50%;
            transform: translateY(-50%);
            width: 6px;
            height: 6px;
            background: var(--turath-gold);
            border-radius: 50%;
            box-shadow: 0 0 8px rgba(213, 128, 65, 0.6);
        }

        body.lang-ar .contents-item::before {
            left: auto;
            right: 0;
        }

        /* Add-to-Order bar — fixed at the bottom of the detail view */
        .add-to-order-btn {
            flex: 0 0 auto;
            margin: 8px 24px 24px;
            padding: 15px 20px;
            border-radius: 16px;
            background: linear-gradient(135deg, var(--turath-gold) 0%, #b86a34 100%);
            color: #fff5e6;
            border: none;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            cursor: pointer;
            font-size: 1rem;
            font-weight: 700;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            box-shadow: 0 8px 24px rgba(213, 128, 65, 0.4);
        }
        body.lang-ar .add-to-order-btn { font-family: 'Tajawal', sans-serif; }

        .add-to-order-btn svg {
            width: 20px;
            height: 20px;
            filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
        }

        .add-to-order-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 12px 30px rgba(213, 128, 65, 0.55);
            background: linear-gradient(135deg, #e09a5a 0%, var(--turath-gold) 100%);
        }

        .add-to-order-btn:active {
            transform: translateY(0);
        }

        body.lang-ar .contents-item::before {
            margin-right: 0;
            margin-left: 10px;
        }

        /* Dish detail view — hide the other cards, float the active dish up */
        body.dish-detail-active .card:not(.detail-active) {
            opacity: 0 !important;
            transition: opacity 0.4s ease;
        }

        body.dish-detail-active .card.detail-active {
            transform: translate(-50%, -50%) translateY(var(--lift, -9vh)) scale(var(--dscale, 1.12)) !important;
            transition: transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) !important;
            z-index: 997 !important;
        }

        body.dish-detail-active .card.detail-active img {
            animation: dish-img-float 4.5s ease-in-out infinite;
        }
        @keyframes dish-img-float {
            0%, 100% { transform: scale(1.05) translateY(0) translateZ(0); }
            50%      { transform: scale(1.05) translateY(-10px) translateZ(0); }
        }

        /* Desktop Adjustments */
        @media (min-width: 769px) {
            .card { max-width: 350px; top: 35%; }
            .card img { max-width: 350px; max-height: 500px; }
            .info-panel {
                position: absolute;
                top: auto;
                width: 450px;
                height: auto;
                max-height: none;
                bottom: 8%;
                right: 10%;
                left: auto;
                background: linear-gradient(135deg, rgba(255,255,255,0.82) 0%, rgba(255,246,227,0.7) 100%);
                border-radius: 20px;
                padding: 25px;
                border: 1px solid rgba(108, 28, 30, 0.15);
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
            }
            body.lang-ar .info-panel { left: 10%; right: auto; }
            .dish-category { font-size: 1rem; margin-bottom: 8px; }
            .dish-name { font-size: 1.8rem; }
            .dish-price { font-size: 1.4rem; }
            .dish-desc { font-size: 0.95rem; }
            .turath-name { font-size: 2.8rem; letter-spacing: 5px; margin-top: 10px; }

            /* Category overlay on desktop */
            .card-title-overlay {
                bottom: 8%;
                border-radius: 20px 20px 0 0;
                margin: 0 20px;
                left: 0;
                right: 0;
                width: calc(100% - 40px);
                padding: 30px;
            }
            .card-title-overlay .category-name {
                font-size: 1.8rem;
            }
            .card-title-overlay .category-desc {
                font-size: 1.1rem;
                max-width: 800px;
            }

            /* Detail view — desktop */
            .ingredients-container {
                max-width: 560px;
                top: 52%;
            }
            body.dish-detail-active .card.detail-active {
                --lift: -12vh;
                --dscale: 1.35;
            }
            /* keep the dish info panel clear of the centered list on desktop */
            body.dish-detail-active .info-panel { opacity: 0; pointer-events: none; }
            .contents-item {
                font-size: 1.1rem;
            }
        }

        /* Mobile Adjustments */
        @media (max-width: 768px) {
            .turath-name { font-size: 1.4rem; letter-spacing: 2px; }
            .branch-name { font-size: 0.6rem; letter-spacing: 1px; margin-top: 2px; }
            header { height: 100px; padding: 10px 15px; }
            .view-section { top: 100px; height: calc(100vh - 100px); }
            .brand-logos { gap: 8px; }
            .brand-logos img { height: 30px !important; }

            /* Leave room at the leading-top corner for the floating back arrow */
            .info-panel { padding-inline-start: 60px; }

            /* Move cards down on mobile to make space */
            .card {
                top: 50%;
            }

            /* Category overlay adjustments for mobile - move to top */
            .card-title-overlay {
                top: 100px;
                bottom: auto;
                border-radius: 20px 20px 20px 20px;
                border-top: none;
                border-bottom: 1px solid rgba(108, 28, 30, 0.1);
                margin: 0 10px;
                left: 0;
                right: 0;
                width: calc(100% - 20px);
                background: linear-gradient(to bottom, rgba(251,233,183,0.9) 0%, rgba(251,233,183,0.6) 100%);
                box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
                max-height: 30vh;
                overflow-y: auto;
            }
            .card-title-overlay .category-desc {
                font-size: 0.85rem;
                line-height: 1.4;
            }

            /* Detail view — mobile */
            .ingredients-container {
                top: 57%;
                max-width: 100%;
            }

            .dish-contents-list {
                padding: 22px 22px 10px;
            }

            .contents-item {
                font-size: 0.98rem;
                margin-bottom: 13px;
            }

            .add-to-order-btn {
                margin: 8px 18px 20px;
                padding: 14px 18px;
                font-size: 0.98rem;
            }

            body.dish-detail-active .card.detail-active {
                --lift: -7vh;
                --dscale: 1.12;
            }
        }

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

        /* --- FOOTER --- */
        footer {
            position: fixed;
            bottom: 0;
            left: 0;
            right: 0;
            width: 100%;
            padding: 8px 20px;
            background: linear-gradient(to top, rgba(251,233,183,0.97) 0%, rgba(251,233,183,0.55) 100%);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            text-align: center;
            z-index: 100;
            border-top: 1px solid rgba(108, 28, 30, 0.05);
        }

        footer p {
            margin: 0;
            font-size: 0.7rem;
            color: rgba(108, 28, 30, 0.6);
            font-weight: 500;
            letter-spacing: 0.5px;
        }

        body.lang-ar footer p {
            font-family: 'Tajawal', sans-serif;
        }

        @media (max-width: 768px) {
            footer {
                padding: 6px 15px;
            }
            footer p {
                font-size: 0.65rem;
            }
        }

        /* --- CONTENT PROTECTION (TEMPORARILY DISABLED on request) ---
           Re-enable to block text selection and image drag/save.
        * {
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            -webkit-touch-callout: none;
        }

        img {
            pointer-events: none;
            -webkit-user-drag: none;
            -khtml-user-drag: none;
            -moz-user-drag: none;
            -o-user-drag: none;
        }
        */

        /* ===== ELEGANT ORDERS LIST FEATURE ===== */

        /* Floating Action Button - Orders Icon */
        .orders-fab {
            position: fixed;
            bottom: 30px;
            right: 30px;
            width: 70px;
            height: 70px;
            background: linear-gradient(135deg, var(--turath-gold), #c68a5a);
            border-radius: 50%;
            box-shadow: 0 8px 25px rgba(213, 128, 65, 0.6), 0 0 0 0 rgba(213, 128, 65, 0.4);
            cursor: pointer;
            z-index: 9999;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            display: flex;
            align-items: center;
            justify-content: center;
            border: 3px solid rgba(108, 28, 30, 0.3);
        }

        .orders-fab:hover {
            transform: scale(1.1) translateY(-5px);
            box-shadow: 0 12px 35px rgba(213, 128, 65, 0.8), 0 0 0 0 rgba(213, 128, 65, 0);
        }

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

        /* Shopping bag icon */
        .orders-icon {
            width: 35px;
            height: 35px;
            position: relative;
            transition: transform 0.3s ease;
        }

        .orders-icon svg {
            width: 100%;
            height: 100%;
            stroke: white;
            stroke-width: 2.5;
            fill: none;
        }

        .orders-fab:hover .orders-icon {
            transform: scale(1.1);
        }

        /* Pulse animation */
        @keyframes pulse-orders {
            0% {
                box-shadow: 0 8px 25px rgba(213, 128, 65, 0.6), 0 0 0 0 rgba(213, 128, 65, 0.7);
            }
            70% {
                box-shadow: 0 8px 25px rgba(213, 128, 65, 0.6), 0 0 0 20px rgba(213, 128, 65, 0);
            }
            100% {
                box-shadow: 0 8px 25px rgba(213, 128, 65, 0.6), 0 0 0 0 rgba(213, 128, 65, 0);
            }
        }

        .orders-fab.pulse {
            animation: pulse-orders 1s ease-out;
        }

        /* Item counter badge */
        .orders-badge {
            position: absolute;
            top: -5px;
            right: -5px;
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            color: #6c1c1e;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.75rem;
            font-weight: bold;
            border: 3px solid white;
            opacity: 0;
            transform: scale(0);
            transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            box-shadow: 0 4px 12px rgba(231, 76, 60, 0.5);
        }

        .orders-badge.show {
            opacity: 1;
            transform: scale(1);
        }

        /* Elegant Orders Overlay */
        .orders-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(74, 18, 20, 0.4);
            backdrop-filter: blur(10px);
            z-index: 10000;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 20px;
        }

        .orders-overlay.active {
            opacity: 1;
            pointer-events: all;
        }

        /* Orders Panel */
        .orders-panel {
            background: linear-gradient(135deg, rgba(255,250,240,0.98) 0%, rgba(251,233,183,0.98) 100%);
            border-radius: 30px;
            width: 100%;
            max-width: 600px;
            max-height: 90vh;
            box-shadow: 0 25px 80px rgba(0, 0, 0, 0.8), 0 0 100px rgba(213, 128, 65, 0.3);
            border: 2px solid rgba(213, 128, 65, 0.3);
            display: flex;
            flex-direction: column;
            transform: scale(0.9) translateY(50px);
            transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .orders-overlay.active .orders-panel {
            transform: scale(1) translateY(0);
        }

        /* Orders Header */
        .orders-header {
            background: linear-gradient(135deg, var(--turath-gold), #c68a5a);
            border-radius: 30px 30px 0 0;
            padding: 25px 30px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 3px solid rgba(108, 28, 30, 0.2);
        }

        .orders-title {
            display: flex;
            align-items: center;
            gap: 15px;
            color: #fff5e6;
        }

        .orders-title-icon {
            width: 32px;
            height: 32px;
        }

        .orders-title-icon svg {
            width: 100%;
            height: 100%;
            stroke: white;
            fill: none;
            stroke-width: 2;
        }

        .orders-title-text {
            font-size: 1.5rem;
            font-weight: 700;
            text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
        }

        .orders-close {
            width: 40px;
            height: 40px;
            background: rgba(108, 28, 30, 0.2);
            border: 2px solid white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 1.5rem;
            color: #fff5e6;
            transition: all 0.3s ease;
            font-weight: bold;
        }

        .orders-close:hover {
            background: rgba(108, 28, 30, 0.3);
            transform: rotate(90deg);
        }

        .orders-close:active {
            transform: rotate(90deg) scale(0.9);
        }

        /* Orders Content Area */
        .orders-content {
            flex: 1;
            overflow-y: auto;
            padding: 25px;
            display: flex;
            flex-direction: column;
            gap: 15px;
        }

        .orders-content::-webkit-scrollbar {
            width: 8px;
        }

        .orders-content::-webkit-scrollbar-track {
            background: rgba(108, 28, 30, 0.05);
            border-radius: 10px;
        }

        .orders-content::-webkit-scrollbar-thumb {
            background: var(--turath-gold);
            border-radius: 10px;
        }

        /* Order Item Card */
        .order-item {
            background: rgba(108, 28, 30, 0.05);
            backdrop-filter: blur(10px);
            border-radius: 20px;
            padding: 15px;
            display: flex;
            gap: 15px;
            border: 2px solid rgba(213, 128, 65, 0.2);
            transition: all 0.3s ease;
            animation: slideInOrder 0.4s ease-out;
        }

        .order-item:hover {
            background: rgba(108, 28, 30, 0.08);
            border-color: rgba(213, 128, 65, 0.4);
            transform: translateY(-2px);
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        }

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

        .order-item-image {
            width: 100px;
            height: 100px;
            border-radius: 15px;
            object-fit: cover;
            border: 3px solid rgba(213, 128, 65, 0.3);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
            flex-shrink: 0;
        }

        .order-item-details {
            flex: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }

        .order-item-name {
            font-size: 1.1rem;
            font-weight: 700;
            color: #6c1c1e;
            margin-bottom: 5px;
            text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
        }

        .order-item-price {
            font-size: 0.95rem;
            color: var(--turath-gold);
            font-weight: 600;
        }

        .order-item-controls {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-top: 10px;
        }

        .order-item-qty-control {
            display: flex;
            align-items: center;
            gap: 10px;
            background: rgba(108, 28, 30, 0.1);
            border-radius: 25px;
            padding: 5px 10px;
            border: 1px solid rgba(213, 128, 65, 0.3);
        }

        .order-item-qty-btn {
            width: 28px;
            height: 28px;
            border-radius: 50%;
            background: linear-gradient(135deg, var(--turath-gold), #c68a5a);
            border: none;
            color: #6c1c1e;
            font-size: 1.2rem;
            font-weight: bold;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .order-item-qty-btn:hover {
            transform: scale(1.1);
            box-shadow: 0 4px 12px rgba(213, 128, 65, 0.5);
        }

        .order-item-qty-btn:active {
            transform: scale(0.95);
        }

        .order-item-qty {
            font-size: 1rem;
            font-weight: 700;
            color: #6c1c1e;
            min-width: 25px;
            text-align: center;
        }

        .order-item-remove {
            width: 32px;
            height: 32px;
            border-radius: 50%;
            background: linear-gradient(135deg, #e74c3c, #c0392b);
            border: 2px solid white;
            color: #fff5e6;
            font-size: 1.2rem;
            cursor: pointer;
            transition: all 0.2s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            font-weight: bold;
            margin-left: auto;
        }

        .order-item-remove:hover {
            transform: scale(1.1) rotate(90deg);
            box-shadow: 0 4px 12px rgba(231, 76, 60, 0.6);
        }

        .order-item-remove:active {
            transform: scale(0.9) rotate(90deg);
        }

        /* Empty State */
        .orders-empty {
            text-align: center;
            padding: 60px 20px;
            color: rgba(108, 28, 30, 0.5);
        }

        .orders-empty-icon {
            width: 80px;
            height: 80px;
            margin: 0 auto 20px;
            opacity: 0.3;
        }

        .orders-empty-icon svg {
            width: 100%;
            height: 100%;
            stroke: white;
            fill: none;
            stroke-width: 1.5;
        }

        .orders-empty-text {
            font-size: 1.2rem;
            font-weight: 600;
        }

        /* Orders Footer */
        .orders-footer {
            background: rgba(74, 18, 20, 0.32);
            border-radius: 0 0 30px 30px;
            padding: 20px 30px;
            border-top: 2px solid rgba(213, 128, 65, 0.3);
            display: none;
        }

        .orders-footer.show {
            display: block;
        }

        .orders-total {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            margin-bottom: 15px;
            padding-bottom: 15px;
            border-bottom: 2px solid rgba(213, 128, 65, 0.2);
        }

        .orders-total-label {
            font-size: 1.2rem;
            font-weight: 700;
            color: #6c1c1e;
        }

        .orders-total-amount {
            font-size: 1.5rem;
            font-weight: 800;
            color: var(--turath-gold);
            text-shadow: 0 2px 8px rgba(213, 128, 65, 0.5);
        }

        .orders-btn-clear {
            width: 100%;
            padding: 14px 20px;
            border-radius: 15px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.3s ease;
            border: 2px solid rgba(231, 76, 60, 0.5);
            background: linear-gradient(135deg, rgba(231, 76, 60, 0.2), rgba(192, 57, 43, 0.2));
            color: #6c1c1e;
        }

        .orders-btn-clear:hover {
            background: linear-gradient(135deg, rgba(231, 76, 60, 0.3), rgba(192, 57, 43, 0.3));
            border-color: rgba(231, 76, 60, 0.8);
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(231, 76, 60, 0.3);
        }

        .orders-btn-clear:active {
            transform: translateY(0);
        }

        /* Mobile Adjustments for Orders */
        @media (max-width: 768px) {
            .orders-panel {
                max-width: 100%;
                border-radius: 20px;
            }

            .orders-header {
                padding: 20px;
                border-radius: 20px 20px 0 0;
            }

            .orders-title-text {
                font-size: 1.2rem;
            }

            .orders-content {
                padding: 15px;
            }

            .order-item {
                padding: 12px;
            }

            .order-item-image {
                width: 80px;
                height: 80px;
            }

            .order-item-name {
                font-size: 1rem;
            }

            .orders-footer {
                padding: 15px 20px;
                border-radius: 0 0 20px 20px;
            }
        }

        /* Floating animation */
        @keyframes subtle-float {
            0%, 100% {
                transform: translateX(-50%) translateY(0);
            }
            50% {
                transform: translateX(-50%) translateY(-10px);
            }
        }

        /* Maintenance Overlay */
        .maintenance-overlay {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, var(--dark-bg) 0%, #1a2332 50%, var(--dark-bg) 100%);
            z-index: 10000;
            display: none;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            padding: 20px;
            text-align: center;
        }

        .maintenance-overlay.show {
            display: flex;
        }

        .maintenance-icon {
            font-size: 5rem;
            margin-bottom: 30px;
            animation: pulse-glow 2s ease-in-out infinite;
        }

        @keyframes pulse-glow {
            0%, 100% {
                opacity: 0.8;
                transform: scale(1);
            }
            50% {
                opacity: 1;
                transform: scale(1.1);
            }
        }

        .maintenance-title {
            font-family: 'Tajawal', sans-serif;
            font-size: 2.5rem;
            font-weight: 900;
            background: linear-gradient(135deg, var(--turath-teal) 0%, var(--turath-gold) 50%, var(--turath-light) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            margin-bottom: 20px;
            line-height: 1.3;
        }

        .maintenance-message {
            font-size: 1.2rem;
            color: var(--text-grey);
            max-width: 400px;
            line-height: 1.6;
            margin-bottom: 30px;
        }

        .maintenance-brand {
            display: flex;
            align-items: center;
            gap: 15px;
            margin-top: 40px;
            opacity: 0.7;
        }

        .maintenance-brand img {
            height: 50px;
        }

        .maintenance-brand-name {
            font-family: 'Tajawal', sans-serif;
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--turath-gold);
        }

        /* ============================================================
           VIEW TOGGLE (2D / 3D segmented control)
           ============================================================ */
        .view-toggle {
            display: flex;
            align-items: center;
            background: rgba(108, 28, 30, 0.06);
            border: 1px solid rgba(108, 28, 30, 0.15);
            border-radius: 22px;
            padding: 3px;
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            gap: 2px;
        }

        .vt-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 5px;
            border: none;
            background: transparent;
            color: rgba(108, 28, 30, 0.65);
            border-radius: 18px;
            padding: 6px 12px;
            cursor: pointer;
            font-size: 0.72rem;
            font-weight: 700;
            letter-spacing: 0.5px;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            white-space: nowrap;
        }

        .vt-btn svg {
            width: 15px;
            height: 15px;
            stroke: currentColor;
            fill: none;
            stroke-width: 2;
        }

        .vt-btn:hover { color: var(--turath-light); }

        .vt-btn.active {
            background: linear-gradient(135deg, var(--turath-gold) 0%, #b86a34 100%);
            color: #6c1c1e;
            box-shadow: 0 2px 10px rgba(213, 128, 65, 0.4);
        }

        body.lang-ar .vt-btn { font-family: 'Tajawal', sans-serif; }

        @media (max-width: 768px) {
            .vt-btn .vt-label { display: none; }
            .vt-btn { padding: 6px 9px; }
        }

        /* ============================================================
           2D GRID VIEW
           ============================================================ */
        .grid-view {
            position: absolute;
            top: 110px;
            left: 0;
            width: 100%;
            height: calc(100vh - 110px);
            overflow-y: auto;
            overflow-x: hidden;
            display: none;
            flex-direction: column;
            -webkit-overflow-scrolling: touch;
            padding-bottom: 120px;
        }

        body.grid-mode .grid-view { display: flex; }
        body.grid-mode #viewStack { display: none; }

        .grid-view::-webkit-scrollbar { width: 8px; }
        .grid-view::-webkit-scrollbar-track { background: rgba(108,28,30,0.04); }
        .grid-view::-webkit-scrollbar-thumb { background: var(--turath-gold); border-radius: 10px; }

        /* Category pills bar (sticky) */
        .grid-cats {
            position: sticky;
            top: 0;
            z-index: 30;
            display: flex;
            flex-shrink: 0;
            align-items: center;
            gap: 10px;
            padding: 16px 18px;
            overflow-x: auto;
            overflow-y: visible;
            white-space: nowrap;
            margin-bottom: 14px;
            background: linear-gradient(to bottom, rgba(251,233,183,0.96) 0%, rgba(251,233,183,0.7) 100%);
            backdrop-filter: blur(16px) saturate(150%);
            -webkit-backdrop-filter: blur(16px) saturate(150%);
            border-bottom: 1px solid rgba(213, 128, 65, 0.15);
            scrollbar-width: none;
        }
        .grid-cats::-webkit-scrollbar { display: none; }

        .grid-cat-pill {
            flex: 0 0 auto;
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 13px 22px;
            border-radius: 30px;
            background: rgba(108, 28, 30, 0.05);
            border: 1px solid rgba(108, 28, 30, 0.12);
            color: rgba(108, 28, 30, 0.8);
            font-size: 0.9rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        }
        body.lang-ar .grid-cat-pill { font-family: 'Tajawal', sans-serif; }

        .grid-cat-pill:hover {
            border-color: rgba(213, 128, 65, 0.5);
            color: #6c1c1e;
        }

        .grid-cat-pill.active {
            background: linear-gradient(135deg, var(--turath-gold) 0%, #a84f14 100%);
            border-color: var(--turath-gold);
            color: #fff5e6;
            box-shadow: 0 6px 16px rgba(200, 100, 29, 0.35);
        }

        /* Category heading inside the scroll body */
        .grid-section-head {
            text-align: center;
            padding: 26px 20px 6px;
        }
        .grid-section-title {
            font-size: 1.6rem;
            font-weight: 900;
            background: linear-gradient(135deg, var(--turath-gold) 0%, var(--turath-light) 100%);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            line-height: 1.3;
        }
        body.lang-ar .grid-section-title { font-family: 'Tajawal', sans-serif; }
        .grid-section-desc {
            font-size: 0.85rem;
            color: var(--text-grey);
            max-width: 600px;
            margin: 8px auto 0;
            line-height: 1.5;
        }

        /* The grid itself */
        .grid-items {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
            gap: 16px;
            padding: 18px;
            max-width: 1280px;
            margin: 0 auto;
            width: 100%;
        }

        @media (min-width: 769px) {
            .grid-items {
                grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
                gap: 24px;
                padding: 24px;
            }
        }

        /* Dish card */
        .grid-card {
            position: relative;
            background: linear-gradient(160deg, rgba(255, 255, 255, 0.92) 0%, rgba(255, 246, 227, 0.82) 100%);
            border: 1px solid rgba(108, 28, 30, 0.14);
            border-radius: 22px;
            padding: 14px 14px 16px;
            display: flex;
            flex-direction: column;
            cursor: pointer;
            overflow: hidden;
            transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.3s ease, box-shadow 0.3s ease;
            box-shadow: 0 8px 22px rgba(108, 28, 30, 0.12);
            opacity: 0;
            transform: translateY(24px);
            animation: gridCardIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
        }

        @keyframes gridCardIn {
            to { opacity: 1; transform: translateY(0); }
        }

        .grid-card:hover {
            transform: translateY(-6px);
            border-color: rgba(200, 100, 29, 0.55);
            box-shadow: 0 16px 34px rgba(108, 28, 30, 0.2), 0 0 34px rgba(200, 100, 29, 0.12);
        }
        .grid-card:active { transform: translateY(-2px) scale(0.99); }

        /* Image stage with teal glow */
        .grid-card-img {
            position: relative;
            width: 100%;
            aspect-ratio: 1 / 1;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-bottom: 12px;
        }
        .grid-card-img::before {
            content: '';
            position: absolute;
            inset: 8%;
            background: radial-gradient(circle at center, var(--glow, rgba(108, 28, 30, 0.55)) 0%, transparent 70%);
            border-radius: 50%;
            z-index: 0;
            opacity: 0.6;
        }
        .grid-card-img img {
            position: relative;
            z-index: 1;
            max-width: 92%;
            max-height: 92%;
            width: auto;
            height: auto;
            object-fit: contain;
            filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.55));
            transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .grid-card:hover .grid-card-img img { transform: scale(1.08); }

        .grid-card-name {
            font-size: 0.98rem;
            font-weight: 700;
            color: #6c1c1e;
            line-height: 1.25;
            margin-bottom: 5px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }
        body.lang-ar .grid-card-name { font-family: 'Tajawal', sans-serif; }

        .grid-card-desc {
            font-size: 0.74rem;
            color: var(--text-grey);
            line-height: 1.4;
            margin-bottom: 10px;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            overflow: hidden;
            min-height: 2em;
        }

        .grid-card-foot {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-top: auto;
            gap: 8px;
        }
        body.lang-ar .grid-card-foot { flex-direction: row-reverse; }

        .grid-card-price {
            font-size: 0.95rem;
            font-weight: 800;
            color: var(--turath-gold);
            text-shadow: 0 2px 8px rgba(213, 128, 65, 0.25);
        }
        body.lang-ar .grid-card-price { font-family: 'Tajawal', sans-serif; }

        .grid-card-add {
            flex-shrink: 0;
            width: 38px;
            height: 38px;
            border-radius: 50%;
            border: none;
            background: linear-gradient(135deg, var(--turath-gold) 0%, #b86a34 100%);
            color: #fff5e6;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.25s ease;
            box-shadow: 0 4px 14px rgba(213, 128, 65, 0.4);
        }
        .grid-card-add svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2.5; fill: none; }
        .grid-card-add:hover { transform: scale(1.12); box-shadow: 0 6px 20px rgba(213, 128, 65, 0.6); }
        .grid-card-add:active { transform: scale(0.92); }

        /* Out of stock card */
        .grid-card.out-of-stock { cursor: default; }
        .grid-card.out-of-stock .grid-card-img img { filter: grayscale(80%) drop-shadow(0 8px 16px rgba(0,0,0,0.5)); opacity: 0.55; }
        .grid-card.out-of-stock .grid-card-add { background: rgba(108,28,30,0.12); box-shadow: none; cursor: not-allowed; }
        .grid-card-stock-badge {
            position: absolute;
            top: 14px;
            inset-inline-start: 14px;
            background: rgba(220, 53, 69, 0.92);
            color: #6c1c1e;
            font-size: 0.62rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            padding: 4px 10px;
            border-radius: 20px;
            z-index: 3;
            box-shadow: 0 3px 10px rgba(0,0,0,0.4);
        }
        body.lang-ar .grid-card-stock-badge { font-family: 'Tajawal', sans-serif; }

        .grid-card-spicy {
            position: absolute;
            top: 14px;
            inset-inline-end: 14px;
            font-size: 0.95rem;
            z-index: 3;
            filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5));
        }

        .grid-empty {
            text-align: center;
            padding: 80px 20px;
            color: rgba(108,28,30,0.45);
            font-size: 1.1rem;
        }
        body.lang-ar .grid-empty { font-family: 'Tajawal', sans-serif; }

        /* ============================================================
           DISH DETAIL MODAL (2D)
           ============================================================ */
        /* 2D dish detail — same treatment as the 3D detail screen:
           header stays visible, dish floats over the teal background,
           ingredients scroll beneath, Add-to-Order bar fixed at the bottom. */
        .dish-modal {
            position: fixed;
            top: 110px;
            left: 0;
            right: 0;
            bottom: 0;
            z-index: 49;
            background: radial-gradient(circle at center, rgba(200,100,29,0.10) 0%, #fbe9b7 60%, #fbe9b7 100%);
            display: flex;
            flex-direction: column;
            opacity: 0;
            pointer-events: none;
            transition: opacity 0.4s ease;
        }
        .dish-modal.active { opacity: 1; pointer-events: auto; }

        .dish-modal-card {
            position: relative;
            width: 100%;
            max-width: 600px;
            height: 100%;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            background: none;
            border: none;
            border-radius: 0;
            box-shadow: none;
            transform: translateY(22px);
            transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
        }
        .dish-modal.active .dish-modal-card { transform: translateY(0); }

        .dish-modal-close {
            position: absolute;
            top: 12px;
            inset-inline-start: 12px;
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: rgba(255, 246, 227, 0.82);
            border: 1px solid rgba(108, 28, 30, 0.18);
            backdrop-filter: blur(12px);
            -webkit-backdrop-filter: blur(12px);
            color: #6c1c1e;
            cursor: pointer;
            z-index: 5;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .dish-modal-close svg { width: 22px; height: 22px; }
        .dish-modal-close:hover { border-color: var(--turath-gold); color: var(--turath-gold); }
        body.lang-ar .dish-modal-close svg { transform: scaleX(-1); }

        .dish-modal-imgwrap {
            position: relative;
            flex: 0 0 auto;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 28px 24px 6px;
            min-height: 190px;
        }
        .dish-modal-imgwrap::before {
            content: '';
            position: absolute;
            inset: 12%;
            background: radial-gradient(circle at center, rgba(200, 100, 29, 0.18) 0%, transparent 70%);
            border-radius: 50%;
        }
        .dish-modal-imgwrap img {
            position: relative;
            max-width: 100%;
            max-height: 290px;
            object-fit: contain;
            filter: drop-shadow(0 18px 30px rgba(108,28,30,0.28));
            animation: dish-float 4s ease-in-out infinite;
        }

        /* Dedicated float for the modal dish image (no translateX, so it stays centered) */
        @keyframes dish-float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-10px); }
        }

        .dish-modal-body {
            flex: 1 1 auto;
            min-height: 0;
            overflow-y: auto;
            padding: 6px 28px 14px;
            display: flex;
            flex-direction: column;
            -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
            mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
        }
        .dish-modal-body::-webkit-scrollbar { width: 5px; }
        .dish-modal-body::-webkit-scrollbar-thumb { background: rgba(213, 128, 65, 0.45); border-radius: 4px; }
        body.lang-ar .dish-modal-body { text-align: right; }

        .dish-modal-cat {
            font-size: 0.78rem;
            font-weight: 600;
            color: var(--turath-light);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 8px;
            opacity: 0.9;
        }
        .dish-modal-name {
            font-size: 1.6rem;
            font-weight: 900;
            color: #6c1c1e;
            line-height: 1.2;
            margin-bottom: 10px;
            text-shadow: 0 2px 12px rgba(0,0,0,0.5);
        }
        body.lang-ar .dish-modal-name { font-family: 'Tajawal', sans-serif; }
        .dish-modal-price {
            font-size: 1.35rem;
            font-weight: 800;
            color: var(--turath-gold);
            margin-bottom: 16px;
            text-shadow: 0 2px 10px rgba(213, 128, 65, 0.3);
        }
        body.lang-ar .dish-modal-price { font-family: 'Tajawal', sans-serif; }
        .dish-modal-desc {
            font-size: 0.92rem;
            color: rgba(108, 28, 30, 0.85);
            line-height: 1.6;
            margin-bottom: 18px;
        }
        body.lang-ar .dish-modal-desc { font-family: 'Tajawal', sans-serif; }

        .dish-modal-ing-title {
            font-size: 0.8rem;
            font-weight: 700;
            color: var(--turath-light);
            text-transform: uppercase;
            letter-spacing: 1px;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1px solid rgba(213, 128, 65, 0.25);
        }
        body.lang-ar .dish-modal-ing-title { font-family: 'Tajawal', sans-serif; }

        .dish-modal-ing {
            list-style: none;
            margin: 0 0 22px;
            padding: 0;
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        .dish-modal-ing li {
            position: relative;
            padding-inline-start: 22px;
            font-size: 0.9rem;
            color: rgba(108,28,30,0.9);
            line-height: 1.4;
        }
        body.lang-ar .dish-modal-ing li { font-family: 'Tajawal', sans-serif; }
        .dish-modal-ing li::before {
            content: '';
            position: absolute;
            inset-inline-start: 0;
            top: 0.5em;
            width: 7px;
            height: 7px;
            border-radius: 50%;
            background: var(--turath-gold);
            box-shadow: 0 0 8px rgba(213, 128, 65, 0.6);
        }

        .dish-modal-addbtn {
            flex: 0 0 auto;
            margin: 8px 24px 22px;
            padding: 15px 20px;
            border: none;
            border-radius: 16px;
            background: linear-gradient(135deg, var(--turath-gold) 0%, #b86a34 100%);
            color: #fff5e6;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            transition: all 0.3s ease;
            box-shadow: 0 8px 24px rgba(213, 128, 65, 0.4);
        }
        body.lang-ar .dish-modal-addbtn { font-family: 'Tajawal', sans-serif; }
        .dish-modal-addbtn svg { width: 20px; height: 20px; stroke: #fff; stroke-width: 2.5; fill: none; }
        .dish-modal-addbtn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(213, 128, 65, 0.55); }
        .dish-modal-addbtn:active { transform: translateY(0); }
        .dish-modal-addbtn:disabled {
            background: rgba(108,28,30,0.12);
            color: rgba(108,28,30,0.5);
            cursor: not-allowed;
            box-shadow: none;
            transform: none;
        }

        @media (max-width: 768px) {
            .grid-view { top: 100px; height: calc(100vh - 100px); }
            .grid-section-title { font-size: 1.3rem; }
            .dish-modal { top: 100px; }
            .dish-modal-name { font-size: 1.3rem; }
            .dish-modal-price { font-size: 1.15rem; }
        }

        /* ===== CHECKOUT / ORDER STATUS ===== */
        .orders-btn-checkout {
            width: 100%;
            padding: 14px 20px;
            border: none;
            border-radius: 15px;
            font-size: 1rem;
            font-weight: 700;
            cursor: pointer;
            color: #fff5e6;
            background: linear-gradient(135deg, var(--turath-gold) 0%, #b86a34 100%);
            box-shadow: 0 8px 22px rgba(213,128,65,0.4);
            transition: all 0.3s ease;
            margin-bottom: 10px;
        }
        body.lang-ar .orders-btn-checkout { font-family: 'Tajawal', sans-serif; }
        .orders-btn-checkout:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(213,128,65,0.55); }
        .orders-btn-checkout:active { transform: translateY(0); }
        .orders-btn-checkout:disabled { opacity: 0.6; cursor: default; transform: none; }

        .co-types { display: flex; gap: 12px; margin-bottom: 18px; }
        .co-type {
            flex: 1; padding: 14px; border-radius: 14px; cursor: pointer;
            background: rgba(108,28,30,0.05); border: 2px solid rgba(108,28,30,0.12);
            color: #6c1c1e; font-size: 1rem; font-weight: 700; transition: all 0.25s ease;
        }
        body.lang-ar .co-type { font-family: 'Tajawal', sans-serif; }
        .co-type.active { border-color: var(--turath-gold); background: linear-gradient(135deg, rgba(213,128,65,0.25), rgba(108,28,30,0.3)); color: var(--turath-light); }

        .co-label { display: block; margin: 12px 0 6px; font-size: 0.85rem; color: var(--turath-light); font-weight: 600; }
        body.lang-ar .co-label { font-family: 'Tajawal', sans-serif; }
        .co-input {
            width: 100%; padding: 12px 14px; border-radius: 12px;
            background: rgba(108,28,30,0.06); border: 1px solid rgba(108,28,30,0.15);
            color: #6c1c1e; font-size: 1rem; outline: none; transition: border-color 0.2s ease;
            font-family: inherit;
        }
        .co-input:focus { border-color: var(--turath-gold); }
        body.lang-ar .co-input { font-family: 'Tajawal', sans-serif; text-align: right; }
        .co-error { color: #ff6b6b; font-size: 0.85rem; margin-top: 12px; min-height: 1em; }
        body.lang-ar .co-error { font-family: 'Tajawal', sans-serif; }

        .os-number { font-size: 1.1rem; color: #6c1c1e; margin-bottom: 14px; }
        .os-badge {
            display: inline-block; padding: 10px 22px; border-radius: 30px; font-weight: 700;
            font-size: 1rem; background: rgba(213,128,65,0.2); color: var(--turath-light);
            border: 1px solid rgba(213,128,65,0.4);
        }
        body.lang-ar .os-badge, body.lang-ar .os-number, body.lang-ar .os-total, body.lang-ar .os-note { font-family: 'Tajawal', sans-serif; }
        .os-badge.os-open, .os-badge.os-in_progress, .os-badge.os-ready { background: rgba(46,204,113,0.2); color: #2ecc71; border-color: rgba(46,204,113,0.4); }
        .os-badge.os-canceled { background: rgba(231,76,60,0.2); color: #e74c3c; border-color: rgba(231,76,60,0.4); }
        .os-badge.os-closed { background: rgba(108,28,30,0.12); color: #6c1c1e; }
        .os-total { margin-top: 16px; color: rgba(108, 28, 30, 0.82); }
        .os-total b { color: var(--turath-gold); }
        .os-note { margin-top: 10px; font-size: 0.8rem; color: #999; }

        /* ===== ORDER TRACKER (persisted) ===== */
        .order-tracker {
            position: fixed;
            bottom: 78px;
            left: 50%;
            transform: translateX(-50%);
            z-index: 9998;
            display: none;
            align-items: center;
            gap: 8px;
            padding: 11px 20px;
            border-radius: 30px;
            border: 1px solid rgba(213,128,65,0.5);
            background: linear-gradient(135deg, var(--turath-teal) 0%, #4a1214 100%);
            color: var(--turath-light);
            font-size: 0.9rem; font-weight: 700;
            cursor: pointer;
            box-shadow: 0 8px 24px rgba(0,0,0,0.5);
        }
        body.lang-ar .order-tracker { font-family: 'Tajawal', sans-serif; }
        .order-tracker svg { width: 18px; height: 18px; }
        .order-tracker.tracker-live { animation: tracker-pulse 2s ease-in-out infinite; }
        @keyframes tracker-pulse {
            0%,100% { box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 0 rgba(213,128,65,0.45); }
            50%     { box-shadow: 0 8px 24px rgba(0,0,0,0.5), 0 0 0 9px rgba(213,128,65,0); }
        }

        .os-card {
            background: rgba(108,28,30,0.04);
            border: 1px solid rgba(213,128,65,0.2);
            border-radius: 16px;
            padding: 18px;
            margin-bottom: 14px;
            text-align: center;
        }
        .ot-dismiss {
            margin-top: 12px;
            padding: 8px 18px;
            border-radius: 12px;
            border: 1px solid rgba(108,28,30,0.2);
            background: rgba(108,28,30,0.06);
            color: #ccc; cursor: pointer; font-size: 0.85rem;
        }
        body.lang-ar .ot-dismiss { font-family: 'Tajawal', sans-serif; }

        .os-divider {
            text-align: center;
            color: #999;
            font-size: 0.8rem;
            margin: 18px 0 12px;
            position: relative;
        }
        body.lang-ar .os-divider { font-family: 'Tajawal', sans-serif; }
        .os-divider::before, .os-divider::after {
            content: '';
            position: absolute;
            top: 50%;
            width: 28%;
            height: 1px;
            background: rgba(108,28,30,0.12);
        }
        .os-divider::before { left: 0; }
        .os-divider::after { right: 0; }
