/*
 * Mister Bob customer menu.
 * Stands alone — none of the admin template is loaded on this side.
 *
 * Built from the logo: its near-black, its white, and its teal. The page is
 * dark so the food photos carry the colour; the teal is kept small — the
 * chosen category, Add, the cart bar — and never laid down as a band. The type
 * follows the logo too: a serif like "Mr. BOB" for dish names, spaced-out
 * capitals like "FOOD & DRINKS" for the categories.
 *
 *   bg        #0C0E0E   the page
 *   surface   #151818   dishes, the cart
 *   accent    #20BCC0   the logo's teal, for what can be tapped
 */

/* ==========================================================================
   1. Base
   ========================================================================== */

:root {
    --bg: #0C0E0E;
    --surface: #151818;
    --surface-raised: #1E2222;
    --line: #282D2D;
    --line-strong: #384040;
    --text: #F4F6F6;
    --muted: #9BA6A6;
    --accent: #20BCC0;
    --accent-hover: #3DD0D4;
    --accent-soft: rgba(32, 188, 192, 0.14);
    --accent-ring: rgba(32, 188, 192, 0.18);
    /* Dark words on the teal: white on it is too faint to read. */
    --on-accent: #04292A;
    --danger: #FF8A7E;
    --radius-lg: 22px;
    --radius-md: 14px;
    --font-display: 'Playfair Display', 'Tajawal', Georgia, 'Times New Roman', serif;
    --font-body: 'Archivo', 'Tajawal', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    color-scheme: dark;
    background: var(--bg);
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body.menu-body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Room under the footer for the cart bar once it shows. */
body.menu-body.has-cart {
    padding-bottom: 88px;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* The drawn icons (menu.partials.icons): one em square in the colour of the
   words around them, so every rule that sized or coloured the old icon font
   still sizes and colours these. */
.mi {
    display: inline-block;
    line-height: 0;
    vertical-align: -0.15em;
}

.mi svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* One narrow column, like a printed menu, rather than a shop's wide grid. */
.menu-container {
    width: 100%;
    max-width: 1000px;
    margin-inline: auto;
    padding-inline: 16px;
}

@media (min-width: 768px) {
    .menu-container {
        padding-inline: 24px;
    }
}

.menu-main {
    min-height: 60vh;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ==========================================================================
   2. Header
   ========================================================================== */

.menu-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-block: 18px;
}

/* The logo on a plain white circle. No ring and no gap around it — that is
   what made it read like a story avatar — and the logo fills the circle like
   an emblem instead of sitting small in the middle of a frame. */
.menu-brand {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #FFFFFF;
    box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.9);
}

.menu-brand-logo {
    width: auto;
    height: 41px;
}

@media (max-width: 559px) {
    .menu-brand {
        width: 46px;
        height: 46px;
    }

    .menu-brand-logo {
        height: 36px;
    }
}

.menu-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-call {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s;
}

.menu-call i {
    color: var(--accent);
    font-size: 16px;
}

.menu-call:hover {
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 420px) {
    .menu-call span {
        display: none;
    }

    .menu-call {
        padding: 11px;
    }
}

.menu-cart {
    position: relative;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface);
    color: var(--text);
    font-size: 21px;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.menu-cart:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* The phone button opens onto the two ways to reach the shop: a call, or a
   WhatsApp message. */
.menu-contact {
    position: relative;
}

.menu-call {
    cursor: pointer;
    list-style: none;
    -webkit-user-select: none;
    user-select: none;
}

.menu-call::-webkit-details-marker {
    display: none;
}

.menu-contact[open] .menu-call {
    border-color: var(--accent);
    color: var(--accent);
}

.menu-contact-menu {
    position: absolute;
    top: calc(100% + 8px);
    inset-inline-end: 0;
    z-index: 80;
    display: grid;
    gap: 2px;
    min-width: 230px;
    padding: 6px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: 0 18px 40px -12px rgba(0, 0, 0, 0.8);
}

.menu-contact-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text);
    transition: background-color 0.2s;
}

