/* ==========================================================================
   CRAWFORD HILLS — ORDERING
   Clever Fox Creative

   An extension of main.css, not a second design system. Every token, every
   button, every radius below comes from the site's stylesheet; this file
   only adds the shapes ordering needs.

   The ordering system already exists: Dana Cook's PHP app enforces hours,
   prices the cart and takes the Square payment server-side. Nothing here
   duplicates that. This is the front of house — the part a hungry person on
   the seventh green actually touches — talking to the same endpoints.

   The page is locked to the night palette. Ordering happens in the evening,
   and dark is where food photography lives.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. HEAD
   -------------------------------------------------------------------------- */

.order-hero {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: clamp(280px, 44vh, 440px);
    --ov: .6;
}
.order-hero .media__content {
    width: 100%;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 0 var(--gutter) clamp(26px, 4vh, 46px);
}
.order-hero__title {
    font-family: var(--f-display);
    font-size: clamp(2.6rem, 7vw, 5rem);
    line-height: .95;
    color: #fff;
    text-shadow: 0 2px 28px rgba(0, 0, 0, .5);
}
.order-hero__sub {
    color: rgba(255, 255, 255, .95);
    max-width: 44ch;
    margin-top: .5em;
    text-shadow: 0 1px 14px rgba(0, 0, 0, .5);
}

/* The status strip. Sticks under the nav and is the first thing anybody
   checks: is the kitchen actually on right now. */
.order-strip {
    position: sticky;
    top: 0;
    z-index: 60;
    background: color-mix(in srgb, var(--night) 94%, transparent);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-bottom: 1px solid var(--rule);

    /*
     * THE STRIP CARRIES ITS OWN PALETTE.
     *
     * It is dark in every phase, but the page around it is not, so anything
     * inside it inherited day-phase colours meant for near-black text on
     * cream. The ghost button was patched for that once; the status line was
     * not, and "Opens today at 5:00 PM" was mid-grey on near-black while
     * "DINER CLOSED" sat just under the AA threshold — on the one line of
     * the site whose whole job is to tell somebody whether they can order.
     *
     * Redefining the tokens here fixes every child at once, including any
     * added later, rather than colouring them one at a time.
     */
    --ink:        #F6F2E9;
    --ink-soft:   #AEBAB2;
    --ink-faint:  #AEBAB2;
    --ember:      #F08A5D;
    --rule:       rgba(246, 242, 233, .16);

    /* --accent is the darker amber on a light page, because it has to pass
       against cream. Here it is the open/closed signal on near-black, so it
       takes the brand amber the rest of the site uses on dark surfaces. */
    --accent:     var(--amber);
}
.order-strip__inner {
    display: flex;
    align-items: center;
    gap: 18px;
    max-width: var(--measure);
    margin: 0 auto;
    padding: 12px var(--gutter);
    min-height: 62px;
}
/*
 * The strip is always dark, whatever phase the page is in, so anything
 * inside it needs its own on-dark treatment. The ghost button was taking
 * var(--ink) from a day-phase page, which is near-black: the label read as
 * an empty outline and the only thing you could see was the border.
 */
.order-strip .btn--ghost {
    color: #F2EFE6;
    border-color: rgba(242, 239, 230, .38);
    background: transparent;
}
.order-strip .btn--ghost:hover,
.order-strip .btn--ghost:focus-visible {
    color: var(--night);
    background: #F2EFE6;
    border-color: #F2EFE6;
}

.order-strip__state {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--f-mono);
    font-size: .74rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    white-space: nowrap;
}
.order-strip__detail {
    font-size: .88rem;
    color: var(--ink-soft);
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.order-strip__right { margin-left: auto; display: flex; align-items: center; gap: 12px; }

/* --------------------------------------------------------------------------
   2. LAYOUT
   -------------------------------------------------------------------------- */

.order-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    max-width: var(--measure);
    margin: 0 auto;
    padding: clamp(28px, 4vw, 52px) var(--gutter) clamp(60px, 9vw, 110px);
}

/* --------------------------------------------------------------------------
   3. CATEGORY RAIL
   -------------------------------------------------------------------------- */

