/**
 * Guest food menu on big screens (>= 1024px): category sidebar, photo cards, order panel,
 * wide dish popup. Every rule is inside a media query; the hidden-by-default rules for the
 * panel, size buttons and add-button total live in css/food-menu.css (loaded on every menu template).
 */

@media (min-width: 1024px) {
    body.saigon-desktop-menu .ast-container {
        max-width: none;
        padding: 0;
    }

    body.saigon-desktop-menu #primary {
        display: grid;
        grid-template-columns: 220px minmax(0, 1fr) 340px;
        grid-auto-flow: row dense;
        column-gap: 28px;
        align-items: start;
        padding-inline: 32px;
        padding-bottom: 48px;
    }

    body.saigon-desktop-menu #primary > * {
        grid-column: 1 / -1;
        min-width: 0;
    }

    body.saigon-desktop-menu #primary > .menu-top-header {
        margin-inline: -32px;
    }

    /* The "no table number" band is a child of #primary, so without this it sits inside the
       32px page padding while the white bar above it runs edge to edge: a red rectangle with
       a step at both ends. Full-bleed, left-aligned on the same 32px as the logo. */
    body.saigon-desktop-menu #primary > .menu-top-header-warning {
        margin-inline: -32px;
        justify-content: flex-start;
        padding: 10px 32px;
        font-size: 14px;
    }

    body.saigon-desktop-menu #primary > .menu-top-header-warning .menu-top-header-warning-icon {
        flex: 0 0 auto;
    }

    /* No drop shadow: the cards below are positioned, so they paint over it halfway across
       and the shadow reads as a grey strip that stops in the middle of the page. */
    body.saigon-desktop-menu #primary > .menu-top-header-warning {
        box-shadow: none;
    }

    /* Category sidebar */
    body.saigon-desktop-menu #primary > #menu-bar {
        grid-column: 1;
        grid-row: span 3;
        position: sticky !important;
        top: calc(var(--saigon-menu-header-h, 0px) + 24px) !important;
        max-height: calc(100vh - var(--saigon-menu-header-h, 0px) - 48px);
        max-height: calc(100dvh - var(--saigon-menu-header-h, 0px) - 48px);
        overflow-y: auto;
        margin-top: 24px;
        padding: 0 16px 0 0;
        background: transparent;
        box-shadow: none;
        border: 0;
        border-right: 1px solid var(--so-ln-eef0f2);
        z-index: 5;
    }

    body.saigon-desktop-menu #menu-bar .menu-scroll-wrapper {
        position: static;
    }

    body.saigon-desktop-menu #menu-bar .menu-scroll-arrow {
        display: none !important;
    }

    body.saigon-desktop-menu #menu-bar #menu-scroll-container {
        display: flex;
        flex-direction: column;
        flex-wrap: nowrap;
        gap: 2px;
        max-width: none;
        margin: 0;
        padding: 0;
        overflow: visible;
    }

    body.saigon-desktop-menu #menu-bar .menu-link {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        gap: 10px;
        width: 100%;
        margin: 0;
        padding: 8px 12px;
        border-radius: 10px;
        text-align: left;
        white-space: normal;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.45;
        color: var(--so-fg-374151);
    }

    body.saigon-desktop-menu #menu-bar .menu-link:hover {
        background: var(--so-pg-f3f4f6);
    }

    body.saigon-desktop-menu #menu-bar .menu-link.active {
        background: var(--brand-primary, #c41e3a);
        color: var(--so-fg-ffffff);
    }

    body.saigon-desktop-menu #menu-bar .menu-link .saigon-desktop-count {
        flex: none;
        font-weight: 500;
        font-variant-numeric: tabular-nums;
        color: var(--so-fg-9aa1ab);
    }

    body.saigon-desktop-menu #menu-bar .menu-link.active .saigon-desktop-count {
        color: var(--so-fg-ffd9df);
    }

    /* Middle column */
    body.saigon-desktop-menu #primary > .saigon-lunch-tile,
    body.saigon-desktop-menu #primary > .saigon-promo-carousel,
    body.saigon-desktop-menu #primary > #menu-diet-filters,
    body.saigon-desktop-menu #primary > main.menu-content {
        grid-column: 2;
    }

    body.saigon-desktop-menu #primary > #menu-diet-filters {
        position: static !important;
        left: auto !important;
        right: auto !important;
        width: auto !important;
        z-index: auto;
        display: flex;
        align-items: center;
        justify-content: flex-end;
        gap: 16px;
        margin: 0;
        padding-block: 18px 12px;
        border: 0;
        background: var(--so-pg-ffffff);
        box-shadow: none;
    }

    /* Tools row: each section now carries its own heading above its cards, so the name here
       would be the same words twice on the screen. Only the diet pills are left. */
    body.saigon-desktop-menu #menu-diet-filters .saigon-desktop-tools-title {
        display: none;
        align-items: baseline;
        gap: 10px;
        min-width: 0;
        font-size: 22px;
        font-weight: 800;
        line-height: 1.45;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu #menu-diet-filters .saigon-desktop-tools-name {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.saigon-desktop-menu #menu-diet-filters .saigon-desktop-tools-count,
    body.saigon-desktop-menu .menu-form-category-title .saigon-desktop-title-count {
        flex: none;
        font-size: 13px;
        font-weight: 600;
        letter-spacing: 0;
        text-transform: none;
        color: var(--so-fg-8a919c);
    }

    body.saigon-desktop-menu #menu-diet-filters .menu-diet-filters-inner {
        flex: none;
        justify-content: flex-end;
        gap: 8px;
        margin-left: auto;
        padding: 0;
        overflow: visible;
    }

    body.saigon-desktop-menu #menu-diet-filters .menu-diet-pill {
        gap: 0;
        min-height: 0;
        padding: 4px 11px;
        border: 1px solid var(--so-ln-dfe2e6);
        background: var(--so-pg-ffffff);
        box-shadow: none;
        transform: none;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.45;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu #menu-diet-filters .menu-diet-pill:hover {
        border-color: var(--so-ln-9aa1ab);
    }

    body.saigon-desktop-menu #menu-diet-filters .menu-diet-pill[aria-pressed="true"] {
        border-color: var(--brand-primary, #c41e3a);
        background: var(--brand-primary, #c41e3a);
        color: var(--so-fg-ffffff);
    }

    body.saigon-desktop-menu #menu-diet-filters .menu-diet-pill-icon {
        display: none;
    }

    body.saigon-desktop-menu #menu-diet-filters .menu-diet-pill-label {
        line-height: inherit;
    }

    body.saigon-desktop-menu #primary > main.menu-content {
        max-width: none;
        margin: 0;
        padding: 0 !important;
    }

    /* Order panel column (filled in Task 6) */
    body.saigon-desktop-menu #primary > #saigon-desktop-cart {
        grid-column: 3;
        grid-row: span 3;
    }

    /* Closed or browsing while closed: no ordering, menu takes the extra width */
    body.saigon-desktop-menu.saigon-store-browsing #primary > #saigon-desktop-cart,
    body.saigon-desktop-menu.saigon-store-closed #primary > #saigon-desktop-cart {
        display: none !important;
    }

    body.saigon-desktop-menu.saigon-store-browsing #primary > .saigon-lunch-tile,
    body.saigon-desktop-menu.saigon-store-browsing #primary > .saigon-promo-carousel,
    body.saigon-desktop-menu.saigon-store-browsing #primary > #menu-diet-filters,
    body.saigon-desktop-menu.saigon-store-browsing #primary > main.menu-content {
        grid-column: 2 / -1;
    }
}