.menu-contact-option:hover,
.menu-contact-option:focus-visible {
    background: var(--surface-raised);
}

.menu-contact-icon {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 18px;
}

.menu-contact-option.is-whatsapp .menu-contact-icon {
    background: rgba(37, 211, 102, 0.14);
    color: #25D366;
}

.menu-contact-text {
    display: grid;
    line-height: 1.3;
}

.menu-contact-text strong {
    font-size: 15px;
    font-weight: 700;
}

.menu-contact-text small {
    color: var(--muted);
    font-size: 13px;
}

/* The other language, a button the size of the ones beside it. */
.menu-lang {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 46px;
    height: 46px;
    padding-block: 0;
    padding-inline: 10px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
    transition: border-color 0.2s, color 0.2s;
}

/* Round, with a faint ring so the white of either flag does not melt into
   the button. */
.menu-lang-flag {
    flex: 0 0 auto;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.menu-lang:lang(ar) {
    font-family: 'Tajawal', var(--font-body);
    font-size: 16px;
}

.menu-lang:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Feedback, beside the cart: round like it on a phone, its word added where
   there is room. */
.menu-feedback {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 46px;
    height: 46px;
    padding-inline: 12px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    transition: border-color 0.2s, color 0.2s;
}

.menu-feedback i {
    color: var(--accent);
    font-size: 19px;
}

.menu-feedback:hover,
.menu-feedback.is-current {
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 767px) {
    .menu-feedback {
        padding-inline: 0;
    }

    .menu-feedback span {
        display: none;
    }
}

/* ==========================================================================
   3. Banner
   ========================================================================== */

.banner {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: var(--surface);
    isolation: isolate;
}

.banner-track {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
}

.banner-track::-webkit-scrollbar {
    display: none;
}

.banner-slide {
    position: relative;
    flex: 0 0 100%;
    margin: 0;
    aspect-ratio: 2 / 1;
    scroll-snap-align: start;
}

/* The wide shape offer banners are usually made in, so their words are not
   cropped off the ends. */
@media (min-width: 768px) {
    .banner-slide {
        aspect-ratio: 8 / 3;
    }
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    background: rgba(12, 14, 14, 0.6);
    color: var(--text);
    font-size: 24px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.banner-arrow-prev {
    left: 14px;
}

.banner-arrow-next {
    right: 14px;
}

.banner-arrow:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

/* Swiping is the way on a touch screen; the arrows only get in the way. */
@media (hover: none) {
    .banner-arrow {
        display: none;
    }
}

.banner-dots {
    position: absolute;
    left: 50%;
    bottom: 14px;
    z-index: 2;
    display: flex;
    gap: 7px;
    transform: translateX(-50%);
}

.banner-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25);
    cursor: pointer;
    transition: width 0.35s var(--ease), background-color 0.2s;
}

.banner-dot[aria-current="true"] {
    width: 22px;
    background: var(--accent);
}

/* ==========================================================================
   4. Heading and category bar
   ========================================================================== */

.menu-heading {
    padding-top: 18px;
}

.menu-heading h1 {
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 700;
    line-height: 1.05;
}

/* Pinned to the top, on the page's own dark — no coloured band. */
.category-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin-top: 18px;
    padding-block: 10px;
    border-bottom: 1px solid transparent;
    background: rgba(12, 14, 14, 0.94);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    transition: border-color 0.25s;
}

.category-bar.is-stuck {
    border-bottom-color: var(--line);
}

.category-nav {
    position: relative;
    flex: 1;
    min-width: 0;
}

/* The fades that say the row carries on, laid over its ends. */
.category-nav::before,
.category-nav::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 1;
    width: 76px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s;
}

.category-nav::before {
    inset-inline-start: 0;
    background: linear-gradient(to right, var(--bg) 30%, rgba(12, 14, 14, 0));
}

