/* =====================================================
   Urjoon Cafe - Customer Menu
   Colors: #292934 #ead9a0 #d6a928 #ffffff
   ===================================================== */

:root {
    --primary: #292934;
    --primary-dark: #1e1e27;
    --primary-light: #3a3a47;
    --secondary: #ead9a0;
    --secondary-light: #f2e6c4;
    --secondary-lighter: #f5ecd0;
    --accent: #d6a928;
    --accent-light: #e6c04e;
    --accent-ink: #a17a10;
    --bg: #ffffff;
    --white: #ffffff;
    --gray-50: #f7f5ef;
    --gray-100: #eeece7;
    --gray-200: #e2ded5;
    --gray-400: #9b9aa3;
    --gray-600: #5f5e6b;
    --success: #16a34a;
    --danger: #dc2626;

    --header-h: 68px;
    --bottom-nav-h: 68px;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;

    --shadow-sm: 0 2px 8px rgba(41, 41, 52, 0.06);
    --shadow: 0 8px 24px rgba(41, 41, 52, 0.1);
    --shadow-lg: 0 20px 60px rgba(41, 41, 52, 0.18);
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
    font-family: 'Tajawal', 'Segoe UI', Tahoma, Arial, sans-serif;
    background: var(--bg);
    color: var(--primary);
    line-height: 1.6;
    font-size: 15px;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-h) + env(safe-area-inset-bottom, 0px));
    background-image:
        radial-gradient(circle at 100% 0%, rgba(234, 217, 160, 0.15), transparent 50%),
        radial-gradient(circle at 0% 100%, rgba(214, 169, 40, 0.05), transparent 50%);
    background-attachment: fixed;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

/* =========== Header =========== */
.menu-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(253, 253, 251, 0.92);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid rgba(234, 217, 160, 0.4);
    padding: 12px 16px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
}
.menu-header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 12px;
}
.menu-header .logo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--secondary);
    padding: 3px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}
.menu-header .brand {
    flex: 1;
    min-width: 0;
}
.menu-header .brand .name {
    font-size: 17px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}
.menu-header .brand .tagline {
    font-size: 11px;
    color: var(--gray-600);
    margin-top: 2px;
    letter-spacing: 0.5px;
}
.header-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

/* ---- Header layout: Centered (large logo + name + tagline stacked) ---- */
.menu-header.menu-header-centered {
    /* stays sticky so it can collapse into a compact bar on scroll */
    position: sticky;
    top: 0;
    padding: 32px 20px 26px;
    padding-top: calc(32px + env(safe-area-inset-top, 0px));
    background: linear-gradient(180deg, rgba(234, 217, 160, 0.28), rgba(253, 253, 251, 0.96));
    border-bottom: 1px solid transparent;
    text-align: center;
    transition: padding 0.28s ease, background 0.28s ease, border-bottom-color 0.28s ease;
}
.menu-header-centered .menu-header-inner {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: gap 0.28s ease;
}
.menu-header-centered .logo {
    width: 108px;
    height: 108px;
    padding: 5px;
    box-shadow: 0 10px 30px rgba(41, 41, 52, 0.18);
    transition: width 0.28s ease, height 0.28s ease, padding 0.28s ease, box-shadow 0.28s ease;
}
.menu-header-centered .brand {
    text-align: center;
    transition: text-align 0.28s ease;
}
.menu-header-centered .brand .name {
    font-size: 24px;
    line-height: 1.2;
    transition: font-size 0.28s ease;
}
.menu-header-centered .brand .tagline {
    font-size: 13px;
    margin-top: 6px;
    letter-spacing: 0.3px;
    max-height: 40px;
    overflow: hidden;
    opacity: 1;
    transition: font-size 0.28s ease, max-height 0.28s ease, opacity 0.2s ease, margin 0.28s ease;
}
@media (min-width: 768px) {
    .menu-header-centered .logo { width: 116px; height: 116px; }
    .menu-header-centered .brand .name { font-size: 26px; }
    .menu-header-centered .brand .tagline { font-size: 14px; }
}

/* ---- Centered → compact (triggered by scroll via .is-compact class) ----
   Placed AFTER all base rules and media queries so cascade order wins.
   Stays vertical: shrinks logo + name only, hides tagline. */