@media (min-width: 1024px) {
    /* Dish cards: categories with at least one photo */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
        border: 0;
        border-radius: 0;
        overflow: visible;
        /* !important: food-menu.css .menu-form-list surface background is !important */
        background: transparent !important;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-subcategory-title {
        grid-column: 1 / -1;
    }

    /* One grid per card: the text on the left, the photo as a square beside it, and the
       price with the add button (or "Choose options") on the last line. Kept at the height
       of the older menu so a screen holds far more dishes than a photo-on-top card does.
       The wrappers become display: contents so their parts can be placed in that grid. */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row {
        position: relative;
        display: grid;
        grid-template-columns: 14px minmax(0, 1fr) auto 116px 14px;
        grid-template-areas:
            ". name name media ."
            ". desc desc media ."
            ". tags tags media ."
            ". badge badge media ."
            ". price action media .";
        align-content: center;
        gap: 0;
        min-height: 0;
        padding: 12px 0;
        border: 1px solid var(--so-ln-eceef0) !important;
        border-radius: 14px;
        overflow: hidden;
        background: var(--so-pg-ffffff) !important;
        box-shadow: none;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row > .menu-form-row-main,
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-copy,
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-heading,
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row > .menu-form-row-aside {
        display: contents;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-media {
        grid-area: media;
        position: relative;
        align-self: center;
        justify-self: end;
        width: 104px;
        height: auto;
        aspect-ratio: 1 / 1;
        margin: 0;
        border-radius: 10px;
        overflow: hidden;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-visual-shade {
        display: none;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-name {
        grid-area: name;
        margin: 0;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.3;
        letter-spacing: 0;
        text-wrap: wrap;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu .menu-form-row-name .saigon-desktop-name-sub {
        display: block;
        margin-top: 1px;
        font-size: 13px;
        font-weight: 500;
        line-height: 1.45;
        color: var(--so-fg-6b7280);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-description {
        grid-area: desc;
        margin: 4px 0 0;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        font-size: 13px;
        line-height: 1.45;
        color: var(--so-fg-6b7280);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-tags {
        grid-area: tags;
        margin: 6px 0 0;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-out-of-stock-badge,
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-availability-badge {
        grid-area: badge;
        justify-self: start;
        margin: 6px 0 0;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-price {
        grid-area: price;
        align-self: center;
        margin: 6px 12px 0 0;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.45;
        font-variant-numeric: tabular-nums;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-price * {
        font-size: inherit;
        font-weight: inherit;
    }

    /* Lunch deal mains have no price of their own: "side included" takes the price slot. */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-deal-note {
        grid-area: price;
        align-self: center;
        margin: 6px 12px 0 0;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.45;
        color: var(--so-fg-4b5563);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-customize {
        grid-area: action;
        align-self: center;
        justify-self: end;
        margin: 6px 0 0;
        opacity: 1;
        font-size: 12px;
        font-weight: 700;
        letter-spacing: 0;
        line-height: 1.45;
        color: var(--brand-primary, #c41e3a);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-customize:hover {
        text-decoration: underline;
    }

    /* Add button / − qty + in the footer, never on the photo */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-controls {
        grid-area: action;
        align-self: center;
        justify-self: end;
        position: static;
        inset: auto;
        display: flex;
        align-items: center;
        gap: 8px;
        margin: 10px 0 0;
        padding: 0;
        border-radius: 0;
        background: transparent;
        pointer-events: auto;
    }

    /* Dishes with choices show "Choose options" until they are in the order */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row[data-requires-modal="1"] .menu-form-qty-controls.is-zero,
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row:has(.menu-form-qty-controls:not(.is-zero)) .menu-form-row-customize {
        display: none;
    }

    /* !important: food-menu.css positions, fades and scales these buttons (hover / touch states) */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-btn {
        position: static !important;
        width: 30px;
        height: 30px;
        min-width: 0;
        margin: 0;
        padding: 0;
        border: 1px solid var(--so-ln-dfe2e6);
        border-radius: 50%;
        background: var(--so-pg-ffffff);
        box-shadow: none !important;
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        font-size: 16px;
        font-weight: 700;
        line-height: 1;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-btn.menu-form-qty-plus {
        border-color: var(--brand-primary, #c41e3a);
        background: var(--brand-primary, #c41e3a);
        color: var(--so-fg-ffffff);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-controls.is-zero .menu-form-qty-plus {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-btn:hover,
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-btn:focus-visible {
        border-color: var(--so-ln-9aa1ab);
        background: var(--so-pg-f9fafb);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-btn.menu-form-qty-plus:hover,
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-btn.menu-form-qty-plus:focus-visible {
        border-color: var(--brand-primary-dark, #991b1b);
        background: var(--brand-primary-dark, #991b1b);
        color: var(--so-fg-ffffff);
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-btn:focus-visible {
        outline: 2px solid var(--so-ln-1f2937);
        outline-offset: 2px;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-qty-display {
        position: static !important;
        min-width: 18px;
        height: auto;
        padding: 0;
        border-radius: 0;
        background: transparent;
        transform: none !important;
        pointer-events: none !important;
        font-size: 15px;
        font-weight: 800;
        line-height: 1.45;
        text-align: center;
        font-variant-numeric: tabular-nums;
        color: var(--so-fg-1f2937);
    }

    /* A dish without its own photo inside a photo category: text card at its natural height */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row:not(.menu-form-row--with-image) {
        align-self: start;
    }

    /* A card without a photo: no empty square, the text uses the whole card. Rows are as
       tall as their text now, so nothing tears open the way it did with photos on top. */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row .menu-form-row-media--placeholder {
        display: none;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row:not(.menu-form-row--with-image) {
        grid-template-columns: 14px minmax(0, 1fr) auto 0 14px;
    }

    /* Categories without any photo: compact three-column text rows */
    body.saigon-desktop-menu .menu-form-list:not(:has(.menu-form-row--with-image)) {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        border-left: 0;
        background: var(--so-pg-ffffff) !important;
    }

    /* The 2-column zebra and odd-row right border do not fit three columns: plain white rows,
       one left rule per cell (the first column's rule doubles as the list edge). */
    body.saigon-desktop-menu .menu-form-list:not(:has(.menu-form-row--with-image)) > .menu-form-row,
    body.saigon-desktop-menu .menu-form-list:not(:has(.menu-form-row--with-image)) > .menu-form-row:nth-child(n) {
        min-height: 84px;
        border-right: 0;
        border-left: 1px solid var(--saigon-surface-border, var(--color-border));
        background: var(--so-pg-ffffff) !important;
    }

    body.saigon-desktop-menu .menu-form-list:not(:has(.menu-form-row--with-image)) > .menu-form-row:hover {
        background: var(--so-pg-fcfcfd) !important;
    }

    /* Keep the "in cart" highlight (food-menu.css .menu-row-selected) over the white overrides above */
    body.saigon-desktop-menu .menu-form-list > .menu-form-row.menu-row-selected:nth-child(n) {
        background: var(--brand-primary-light) !important;
    }

    /* Photo cards stay white in the order; a soft maroon edge and the − qty + footer mark them */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) > .menu-form-row.menu-row-selected:nth-child(n) {
        border-color: var(--so-ln-f2d3d8) !important;
        background: var(--so-pg-ffffff) !important;
        box-shadow: none;
    }

    body.saigon-desktop-menu .menu-form-list:not(:has(.menu-form-row--with-image)) > .menu-form-subcategory-title {
        border-left: 1px solid var(--saigon-surface-border, var(--color-border));
    }
}

@media (min-width: 1024px) {
    /* Order panel: always-visible cart in the right column */
    body.saigon-desktop-menu #saigon-desktop-cart {
        display: flex;
        flex-direction: column;
        position: sticky;
        top: calc(var(--saigon-menu-header-h, 0px) + 24px);
        max-height: calc(100vh - var(--saigon-menu-header-h, 0px) - 48px);
        max-height: calc(100dvh - var(--saigon-menu-header-h, 0px) - 48px);
        margin-top: 24px;
        background: var(--so-pg-ffffff);
        border: 1px solid var(--so-ln-eceef0);
        border-radius: 16px;
        box-shadow: 0 10px 30px var(--so-sh-0f172a-a06);
        overflow: hidden;
    }

    /* The split bill prompt (position: fixed) lives inside the cart body; the sticky panel is its
       stacking context, so lift the panel above the sticky header, sidebar and diet bar while it shows. */
    body.saigon-desktop-menu #saigon-desktop-cart:has(.saigon-split-bill-overlay.is-visible) {
        z-index: 100010;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot {
        flex: 1 1 auto;
        min-height: 120px;
        overflow-y: auto;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        max-height: none;
        overflow: visible;
        padding: 18px 18px 8px;
        color: var(--so-fg-0f172a);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body > * {
        flex: 0 0 100%;
        min-width: 0;
    }

    /* Title with the table chip on the right */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body > .cart-modal-title {
        flex: 1 1 auto;
        position: static;
        width: auto;
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
        font-size: 18px;
        font-weight: 700;
        line-height: 1.3;
        text-align: left;
        color: var(--so-fg-0f172a);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body > .cart-modal-table {
        flex: 0 0 auto;
        display: inline-flex;
        align-items: center;
        gap: 4px;
        margin: 0 0 0 10px;
        padding: 4px 12px;
        border: 1px solid var(--so-ln-fecdd3);
        border-radius: 999px;
        background: var(--brand-primary-light, #fff1f2);
        color: var(--brand-primary, #c41e3a);
        font-size: 13px;
        font-weight: 500;
        line-height: 1.3;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body > .cart-modal-table span {
        margin: 0;
        padding: 0;
        color: inherit;
        font-size: inherit;
        font-weight: inherit;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body > .cart-modal-error {
        margin-top: 10px;
    }

    /* Empty cart */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .saigon-empty-cart {
        margin: 14px 0 6px;
        padding: 18px 8px;
        text-align: center;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .saigon-empty-cart-icon {
        margin: 0 auto 8px;
        color: var(--so-fg-cbd5e1);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .saigon-empty-cart-icon svg {
        width: 32px;
        height: 32px;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .saigon-empty-cart-title {
        margin: 0 0 4px;
        font-size: 14px;
        font-weight: 600;
        color: var(--so-fg-334155);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .saigon-empty-cart-desc {
        margin: 0;
        font-size: 13px;
        color: var(--so-fg-64748b);
    }

    /* Item lines: quantity | name + details | price, with a small minus / plus under the price */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-item-list {
        margin: 14px 0 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-category-section {
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-category-header {
        display: none;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-item {
        display: grid;
        grid-template-columns: 34px minmax(0, 1fr) auto;
        column-gap: 6px;
        row-gap: 2px;
        align-items: start;
        margin: 0;
        padding: 7px 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-thumb {
        display: none;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-details,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-quantity {
        display: contents;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-title {
        grid-column: 2;
        grid-row: 1;
        margin: 0;
        font-size: 14px;
        font-weight: 500;
        line-height: 1.35;
        color: var(--so-fg-0f172a);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-title-secondary,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-addons {
        grid-column: 2;
        margin: 0;
        padding: 0;
        font-size: 12px;
        line-height: 1.4;
        color: var(--so-fg-64748b);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-addons .cart-item-addon-line:not(.cart-item-addon-line--side),
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-addons .cart-item-addon-line:not(.cart-item-addon-line--side) * {
        margin: 0;
        font-size: 12px;
        font-weight: 400;
        color: var(--so-fg-64748b);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-price {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
        margin: 0;
        font-size: 14px;
        font-weight: 700;
        line-height: 1.35;
        white-space: nowrap;
        color: var(--so-fg-0f172a);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-price * {
        font-size: inherit;
        font-weight: inherit;
        color: inherit;
    }

    /* !important: menu-modal.css styles .cart-quantity-input with !important */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-input {
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        width: 20px !important;
        height: auto;
        margin: 0;
        text-align: right !important;
        font-size: 14px !important;
        line-height: 1.35;
        color: var(--brand-primary, #c41e3a) !important;
        pointer-events: none;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-input::-webkit-inner-spin-button,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-input::-webkit-outer-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-quantity::after {
        content: "\00D7";
        grid-column: 1;
        grid-row: 1;
        justify-self: start;
        margin-left: 21px;
        font-size: 13px;
        font-weight: 700;
        line-height: 1.45;
        color: var(--brand-primary, #c41e3a);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-btn {
        grid-column: 3;
        grid-row: 2;
        align-self: start;
        justify-self: end;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 24px;
        height: 24px;
        min-width: 0;
        min-height: 0;
        margin: 2px 0 0;
        padding: 0;
        border: 1px solid var(--so-ln-e2e8f0) !important;
        border-radius: 999px;
        /* !important: menu-modal.css paints the quantity buttons with !important */
        background: var(--so-pg-ffffff) !important;
        box-shadow: none;
        font-size: 15px;
        font-weight: 600;
        line-height: 1;
        color: var(--so-fg-475569) !important;
        cursor: pointer;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-btn.cart-quantity-minus {
        margin-right: 30px;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-btn:hover {
        border-color: var(--brand-primary, #c41e3a) !important;
        background: var(--so-pg-ffffff) !important;
        color: var(--brand-primary, #c41e3a) !important;
    }

    /* Totals */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-totals-section {
        position: static;
        z-index: auto;
        margin: 10px 0 0;
        padding: 12px 0 0;
        border: 0;
        border-top: 1px dashed var(--so-ln-e2e8f0);
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-totals-row {
        display: flex;
        justify-content: space-between;
        align-items: baseline;
        margin: 0;
        padding: 2px 0;
        font-size: 13px;
        color: var(--so-fg-475569);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-totals-row.cart-totals-final {
        font-size: 17px;
        font-weight: 700;
        color: var(--so-fg-0f172a);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-totals-final .cart-total-amount,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-totals-final .cart-total-amount * {
        font-size: 18px;
        font-weight: 700;
        color: var(--so-fg-0f172a);
    }

    /* Order note, kept compact */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-order-notes {
        position: static;
        z-index: auto;
        margin: 12px 0 0;
        padding: 0;
        border: 0;
        background: transparent;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-order-notes-label {
        display: block;
        margin: 0 0 4px;
        font-size: 12px;
        font-weight: 600;
        color: var(--so-fg-64748b);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-order-notes-input {
        display: block;
        width: 100%;
        min-height: 40px;
        height: 40px;
        margin: 0;
        padding: 9px 12px;
        border: 1px solid var(--so-ln-e2e8f0);
        border-radius: 10px;
        background: var(--so-pg-ffffff);
        font-size: 13px;
        line-height: 1.4;
        resize: vertical;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-order-notes-input:focus {
        border-color: var(--brand-primary, #c41e3a);
        outline: none;
        box-shadow: 0 0 0 3px var(--brand-primary-light, #fff1f2);
    }

    /* Place order */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-actions {
        position: sticky;
        bottom: 0;
        z-index: 2;
        /* Own compositing layer: without it Chromium bleeds the pill colour onto the box edges. */
        will-change: transform;
        margin: 6px 0 0;
        padding: 8px 0;
        border: 0;
        background: var(--so-pg-ffffff);
        box-shadow: none;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-buttons {
        display: flex;
        flex-direction: column;
        gap: 10px;
        margin: 0;
        padding: 0;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-payment-choice {
        margin: 0;
        padding: 0;
        border: 0;
        background: transparent;
        font-size: 12px;
        color: var(--so-fg-64748b);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-checkout-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 10px 18px;
        border: 0;
        border-radius: 999px;
        background: var(--brand-primary, #c41e3a);
        box-shadow: none;
        font-size: 15px;
        font-weight: 700;
        line-height: 1.25;
        text-align: center;
        text-decoration: none;
        color: var(--so-fg-ffffff);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-checkout-btn:hover {
        background: var(--brand-primary-dark, #991b1b);
        color: var(--so-fg-ffffff);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-checkout-btn:disabled {
        opacity: 0.55;
        cursor: not-allowed;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-checkout-btn svg {
        display: none;
    }

    /* Call service / order history under the cart */
    body.saigon-desktop-menu .saigon-desktop-cart-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
        padding: 0 18px 18px;
        border: 0;
    }

    /* !important: food-menu.css styles .saigon-request-service-btn--bar almost entirely with !important */
    body.saigon-desktop-menu .saigon-desktop-cart-actions > * {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100%;
        min-width: 0;
        min-height: 46px;
        margin: 0;
        padding: 10px 18px !important;
        border: 1px solid var(--so-ln-e2e8f0) !important;
        border-radius: 999px !important;
        background: var(--so-pg-ffffff) !important;
        box-shadow: none !important;
        font-size: 15px !important;
        font-weight: 600 !important;
        letter-spacing: 0 !important;
        text-transform: none !important;
        line-height: 1.25 !important;
        white-space: nowrap !important;
        color: var(--so-fg-0f172a) !important;
    }

    body.saigon-desktop-menu .saigon-desktop-cart-actions > *:hover {
        border-color: var(--so-ln-cbd5e1) !important;
        background: var(--so-pg-f8fafc) !important;
        color: var(--so-fg-0f172a) !important;
    }

    body.saigon-desktop-menu .saigon-desktop-cart-actions > * svg {
        display: none;
    }

    /* The order panel replaces the bottom cart bar on big screens. */
    body.saigon-desktop-menu .sticky-cart-footer-wrapper {
        display: none !important;
    }
}

/* ---------------------------------------------------------------------------
   Task 7: wide dish popup (photo left, choices right) on big screens.
   --------------------------------------------------------------------------- */

@media (min-width: 1024px) {
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) {
        width: min(980px, 92vw);
        max-width: none;
        height: min(620px, 88vh);
        max-height: none;
        border: 0;
        border-radius: 20px;
        overflow: hidden;
    }

    /* The body scrolls instead of the window, so the round close button stays in the corner. */
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) > #food-modal-body {
        height: 100%;
        overflow-y: auto;
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: var(--so-ln-d1d5db) transparent;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-drag-handle {
        display: none;
    }

    /* A dish with nothing to choose carries only a title, a line of description and the
       add bar - around 210px. In the fixed window that leaves some 400px of white, so
       those popups follow their content. The floor keeps the photo worth looking at.
       Dishes with options or a portion size keep the tall window. */
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active):not(:has(.so-addons-section)):not(:has(.variations)) {
        height: auto;
        max-height: min(620px, 88vh);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active):not(:has(.so-addons-section)):not(:has(.variations)) > #food-modal-body {
        height: auto;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active):not(:has(.so-addons-section)):not(:has(.variations)) .so-modal-inner:not(.so-modal-inner--no-image) {
        min-height: 340px;
    }

    /* Photo column: pinned to the non-scrolling window; the choices column scrolls beside it. */
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner:not(.so-modal-inner--no-image) {
        display: flex;
        flex-direction: column;
        flex: none;
        height: auto;
        min-height: 100%;
        margin-left: 460px;
        padding: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner:not(.so-modal-inner--no-image) > * {
        margin-inline: 10px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner:not(.so-modal-inner--no-image) > .so-modal-img-wrap {
        position: absolute;
        top: 0;
        left: 0;
        bottom: 0;
        margin: 0;
        padding: 0;
        width: 460px;
        height: 100%;
        max-height: none;
        --so-modal-image-height: min(620px, 88vh);
    }

    /* Short dishes: the add bar still sits at the bottom of the window. */
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner > form.cart {
        display: flex;
        flex: 1 0 auto;
        flex-direction: column;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner > form.cart > .saigon-modal-total-bar {
        margin-top: auto;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner:not(.so-modal-inner--no-image) > .so-modal-img-wrap::after {
        inset: 0;
        border-radius: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-img-wrap .so-modal-img {
        width: 100% !important;
        max-width: none !important;
        height: 100% !important;
        margin: 0 !important;
        border-radius: 0;
        object-fit: cover;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-img-wrap--contain .so-modal-img,
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-img-wrap--adaptive-contain .so-modal-img {
        object-fit: contain;
        padding: 32px;
        background: var(--so-pg-ffffff);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner > .so-modal-header {
        margin-top: 28px;
        padding-top: 0;
        padding-right: 64px;
        padding-bottom: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image {
        display: flex;
        flex-direction: column;
        flex: none;
        min-height: 100%;
        max-width: 640px;
        margin: 0 auto;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-modal-total-bar {
        margin-inline: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-addons-list {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) table.variations select.has-saigon-buttons {
        position: absolute;
        width: 1px;
        height: 1px;
        opacity: 0;
        pointer-events: none;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-variation-buttons {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-variation-button {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 14px;
        border: 2px solid var(--so-ln-e5e7eb);
        border-radius: 12px;
        background: var(--so-pg-ffffff);
        color: var(--so-fg-0f172a);
        font: inherit;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-variation-button.is-selected {
        border-color: var(--saigon-button-background, #c41e3a);
        background: var(--so-pg-fbeef0);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-variation-button:focus-visible {
        outline: 3px solid var(--so-ln-1f2937);
        outline-offset: 2px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-modal-add-total:not(:empty) {
        display: inline;
        margin-left: auto;
    }
    /* Concept fidelity: title with the second name on a grey line, no price range in the header. */
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner:not(.so-modal-inner--no-image) > .so-modal-header,
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image > .so-modal-header {
        display: block;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-header .so-modal-price {
        display: none;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-title {
        font-size: 26px;
        line-height: 1.2;
        font-weight: 700;
        color: var(--so-fg-111827);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-title .saigon-modal-title-sep {
        display: none;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-title .saigon-modal-title-sub {
        display: block;
        margin-top: 2px;
        font-size: 17px;
        line-height: 1.3;
        font-weight: 400;
        color: var(--so-fg-6b7280);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner > .so-modal-header {
        margin-bottom: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) #food-modal-close {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        background: var(--so-pg-f1f3f5);
        font-size: 20px;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-desc {
        margin-top: 10px;
        padding-top: 0;
        color: var(--so-fg-6b7280);
        font-size: 15px;
        line-height: 1.5;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) table.variations th label,
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-addons-heading,
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-item-remark-label {
        margin-bottom: 8px;
        font-size: 14px;
        font-weight: 700;
        color: var(--so-fg-111827);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) table.variations {
        margin-bottom: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) table.variations td.value:has(> select.has-saigon-buttons)::after {
        display: none;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .single_variation_wrap {
        margin: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-variation-button {
        min-height: 46px;
        font-size: 15px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-addons-list {
        border: 0;
        border-radius: 0;
        overflow: visible;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-addons-list .so-addon-row {
        align-items: flex-start;
        gap: 8px;
        min-height: 40px;
        margin: 0;
        padding: 8px 12px;
        border: 1px solid var(--so-ln-e5e7eb);
        border-radius: 10px;
        background: var(--so-pg-ffffff);
        font-size: 14px;
        line-height: 1.5;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-addons-list .so-addon-row .so-addon-left {
        align-items: flex-start;
        gap: 8px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-addons-list .so-addon-row .so-addon-check {
        margin-top: 2px;
        flex: 0 0 auto;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-addons-list .so-addon-row .so-addon-price {
        flex: 0 0 auto;
        white-space: nowrap;
        color: var(--so-fg-111827);
        font-size: 14px;
        line-height: 1.5;
        font-weight: 500;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-item-remark-input {
        height: 56px;
        min-height: 56px;
        resize: none;
        border-color: var(--so-ln-e5e7eb);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-modal-total-bar {
        padding: 16px 0 18px;
        border-top: 1px solid var(--so-ln-f1f5f9);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-modal-total-bar .so-modal-footer-inner {
        padding: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .saigon-modal-total-actions .single_add_to_cart_button {
        flex: 1 1 auto;
    }
}

/* ---------------------------------------------------------------------------
   Task 7b: concept A fidelity (top bar, section titles, order panel details).
   js/menu-desktop.js moves the search field and table chip into the top bar and adds the counts.
   --------------------------------------------------------------------------- */
@media (min-width: 1024px) {
    /* Top bar: logo left, search centred, table chip + language pill right */
    /* The closed-store banner from the custom-store-hours plugin is sticky at top: 0 with
       z-index 9999, so it would cover this bar completely. It is a one-off notice, not
       something to follow the scroll: let it scroll away and keep the top bar pinned. */
    body.saigon-desktop-menu .my-store-closed-banner {
        position: static;
    }

    body.saigon-desktop-menu .my-store-closed-banner .my-store-closed-banner-inner {
        max-width: none;
        padding-inline: 32px;
    }

    /* Sticky: desktop-layout.js only measures --saigon-menu-header-h once this bar is
       sticky, and the sidebar and category jumps offset themselves by that value. */
    body.saigon-desktop-menu #primary > .menu-top-header {
        position: sticky;
        top: 0;
        z-index: 20;
        padding: 0;
        border-bottom: 1px solid var(--so-ln-eceef0);
        background: var(--so-pg-ffffff);
    }

    body.saigon-desktop-menu .menu-top-header-inner {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        align-items: center;
        gap: 24px;
        /* 63px + the 1px hairline = the 64px bar of the reference */
        height: 63px;
        max-width: none;
        padding: 0 32px;
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-top-header-logo {
        grid-column: 1;
        justify-self: start;
        display: flex;
        align-items: center;
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-top-header-logo img {
        max-height: 44px;
    }

    /* Which of the three restaurants this is: sits next to the logo, quiet enough not to
       compete with it. Hidden below 1024px, where the header has no room for it. */
    body.saigon-desktop-menu .menu-top-header-logo > .menu-top-header-branch {
        display: flex;
        flex-direction: column;
        gap: 1px;
        margin-left: 16px;
        padding-left: 16px;
        border-left: 1px solid var(--so-ln-e6e9ec);
        min-width: 0;
    }

    body.saigon-desktop-menu .menu-top-header-branch-name {
        font-size: 13px;
        font-weight: 700;
        line-height: 1.3;
        color: var(--so-fg-16221f);
    }

    body.saigon-desktop-menu .menu-top-header-branch-address {
        font-size: 12px;
        font-weight: 500;
        line-height: 1.3;
        color: var(--so-fg-6e7a75);
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search {
        grid-column: 2;
        display: flex;
        width: 280px;
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-toggle {
        display: none;
    }

    /* Always open on desktop, whatever the phone open / closed state says */
    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-field {
        width: 100%;
        height: 36px;
        opacity: 1;
        pointer-events: auto;
        transition: none;
    }

    /* The small magnifier circle of the reference, drawn with a border */
    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-field::before {
        content: "";
        position: absolute;
        top: 50%;
        left: 14px;
        box-sizing: border-box;
        width: 11px;
        height: 11px;
        border: 2px solid var(--so-ln-8a919c);
        border-radius: 50%;
        transform: translateY(-50%);
        pointer-events: none;
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-input {
        height: 100%;
        padding: 0 36px 0 33px;
        border: 1px solid var(--so-ln-dfe2e6);
        border-radius: 999px;
        background: var(--so-pg-ffffff);
        font-size: 13px;
        line-height: 1.45;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-input::placeholder {
        color: var(--so-fg-8a919c);
        opacity: 1;
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-input::-webkit-search-cancel-button {
        -webkit-appearance: none;
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-input:focus {
        border-color: var(--brand-primary, #c41e3a);
        box-shadow: 0 0 0 3px var(--so-sh-c41e3a-a12);
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-close {
        display: none;
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-diet-search .menu-diet-search-field:has(.menu-diet-search-input:not(:placeholder-shown)) .menu-diet-search-close {
        display: inline-flex;
        right: 6px;
    }

    body.saigon-desktop-menu.saigon-store-closed .menu-top-header-inner > .menu-diet-search {
        display: none;
    }

    body.saigon-desktop-menu .menu-top-header-inner > .menu-top-header-actions {
        grid-column: 3;
        justify-self: end;
        gap: 12px;
        margin-left: 0;
    }

    body.saigon-desktop-menu .menu-top-header-actions > .menu-current-table-banner {
        display: inline-flex;
        align-items: baseline;
        gap: 4px;
        padding: 5px 12px;
        border: 1px solid var(--so-ln-f2d3d8);
        border-radius: 999px;
        background: var(--so-pg-fbeef0);
        font-size: 13px;
        font-weight: 600;
        line-height: 1.45;
        white-space: nowrap;
        color: var(--so-fg-9e1b20);
    }

    body.saigon-desktop-menu .menu-top-header-actions > .menu-current-table-banner > span {
        margin: 0;
        font-size: inherit;
        font-weight: inherit;
        letter-spacing: 0;
        text-transform: none;
        line-height: inherit;
        color: inherit;
    }

    /* Language switcher as an outlined pill (GTranslate or the theme switcher) */
    body.saigon-desktop-menu .menu-top-header-lang a.gt_switcher-popup,
    body.saigon-desktop-menu .menu-top-header-lang .saigon-lang-toggle {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        min-height: 0;
        padding: 5px 12px;
        border: 1px solid var(--so-ln-dfe2e6);
        border-radius: 999px;
        background: var(--so-pg-ffffff);
        box-shadow: none;
        font-size: 13px;
        font-weight: 600;
        line-height: 1.45;
        text-decoration: none;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu .menu-top-header-lang a.gt_switcher-popup:hover,
    body.saigon-desktop-menu .menu-top-header-lang .saigon-lang-toggle:hover {
        border-color: var(--so-ln-9aa1ab);
    }

    body.saigon-desktop-menu .menu-top-header-lang a.gt_switcher-popup img,
    body.saigon-desktop-menu .menu-top-header-lang .saigon-lang-toggle svg {
        width: 18px;
        height: 18px;
        margin: 0;
    }

    body.saigon-desktop-menu .menu-top-header-lang a.gt_switcher-popup span {
        font-size: inherit;
        font-weight: inherit;
        color: inherit;
    }

    body.saigon-desktop-menu .menu-top-header-lang a.gt_switcher-popup > span[style],
    body.saigon-desktop-menu .menu-top-header-lang .saigon-lang-caret {
        display: none;
    }

    /* Category sections. The gap between sections is a margin, not padding, so a category
       jump lands on the heading itself: scroll-margin only counts the border box, and 32px
       of padding would push the heading that far below the sticky bar. */
    body.saigon-desktop-menu main.menu-content .menu-form-section {
        padding-top: 0;
        margin-top: 32px;
        scroll-margin-top: calc(var(--saigon-menu-header-h, 0px) + 12px);
    }

    body.saigon-desktop-menu main.menu-content > .menu-form-section:first-of-type {
        padding-top: 0;
        margin-top: 0;
    }

    body.saigon-desktop-menu main.menu-content .menu-form-category-title {
        display: flex;
        align-items: baseline;
        gap: 10px;
        margin: 0 0 14px;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        font-size: 22px;
        font-weight: 800;
        line-height: 1.45;
        letter-spacing: 0;
        text-transform: none;
        color: var(--so-fg-1f2937);
    }

    /* Each section names itself above its cards: the name with a red edge beside it. The row
       above the grid is no longer sticky, so these headings are the only thing telling you
       which part of the menu you are in while scrolling. */
    body.saigon-desktop-menu main.menu-content > .menu-form-section .menu-form-category-title {
        display: flex;
        align-items: center;
        gap: 12px;
        height: auto;
        margin: 10px 0 14px;
        padding: 2px 0 2px 14px;
        overflow: visible;
        visibility: visible;
        border-left: 5px solid var(--brand-primary, #c8102e);
        font-size: 21px;
        font-weight: 800;
        letter-spacing: -.01em;
        text-transform: none;
        color: var(--so-fg-16221f);
    }

    body.saigon-desktop-menu main.menu-content > .menu-form-section .menu-form-category-title .saigon-desktop-title-count {
        margin-left: auto;
        padding: 3px 10px;
        border-radius: 99px;
        background: var(--so-pg-f1f3f2);
        font-size: 12px;
        font-weight: 700;
        color: var(--so-fg-6e7a75);
    }

    body.saigon-desktop-menu .menu-form-list:not(:has(.menu-form-row--with-image)) {
        border: 1px solid var(--saigon-surface-border, var(--color-border));
        border-left: 0;
        border-radius: 14px;
        overflow: hidden;
    }

    /* Order panel details */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body > .cart-modal-title {
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body > .cart-modal-table {
        padding: 5px 12px;
        border-color: var(--so-ln-f2d3d8);
        background: var(--so-pg-fbeef0);
        font-weight: 600;
        color: var(--so-fg-9e1b20);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-input {
        font-weight: 800 !important;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-quantity::after {
        font-size: 13px;
        font-weight: 800;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-title,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-price {
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-totals-section {
        border-top-color: var(--so-ln-dfe2e6);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-totals-row.cart-totals-final,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-totals-final .cart-total-amount,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-totals-final .cart-total-amount * {
        font-size: 17px;
        font-weight: 800;
        font-variant-numeric: tabular-nums;
        color: var(--so-fg-1f2937);
    }

    body.saigon-desktop-menu .saigon-desktop-cart-actions > .saigon-request-service-btn {
        color: var(--so-fg-1f2937) !important;
    }

    /* Order history: a quiet text link under "Call service" */
    body.saigon-desktop-menu .saigon-desktop-cart-actions > .saigon-cart-history-btn {
        min-height: 0;
        padding: 2px 0 !important;
        border: 0 !important;
        background: transparent !important;
        font-size: 13px !important;
        color: var(--so-fg-5f6878) !important;
    }

    body.saigon-desktop-menu .saigon-desktop-cart-actions > .saigon-cart-history-btn:hover {
        border: 0 !important;
        background: transparent !important;
        text-decoration: underline;
        color: var(--so-fg-1f2937) !important;
    }

    body.saigon-desktop-menu .saigon-desktop-cart-actions > .saigon-cart-history-btn .saigon-cart-history-btn-icon {
        display: none;
    }

    body.saigon-desktop-menu .saigon-desktop-cart-allergy {
        margin: 0;
        padding: 0 18px 16px;
        font-size: 12px;
        line-height: 1.45;
        text-align: center;
        color: var(--so-fg-8a919c);
    }

    body.saigon-desktop-menu .saigon-desktop-cart-actions:has(+ .saigon-desktop-cart-allergy) {
        padding-bottom: 12px;
    }

    /* Takeout: the checkout link (a.cart-modal-checkout-btn from inc/ajax/menu.php) keeps the
       "Place order" pill look in every link state. */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-actions a.cart-modal-checkout-btn,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-actions a.cart-modal-checkout-btn:visited,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-actions a.cart-modal-checkout-btn:hover,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-actions a.cart-modal-checkout-btn:focus {
        text-decoration: none;
        color: var(--so-fg-ffffff);
        border-radius: 24px;
        clip-path: inset(0 round 24px);
    }

    /* Takeout pickup address: a quiet line above the allergy notice */
    body.saigon-desktop-menu .saigon-desktop-cart-pickup {
        margin: 0;
        padding: 0 18px 6px;
        font-size: 12px;
        line-height: 1.45;
        text-align: center;
        color: var(--so-fg-8a919c);
    }

    body.saigon-desktop-menu .saigon-desktop-cart-actions:has(+ .saigon-desktop-cart-pickup) {
        padding-bottom: 12px;
    }
}

@media (min-width: 1680px) {
    /* Very wide screens: a third column of the compact row */
    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    /* Tablet landscape (iPad): narrower sidebar and panel, two card columns */
    body.saigon-desktop-menu #primary {
        grid-template-columns: 180px minmax(0, 1fr) 300px;
        column-gap: 20px;
        padding-inline: 20px;
    }

    body.saigon-desktop-menu #primary > .menu-top-header {
        margin-inline: -20px;
    }

    body.saigon-desktop-menu #primary > .menu-top-header-warning {
        margin-inline: -20px;
        padding-inline: 20px;
    }

    body.saigon-desktop-menu .menu-form-list:has(.menu-form-row--with-image),
    body.saigon-desktop-menu .menu-form-list:not(:has(.menu-form-row--with-image)) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    body.saigon-desktop-menu .menu-top-header-inner {
        gap: 16px;
        padding: 0 20px;
    }

    /* Tools row: smaller category title and pills so the name is not cut off next to the pills */
    body.saigon-desktop-menu #primary > #menu-diet-filters {
        gap: 12px;
    }

    body.saigon-desktop-menu #menu-diet-filters .saigon-desktop-tools-title {
        gap: 8px;
        font-size: 19px;
    }

    body.saigon-desktop-menu #menu-diet-filters .menu-diet-filters-inner {
        gap: 6px;
    }

    body.saigon-desktop-menu #menu-diet-filters .menu-diet-pill {
        padding: 4px 9px;
    }

    /* Dish popup: smaller photo column so the options keep room */
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner:not(.so-modal-inner--no-image) {
        margin-left: 380px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner:not(.so-modal-inner--no-image) > .so-modal-img-wrap {
        width: 380px;
    }




}

/* ---------------------------------------------------------------------------
   Dishes without a photo: a compact popup as tall as its content, with the
   category and price as small labels above the title.
   --------------------------------------------------------------------------- */

@media (min-width: 1024px) {
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active):has(> #food-modal-body > .so-modal-inner--no-image) {
        width: min(600px, 92vw);
        height: auto;
        max-height: min(620px, 88vh);
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active):has(> #food-modal-body > .so-modal-inner--no-image) > #food-modal-body {
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image {
        min-height: 0;
        max-width: none;
        margin: 0;
        padding: 0 32px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image > form.cart {
        flex: 0 0 auto;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image > form.cart > .saigon-modal-total-bar {
        margin-top: 8px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image > .so-modal-header {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-start;
        gap: 10px 8px;
        margin-top: 32px;
        padding-right: 56px;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image > .so-modal-header > .so-modal-title,
    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image > .so-modal-header > .so-modal-title-stack {
        order: 2;
        flex: 1 0 100%;
        margin: 0;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image .saigon-desktop-cat-chip {
        order: 0;
        padding: 4px 12px;
        border-radius: 999px;
        background: var(--so-pg-fbeef0);
        color: var(--saigon-button-background, #c41e3a);
        font-size: 12px;
        font-weight: 700;
        line-height: 1.4;
        letter-spacing: 0.08em;
        text-transform: uppercase;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image .so-modal-header .so-modal-price {
        display: inline-block;
        order: 1;
        margin: 0;
        padding: 3px 12px;
        border-radius: 999px;
        background: var(--so-pg-fbeef0);
        color: var(--saigon-button-background, #c41e3a);
        font-size: 15px;
        font-weight: 700;
        line-height: 1.4;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image .so-modal-header .so-modal-price:empty {
        display: none;
    }

    body.saigon-desktop-menu #food-modal-content:not(.lunch-special-active) .so-modal-inner--no-image .so-modal-header .so-modal-price * {
        color: inherit;
        font-size: inherit;
        font-weight: inherit;
    }
}

/* ---------------------------------------------------------------------------
   Dish counts next to the categories are hidden (owner: not needed).
   --------------------------------------------------------------------------- */

@media (min-width: 1024px) {
    body.saigon-desktop-menu .saigon-desktop-count,
    body.saigon-desktop-menu .saigon-desktop-title-count,
    body.saigon-desktop-menu #menu-diet-filters .saigon-desktop-tools-count {
        display: none !important;
    }
}

/* ── Order panel only while the cart has dishes (js/menu-desktop-cart-motion.js sets
      body.saigon-desktop-cart-empty). Empty: the menu takes the panel's width; the panel slides
      out to the right, or, when it carries service / order history buttons, shrinks to a small
      floating dock with only those buttons. The first dish brings the panel back. ── */
@media (min-width: 1024px) {
    body.saigon-desktop-menu #primary {
        transition: grid-template-columns 0.55s cubic-bezier(0.22, 0.9, 0.3, 1), column-gap 0.55s cubic-bezier(0.22, 0.9, 0.3, 1);
    }

    body.saigon-desktop-menu.saigon-desktop-cart-empty:not(.saigon-store-browsing):not(.saigon-store-closed) #primary {
        grid-template-columns: 220px minmax(0, 1fr) 0px;
    }

    body.saigon-desktop-menu #primary > #saigon-desktop-cart {
        transition: transform 0.55s cubic-bezier(0.22, 0.9, 0.3, 1), opacity 0.35s ease, visibility 0s;
    }

    body.saigon-desktop-menu.saigon-desktop-cart-empty #primary > #saigon-desktop-cart {
        /* Stays inside the page padding: pushed further right it widens the page (sideways scroll). */
        transform: translateX(12px);
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: transform 0.45s cubic-bezier(0.55, 0, 0.75, 0.2), opacity 0.3s ease, visibility 0s linear 0.45s;
    }

    /* Empty, with service / order history buttons: a small dock in the corner
       (body class from js/menu-desktop-cart-motion.js, so it also works without :has()). */
    body.saigon-desktop-menu.saigon-desktop-cart-empty.saigon-desktop-cart-has-actions #primary > #saigon-desktop-cart {
        position: fixed;
        top: auto;
        right: 24px;
        bottom: 24px;
        z-index: 60;
        width: auto;
        max-height: none;
        margin: 0;
        border-radius: 999px;
        box-shadow: 0 12px 30px var(--so-sh-0f172a-a16);
        transform: none;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        animation: saigon-dock-in 0.4s cubic-bezier(0.22, 0.9, 0.3, 1);
    }

    body.saigon-desktop-menu.saigon-desktop-cart-empty.saigon-desktop-cart-has-actions #primary > #saigon-desktop-cart > *:not(.saigon-desktop-cart-actions) {
        display: none;
    }

    body.saigon-desktop-menu.saigon-desktop-cart-empty #saigon-desktop-cart .saigon-desktop-cart-actions {
        flex-direction: row;
        padding: 6px;
    }

    body.saigon-desktop-menu.saigon-desktop-cart-empty #saigon-desktop-cart .saigon-desktop-cart-actions > * {
        width: auto;
        min-height: 42px;
        padding: 8px 16px !important;
    }

    /* Pickup address and allergy sentence under the category list while the panel is away. */
    body.saigon-desktop-menu #menu-bar .saigon-desktop-menu-notes {
        display: none;
        margin: 18px 0 8px;
        padding: 14px 4px 0 0;
        border-top: 1px solid var(--so-ln-eef0f2);
        font-size: 12px;
        line-height: 1.45;
        color: var(--so-fg-8a919c);
    }

    body.saigon-desktop-menu #menu-bar .saigon-desktop-menu-notes p {
        margin: 0 0 8px;
    }

    body.saigon-desktop-menu.saigon-desktop-cart-empty:not(.saigon-store-browsing):not(.saigon-store-closed) #menu-bar .saigon-desktop-menu-notes {
        display: block;
    }

    /* Room freed by the panel: one more column of dish cards. */
    body.saigon-desktop-menu.saigon-desktop-cart-empty:not(.saigon-store-browsing):not(.saigon-store-closed) .menu-form-list:has(.menu-form-row--with-image) {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* First paint and a returning guest's filled cart: no slide, just the right state. */
    body.saigon-desktop-menu.saigon-desktop-cart-instant #primary,
    body.saigon-desktop-menu.saigon-desktop-cart-instant #primary > #saigon-desktop-cart {
        transition: none !important;
        animation: none !important;
    }

    /* The dish photo that flies into the panel after "+". */
    .saigon-cart-fly {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 100020;
        width: 72px;
        height: 72px;
        border-radius: 16px;
        object-fit: cover;
        box-shadow: 0 12px 28px var(--so-sh-0f172a-a28);
        pointer-events: none;
    }

    /* A line that just arrived or grew. */
    body.saigon-desktop-menu #saigon-desktop-cart-slot .cart-modal-item.saigon-cart-line-new {
        animation: saigon-cart-line-in 0.45s cubic-bezier(0.22, 0.9, 0.3, 1), saigon-cart-line-flash 1.2s ease-out;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot .cart-total-amount.saigon-cart-total-pulse {
        display: inline-block;
        animation: saigon-cart-pop 0.4s cubic-bezier(0.3, 1.6, 0.5, 1);
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    body.saigon-desktop-menu.saigon-desktop-cart-empty:not(.saigon-store-browsing):not(.saigon-store-closed) #primary {
        grid-template-columns: 180px minmax(0, 1fr) 0px;
    }

    body.saigon-desktop-menu.saigon-desktop-cart-empty:not(.saigon-store-browsing):not(.saigon-store-closed) .menu-form-list:has(.menu-form-row--with-image) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1680px) {
    body.saigon-desktop-menu.saigon-desktop-cart-empty:not(.saigon-store-browsing):not(.saigon-store-closed) .menu-form-list:has(.menu-form-row--with-image) {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@keyframes saigon-dock-in {
    from { opacity: 0; transform: translateY(16px) scale(0.96); }
    to { opacity: 1; transform: none; }
}

@keyframes saigon-cart-line-in {
    from { opacity: 0; transform: translateX(24px); }
    to { opacity: 1; transform: none; }
}

@keyframes saigon-cart-line-flash {
    0% { background-color: var(--so-bg-fff3d6); }
    100% { background-color: transparent; }
}

@keyframes saigon-cart-pop {
    0% { transform: scale(1); }
    40% { transform: scale(1.12); }
    100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    body.saigon-desktop-menu #primary,
    body.saigon-desktop-menu #primary > #saigon-desktop-cart {
        transition: none !important;
        animation: none !important;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot .cart-modal-item.saigon-cart-line-new,
    body.saigon-desktop-menu #saigon-desktop-cart-slot .cart-total-amount.saigon-cart-total-pulse {
        animation: none !important;
    }
}

@media (min-width: 1024px) {
    /* Room under the last dishes so the corner dock never covers them. */
    body.saigon-desktop-menu.saigon-desktop-cart-empty #primary:has(> #saigon-desktop-cart .saigon-desktop-cart-actions > *) {
        padding-bottom: 104px;
    }
}

/* ── Order panel lines, v2 (owner pick A, 2026-10-10): photo, name on max. two lines, choices in
      grey, one − n + pill on the price row; the line list scrolls on its own so the total and the
      order button are always in view. Overrides the first panel block above. ── */
@media (min-width: 1024px) {
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-item-list {
        max-height: max(180px, calc(100vh - var(--saigon-menu-header-h, 0px) - 380px));
        max-height: max(180px, calc(100dvh - var(--saigon-menu-header-h, 0px) - 380px));
        overflow-y: auto;
        overscroll-behavior: contain;
        margin: 10px -6px 0;
        padding: 0 6px;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-item {
        grid-template-columns: 52px minmax(0, 1fr) auto;
        column-gap: 12px;
        row-gap: 3px;
        align-items: center;
        padding: 10px 0;
        border-top: 1px solid var(--so-ln-f1ece6);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-category-section:first-child .cart-modal-item:first-of-type {
        border-top: 0;
    }

    /* Sites without menu photos: no photo column. */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-item:not(:has(.cart-item-thumb)) {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-thumb {
        display: block;
        grid-column: 1;
        grid-row: 1 / span 4;
        align-self: start;
        width: 52px;
        height: 52px;
        margin: 0;
        border-radius: 12px;
        overflow: hidden;
        background: var(--so-pg-f6f1eb);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-thumb img,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-thumb .cart-item-thumb-placeholder {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 0;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-title {
        grid-column: -3;
        grid-row: 1;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-weight: 600;
        line-height: 1.3;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-title-secondary,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-addons,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-unavailable {
        grid-column: -3;
        font-size: 12px;
        color: var(--so-fg-94877c);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-addons .cart-item-addon-line:not(.cart-item-addon-line--side),
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-addons .cart-item-addon-line:not(.cart-item-addon-line--side) * {
        color: var(--so-fg-94877c);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-price {
        grid-column: -2;
        grid-row: 1;
        align-self: start;
        font-variant-numeric: tabular-nums;
    }

    /* One pill under the price: − n + */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-quantity {
        display: inline-flex;
        grid-column: -2;
        grid-row: 2 / span 3;
        align-self: end;
        justify-self: end;
        align-items: center;
        height: 30px;
        margin: 2px 0 0;
        padding: 0;
        border: 1px solid var(--so-ln-e6ddd3);
        border-radius: 999px;
        background: var(--so-pg-ffffff);
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-item-quantity::after {
        content: none;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-btn,
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-btn.cart-quantity-minus {
        grid-column: auto;
        grid-row: auto;
        width: 28px;
        height: 28px;
        margin: 0;
        border: 0 !important;
        border-radius: 999px;
        background: transparent !important;
        font-size: 17px;
        color: var(--so-fg-1d1a18) !important;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-btn.cart-quantity-plus {
        color: var(--brand-primary, #c41e3a) !important;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-btn:hover {
        background: var(--so-pg-f6f1eb) !important;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-quantity-input {
        grid-column: auto;
        grid-row: auto;
        width: 20px !important;
        text-align: center !important;
        font-weight: 700 !important;
        color: var(--so-fg-1d1a18) !important;
        font-variant-numeric: tabular-nums;
    }

    /* Item count next to the title (js/menu-desktop-cart-motion.js sets data-saigon-count). */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body > .cart-modal-title[data-saigon-count]::after {
        content: attr(data-saigon-count);
        display: inline-grid;
        place-items: center;
        min-width: 24px;
        height: 24px;
        margin-left: 8px;
        padding: 0 7px;
        border-radius: 999px;
        background: var(--brand-primary, #c41e3a);
        color: var(--so-fg-ffffff);
        font-size: 13px;
        font-weight: 700;
        vertical-align: 2px;
        font-variant-numeric: tabular-nums;
    }

    /* The total in the order button (data-saigon-total, same script). */
    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-checkout-btn[data-saigon-total] {
        justify-content: space-between;
        border-radius: 14px;
    }

    body.saigon-desktop-menu #saigon-desktop-cart-slot #cart-modal-body .cart-modal-checkout-btn[data-saigon-total]::after {
        content: attr(data-saigon-total);
        margin-left: 12px;
        font-variant-numeric: tabular-nums;
        white-space: nowrap;
    }
}

/* Focus lands here when the emptied order panel hides; it is not a control, so no ring. */
main.menu-content[tabindex="-1"]:focus {
    outline: none;
}