.menu-rail {
    position: sticky;
    top: 62px;
    z-index: 50;
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 14px 0;
    margin-bottom: 8px;
    background: linear-gradient(180deg, var(--bg) 72%, transparent);
    -webkit-overflow-scrolling: touch;
}
.menu-rail::-webkit-scrollbar { display: none; }

.menu-rail button {
    flex: none;
    min-height: 40px;
    padding: 9px 18px;
    font-family: var(--f-mono);
    font-size: .72rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    white-space: nowrap;
    color: var(--ink-soft);
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 999px;
    cursor: pointer;
    transition: color var(--t) var(--ease), border-color var(--t) var(--ease),
                background-color var(--t) var(--ease);
}
.menu-rail button:hover { border-color: var(--accent); color: var(--accent); }
.menu-rail button[aria-current="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

/* WHICH MENU: the grill or the pro shop.
   Deliberately heavier than the section rail below it. These are two
   different shops sharing one cart, and the jump between them is a bigger
   move than skipping from Entrees to Drinks. Hidden outright when the till
   publishes only one menu, because one option is not a choice. */
.menu-switch { margin: 4px 0 2px; }
.menu-switch__row {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: 999px;
}
.menu-switch__tab {
    min-height: 40px;
    padding: 9px 20px;
    font-family: var(--f-sans, inherit);
    font-size: .92rem;
    font-weight: 600;
    white-space: nowrap;
    color: var(--ink-soft);
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: color var(--t) var(--ease), background-color var(--t) var(--ease);
}
.menu-switch__tab:hover { color: var(--accent); }
.menu-switch__tab[aria-selected="true"] {
    background: var(--ink);
    color: var(--bg);
}
@media (max-width: 480px) {
    .menu-switch__row { display: flex; width: 100%; }
    .menu-switch__tab { flex: 1; padding: 9px 12px; }
}

/* --------------------------------------------------------------------------
   4. SECTIONS AND ITEMS
   -------------------------------------------------------------------------- */

.order-section { scroll-margin-top: 130px; margin-bottom: clamp(38px, 5vw, 64px); }

.order-section__head {
    display: flex;
    align-items: baseline;
    gap: 14px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--rule);
}
.order-section__head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.order-section__count {
    margin-left: auto;
    font-family: var(--f-mono);
    font-size: .68rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

/* Featured items get a real card with a real photograph. */
.feature-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}

.food-card {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: left;
    padding: 0;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    overflow: hidden;
    cursor: pointer;
    color: inherit;
    font: inherit;
    transition: transform var(--t) var(--ease), border-color var(--t) var(--ease),
                box-shadow var(--t) var(--ease);
}
.food-card:hover:not(:disabled) {
    transform: translateY(-3px);
    border-color: var(--accent);
    box-shadow: 0 18px 44px -26px rgba(0, 0, 0, .9);
}
.food-card:disabled { opacity: .55; cursor: not-allowed; }

.food-card__img {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--bg-alt);
}
.food-card__img img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 1.1s var(--ease);
}
.food-card:hover:not(:disabled) .food-card__img img { transform: scale(1.05); }

.food-card__body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.food-card__name { font-family: var(--f-display); font-size: 1.4rem; line-height: 1.1; }
.food-card__meta { font-size: .86rem; color: var(--ink-faint); margin-top: 5px; }
.food-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}
.food-card__price {
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.05rem;
    color: var(--accent);
}

/* The workhorse: a plain, fast, scannable row. */
.item-row {
    display: grid;
    grid-template-columns: 1fr auto auto;
    align-items: center;
    gap: 6px 18px;
    width: 100%;
    padding: 15px 4px;
    text-align: left;
    background: none;
    border: 0;
    border-bottom: 1px solid var(--rule);
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background-color var(--t) var(--ease), padding-left var(--t) var(--ease);
}
.item-row:hover:not(:disabled) {
    background: color-mix(in srgb, var(--accent) 7%, transparent);
    padding-left: 12px;
}
.item-row:disabled { opacity: .5; cursor: not-allowed; }