.menu-header-centered.is-compact {
    padding: 10px 16px 8px;
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
    background: rgba(253, 253, 251, 0.94);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    backdrop-filter: saturate(180%) blur(12px);
    border-bottom-color: rgba(234, 217, 160, 0.4);
}
.menu-header-centered.is-compact .menu-header-inner {
    /* stay column — just tighter */
    gap: 4px;
}
.menu-header-centered.is-compact .logo {
    width: 48px;
    height: 48px;
    padding: 3px;
    box-shadow: 0 2px 8px rgba(41, 41, 52, 0.12);
}
.menu-header-centered.is-compact .brand .name {
    font-size: 15px;
}
.menu-header-centered.is-compact .brand .tagline {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}
@media (min-width: 768px) {
    .menu-header-centered.is-compact .logo { width: 52px; height: 52px; }
    .menu-header-centered.is-compact .brand .name { font-size: 16px; }
}
.header-btn {
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: 999px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    cursor: pointer;
    transition: 0.2s;
    box-shadow: var(--shadow-sm);
}
.header-btn:hover, .header-btn:active {
    background: var(--secondary);
    color: var(--primary);
    transform: scale(0.95);
}
.header-btn svg { width: 18px; height: 18px; }
.header-btn.active { background: var(--secondary); color: var(--primary); }

/* ---- Header layout: Minimal (logo moves to body centre; only icons up top) ---- */
.menu-header.menu-header-minimal { padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
/* Actions sit on the LEFT (inline-end in RTL), mini brand (logo + name) on the RIGHT. */
.menu-header-minimal .menu-header-inner { justify-content: space-between; }
/* Mini brand: small logo + Arabic name, hidden until the big centered logo scrolls away. */
.menu-header-minimal .mini-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    overflow: hidden;
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}
.menu-header-minimal.logo-visible .mini-brand {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}
.menu-header-minimal .mini-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--secondary);
    padding: 3px;
    box-shadow: var(--shadow-sm);
    flex-shrink: 0;
}
.menu-header-minimal .mini-name {
    font-size: 15px;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* ---- Centered logo shown in the body (Minimal / center-logo mode) ---- */
.menu-logo-center {
    display: flex;
    justify-content: center;
    padding: 22px 20px 6px;
}
.menu-logo-center .logo {
    width: 112px;
    height: 112px;
    border-radius: 50%;
    object-fit: cover;
    background: var(--secondary);
    padding: 5px;
    box-shadow: 0 10px 30px rgba(41, 41, 52, 0.18);
}
@media (min-width: 768px) {
    .menu-logo-center .logo { width: 124px; height: 124px; }
}

/* =========== Hero (optional intro) =========== */
.menu-hero {
    max-width: 1100px;
    margin: 0 auto;
    padding: 24px 16px 8px;
    text-align: center;
}
.menu-hero h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 6px;
}
.menu-hero p {
    color: var(--gray-600);
    font-size: 14px;
}

/* =========== Category Nav (sticky) =========== */
.category-nav {
    position: sticky;
    top: calc(var(--header-h) + env(safe-area-inset-top, 0px));
    z-index: 40;
    background: rgba(253, 253, 251, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    border-bottom: 1px solid rgba(234, 217, 160, 0.3);
}
.category-nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding: 2px 16px;
    scrollbar-width: none;
    cursor: grab;
    user-select: none;
}
.category-nav-inner::-webkit-scrollbar { display: none; }
.category-nav-inner.dragging { cursor: grabbing; }
/* NOTE: we must NOT set `pointer-events: none` on the pills while dragging.
   The drag handler adds `.dragging` on mousedown, and pointer-events:none
   would move the click target off the <a> pill onto the container — which
   silently breaks the native anchor scroll (this is exactly why it worked
   with JS disabled but not enabled). Accidental clicks after a real drag are
   already suppressed by the `moved` flag in the click handler instead. */

.cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    background: var(--white);
    border: 1.5px solid var(--gray-100);
    border-radius: 999px;
    color: var(--primary);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}
.cat-pill:hover { border-color: var(--secondary); }
.cat-pill.active {
    background: var(--primary);
    color: var(--secondary);
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(41, 41, 52, 0.25);
}
.cat-pill .emoji { font-size: 15px; }

/* =========== Closed Banner =========== */
.closed-banner {
    max-width: 1100px;
    margin: 14px auto 0;
    background: linear-gradient(135deg, #b91c1c, #dc2626);
    color: #fff;
    border-radius: var(--radius);
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    box-shadow: 0 8px 24px rgba(220, 38, 38, 0.25);
}
.closed-banner .cb-icon {
    font-size: 28px;
    line-height: 1;
}
.closed-banner .cb-body {
    width: 100%;
    text-align: center;
}
.closed-banner .cb-title {
    font-weight: 800;
    font-size: 16px;
    margin-bottom: 4px;
}
.closed-banner .cb-msg {
    font-size: 13px;
    opacity: 0.95;
    line-height: 1.6;
}

/* Status pill (contact page, near hours) */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}
.status-pill.open   { background: rgba(22,163,74,.12); color: #15803d; }
.status-pill.closed { background: rgba(220,38,38,.12); color: var(--danger); }
.status-pill .dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 3px rgba(0,0,0,0.06);
}
.status-note {
    margin-top: 12px;
    background: rgba(220,38,38,.08);
    color: var(--danger);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13.5px;
    font-weight: 600;
    line-height: 1.6;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

/* =========== Sections =========== */
.menu-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 16px;
}