.category-nav::after {
    inset-inline-end: 0;
    background: linear-gradient(to left, var(--bg) 30%, rgba(12, 14, 14, 0));
}

.category-nav.can-scroll-start::before,
.category-nav.can-scroll-end::after {
    opacity: 1;
}

.category-tabs {
    position: relative;
    display: flex;
    gap: 4px;
    padding: 2px;
    overflow-x: auto;
    scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
    display: none;
}

/* Spaced-out capitals, like "FOOD & DRINKS" under the logo. */
.category-tab {
    flex: 0 0 auto;
    padding: 13px 18px;
    border-radius: 999px;
    color: rgba(244, 246, 246, 0.78);
    font-size: 13.5px;
    font-weight: 600;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    transition: color 0.2s, background-color 0.2s;
}

.category-tab:hover {
    color: var(--accent);
}

/* Only a tab once the script has made them tabs; before that they are links. */
.menu-tabbed .category-tab.is-active {
    background: var(--accent);
    color: var(--on-accent);
    font-weight: 700;
}

@media (max-width: 559px) {
    .category-tab {
        padding: 12px 15px;
        font-size: 12.5px;
        letter-spacing: 0.12em;
    }
}

.category-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--text);
    font-size: 22px;
    cursor: pointer;
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%);
    transition: opacity 0.2s, background-color 0.2s, border-color 0.2s, color 0.2s;
}

.category-arrow-prev {
    inset-inline-start: 0;
}

.category-arrow-next {
    inset-inline-end: 0;
}

.category-nav.can-scroll-start .category-arrow-prev,
.category-nav.can-scroll-end .category-arrow-next {
    opacity: 1;
    pointer-events: auto;
}

.category-arrow:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

@media (hover: none) {
    .category-arrow {
        display: none;
    }
}

/* ==========================================================================
   5. Dishes
   ========================================================================== */

.menu-section {
    padding-block: 24px 56px;
    scroll-margin-top: 90px;
}

.menu-tabbed .menu-section {
    animation: menu-rise 0.45s var(--ease) both;
}

@keyframes menu-rise {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
}

.menu-section-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.menu-section-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.75rem;
    font-weight: 700;
}

.menu-section-header span {
    color: var(--muted);
    font-size: 14px;
}

/* The chosen tab already names the category. */
.menu-tabbed .menu-section-header {
    display: none;
}

/* One dish to a row. */
.dish-list {
    display: grid;
    gap: 22px;
}

.dish {
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: var(--surface);
    transition: border-color 0.3s;
}

.dish:hover {
    border-color: var(--line-strong);
}

.dish-media {
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--surface-raised);
}

@media (min-width: 768px) {
    .dish-media {
        aspect-ratio: 2 / 1;
    }
}

.dish-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s var(--ease);
}

.dish:hover .dish-media img {
    transform: scale(1.03);
}

.dish-body {
    padding: 20px 22px 22px;
}

@media (min-width: 768px) {
    .dish-body {
        padding: 24px 28px 26px;
    }
}

.dish-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
}

.dish-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.14em;
    line-height: 1;
    text-transform: uppercase;
}

.dish-tag i {
    font-size: 13px;
}

.dish-tag-popular {
    background: var(--accent-soft);
    color: var(--accent);
    box-shadow: inset 0 0 0 1px rgba(32, 188, 192, 0.4);
}