.item-row__name { font-family: var(--f-display); font-size: 1.22rem; line-height: 1.2; }
.item-row__note { grid-column: 1 / -1; font-size: .85rem; color: var(--ink-faint); }
.item-row__price {
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
    color: var(--ink);
}
.item-row__add {
    display: grid;
    place-items: center;
    width: 34px; height: 34px;
    border-radius: 50%;
    border: 1px solid var(--rule-strong);
    color: var(--ink-soft);
    transition: all var(--t) var(--ease);
}
.item-row:hover:not(:disabled) .item-row__add {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

.item-chip {
    display: inline-block;
    margin-left: 10px;
    padding: 3px 9px;
    vertical-align: middle;
    font-family: var(--f-mono);
    font-size: .56rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    color: var(--on-accent);
    background: var(--accent);
    border-radius: 999px;
}
.item-chip--quiet {
    color: var(--ink-faint);
    background: transparent;
    border: 1px solid var(--rule-strong);
}

/* --------------------------------------------------------------------------
   5. THE ORDER PANEL
   Two panes on one track. The cart slides left, the details slide in.
   -------------------------------------------------------------------------- */

.cart {
    position: sticky;
    top: 82px;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r-lg);
    overflow: hidden;
    box-shadow: 0 24px 60px -40px rgba(0, 0, 0, .9);
}

.cart__head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--rule);
}
.cart__title { font-family: var(--f-display); font-size: 1.3rem; }
.cart__count {
    margin-left: auto;
    font-family: var(--f-mono);
    font-size: .68rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--ink-faint);
}

.cart__track {
    display: grid;
    grid-template-columns: 100% 100%;
    transition: transform var(--t-slow) var(--ease-out);
}
.cart[data-step="details"] .cart__track { transform: translateX(-100%); }

.cart__pane { min-width: 0; }
.cart__pane[hidden] { display: block !important; visibility: hidden; }

.cart__body { padding: 6px 20px 0; max-height: 44vh; overflow-y: auto; }

.cart__empty {
    padding: 34px 20px 38px;
    text-align: center;
    color: var(--ink-faint);
    font-size: .92rem;
    line-height: 1.7;
}
.cart__empty svg { margin: 0 auto 14px; opacity: .45; }

.line {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--rule);
}
.line:last-child { border-bottom: 0; }
.line__name { font-weight: 600; font-size: .96rem; }
.line__mods { grid-column: 1 / -1; font-size: .82rem; color: var(--ink-faint); line-height: 1.55; }
.line__price {
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
    font-size: .92rem;
}
.line__tools { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--rule-strong);
    border-radius: 999px;
    overflow: hidden;
}
.stepper button {
    width: 32px; height: 32px;
    display: grid;
    place-items: center;
    background: none;
    border: 0;
    color: var(--ink-soft);
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.stepper button:hover { background: var(--accent); color: var(--on-accent); }
.stepper span {
    min-width: 30px;
    text-align: center;
    font-family: var(--f-mono);
    font-variant-numeric: tabular-nums;
    font-size: .9rem;
}
.line__remove {
    margin-left: auto;
    background: none;
    border: 0;
    padding: 6px;
    font-size: .8rem;
    color: var(--ink-faint);
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}
.line__remove:hover { color: var(--ember); }

.totals { padding: 16px 20px; border-top: 1px solid var(--rule); background: var(--bg-alt); }
.totals__row {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    font-size: .92rem;
    color: var(--ink-soft);
}
.totals__row--grand {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid var(--rule);
    font-family: var(--f-display);
    font-size: 1.5rem;
    color: var(--ink);
}
.totals__row span:last-child { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.totals__row--grand span:last-child { font-family: var(--f-display); }

.cart__foot { padding: 16px 20px 20px; }
.cart__foot .btn { width: 100%; }

/* --------------------------------------------------------------------------
   6. DETAILS PANE
   -------------------------------------------------------------------------- */

.cart__pane--details { padding: 18px 20px 20px; }

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    padding: 6px 0;
    background: none;
    border: 0;
    color: var(--ink-soft);
    font: inherit;
    font-size: .88rem;
    cursor: pointer;
}
.back-link:hover { color: var(--accent); }

.seg {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
    gap: 4px;
    padding: 4px;
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    border-radius: 999px;
}
.seg button {
    min-height: 40px;
    padding: 9px 10px;
    font-family: var(--f-ui);
    font-size: .86rem;
    font-weight: 600;
    color: var(--ink-soft);
    background: none;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); }