.category-section {
    margin-bottom: 36px;
    /* Sticky header (~69px) + sticky category nav (~66px) = ~135px, plus a
       small breathing gap so the section title isn't flush against the bars. */
    scroll-margin-top: 150px;
}
/* When the centered layout is active, the sticky compact header is taller,
   so the scroll target must land below it. */
body:has(.menu-header-centered) .category-section {
    scroll-margin-top: 168px;
}
.category-section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px dashed rgba(214, 169, 40, 0.25);
}
.category-section-header .icon {
    font-size: 28px;
    line-height: 1;
    background: var(--secondary-lighter);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}
.category-section-header h2 {
    font-size: 20px;
    font-weight: 800;
    color: var(--primary);
    flex: 1;
}
.category-section-header .desc {
    font-size: 12px;
    color: var(--gray-600);
    margin-top: 2px;
    font-weight: 500;
}

/* =========== Products Grid =========== */
.products-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

/* =========== Per-section layouts ===========
   classic = default (horizontal row). grid2/grid3/featured restructure the
   card into an image-on-top card. Column counts are intentionally the SAME on
   mobile and desktop (a "3-image grid" stays 3 across even on phones). */

/* --- Grid 2 & Grid 3 : image-on-top square cards --- */
.products-list.layout-grid2 { grid-template-columns: 1fr 1fr; gap: 10px; }
.products-list.layout-grid3 { grid-template-columns: 1fr 1fr 1fr; gap: 7px; }

.layout-grid2 .product-card,
.layout-grid3 .product-card,
.layout-featured .product-card {
    flex-direction: column;
    padding: 0;
    gap: 0;
    overflow: hidden;
}
.layout-grid2 .product-card .thumb,
.layout-grid2 .product-card .thumb-placeholder,
.layout-grid3 .product-card .thumb,
.layout-grid3 .product-card .thumb-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    border-radius: 0;
}
.layout-grid2 .product-card .body,
.layout-grid3 .product-card .body { padding: 10px; }
.layout-grid3 .product-card .body { padding: 8px; }

/* only name + price in grids (details live in the popup) */
.layout-grid2 .product-card .desc,
.layout-grid2 .product-card .meta,
.layout-grid3 .product-card .desc,
.layout-grid3 .product-card .meta,
.layout-featured .product-card .desc,
.layout-featured .product-card .meta { display: none; }

/* tighter type for the denser grid-3 */
.layout-grid3 .product-card .name { font-size: 13px; }
.layout-grid3 .product-card .price { font-size: 15px; }
.layout-grid3 .product-card .thumb-placeholder { font-size: 28px; }

/* --- Featured : single wide big image --- */
.products-list.layout-featured { grid-template-columns: 1fr; gap: 14px; }
.layout-featured .product-card .thumb,
.layout-featured .product-card .thumb-placeholder {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 10;
    border-radius: 0;
}
.layout-featured .product-card .body { padding: 14px; }
.layout-featured .product-card .name { font-size: 17px; }
.layout-featured .product-card .thumb-placeholder { font-size: 48px; }

.product-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 12px;
    padding: 12px;
    cursor: pointer;
    transition: 0.2s;
    border: 1px solid transparent;
    position: relative;
}
.product-card:hover, .product-card:active {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: var(--secondary);
}
.product-card.unavailable {
    opacity: 0.6;
    pointer-events: none;
}
.product-card.unavailable::after {
    content: 'غير متاح';
    position: absolute;
    top: 12px;
    inset-inline-end: 12px;
    background: var(--danger);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    z-index: 2;
}