.dish-tag-sold-out {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* Name, a dotted line, the price — the way a printed menu sets a dish. */
.dish-head {
    display: flex;
    align-items: baseline;
    gap: 14px;
}

.dish-name {
    flex: 0 1 auto;
    min-width: 0;
    margin: 0;
    font-family: var(--font-display);
    font-size: clamp(1.35rem, 2.6vw, 1.75rem);
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.dish-leader {
    flex: 1 1 24px;
    min-width: 24px;
    border-bottom: 2px dotted var(--line-strong);
    transform: translateY(-6px);
}

.dish-price {
    flex: 0 0 auto;
    margin: 0;
    font-size: clamp(1.15rem, 2.2vw, 1.35rem);
    font-weight: 700;
    line-height: 1.3;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.dish-foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 14px 28px;
    margin-top: 10px;
}

.dish-description {
    flex: 1;
    max-width: 64ch;
    margin: 0;
    color: var(--muted);
    font-size: 15.5px;
    line-height: 1.6;
}

.dish-order {
    flex: 0 0 auto;
    margin-inline-start: auto;
}

.dish-add {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 42px;
    padding: 0;
    padding-inline: 14px 18px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font: inherit;
    font-size: 13.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    line-height: 1;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.15s var(--ease);
}

.dish-add i {
    font-size: 18px;
}

.dish-add:hover {
    background: var(--accent-hover);
}

.dish-add:active {
    transform: scale(0.95);
}

/* Add, once the dish is in the cart. */
.dish-stepper {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    height: 42px;
    padding: 4px;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    animation: cart-bump 0.35s var(--ease);
}

.dish-stepper button {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(4, 41, 42, 0.14);
    color: var(--on-accent);
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.dish-stepper button:hover:not(:disabled) {
    background: rgba(4, 41, 42, 0.28);
}

.dish-stepper button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.dish-stepper span {
    min-width: 30px;
    font-size: 15px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

/* Sold out today: still on the menu, quieter, and nothing to add. */
.dish.is-sold-out .dish-media img {
    filter: grayscale(1) brightness(0.55);
}

.dish.is-sold-out .dish-name,
.dish.is-sold-out .dish-price {
    color: var(--muted);
}

/* On a phone the button sits on its own line under the words. */
@media (max-width: 559px) {
    .dish-foot {
        flex-direction: column;
        align-items: stretch;
    }

    .dish-order {
        align-self: flex-end;
    }
}

/* ==========================================================================
   6. Empty state and footer
   ========================================================================== */

.menu-empty {
    margin-block: 40px;
    padding: 64px 24px;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-lg);
    background: var(--surface);
    text-align: center;
}

.menu-empty i {
    color: var(--accent);
    font-size: 44px;
}

.menu-empty h2 {
    margin: 12px 0 6px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
}

.menu-empty p {
    margin: 0;
    color: var(--muted);
}

/* Kept quiet: a line, the name, and how to reach the shop. */
.menu-footer {
    margin-top: 16px;
    border-top: 1px solid var(--line);
    color: var(--muted);
    font-size: 14px;
}

.menu-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
    padding-block: 28px calc(28px + env(safe-area-inset-bottom));
}

.menu-footer-note {
    margin: 0;
}

.menu-footer-contact {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.menu-footer-contact i {
    margin-inline-end: 4px;
    color: var(--accent);
}

.menu-footer-contact a:hover {
    color: var(--text);
}

@media (max-width: 559px) {
    .menu-footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .menu-footer-contact {
        justify-content: center;
    }
}

/* ==========================================================================
   7. Cart
   ========================================================================== */

body.cart-open {
    overflow: hidden;
}

.cart-badge {
    position: absolute;
    top: -5px;
    inset-inline-end: -5px;
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    padding-inline: 6px;
    border: 2px solid var(--bg);
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.cart-badge.is-bumped {
    animation: cart-bump 0.45s var(--ease);
}

@keyframes cart-bump {
    40% {
        transform: scale(1.35);
    }
}

/* Along the bottom once something is in the cart: count, "View cart", total. */
.cart-bar {
    position: fixed;
    left: 50%;
    bottom: calc(16px + env(safe-area-inset-bottom));
    z-index: 80;
    display: flex;
    align-items: center;
    gap: 14px;
    width: min(520px, calc(100% - 32px));
    padding: 7px 22px 7px 7px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font: inherit;
    cursor: pointer;
    box-shadow: 0 18px 36px -12px rgba(0, 0, 0, 0.9);
    transform: translateX(-50%);
    transition: background-color 0.2s;
    animation: cart-bar-in 0.35s var(--ease) both;
}

@keyframes cart-bar-in {
    from {
        opacity: 0;
        transform: translate(-50%, 18px);
    }
}

.cart-bar:hover {
    background: var(--accent-hover);
}

.cart-bar-icon {
    position: relative;
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--on-accent);
    color: var(--accent);
    font-size: 20px;
}

.cart-bar .cart-badge {
    top: -4px;
    inset-inline-end: -6px;
    border-color: var(--accent);
    background: var(--text);
    color: var(--bg);
}

.cart-bar-label {
    flex: 1;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-align: start;
    text-transform: uppercase;
}

.cart-bar-total {
    font-size: 17px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cart-overlay {
    position: fixed;
    inset: 0;
    z-index: 90;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
}

.cart-overlay.is-visible {
    opacity: 1;
}

.cart {
    position: fixed;
    top: 0;
    inset-inline-end: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    /* Never the full width of a phone: the strip of dimmed menu left showing
       is what a thumb taps to close it. */
    width: min(420px, calc(100% - 56px));
    border-inline-start: 1px solid var(--line);
    background: #101212;
    box-shadow: -24px 0 48px -24px rgba(0, 0, 0, 0.8);
    transform: translateX(100%);
    visibility: hidden;
    /* Visibility waits for the slide to finish before hiding the panel. */
    transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
}

.cart.is-open {
    transform: none;
    visibility: visible;
    transition-delay: 0s;
}

.cart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
}

.cart-header h2 {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.45rem;
    font-weight: 700;
}

.cart-summary {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.cart-close,
.cart-back {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--text);
    font-size: 21px;
    cursor: pointer;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.cart-close:hover,
.cart-back:hover {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

.cart-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 4px 20px 20px;
}

.cart-empty {
    margin: auto;
    padding: 40px 0;
    text-align: center;
}

.cart-empty i {
    display: grid;
    place-items: center;
    width: 84px;
    height: 84px;
    margin: 0 auto 14px;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: var(--surface);
    color: var(--accent);
    font-size: 36px;
}

.cart-empty p {
    margin: 0;
    font-weight: 700;
}

.cart-empty span {
    color: var(--muted);
    font-size: 14px;
}

.cart-items {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cart-item {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
    animation: menu-rise 0.35s var(--ease) both;
}

.cart-item-media {
    display: grid;
    place-items: center;
    width: 58px;
    height: 58px;
    overflow: hidden;
    border-radius: 12px;
    background: var(--surface-raised);
}

.cart-item-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.cart-item-media.is-named {
    color: var(--accent);
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
}

.cart-item-name {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
}

.cart-item-price {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.cart-item-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

.cart-qty {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.cart-qty button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--surface-raised);
    color: var(--text);
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
}

.cart-qty button:hover:not(:disabled) {
    background: var(--accent);
    color: var(--on-accent);
}

.cart-qty button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cart-qty span {
    min-width: 26px;
    font-size: 14px;
    font-weight: 700;
    text-align: center;
    font-variant-numeric: tabular-nums;
}

.cart-item-remove {
    padding: 2px;
    border: 0;
    background: none;
    color: var(--muted);
    font-size: 17px;
    cursor: pointer;
    transition: color 0.2s;
}

.cart-item-remove:hover {
    color: var(--danger);
}

.cart-note {
    margin-top: 20px;
}

.cart-note label,
.checkout-field label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
}

.cart-note textarea,
.checkout-field input,
.checkout-field textarea {
    display: block;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.cart-note textarea {
    min-height: 92px;
    resize: vertical;
}

.cart-note textarea::placeholder,
.checkout-field input::placeholder,
.checkout-field textarea::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.cart-note textarea:focus,
.checkout-field input:focus,
.checkout-field textarea:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.cart-footer {
    padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #101212;
}

.cart-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}

.cart-total span {
    color: var(--muted);
    font-weight: 600;
}

.cart-total strong {
    font-size: 1.35rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.cart-checkout {
    width: 100%;
    padding: 15px;
    border: 0;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background-color 0.2s;
}

.cart-checkout:hover:not(:disabled) {
    background: var(--accent-hover);
}

.cart-checkout:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

/* ==========================================================================
   8. Checkout
   ========================================================================== */

.cart-header-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.cart-back {
    width: 38px;
    height: 38px;
    font-size: 20px;
}

.cart-step {
    display: flex;
    flex: 1;
    flex-direction: column;
}

.cart-fee-line {
    margin: -6px 0 12px;
    color: var(--muted);
    font-size: 13px;
}

.checkout {
    padding-top: 16px;
}

.checkout-intro {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 14px;
    line-height: 1.55;
}

.checkout-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 138, 126, 0.35);
    border-radius: var(--radius-md);
    background: rgba(255, 138, 126, 0.1);
    color: var(--danger);
    font-size: 14px;
    line-height: 1.5;
}

.checkout-field {
    margin-bottom: 14px;
}

.checkout-field label {
    margin-bottom: 6px;
}

.checkout-field textarea {
    min-height: 84px;
    resize: vertical;
}

.checkout-field .is-invalid {
    border-color: var(--danger);
}

.checkout-field-error {
    margin: 6px 0 0;
    color: var(--danger);
    font-size: 13px;
}

.checkout-field-error:empty {
    display: none;
}

.checkout-note {
    margin-top: 4px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    font-size: 14px;
}

.checkout-note span {
    display: block;
    margin-bottom: 2px;
    font-weight: 700;
}

.checkout-note p {
    margin: 0;
    color: var(--muted);
    overflow-wrap: anywhere;
}

.checkout-done {
    justify-content: center;
    padding: 40px 8px;
    text-align: center;
}

.checkout-done > i {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 46px;
    animation: cart-bump 0.6s var(--ease);
}

.checkout-done h3 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 700;
}

.checkout-done p {
    margin: 0 0 6px;
    color: var(--muted);
}

.checkout-done strong {
    color: var(--text);
}

.checkout-field label span {
    color: var(--muted);
    font-weight: 500;
}

/* The saved addresses, above the box they write into. */
.checkout-saved {
    position: relative;
    margin-bottom: 8px;
}

.checkout-saved select {
    display: block;
    width: 100%;
    padding-block: 12px;
    padding-inline: 14px 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    text-overflow: ellipsis;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.checkout-saved select:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.checkout-saved i {
    position: absolute;
    top: 50%;
    inset-inline-end: 12px;
    color: var(--muted);
    font-size: 20px;
    pointer-events: none;
    transform: translateY(-50%);
}

.checkout-code {
    display: flex;
    gap: 8px;
}

.checkout-code input {
    flex: 1;
    min-width: 0;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.checkout-code-apply {
    flex: 0 0 auto;
    padding: 0 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-md);
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.checkout-code-apply:hover:not(:disabled) {
    border-color: var(--accent);
    color: var(--accent);
}

.checkout-code-apply:disabled {
    opacity: 0.55;
    cursor: wait;
}

.checkout-code-applied {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px 8px 14px;
    border: 1px solid rgba(32, 188, 192, 0.4);
    border-radius: var(--radius-md);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 14px;
    font-weight: 600;
}

.checkout-code-applied i {
    font-size: 17px;
}

.checkout-code-applied span {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

.checkout-code-applied button {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: none;
    color: var(--accent);
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.checkout-code-applied button:hover {
    background: rgba(32, 188, 192, 0.18);
}

/* A cart line that was changed: what was added, left out and asked for. */
.cart-item.is-detailed {
    align-items: start;
}

.cart-item-options {
    margin: 4px 0 0;
    padding: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
    list-style: none;
}

.cart-item-options li {
    overflow-wrap: anywhere;
}

.cart-item-edit {
    margin-top: 4px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--accent);
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.cart-item-edit:hover {
    text-decoration: underline;
}

/* ==========================================================================
   9. Dish options
   ========================================================================== */

/* How many of a dish that can be changed are in the cart, on its Add. */
.dish-add-count {
    display: grid;
    place-items: center;
    min-width: 22px;
    height: 22px;
    margin-inline: 2px -8px;
    padding-inline: 6px;
    border-radius: 999px;
    background: var(--on-accent);
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    font-variant-numeric: tabular-nums;
}

body.sheet-open {
    overflow: hidden;
}

/* Above the cart, since a cart line can be changed from inside it. */
.sheet-overlay {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(0, 0, 0, 0.6);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s;
}

.sheet-overlay.is-visible {
    opacity: 1;
}

/* Rises from the bottom on a phone, where the thumb is; a panel in the middle
   of a wider screen. */
.sheet {
    position: fixed;
    left: 50%;
    bottom: 0;
    z-index: 120;
    display: flex;
    flex-direction: column;
    width: min(560px, 100%);
    max-height: min(90vh, 780px);
    max-height: min(90dvh, 780px);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    background: #101212;
    box-shadow: 0 -24px 48px -24px rgba(0, 0, 0, 0.8);
    transform: translate(-50%, 100%);
    visibility: hidden;
    transition: transform 0.35s var(--ease), visibility 0s linear 0.35s;
}

.sheet.is-open {
    transform: translate(-50%, 0);
    visibility: visible;
    transition-delay: 0s;
}

@media (min-width: 768px) {
    .sheet {
        top: 50%;
        bottom: auto;
        border-bottom: 1px solid var(--line);
        border-radius: var(--radius-lg);
        opacity: 0;
        transform: translate(-50%, -46%);
        transition: transform 0.35s var(--ease), opacity 0.25s, visibility 0s linear 0.35s;
    }

    .sheet.is-open {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.sheet-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 20px 16px;
    border-bottom: 1px solid var(--line);
}

.sheet-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 1.55rem;
    font-weight: 700;
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.sheet-price {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.sheet-body {
    flex: 1;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2px 20px 22px;
}

.sheet-section {
    padding-top: 20px;
}

/* Spaced-out capitals, like the categories. */
.sheet-section-title {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.sheet-section-title span {
    margin-inline-start: 6px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.sheet-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.sheet-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 14px;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.sheet-chip:hover {
    border-color: var(--accent);
}

.sheet-chip i {
    color: var(--accent);
    font-size: 15px;
}

/* Left out: dashed, quieter and crossed through, still there to tap back in. */
.sheet-chip.is-left-out {
    border-style: dashed;
    color: var(--muted);
}

.sheet-chip.is-left-out i {
    color: var(--muted);
}

.sheet-chip.is-left-out .sheet-chip-name {
    text-decoration: line-through;
}

.sheet-chip.is-on {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.sheet-note {
    display: block;
    width: 100%;
    margin-top: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sheet-chips[hidden] + .sheet-note,
.sheet-chips[hidden] ~ .sheet-note {
    margin-top: 0;
}

.sheet-note::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.sheet-note:focus {
    border-color: var(--accent);
    outline: none;
    box-shadow: 0 0 0 4px var(--accent-ring);
}

.sheet-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px calc(14px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
}

.sheet-footer .cart-qty button {
    width: 36px;
    height: 36px;
}

.sheet-confirm {
    flex: 1;
    width: auto;
    font-variant-numeric: tabular-nums;
}

select:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}

/* ==========================================================================
   9b. Feedback page
   ========================================================================== */

.feedback {
    max-width: 620px;
    padding-block: 20px 48px;
}

.feedback-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 600;
}

.feedback-back:hover {
    color: var(--accent);
}

.feedback-heading h1 {
    margin: 0 0 6px;
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.4rem);
    font-weight: 700;
    line-height: 1.15;
}

.feedback-heading p {
    margin: 0 0 22px;
    color: var(--muted);
}

.feedback-card {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    background: #101212;
}

@media (max-width: 559px) {
    .feedback-card {
        padding: 18px 16px;
    }
}

.feedback-group {
    margin: 0 0 18px;
    padding: 0;
    border: 0;
}

.feedback-group legend {
    margin-bottom: 10px;
    padding: 0;
    font-size: 14px;
    font-weight: 600;
}

/* How they ordered: three pills, one picked. */
.feedback-choices {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.feedback-choice {
    position: relative;
    cursor: pointer;
}

.feedback-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-choice span {
    display: block;
    padding: 12px 8px;
    border: 1px solid var(--line-strong);
    border-radius: 999px;
    background: var(--surface);
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.feedback-choice:hover span {
    border-color: var(--accent);
}

.feedback-choice input:checked + span {
    border-color: var(--accent);
    background: var(--accent);
    color: var(--on-accent);
}

.feedback-choice input:focus-visible + span {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.feedback-hint {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.feedback-hint.is-found {
    color: var(--accent);
}

/* Every star up to the picked one lights up; hovering previews the same. */
.feedback-stars {
    display: flex;
    gap: 6px;
}

.feedback-star {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    color: var(--line-strong);
    font-size: 34px;
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
}

.feedback-star:has(input:checked),
.feedback-star:has(~ .feedback-star input:checked) {
    color: #FFC247;
}

@media (hover: hover) {
    .feedback-stars:hover .feedback-star {
        color: var(--line-strong);
    }

    .feedback-stars .feedback-star:hover,
    .feedback-stars .feedback-star:has(~ .feedback-star:hover) {
        color: #FFC247;
    }

    .feedback-star:hover {
        transform: scale(1.08);
    }
}

.feedback-star:has(input:focus-visible) {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.feedback-card .cart-checkout {
    margin-top: 6px;
}

.feedback-done {
    padding-block: 40px;
    text-align: center;
}

.feedback-done > i {
    display: grid;
    place-items: center;
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 46px;
}

.feedback-done h1 {
    margin: 0 0 8px;
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
}

.feedback-done p {
    margin: 0 0 24px;
    color: var(--muted);
}

.feedback-done .cart-checkout {
    display: block;
    text-align: center;
}

/* ==========================================================================
   10. Arabic
   ========================================================================== */

/* Tajawal first, so the Latin letters and figures on the page sit with the
   Arabic around them. */
:root[dir="rtl"] {
    --font-body: 'Tajawal', 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
}

/* Arabic letters join up: spacing them out, the way the English capitals are,
   pulls every word apart. */
[dir="rtl"] .category-tab,
[dir="rtl"] .dish-tag,
[dir="rtl"] .dish-add,
[dir="rtl"] .cart-bar-label,
[dir="rtl"] .cart-checkout,
[dir="rtl"] .checkout-code-apply,
[dir="rtl"] .sheet-section-title {
    letter-spacing: 0;
}

/* The fades say there is more on the side the row carries on to. */
[dir="rtl"] .category-nav::before {
    background: linear-gradient(to left, var(--bg) 30%, rgba(12, 14, 14, 0));
}

[dir="rtl"] .category-nav::after {
    background: linear-gradient(to right, var(--bg) 30%, rgba(12, 14, 14, 0));
}

/* Arrows point the way the page reads. */
[dir="rtl"] .category-arrow svg,
[dir="rtl"] .cart-back svg,
[dir="rtl"] .feedback-back svg {
    transform: scaleX(-1);
}

/* The cart comes in from the left, the side a right-to-left page ends on. */
[dir="rtl"] .cart {
    box-shadow: 24px 0 48px -24px rgba(0, 0, 0, 0.8);
    transform: translateX(-100%);
}

[dir="rtl"] .cart.is-open {
    transform: none;
}