.tip-row { display: flex; gap: 7px; flex-wrap: wrap; }
.tip-row button {
    flex: 1 1 0;
    min-width: 58px;
    min-height: 42px;
    font-family: var(--f-mono);
    font-size: .8rem;
    color: var(--ink-soft);
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t) var(--ease);
}
.tip-row button[aria-pressed="true"] {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--on-accent);
}

/* --------------------------------------------------------------------------
   7. ITEM DIALOG
   -------------------------------------------------------------------------- */

.sheet {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: grid;
    place-items: center;
    padding: clamp(12px, 4vw, 40px);
    background: rgba(4, 7, 6, .78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--t) var(--ease), visibility var(--t);
}
.sheet.is-open { opacity: 1; visibility: visible; }

.sheet__panel {
    position: relative;          /* the close button anchors to this, not the page */
    width: min(560px, 100%);
    max-height: min(88vh, 860px);
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--rule);
    border-radius: var(--r-xl);
    overflow: hidden;
    transform: translateY(14px) scale(.985);
    transition: transform var(--t-slow) var(--ease-out);
}
.sheet.is-open .sheet__panel { transform: none; }

.sheet__img { position: relative; aspect-ratio: 16 / 9; flex: none; overflow: hidden; background: var(--bg-alt); }
.sheet__img img { width: 100%; height: 100%; object-fit: cover; }
.sheet__img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 40%, color-mix(in srgb, var(--surface) 92%, transparent) 100%);
}

.sheet__close {
    position: absolute;
    top: 12px; right: 12px;
    z-index: 3;
    display: grid;
    place-items: center;
    width: 38px; height: 38px;
    background: rgba(10, 13, 12, .62);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    backdrop-filter: blur(8px);
    transition: transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.sheet__close:hover { border-color: #fff; transform: rotate(90deg); }

.sheet__body { padding: 22px clamp(20px, 4vw, 28px); overflow-y: auto; flex: 1; }
.sheet__title { font-family: var(--f-display); font-size: clamp(1.6rem, 3.4vw, 2.1rem); line-height: 1.05; }
.sheet__meta { margin-top: 6px; font-size: .9rem; color: var(--ink-faint); }

.mod-group { margin-top: 26px; }
.mod-group__head {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin-bottom: 12px;
}
.mod-group__title {
    font-family: var(--f-mono);
    font-size: .7rem;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-soft);
}
.mod-group__rule {
    margin-left: auto;
    font-size: .74rem;
    color: var(--ink-faint);
}
.mod-group__rule--over { color: var(--ember); font-weight: 600; }

.opt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 8px; }

.opt {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 46px;
    padding: 10px 14px;
    text-align: left;
    font: inherit;
    font-size: .92rem;
    color: var(--ink);
    background: var(--bg-alt);
    border: 1px solid var(--rule);
    border-radius: var(--r-sm);
    cursor: pointer;
    transition: all var(--t) var(--ease);
}
.opt:hover { border-color: var(--accent); }
.opt[aria-pressed="true"] {
    background: color-mix(in srgb, var(--accent) 16%, var(--bg-alt));
    border-color: var(--accent);
}
.opt__tick {
    display: grid;
    place-items: center;
    flex: none;
    width: 19px; height: 19px;
    border: 1.5px solid var(--rule-strong);
    border-radius: 5px;
    color: var(--on-accent);
}
.opt[aria-pressed="true"] .opt__tick { background: var(--accent); border-color: var(--accent); }
.opt[aria-pressed="false"] .opt__tick svg { opacity: 0; }
.opt__up {
    margin-left: auto;
    padding-left: 8px;
    font-family: var(--f-mono);
    font-size: .78rem;
    white-space: nowrap;
    color: var(--accent);
}
.opt > span:nth-child(2) { line-height: 1.25; }

.sheet__foot {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px clamp(20px, 4vw, 28px) 20px;
    border-top: 1px solid var(--rule);
    background: var(--bg-alt);
}
.sheet__foot .btn { flex: 1; }

/* --------------------------------------------------------------------------
   8. MOBILE CART BAR
   -------------------------------------------------------------------------- */