.product-card .thumb {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    object-fit: cover;
    background: var(--secondary-lighter);
    flex-shrink: 0;
    position: relative;
}
.product-card .thumb-placeholder {
    width: 96px;
    height: 96px;
    border-radius: 12px;
    background: var(--secondary-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    flex-shrink: 0;
    color: var(--gray-400);
}

.product-card .body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.product-card .name {
    font-weight: 800;
    color: var(--primary);
    font-size: 15px;
    line-height: 1.3;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.product-card .featured-star {
    color: #f59e0b;
    font-size: 14px;
}
.product-card .desc {
    font-size: 12.5px;
    color: var(--gray-600);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 8px;
}
.product-card .foot {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    flex-wrap: wrap;
}
.product-card .price-block {
    display: flex;
    align-items: baseline;
    gap: 6px;
}
.product-card .price {
    color: var(--accent-ink);
    font-weight: 800;
    font-size: 16px;
    white-space: nowrap;
}
.product-card .price small { font-size: 11px; font-weight: 600; opacity: 0.75; margin-inline-start: 2px; }
.product-card .old-price {
    color: var(--gray-400);
    text-decoration: line-through;
    font-size: 12px;
}
.product-card .meta {
    display: flex;
    gap: 6px;
    font-size: 10.5px;
    color: var(--gray-600);
    flex-wrap: wrap;
}
.product-card .meta span {
    background: var(--gray-50);
    padding: 2px 8px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    white-space: nowrap;
}

/* =========== Product Detail Modal =========== */
.pd-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(30, 18, 12, 0.7);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 200;
    display: none;
    align-items: flex-end;
    justify-content: center;
    animation: fadeIn 0.2s ease-out;
}
.pd-backdrop.open { display: flex; }

.pd-modal {
    background: var(--white);
    width: 100%;
    max-width: 520px;
    max-height: 95vh;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
    animation: slideUp 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

.pd-image {
    aspect-ratio: 4 / 3;
    background: var(--secondary-lighter);
    position: relative;
    overflow: hidden;
}
.pd-image img { width: 100%; height: 100%; object-fit: cover; }
.pd-image .no-img {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 64px;
    color: var(--gray-400);
}
.pd-close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    background: rgba(255, 255, 255, 0.95);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow);
    z-index: 2;
    color: var(--primary);
    transition: 0.15s;
}
.pd-close:active { transform: scale(0.9); }
.pd-close svg { width: 20px; height: 20px; }

.pd-badges {
    position: absolute;
    top: 14px;
    inset-inline-start: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    z-index: 2;
}
.pd-badge {
    background: rgba(255, 255, 255, 0.95);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow-sm);
}
.pd-badge.featured { background: #f59e0b; color: var(--white); }
.pd-badge.discount { background: var(--accent); color: var(--white); }

.pd-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.pd-name {
    font-size: 22px;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 8px;
    line-height: 1.2;
}
.pd-desc {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 16px;
}
.pd-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 8px;
    margin-bottom: 20px;
}
.pd-meta-item {
    background: var(--secondary-lighter);
    color: var(--primary);
    padding: 10px 12px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}
.pd-meta-item .label {
    font-size: 10.5px;
    font-weight: 700;
    color: var(--gray-600);
    letter-spacing: 0.2px;
    text-transform: none;
}
.pd-meta-item .value {
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 6px;
    line-height: 1.2;
    word-break: break-word;
}
.pd-meta-item .value .emoji {
    font-size: 16px;
    flex-shrink: 0;
}
.pd-price-block {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 14px 18px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--secondary);
    border-radius: var(--radius);
    margin-bottom: 20px;
}
.pd-price-block .label {
    font-size: 12px;
    opacity: 0.75;
    font-weight: 500;
}
.pd-price-block .price {
    font-size: 26px;
    font-weight: 800;
    color: var(--white);
}
.pd-price-block .price small { font-size: 14px; font-weight: 600; opacity: 0.85; margin-inline-start: 4px; }
.pd-price-block .old {
    color: rgba(234, 217, 160, 0.7);
    text-decoration: line-through;
    font-size: 14px;
    margin-inline-start: auto;
}

.pd-option-group {
    margin-bottom: 16px;
}
.pd-option-group h4 {
    font-size: 14px;
    color: var(--primary);
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pd-option-group h4 .price-note {
    font-size: 11px;
    background: var(--secondary);
    color: var(--primary);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 700;
}
.pd-option-values {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.pd-option-value {
    background: var(--gray-50);
    border: 1.5px solid var(--gray-100);
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.pd-option-value .val-price {
    color: var(--accent-ink);
    font-weight: 800;
    font-size: 12px;
}

/* =========== Empty state =========== */
.empty {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}
.empty .icon { font-size: 56px; opacity: 0.35; margin-bottom: 12px; }
.empty h3 { color: var(--primary); font-weight: 700; margin-bottom: 6px; }

/* =========== Bottom Nav =========== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 60;
    background: rgba(255, 255, 255, 0.96);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    border-top: 1px solid rgba(234, 217, 160, 0.4);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -8px 32px rgba(41, 41, 52, 0.05);
}
.bottom-nav-inner {
    max-width: 480px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.bottom-nav.has-qr .bottom-nav-inner { grid-template-columns: repeat(4, 1fr); }
.bottom-nav-item.as-button {
    background: none;
    border: none;
    font-family: inherit;
    cursor: pointer;
}
.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    color: var(--gray-600);
    font-size: 11px;
    font-weight: 700;
    border-radius: 14px;
    transition: 0.2s;
}
.bottom-nav-item svg {
    width: 22px;
    height: 22px;
    transition: 0.2s;
}
.bottom-nav-item.active {
    color: var(--accent-ink);
    background: rgba(214, 169, 40, 0.1);
}
.bottom-nav-item.active svg {
    transform: scale(1.1);
}
.bottom-nav-item:active { transform: scale(0.95); }

/* =========== Allergens Page =========== */
.page-intro {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--secondary);
    padding: 28px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    text-align: center;
}
.page-intro h1 {
    color: var(--white);
    font-size: 22px;
    margin-bottom: 8px;
    font-weight: 800;
}
.page-intro p {
    font-size: 14px;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
}

.allergen-list {
    display: grid;
    gap: 12px;
}
.allergen-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    display: flex;
    gap: 14px;
    align-items: flex-start;
    border-inline-start: 4px solid var(--accent);
}
.allergen-card .icon-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--secondary-lighter);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    flex-shrink: 0;
    overflow: hidden;
}
.allergen-card .icon-box img { width: 100%; height: 100%; object-fit: cover; }
.allergen-card .content { flex: 1; min-width: 0; }
.allergen-card h3 {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 4px;
}
.allergen-card p {
    color: var(--gray-600);
    font-size: 13.5px;
    line-height: 1.6;
}

/* =========== Contact Page =========== */
.contact-cards {
    display: grid;
    gap: 14px;
}
.contact-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    box-shadow: var(--shadow-sm);
}
.contact-card h3 {
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--gray-100);
}
.contact-card h3 .emoji { font-size: 22px; }

.address-block {
    color: var(--gray-600);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 14px;
}
.address-block .value { color: var(--primary); font-weight: 500; }

.action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 20px;
    background: var(--primary);
    color: var(--secondary);
    border-radius: 12px;
    font-weight: 700;
    font-size: 14px;
    transition: 0.2s;
    border: none;
    cursor: pointer;
    font-family: inherit;
    width: 100%;
}
.action-btn:hover, .action-btn:active {
    background: var(--accent);
    color: var(--white);
    transform: translateY(-1px);
}
.action-btn svg { width: 18px; height: 18px; }

.phone-list, .social-list {
    display: grid;
    gap: 8px;
}
.phone-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    background: var(--gray-50);
    border-radius: 12px;
    color: var(--primary);
    transition: 0.15s;
    border: 1.5px solid transparent;
}
.phone-item:hover { border-color: var(--secondary); }
.phone-item .label { font-size: 12px; color: var(--gray-600); }
.phone-item .number { font-weight: 800; font-size: 15px; direction: ltr; }
.phone-item .call-btn {
    background: var(--accent);
    color: var(--white);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.social-list {
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}
.social-item {
    background: var(--secondary-lighter);
    padding: 14px 8px;
    border-radius: 14px;
    text-align: center;
    color: var(--primary);
    font-weight: 700;
    font-size: 12px;
    transition: 0.15s;
}
.social-item:active { transform: scale(0.95); }
.social-item .emoji { font-size: 26px; display: block; margin-bottom: 4px; }

.hours-table {
    display: grid;
    gap: 6px;
}
.hours-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: var(--gray-50);
    border-radius: 10px;
    font-size: 14px;
}
.hours-row.today {
    background: linear-gradient(135deg, var(--secondary-lighter), var(--secondary));
    color: var(--primary);
    font-weight: 700;
    border: 2px solid var(--accent);
}
.hours-row .day { font-weight: 700; color: var(--primary); }
.hours-row .time { color: var(--gray-600); direction: ltr; font-weight: 600; }
.hours-row.today .time { color: var(--primary); }
.hours-row .closed { color: var(--danger); font-weight: 700; }