.cart-bar {
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 96;
    display: none;
    padding: 12px var(--gutter) calc(12px + env(safe-area-inset-bottom, 0));
    background: color-mix(in srgb, var(--night) 95%, transparent);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border-top: 1px solid var(--rule);
    transform: translateY(110%);
    transition: transform var(--t-slow) var(--ease-out);
}
.cart-bar.is-up { transform: none; }
.cart-bar .btn { width: 100%; justify-content: space-between; }
.cart-bar__n {
    display: inline-grid;
    place-items: center;
    min-width: 24px; height: 24px;
    padding: 0 7px;
    margin-right: 10px;
    background: rgba(10, 13, 12, .22);
    border-radius: 999px;
    font-family: var(--f-mono);
    font-size: .78rem;
}

/* --------------------------------------------------------------------------
   9. CONFIRMATION
   -------------------------------------------------------------------------- */

.done {
    max-width: 620px;
    margin: clamp(48px, 9vw, 110px) auto;
    padding: 0 var(--gutter);
    text-align: center;
}
.done__mark {
    display: grid;
    place-items: center;
    width: 84px; height: 84px;
    margin: 0 auto 26px;
    border-radius: 50%;
    border: 1.5px solid var(--accent);
    color: var(--accent);
}
.done__no {
    display: inline-block;
    margin-top: 22px;
    padding: 12px 22px;
    font-family: var(--f-mono);
    font-size: 1.1rem;
    letter-spacing: .1em;
    color: var(--amber-glow);
    background: var(--bg-alt);
    border: 1px dashed var(--rule-strong);
    border-radius: var(--r-sm);
}

/* --------------------------------------------------------------------------
   10. NOTICES
   -------------------------------------------------------------------------- */

.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: .92rem;
    line-height: 1.6;
    background: var(--bg-alt);
    border: 1px solid var(--rule-strong);
    border-left: 3px solid var(--accent);
    border-radius: var(--r-sm);
}
.notice--bad { border-left-color: var(--ember); }
.notice--good { border-left-color: #2F9E5F; }

/* Reserve the room the menu will need. Without this the skeleton collapses
   into a taller list and everything below it jumps. */
[data-menu-root] { min-height: 70vh; }

/* And reserve the notice slot while the kitchen's state is still unknown, so
   "the kitchen is closed" appearing does not shove the menu down the page. */
.is-loading [data-order-notice] { min-height: 64px; }

.skeleton {
    background: linear-gradient(90deg, var(--bg-alt) 25%, var(--surface) 50%, var(--bg-alt) 75%);
    background-size: 240% 100%;
    animation: sheen 1.5s linear infinite;
    border-radius: var(--r-sm);
}
@keyframes sheen { to { background-position: -240% 0; } }

/* --------------------------------------------------------------------------
   11. RESPONSIVE
   -------------------------------------------------------------------------- */

@media (max-width: 1020px) {
    .order-layout { grid-template-columns: 1fr; }

    /* The cart becomes a full-height drawer from the right. */
    .cart {
        position: fixed;
        top: 0; right: 0; bottom: 0;
        width: min(430px, 100%);
        z-index: 120;
        border-radius: 0;
        border: 0;
        border-left: 1px solid var(--rule);
        display: flex;
        flex-direction: column;
        transform: translateX(101%);
        transition: transform var(--t-slow) var(--ease-out);
    }
    .cart.is-open { transform: none; }
    .cart__body { max-height: none; flex: 1; }
    .cart__track { flex: 1; min-height: 0; }
    .cart-bar { display: block; }
    body { padding-bottom: 76px; }

    .cart__scrim {
        position: fixed;
        inset: 0;
        z-index: 119;
        background: rgba(4, 7, 6, .6);
        backdrop-filter: blur(3px);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--t) var(--ease), visibility var(--t);
    }
    .cart__scrim.is-open { opacity: 1; visibility: visible; }
}

@media (min-width: 1021px) {
    .cart__scrim { display: none; }
    .cart__close-drawer { display: none; }
}

@media (max-width: 640px) {
    .order-strip__detail { display: none; }
    .opt-grid { grid-template-columns: 1fr 1fr; }
    .sheet { padding: 0; align-items: end; }
    .sheet__panel {
        width: 100%;
        max-height: 92vh;
        border-radius: var(--r-xl) var(--r-xl) 0 0;
        border-bottom: 0;
        transform: translateY(100%);
    }
}

@media (prefers-reduced-motion: reduce) {
    .cart__track, .cart, .sheet__panel, .cart-bar { transition-duration: .001ms !important; }
}