/* =========== QR Modal =========== */
.qr-modal-content {
    background: var(--white);
    padding: 28px 24px;
    border-radius: var(--radius-lg);
    text-align: center;
    max-width: 340px;
    margin: 20px;
    box-shadow: var(--shadow-lg);
}
.qr-modal-content h3 {
    color: var(--primary);
    font-size: 18px;
    margin-bottom: 16px;
}
.qr-modal-content .qr-box {
    background: var(--white);
    border: 2px solid var(--secondary);
    padding: 14px;
    border-radius: 14px;
    display: inline-block;
    margin-bottom: 16px;
}
.qr-modal-content .qr-box canvas, .qr-modal-content .qr-box svg { display: block; }
.qr-modal-content p {
    color: var(--gray-600);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* =========== Responsive =========== */
@media (min-width: 640px) {
    /* Column counts are now driven per-section by the .layout-* classes, so we
       no longer force a 2-column grid here. Classic cards just get a slightly
       larger thumbnail on wider screens. */
    .layout-classic .product-card .thumb,
    .layout-classic .product-card .thumb-placeholder {
        width: 100px;
        height: 100px;
    }
}

@media (min-width: 900px) {
    .menu-hero h1 { font-size: 30px; }
    .menu-hero p { font-size: 15px; }
}

/* =========== App Shell (Desktop mobile-app frame) =========== */
.app-shell { width: 100%; }

@media (min-width: 768px) {
    body {
        background:
            radial-gradient(circle at 20% 0%, rgba(214, 169, 40, 0.08), transparent 40%),
            radial-gradient(circle at 80% 100%, rgba(234, 217, 160, 0.15), transparent 40%),
            #efeae2;
        min-height: 100vh;
    }
    .app-shell {
        max-width: 480px;
        margin: 0 auto;
        min-height: 100vh;
        background: var(--bg, #ffffff);
        box-shadow: 0 0 60px rgba(41, 41, 52, 0.12);
        position: relative;
        /* IMPORTANT: no overflow rules here — otherwise the page scrolls inside
           the shell instead of on the window, which breaks sticky/fixed elements
           and can cause auto-snap-to-top behavior. */
    }
    /* Sticky elements inside the shell already work — no changes needed */

    /* Force max-width containers to fill the shell so nothing looks off-center */
    .menu-header-inner,
    .category-nav-inner,
    .menu-container,
    .bottom-nav-inner {
        max-width: 100%;
    }

    /* Center the bottom nav under the shell frame */
    .bottom-nav {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: 480px;
        border-left: 1px solid rgba(234, 217, 160, 0.4);
        border-right: 1px solid rgba(234, 217, 160, 0.4);
    }

    /* Reduce hero size so it looks proportional inside the frame */
    .menu-hero h1 { font-size: 22px; }
    .menu-hero p { font-size: 13px; }

    /* Product detail modal — constrain to shell width so it feels app-like */
    .pd-backdrop {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        width: 100%;
        max-width: 480px;
    }
}

/* =========== Site Credit (footer signature) =========== */
.site-credit {
    text-align: center;
    font-size: 11px;
    color: var(--gray-400, #a1a1aa);
    padding: 20px 16px 24px;
    /* Extra breathing room so the fixed bottom-nav (which is slightly taller
       than body's --bottom-nav-h padding) never overlaps the credit. */
    margin-bottom: 24px;
    letter-spacing: 0.2px;
    direction: ltr;
    font-family: 'Tajawal', system-ui, sans-serif;
}
.site-credit a {
    color: var(--gray-600, #6b7280);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}
.site-credit a:hover {
    color: var(--primary, #292934);
}
.site-credit .sep {
    margin: 0 6px;
    opacity: 0.6;
}


/* ===== WeeMenu ordering (cart + checkout) ===== */
.wm-order{margin-top:16px;border-top:1px solid var(--gray-200);padding-top:14px}
.wm-optgroup{margin-bottom:12px}
.wm-optgroup-t{font-weight:700;font-size:14px;margin-bottom:7px;color:var(--primary)}
.wm-opts{display:flex;flex-wrap:wrap;gap:8px}
.wm-opt{display:inline-flex;align-items:center;gap:6px;border:1.5px solid var(--gray-200);border-radius:10px;padding:8px 12px;font-size:13px;cursor:pointer;background:var(--white)}
.wm-opt input{accent-color:var(--accent-ink)}
.wm-opt b{color:var(--accent-ink);font-weight:700}
.wm-qtyrow{display:flex;align-items:center;gap:12px;margin-top:14px}
.wm-qty{display:flex;align-items:center;gap:14px;border:1.5px solid var(--gray-200);border-radius:12px;padding:6px 14px}
.wm-qty button{border:none;background:none;font-size:22px;color:var(--primary);cursor:pointer;line-height:1;width:24px}
.wm-qty span{font-weight:800;min-width:20px;text-align:center}
.wm-add{flex:1;background:var(--primary);color:#fff;border:none;border-radius:12px;padding:14px;font-family:inherit;font-weight:800;font-size:15px;cursor:pointer}
.wm-add:active{background:var(--accent)}

.wm-bar{position:fixed;bottom:calc(94px + env(safe-area-inset-bottom, 0px));left:16px;right:16px;max-width:560px;margin:0 auto;background:var(--primary);color:#fff;border-radius:16px;padding:15px 20px;display:flex;align-items:center;justify-content:space-between;gap:12px;font-weight:800;font-size:15px;box-shadow:0 10px 30px rgba(0,0,0,.25);cursor:pointer;z-index:55}
.wm-bar-count{background:var(--secondary);color:var(--primary);border-radius:50%;width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;font-size:14px}

.wm-drawer-wrap{position:fixed;inset:0;background:rgba(0,0,0,.5);display:none;align-items:flex-end;justify-content:center;z-index:1000}
.wm-drawer-wrap.open{display:flex}
.wm-drawer{background:var(--bg);width:100%;max-width:560px;max-height:88vh;border-radius:22px 22px 0 0;display:flex;flex-direction:column;overflow:hidden}
.wm-drawer-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px;border-bottom:1px solid var(--gray-200)}
.wm-drawer-head h3{font-size:18px;font-weight:800}
.wm-drawer-head button{border:none;background:none;font-size:20px;cursor:pointer;color:var(--gray-600)}
.wm-drawer-body{padding:16px 20px;overflow-y:auto;flex:1}
.wm-empty{text-align:center;color:var(--gray-400);padding:30px}
.wm-ci{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid var(--gray-100)}
.wm-ci-main{flex:1;min-width:0}
.wm-ci-name{font-weight:700;font-size:14px}
.wm-ci-opt{font-size:12px;color:var(--gray-600)}
.wm-ci-price{font-size:13px;color:var(--accent-ink);font-weight:700;margin-top:2px}
.wm-ci-qty{display:flex;align-items:center;gap:10px;border:1px solid var(--gray-200);border-radius:10px;padding:4px 10px}
.wm-ci-qty button{border:none;background:none;font-size:18px;cursor:pointer;color:var(--primary)}
.wm-ci-del{border:none;background:none;cursor:pointer;font-size:16px}
.wm-drawer-foot{padding:16px 20px;border-top:1px solid var(--gray-200);background:var(--white)}
.wm-sum{display:flex;justify-content:space-between;font-size:16px;margin-bottom:12px}
.wm-sum b{color:var(--accent-ink)}
.wm-checkout{width:100%;background:var(--primary);color:#fff;border:none;border-radius:12px;padding:15px;font-family:inherit;font-weight:800;font-size:16px;cursor:pointer}
.wm-checkout:disabled{opacity:.6}
.wm-f{display:block;font-weight:700;font-size:13.5px;margin-bottom:12px;color:var(--primary)}
.wm-f input,.wm-f select,.wm-f textarea{width:100%;margin-top:6px;padding:11px 13px;border:1.5px solid var(--gray-200);border-radius:10px;font-family:inherit;font-size:14px;background:var(--white)}
.wm-pay .wm-pay-opts{display:flex;flex-direction:column;gap:8px;margin-top:8px}
.wm-pay-opt{display:flex;align-items:center;gap:10px;border:1.5px solid var(--gray-200);border-radius:10px;padding:11px 13px;font-size:14px;cursor:pointer;background:var(--white);font-weight:600}
.wm-pay-opt input{width:auto;margin:0;accent-color:var(--accent-ink)}
.wm-bank{margin-top:10px;background:var(--secondary-lighter);border-radius:10px;padding:11px 13px;font-size:13px;font-weight:600;color:var(--primary);line-height:1.8}
.wm-toast{position:fixed;bottom:90px;left:50%;transform:translateX(-50%) translateY(20px);background:var(--primary);color:#fff;padding:11px 20px;border-radius:12px;font-weight:700;font-size:14px;opacity:0;transition:.25s;z-index:1100;pointer-events:none}
.wm-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}
.wm-locate{width:100%;background:var(--secondary-lighter);color:var(--primary);border:1.5px dashed var(--secondary);border-radius:10px;padding:11px;font-family:inherit;font-weight:700;font-size:14px;cursor:pointer;margin-bottom:10px}
.wm-delivinfo{font-size:13px;padding:8px 0;color:var(--gray-600)}
.wm-delivinfo.ok{color:#15803d;font-weight:700}
.wm-delivinfo.bad{color:#b91c1c;font-weight:700}
.wm-note{background:var(--secondary-lighter);border-radius:10px;padding:10px 12px;font-size:13px;color:var(--primary);margin-bottom:12px;font-weight:600}
.wm-min{background:#fef3c7;color:#92400e;border-radius:8px;padding:8px 12px;font-size:13px;font-weight:700;text-align:center;margin-bottom:10px}

/* ===== ratings ===== */
.rt{margin-top:16px;border-top:1px solid var(--gray-200);padding-top:14px}
.rt h4{font-size:15px;font-weight:800;margin-bottom:8px;color:var(--primary)}
.rt-summary{display:flex;align-items:center;gap:6px;font-size:14px;margin-bottom:12px}
.rt-summary b{font-size:16px}.rt-summary span{color:var(--gray-500)}
.rt-summary.rt-none{color:var(--gray-400);font-size:13px}
.rt-star{color:var(--gray-200);font-size:16px}.rt-star.on{color:#f59e0b}
.rt-pick{display:flex;gap:4px;font-size:30px;color:#f59e0b;cursor:pointer;margin-bottom:10px;direction:ltr;justify-content:center}
.rt-pick span{transition:transform .1s}.rt-pick span:hover{transform:scale(1.15)}
.rt-in{width:100%;padding:10px 12px;border:1.5px solid var(--gray-200);border-radius:10px;font-family:inherit;font-size:14px;margin-bottom:8px;background:var(--white)}
.rt-btn{width:100%;background:var(--primary);color:#fff;border:none;border-radius:10px;padding:12px;font-family:inherit;font-weight:800;font-size:14px;cursor:pointer}
.rt-msg{text-align:center;font-size:13px;font-weight:700;margin-top:8px}

/* ===== offers strip ===== */
.offers-strip{margin:12px 16px 0;display:grid;gap:8px}
.offer-item{display:flex;align-items:center;gap:10px;background:linear-gradient(135deg,var(--secondary-lighter),var(--secondary-light));border:1px solid var(--secondary);border-radius:12px;padding:11px 15px;font-size:14px;color:var(--primary)}
.offer-item .offer-ic{font-size:20px}
.offer-item b{font-weight:800}
.offers-strip.center .offer-item{justify-content:center;text-align:center}
/* animated (marquee) banner strip — seamless infinite loop (JS-measured shift) */
.offers-marquee{margin:12px 16px 0;overflow:hidden;border-radius:12px;border:1px solid var(--secondary);
  background:linear-gradient(135deg,var(--secondary-lighter),var(--secondary-light));padding:11px 0;direction:ltr}
/* force LTR layout on the animated track so the two copies sit predictably
   ([copy1][copy2]) and translateX behaves the same regardless of page dir */
.offers-marquee-track{display:flex;width:max-content;will-change:transform;direction:ltr}
.offers-marquee-track.run{animation:wm-marquee linear infinite}
.offers-marquee-track.ltr{animation-direction:reverse}
.offers-marquee:hover .offers-marquee-track{animation-play-state:paused}
/* identical groups; trailing gap = inter-item gap → uniform spacing across the seam */
.offers-marquee .m-group{display:flex;gap:44px;padding-inline-end:44px}
/* each item keeps RTL so Arabic text + icon order render correctly */
.offers-marquee .m-item{display:inline-flex;align-items:center;gap:8px;font-size:14px;color:var(--primary);white-space:nowrap;direction:rtl}
.offers-marquee .m-item b{font-weight:800}
.offers-marquee .offer-ic{font-size:18px}
/* shift by exactly one group's measured width (px) → no rounding, no jump */
@keyframes wm-marquee{from{transform:translateX(0)}to{transform:translateX(calc(-1 * var(--wm-shift,50%)))}}
@media (prefers-reduced-motion: reduce){.offers-marquee-track.run{animation:none}}

/* ===== menu search + filters ===== */
.menu-search{margin:14px 16px 0;display:flex;flex-direction:column;gap:10px}
.ms-box{display:flex;align-items:center;gap:8px;background:var(--white);border:1.5px solid var(--gray-200);border-radius:14px;padding:11px 14px}
.ms-box .ms-ic{font-size:16px;opacity:.7}
.ms-box input{flex:1;border:none;outline:none;background:none;font-family:inherit;font-size:15px;color:var(--primary)}
.ms-clear{border:none;background:var(--gray-100);color:var(--gray-600);width:24px;height:24px;border-radius:50%;cursor:pointer;font-size:12px}
.ms-noresults{text-align:center;color:var(--gray-400);padding:40px 20px;font-size:15px}

/* Collapsible search (center-logo mode): hidden until the header icon opens it */
.menu-search.collapsible{margin-top:0;max-height:0;opacity:0;overflow:hidden;transform:translateY(-6px);
    transition:max-height .28s ease,opacity .2s ease,transform .28s ease,margin-top .28s ease}
.menu-search.collapsible.open{max-height:80px;opacity:1;transform:none;margin-top:14px}

.product-card{position:relative}
