/*
 * MsgBox Orders: storefront base styles (design mockup).
 *
 * Shared by every theme. A theme (themes/<name>/theme.css) only overrides
 * the custom properties declared in :root below, plus a few small
 * .theme-<name> variants. The markup is identical for all themes.
 *
 * Sections:
 *   1. Tokens            8. Menu, product cards      15. Forms and checkout
 *   2. Base              9. Tags and badges          16. Order tracking
 *   3. Utilities        10. Cart bar                 17. Footer
 *   4. Icons, buttons   11. Product sheet            18. Wide screens
 *   5. Store header     12. Option groups            19. Motion, forced colors
 *   6. Notices          13. Half-and-half toggle
 *   7. Menu controls    14. Cart
 */

/* 1. Tokens ------------------------------------------------------------ */

:root {
    /* Surfaces and text */
    --store-bg: #ffffff;
    --store-surface: #ffffff;
    --store-surface-2: #f4f5f7;
    --store-text: #1d2330;
    --store-muted: #5f6b7a;
    --store-border: #e3e6eb;
    --store-border-strong: #8a94a3;

    /* Brand. Set per business by the server (see README: brand colour). */
    --store-brand: #0f766e;
    --store-brand-text: #ffffff;
    --store-brand-ink: var(--store-brand);
    --store-brand-soft: color-mix(in srgb, var(--store-brand) 10%, var(--store-surface));

    /* Header. Light in every theme: the cover photo and the logo carry the colour, the brand stays on the
       buttons (like the kiosk welcome screen). The status colours in the header assume this light background. */
    --store-header-bg: var(--store-bg);
    --store-header-text: var(--store-text);
    --store-header-muted: var(--store-muted);
    --store-header-align: start;
    --store-header-focus: var(--store-focus);
    --store-header-name-size: 1.625rem;
    --store-header-name-size-wide: 2rem;
    --store-cover-height: 128px;
    --store-cover-height-wide: 280px;
    --store-cover-inset: 0px;
    --store-logo-size: 72px;
    --store-logo-size-wide: 96px;
    --store-logo-radius: 999px;

    /* Shape and depth */
    --store-radius: 12px;
    --store-radius-sm: 8px;
    --store-radius-lg: 20px;
    --store-radius-button: 10px;
    --store-radius-media: var(--store-radius);
    --store-shadow: 0 1px 2px rgba(16, 24, 40, 0.06), 0 1px 3px rgba(16, 24, 40, 0.08);
    --store-shadow-lg: 0 10px 30px rgba(16, 24, 40, 0.18);

    /* Type */
    --store-font: system-ui, -apple-system, "Segoe UI", "Noto Sans Hebrew", Arial, sans-serif;
    --store-heading-font: var(--store-font);
    --store-heading-weight: 700;
    --store-heading-spacing: normal;
    --store-price-color: var(--store-text);
    --store-price-weight: 700;

    /* Menu layout variants */
    --store-menu-columns: 1;
    --store-menu-columns-wide: 2;
    --store-menu-gap: 12px;
    --store-card-direction: row;            /* row | column-reverse */
    --store-card-media-width: 104px;        /* 100% when direction is column-reverse */
    --store-card-media-ratio: 1 / 1;
    --store-card-bg: var(--store-surface);
    --store-card-border: 1px solid var(--store-border);
    --store-card-shadow: none;
    --store-card-padding: 12px;
    --store-card-body-padding: 0;
    --store-card-gap: 12px;
    --store-card-desc-lines: 2;
    --store-card-placeholder: none;         /* block to show a tile when a product has no image */

    /* Category tabs */
    --store-tab-radius: 999px;
    --store-tab-bg: transparent;
    --store-tab-text: var(--store-text);
    --store-tab-active-bg: var(--store-brand);
    --store-tab-active-text: var(--store-brand-text);
    --store-tab-active-line: transparent;

    /* Status colours. Fixed, not themed, so meaning never depends on the brand. */
    --store-success: #11603a;
    --store-success-bg: #e7f6ee;
    --store-open-dot: #16a34a;
    --store-danger: #b42318;
    --store-danger-bg: #fdecea;
    --store-danger-text: #8a1c12;
    --store-warning-bg: #fff6e0;
    --store-warning-text: #7a4b00;
    --store-info-bg: #eef4ff;
    --store-info-text: #1e3a8a;
    --store-focus: #1d4ed8;
    --store-overlay: rgba(17, 20, 26, 0.55);

    /* Layout */
    --store-max-width: 960px;
    --store-gutter: 16px;
    --store-sticky-offset: 64px;
}

/* 2. Base -------------------------------------------------------------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-padding-top: var(--store-sticky-offset);
}

body.store {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--store-font);
    font-size: 16px;
    line-height: 1.5;
    color: var(--store-text);
    background: var(--store-bg);
    overflow-wrap: break-word;
}

h1, h2, h3 {
    margin: 0;
    line-height: 1.25;
    font-family: var(--store-heading-font);
    font-weight: var(--store-heading-weight);
    letter-spacing: var(--store-heading-spacing);
}

[hidden] { display: none !important; }
p { margin: 0; }
a { color: var(--store-brand-ink); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

:focus-visible {
    outline: 3px solid var(--store-focus);
    outline-offset: 2px;
}

/* The page's main area takes focus only as the skip link's target (or when clicked on empty space); a ring around
   the whole page there says nothing and looks like a bug. Its first link or button shows the ring on the next Tab. */
main[tabindex="-1"]:focus-visible { outline: none; }

/* Headers can sit on the brand colour (classic), so they get their own focus colour. */
.store-header,
.page-bar { --store-focus: var(--store-header-focus); }

.store-main {
    flex: 1;
    width: 100%;
    max-width: var(--store-max-width);
    margin: 0 auto;
    padding: 20px var(--store-gutter) 48px;
}

.store-main--with-cart-bar { padding-bottom: 112px; }
.store-main--narrow { max-width: 640px; }

/* 3. Utilities --------------------------------------------------------- */

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

.skip-link {
    position: absolute;
    inset-inline-start: 12px;
    top: -100px;
    z-index: 100;
    padding: 10px 16px;
    border-radius: var(--store-radius-sm);
    background: var(--store-surface);
    color: var(--store-text);
    font-weight: 700;
    box-shadow: var(--store-shadow-lg);
}
.skip-link:focus { top: 12px; }

.muted { color: var(--store-muted); }
.nowrap { white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; }
.stack > * + * { margin-top: 16px; }

.preview-bar {
    padding: 8px 16px;
    text-align: center;
    font-size: 0.875rem;
    background: var(--store-warning-bg);
    color: var(--store-warning-text);
    /* Its colour is close to the light header's: a line keeps the edge visible. */
    box-shadow: inset 0 -1px 0 rgba(122, 75, 0, 0.18);
}

.staff-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px 16px;
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 600;
    background: var(--store-brand);
    color: var(--store-brand-text);
}
.staff-bar__actions { display: inline-flex; align-items: center; gap: 12px; }
.staff-bar a, .staff-bar .link-btn { color: inherit; text-decoration: underline; font-size: inherit; }

/* 4. Icons and buttons ------------------------------------------------- */

.icon {
    width: 20px;
    height: 20px;
    flex: none;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.icon--sm { width: 16px; height: 16px; }
.icon--lg { width: 24px; height: 24px; }

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 10px 20px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: var(--store-radius-button);
    background: var(--store-surface);
    color: var(--store-text);
    transition: box-shadow 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn--primary {
    background: var(--store-brand);
    color: var(--store-brand-text);
}
/* Darken any brand colour on hover without touching the text colour. */
.btn--primary:hover { box-shadow: inset 0 0 0 100vmax rgba(0, 0, 0, 0.1); }

.btn--secondary {
    background: var(--store-surface);
    color: var(--store-text);
    border-color: var(--store-border-strong);
}
.btn--secondary:hover { background: var(--store-surface-2); }

.btn--ghost {
    background: transparent;
    color: var(--store-brand-ink);
    padding-inline: 12px;
}
.btn--ghost:hover { background: var(--store-brand-soft); }

.btn--block { display: flex; width: 100%; }
.btn--lg { min-height: 56px; font-size: 1.0625rem; }
.btn--sm { min-height: 44px; padding: 8px 14px; font-size: 0.9375rem; }

.btn:disabled,
.btn[aria-disabled="true"] {
    background: var(--store-surface-2);
    color: var(--store-muted);
    border-color: var(--store-border);
    box-shadow: none;
    cursor: not-allowed;
    transform: none;
}

.btn__split {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    gap: 12px;
}
.btn__price { font-variant-numeric: tabular-nums; white-space: nowrap; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--store-border);
    border-radius: 999px;
    background: var(--store-surface);
    color: var(--store-text);
    text-decoration: none;
}
.icon-btn:hover { background: var(--store-surface-2); }

.link-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 4px;
    border: 0;
    background: none;
    color: var(--store-brand-ink);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}
.link-btn--danger { color: var(--store-danger); }

/* 5. Store header ------------------------------------------------------ */

.store-header {
    background: var(--store-header-bg);
    color: var(--store-header-text);
}

.store-cover {
    /* Close to the photo's own 3:1 shape at any width, instead of a thin strip on mid-size screens. */
    height: clamp(var(--store-cover-height), 33.33vw, var(--store-cover-height-wide));
    margin: var(--store-cover-inset) var(--store-cover-inset) 0;
    overflow: hidden;
    border-radius: calc(var(--store-cover-inset) * 1.25);
    background: var(--store-surface-2);
}
.store-cover img,
.store-cover .ph { width: 100%; height: 100%; object-fit: cover; }

.store-header__inner {
    display: grid;
    justify-items: var(--store-header-align);
    max-width: var(--store-max-width);
    margin: 0 auto;
    padding: 0 var(--store-gutter) 8px;
    text-align: var(--store-header-align);
}

.store-logo {
    display: grid;
    place-items: center;
    width: var(--store-logo-size);
    height: var(--store-logo-size);
    margin-top: calc(var(--store-logo-size) / -2);
    overflow: hidden;
    border: 3px solid var(--store-surface);
    border-radius: var(--store-logo-radius);
    background: var(--store-brand);
    color: var(--store-brand-text);
    /* The faint inner line keeps a very light brand's initials circle visible on the light header. */
    box-shadow: var(--store-shadow), inset 0 0 0 1px rgba(0, 0, 0, 0.06);
    font-family: var(--store-heading-font);
    font-size: calc(var(--store-logo-size) / 3);
    font-weight: 800;
}
/* A transparent logo sits on white, not on the brand fill behind the initials. */
.store-logo img { width: 100%; height: 100%; object-fit: cover; background: var(--store-surface); }
.store-header--no-cover .store-logo { margin-top: 18px; }

.store-header__name {
    margin-top: 10px;
    font-size: var(--store-header-name-size);
}

.store-header__tagline {
    margin-top: 2px;
    font-size: 0.9375rem;
    color: var(--store-header-muted);
}

/* Even rows: the tap areas below grow with ::after, not with height, so they don't push the rows apart. */
.store-header__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: var(--store-header-align);
    gap: 6px 12px;
    margin-top: 12px;
    font-size: 0.9375rem;
}
.store-header__meta + .store-header__meta { gap: 10px 8px; }

.store-header__meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--store-header-muted);
}

.store-header__phone {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    font-weight: 600;
    white-space: nowrap;
    text-underline-offset: 3px;
}
.store-header__phone::after { content: ""; position: absolute; inset: -11px -4px; } /* a 44px tap area */

/* Open or closed: a coloured dot and text. The header is light in every theme, so no pill. */
.store-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-weight: 700;
    color: var(--store-success);
}
.store-status::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--store-open-dot);
}
.store-status--closed { color: var(--store-danger-text); }
.store-status--closed::before { background: var(--store-danger); }
.store-status--busy { color: var(--store-warning-text); }
.store-status--busy::before { background: #b45309; }

/* Compact header for cart, checkout and order pages. */
.page-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--store-header-bg);
    color: var(--store-header-text);
    box-shadow: 0 1px 0 var(--store-border);
}
.page-bar__inner {
    display: flex;
    align-items: center;
    gap: 8px;
    max-width: var(--store-max-width);
    min-height: 60px;
    margin: 0 auto;
    padding: 8px var(--store-gutter);
}
.page-bar__back {
    border-color: transparent;
    background: transparent;
    color: inherit;
}
.page-bar__back:hover { background: rgba(127, 127, 127, 0.16); }
.page-bar__title { font-size: 1.125rem; }
.page-bar__store {
    margin-inline-start: auto;
    font-size: 0.875rem;
    opacity: 0.92;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 6. Notices ----------------------------------------------------------- */

.notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--store-radius);
    background: var(--store-info-bg);
    color: var(--store-info-text);
}
.notice > .icon { margin-top: 2px; }
.notice__body { flex: 1; min-width: 0; }
.notice__title { font-weight: 700; font-size: 1rem; margin-bottom: 2px; }
.notice__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.notice--warning { background: var(--store-warning-bg); color: var(--store-warning-text); }
.notice--error { background: var(--store-danger-bg); color: var(--store-danger-text); }
.notice--success { background: var(--store-success-bg); color: var(--store-success); }
.notice a:not(.btn) { color: inherit; font-weight: 700; }

/* Closed store: a larger card with a clear way out. */
.closed-card {
    padding: 20px;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    background: var(--store-surface);
    box-shadow: var(--store-shadow);
}
.closed-card__title { font-size: 1.25rem; margin-bottom: 4px; }
.closed-card__when { font-size: 1.0625rem; }
.closed-card__when strong { color: var(--store-brand-ink); }
.closed-card__actions { display: grid; gap: 8px; margin-top: 16px; }

.reorder-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 14px 16px;
    margin-bottom: 12px;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    background: var(--store-info-bg);
    color: var(--store-info-text);
}
.reorder-card__text { flex: 1; min-width: 200px; }
.reorder-card__title { font-size: 1.0625rem; margin-bottom: 2px; }

/* 7. Menu controls ----------------------------------------------------- */

.store-info__body { font-size: 0.9375rem; }
.store-info__body h3 { font-size: 0.9375rem; margin: 12px 0 4px; }

/* Waze and Google Maps under the pickup address; wrap to two rows on a narrow phone. */
.navigate-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.order-hero .navigate-links { justify-content: center; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 4px 0; text-align: start; font-weight: 400; }
.hours td { text-align: end; font-variant-numeric: tabular-nums; }
.hours tr.is-today { font-weight: 700; }
.hours tr.is-today th { font-weight: 700; }

/* Segmented control: pickup / delivery and similar two-way choices. */
.segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin: 0;
    padding: 4px;
    border: 1px solid var(--store-border);
    border-radius: calc(var(--store-radius-button) + 4px);
    background: var(--store-surface-2);
    min-width: 0;
}
.segmented__option { position: relative; display: block; }
.segmented__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.segmented__label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 6px 10px;
    border-radius: var(--store-radius-button);
    color: var(--store-muted);
    font-weight: 600;
    pointer-events: none;
}
.segmented__input:checked + .segmented__label {
    background: var(--store-surface);
    color: var(--store-text);
    font-weight: 700;
    box-shadow: var(--store-shadow), inset 0 0 0 1px var(--store-border-strong);
}
.segmented__input:checked + .segmented__label .icon { color: var(--store-brand-ink); }
.segmented__input:focus-visible + .segmented__label { outline: 3px solid var(--store-focus); outline-offset: 1px; }
.segmented__input:disabled + .segmented__label { text-decoration: line-through; opacity: 0.6; }

.fulfillment { display: grid; gap: 8px; margin-top: 16px; }
.store-main > .fulfillment:first-child { margin-top: 0; }
.fulfillment__hint {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.9375rem;
    color: var(--store-muted);
}
.fulfillment__hint .icon { margin-top: 2px; }

.menu-search { position: relative; }
.menu-search__icon {
    position: absolute;
    top: 50%;
    inset-inline-start: 14px;
    transform: translateY(-50%);
    color: var(--store-muted);
    pointer-events: none;
}
.menu-search__input {
    width: 100%;
    min-height: 48px;
    padding: 10px 44px 10px 14px;
    padding-inline-start: 44px;
    padding-inline-end: 14px;
    border: 1px solid var(--store-border-strong);
    border-radius: var(--store-radius-button);
    background: var(--store-surface);
    font-size: 1rem;
}
.menu-search__input::placeholder { color: var(--store-muted); opacity: 1; }

.menu-bar {
    position: sticky;
    top: 0;
    z-index: 20;
    margin: 12px calc(var(--store-gutter) * -1) 0;
    padding: 8px 0;
    background: var(--store-bg);
    box-shadow: 0 1px 0 var(--store-border);
}
.menu-bar__row {
    display: flex;
    align-items: center;
    gap: 2px;
    padding-inline-start: var(--store-gutter);
}
.menu-bar__search-toggle { flex: none; }
.menu-bar__search-toggle[aria-expanded="true"] { background: var(--store-surface-2); border-color: var(--store-border-strong); }
.menu-bar .menu-search { margin: 8px var(--store-gutter) 0; }
.category-nav { flex: 1; min-width: 0; }
.category-nav__list {
    display: flex;
    gap: 6px;
    margin: 0;
    padding: 0 var(--store-gutter);
    list-style: none;
    overflow-x: auto;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
    scroll-padding-inline: var(--store-gutter);
    /* Fade at the end edge hints that the row scrolls. */
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 28px);
    mask-image: linear-gradient(to left, transparent 0, #000 28px);
}
.category-nav__list::-webkit-scrollbar { display: none; }
.category-nav__link {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: var(--store-tab-radius);
    border-bottom: 3px solid transparent;
    background: var(--store-tab-bg);
    color: var(--store-tab-text);
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    scroll-snap-align: start;
}
.category-nav__link:hover { background: var(--store-surface-2); }
.category-nav__link[aria-current="true"] {
    background: var(--store-tab-active-bg);
    color: var(--store-tab-active-text);
    border-bottom-color: var(--store-tab-active-line);
    font-weight: 700;
}
.category-nav__link:focus-visible { outline-offset: -3px; }

/* 8. Menu and product cards ------------------------------------------- */

.menu-section {
    margin-top: 28px;
    scroll-margin-top: var(--store-sticky-offset);
}
.menu-section__title { font-size: 1.375rem; }
.menu-section__desc { margin-top: 2px; color: var(--store-muted); font-size: 0.9375rem; }

.product-list {
    display: grid;
    grid-template-columns: repeat(var(--store-menu-columns), minmax(0, 1fr));
    gap: var(--store-menu-gap);
    margin: 14px 0 0;
    padding: 0;
    list-style: none;
}
.product-list__item { display: flex; min-width: 0; }

.product-card {
    position: relative;
    display: flex;
    flex-direction: var(--store-card-direction);
    gap: var(--store-card-gap);
    width: 100%;
    padding: var(--store-card-padding);
    border: var(--store-card-border);
    border-radius: var(--store-radius);
    background: var(--store-card-bg);
    box-shadow: var(--store-card-shadow);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover { box-shadow: var(--store-shadow-lg); }

.product-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
    padding: var(--store-card-body-padding);
}

.product-card__badges { display: flex; flex-wrap: wrap; gap: 4px; }

.product-card__name { font-size: 1.0625rem; line-height: 1.3; }
.product-card__link {
    color: inherit;
    text-decoration: none;
}
/* Stretched link: the whole card is the tap target, the heading stays the link. */
.product-card__link::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    border-radius: var(--store-radius);
}
.product-card__link:focus-visible { outline: none; }
.product-card__link:focus-visible::after {
    outline: 3px solid var(--store-focus);
    outline-offset: 2px;
}

.product-card__desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: var(--store-card-desc-lines);
    overflow: hidden;
    font-size: 0.875rem;
    color: var(--store-muted);
}

.product-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: auto;
    padding-top: 6px;
}

.product-card__price {
    color: var(--store-price-color);
    font-weight: var(--store-price-weight);
    font-variant-numeric: tabular-nums;
}
.product-card__price-from { font-weight: 400; font-size: 0.875rem; color: var(--store-muted); }

.product-card__add {
    display: grid;
    place-items: center;
    flex: none;
    width: 36px;
    height: 36px;
    border-radius: var(--store-radius-button);
    background: var(--store-brand);
    color: var(--store-brand-text);
}

.product-card__media {
    position: relative;
    flex: none;
    align-self: flex-start;
    width: var(--store-card-media-width);
    aspect-ratio: var(--store-card-media-ratio);
    overflow: hidden;
    border-radius: var(--store-radius-media);
    background: var(--store-surface-2);
}
.product-card__media img,
.product-card__media .ph { width: 100%; height: 100%; object-fit: cover; }

/* No image: optional neutral tile (grid themes) so rows stay aligned. */
.product-card--no-image::after {
    content: "";
    display: var(--store-card-placeholder);
    flex: none;
    align-self: flex-start;
    width: var(--store-card-media-width);
    aspect-ratio: var(--store-card-media-ratio);
    border-radius: var(--store-radius-media);
    /* Neutral plate-and-cutlery mark on a light brand tint: reads as "no photo", not "broken". */
    background: var(--store-brand-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 48' fill='none' stroke='%23000' stroke-opacity='.22' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='24' cy='24' r='11'/%3E%3Ccircle cx='24' cy='24' r='7'/%3E%3Cpath d='M8 12v7a3 3 0 0 0 6 0v-7M11 12v25M40 12c-3 1.5-4.5 5-4.5 9v4H40v12'/%3E%3C/svg%3E") center / 40% no-repeat;
}

.product-card.is-sold-out .product-card__media { filter: grayscale(1); opacity: 0.6; }
.product-card.is-sold-out .product-card__name,
.product-card.is-sold-out .product-card__price { color: var(--store-muted); }
.product-card.is-sold-out:hover { box-shadow: var(--store-card-shadow); }

.menu-empty {
    margin-top: 24px;
    padding: 32px 16px;
    text-align: center;
    border: 1px dashed var(--store-border-strong);
    border-radius: var(--store-radius);
    color: var(--store-muted);
}
.menu-empty__title { color: var(--store-text); font-weight: 700; font-size: 1.0625rem; margin-bottom: 4px; }

/* 9. Tags and badges --------------------------------------------------- */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin: 2px 0 0;
    padding: 0;
    list-style: none;
}
.tag {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.2;
    background: var(--store-surface-2);
    color: var(--store-text);
}
.tag--vegan { background: #e6f4ea; color: #14532d; }
.tag--veg { background: #edf7e4; color: #2f5213; }
.tag--dairy { background: #eaf1fb; color: #1e3a8a; }
.tag--gluten-free { background: #fff3d6; color: #6b4200; }
.tag--spicy { background: #fdecea; color: #8a1c12; }

/* A dish's allergens, and who gave the information (the business). */
.allergens { margin: 10px 0 0; font-size: 0.9375rem; color: var(--store-text); }
.allergens__note { margin: 4px 0 0; font-size: 0.8125rem; color: var(--store-muted); }
.menu-note { margin: 24px 0 8px; font-size: 0.8125rem; color: var(--store-muted); text-align: center; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-height: 24px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    background: var(--store-surface-2);
    color: var(--store-text);
}
.badge--combo { background: var(--store-brand); color: var(--store-brand-text); }
.badge--soldout { background: #eceef1; color: #3b4452; border: 1px solid #c9ced6; }
.badge--required { background: var(--store-surface-2); color: var(--store-text); border: 1px solid var(--store-border-strong); }
.badge--done { background: var(--store-success-bg); color: var(--store-success); }
.badge--error { background: var(--store-danger-bg); color: var(--store-danger-text); }
.badge--free { background: var(--store-success-bg); color: var(--store-success); }

.allergen-note {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--store-radius-sm);
    background: var(--store-surface-2);
    font-size: 0.875rem;
    color: var(--store-text);
}
.allergen-note .icon { margin-top: 2px; color: var(--store-muted); }

/* 10. Cart bar --------------------------------------------------------- */

.cart-bar {
    position: fixed;
    inset-inline: 0;
    bottom: 0;
    z-index: 30;
    padding: 10px var(--store-gutter) calc(10px + env(safe-area-inset-bottom));
    pointer-events: none;
}
.cart-bar__link {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    min-height: 56px;
    margin: 0 auto;
    padding: 8px 16px;
    border-radius: var(--store-radius-button);
    background: var(--store-brand);
    color: var(--store-brand-text);
    box-shadow: var(--store-shadow-lg);
    font-weight: 700;
    text-decoration: none;
    pointer-events: auto;
}
.cart-bar__link:hover { box-shadow: var(--store-shadow-lg), inset 0 0 0 100vmax rgba(0, 0, 0, 0.1); }
.cart-bar__link:focus-visible { outline-offset: 3px; outline-color: var(--store-text); }
.cart-bar__summary { display: flex; align-items: center; gap: 8px; }
.cart-bar__bubble {
    display: inline-grid;
    place-items: center;
    min-width: 28px;
    height: 28px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--store-brand-text);
    color: var(--store-brand);
    font-size: 0.875rem;
}
.cart-bar__sep { opacity: 0.75; }
.cart-bar__cta { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; }

/* 10b. Bottom tab bar (phones) --------------------------------------- */

/* Like the chains' apps: menu, cart, my orders, the club, details. Phones and small tablets only;
   wider screens have the header and the cart bar. */
.tab-bar { display: none; }

@media (max-width: 899px) {
    .store--with-tabbar {
        --store-tabbar-height: 62px;
        padding-bottom: calc(var(--store-tabbar-height) + env(safe-area-inset-bottom));
    }
    .tab-bar {
        position: fixed;
        inset-inline: 0;
        bottom: 0;
        z-index: 35;
        display: grid;
        /* Four tabs, or five where the business has a club. */
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        padding: 0 4px env(safe-area-inset-bottom);
        border-top: 1px solid var(--store-border);
        background: var(--store-surface);
        box-shadow: 0 -4px 16px rgba(16, 24, 40, 0.06);
    }
    .tab-bar__item {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        min-width: 0;
        min-height: var(--store-tabbar-height);
        padding: 6px 2px;
        border: 0;
        background: none;
        color: var(--store-muted);
        font-size: 0.75rem;
        font-weight: 600;
        line-height: 1.2;
        text-decoration: none;
    }
    .tab-bar__item .icon { width: 24px; height: 24px; }
    .tab-bar__label { max-width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
    .tab-bar__item[aria-current="page"] { color: var(--store-brand-ink); }
    .tab-bar__item[aria-current="page"]::before {
        content: "";
        position: absolute;
        top: -1px;
        inset-inline: 24%;
        height: 3px;
        border-radius: 0 0 3px 3px;
        background: var(--store-brand-ink);
    }
    .tab-bar__item:focus-visible { outline-offset: -3px; }
    .tab-bar__icon { position: relative; display: inline-grid; }
    .tab-bar__badge {
        position: absolute;
        top: -6px;
        inset-inline-end: -11px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        border-radius: 999px;
        background: var(--store-brand);
        color: var(--store-brand-text);
        font-size: 0.6875rem;
        line-height: 18px;
        text-align: center;
        font-variant-numeric: tabular-nums;
    }
    /* The cart bar floats above the tab bar. */
    .store--with-tabbar .cart-bar { bottom: calc(var(--store-tabbar-height) + env(safe-area-inset-bottom)); padding-bottom: 10px; }
}

/* My orders */
.my-orders { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.my-order {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    padding-inline-end: 44px;
    border: var(--store-card-border);
    border-radius: var(--store-radius);
    background: var(--store-surface);
    box-shadow: var(--store-shadow);
    color: var(--store-text);
    text-decoration: none;
}
.my-order__head { display: flex; justify-content: space-between; gap: 12px; }
.my-order__number { font-size: 1.0625rem; }
.my-order__total { font-weight: 700; white-space: nowrap; }
.my-order__status { font-weight: 600; color: var(--store-muted); }
.my-order__status.is-active { color: var(--store-success); }
.my-order__meta { font-size: 0.875rem; color: var(--store-muted); }
.my-order__go { position: absolute; inset-inline-end: 14px; top: 50%; margin-top: -10px; color: var(--store-muted); }
.my-orders__note { margin-top: 16px; font-size: 0.875rem; color: var(--store-muted); text-align: center; }
/* The reset, quietly under the list: for a shared device, not an everyday action. */
.my-orders__reset { margin-top: 8px; text-align: center; font-size: 0.875rem; }
.my-orders__reset-hint { display: block; margin-top: 2px; color: var(--store-muted); font-size: 0.8125rem; }

/* The customers' club ("המועדון שלי", docs/SPEC-loyalty.md) */
.club { display: grid; gap: 16px; align-content: start; }
.club .form-section + .form-section { margin-top: 0; }
.club-hero { display: grid; justify-items: center; gap: 6px; padding: 8px 8px 0; text-align: center; }
.club-hero__art {
    display: grid;
    place-items: center;
    width: 72px;
    height: 72px;
    margin-bottom: 4px;
    border-radius: 50%;
    background: var(--store-brand-soft);
    color: var(--store-brand-ink);
}
.club-hero__art .icon { width: 36px; height: 36px; stroke-width: 1.6; }
.club-hero__title { font-size: 1.25rem; }
.club-hero p { color: var(--store-muted); max-width: 36ch; text-wrap: balance; }
.club-section__lead { margin-bottom: 14px; }
.club-form { display: grid; gap: 14px; }
.club-form__code { font-size: 1.375rem; letter-spacing: 0.2em; font-variant-numeric: tabular-nums; }
.club-section__after { margin-top: 14px; font-size: 0.9375rem; color: var(--store-muted); }
.club-section__more { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 14px; }
.club-section__wait { margin-top: 6px; }
.club-section > p + .club-form { margin-top: 14px; }

/* The points: on the brand's soft tint, the number large. */
.club-card {
    display: grid;
    gap: 10px;
    padding: 20px 16px;
    border-radius: var(--store-radius);
    background: var(--store-brand-soft);
    color: var(--store-text);
}
.club-card__who { color: var(--store-muted); font-size: 0.9375rem; }
.club-card__points { display: flex; align-items: baseline; gap: 8px; color: var(--store-brand-ink); }
.club-card__points .num { font-size: 2.75rem; line-height: 1; }
.club-card__unit { font-size: 1.125rem; }
.club-card__reward {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--store-radius-sm);
    background: var(--store-surface);
    font-weight: 700;
}
.club-card__reward .icon { margin-top: 2px; color: var(--store-brand-ink); }
.club-card__hint { display: block; margin-top: 2px; font-weight: 400; color: var(--store-muted); font-size: 0.9375rem; }
.club-card__next { font-weight: 600; }
.club-card__note { font-size: 0.9375rem; color: var(--store-muted); }
.club-progress {
    height: 10px;
    border-radius: 999px;
    background: var(--store-surface);
    box-shadow: inset 0 0 0 1px var(--store-border);
    overflow: hidden;
}
.club-progress__bar { display: block; height: 100%; min-width: 10px; border-radius: inherit; background: var(--store-brand); }

.club-history { margin: 0; padding: 0; list-style: none; }
.club-history__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--store-border);
}
.club-history__row:first-child { border-top: 0; padding-top: 0; }
.club-history__what { display: grid; gap: 2px; min-width: 0; font-weight: 600; }
.club-history__meta { font-weight: 400; font-size: 0.875rem; color: var(--store-muted); }
.club-history__points { font-weight: 700; white-space: nowrap; color: var(--store-muted); }
.club-history__points.is-plus { color: var(--store-success); }

.club-terms { display: grid; gap: 8px; margin: 0; padding-inline-start: 20px; }
/* Leaving, quietly at the end: for a shared device, not an everyday action. */
.club-leave { text-align: center; font-size: 0.875rem; }
.club-leave__hint { display: block; margin-top: 2px; color: var(--store-muted); font-size: 0.8125rem; }

/* 11. Product sheet ---------------------------------------------------- */

/* Standalone page (/p/{id}) shows the sheet on a dimmed page.
   With JS the same markup is loaded into a <dialog class="sheet-dialog">. */
body.store--sheet {
    background: linear-gradient(var(--store-overlay), var(--store-overlay)), var(--store-bg);
}

.sheet {
    position: relative;
    width: 100%;
    max-width: 600px;
    margin: 12px auto 0;
    border-radius: var(--store-radius-lg) var(--store-radius-lg) 0 0;
    background: var(--store-surface);
    box-shadow: var(--store-shadow-lg);
}
.sheet__grabber {
    position: absolute;
    top: 8px;
    left: 50%;
    z-index: 2;
    width: 40px;
    height: 4px;
    margin-left: -20px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.15);
}
.sheet__close {
    position: absolute;
    top: 14px;
    inset-inline-end: 14px;
    z-index: 2;
    border-color: transparent;
    box-shadow: var(--store-shadow);
}
.sheet__media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    border-radius: var(--store-radius-lg) var(--store-radius-lg) 0 0;
    background: var(--store-surface-2);
}
.sheet__media img,
.sheet__media .ph { width: 100%; height: 100%; object-fit: cover; }
.sheet--no-image .sheet__content { padding-top: 64px; }

.sheet__content { padding: 18px var(--store-gutter) 8px; }
.sheet__title { font-size: 1.5rem; }
.sheet__price { margin-top: 2px; font-weight: 700; color: var(--store-price-color); }
.sheet__desc { margin-top: 8px; color: var(--store-muted); }
.sheet__content > .tag-list { margin-top: 10px; }

.sheet__includes {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--store-radius-sm);
    background: var(--store-brand-soft);
    font-size: 0.9375rem;
}

.sheet__footer {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px var(--store-gutter) calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--store-border);
    background: var(--store-surface);
    box-shadow: 0 -6px 16px rgba(16, 24, 40, 0.06);
}
.sheet__footer .btn { flex: 1; }
.sheet__footer-msg {
    flex-basis: 100%;
    order: -1;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--store-danger);
}
.sheet__footer:has(.sheet__footer-msg:not([hidden])) { flex-wrap: wrap; }

.sheet-dialog {
    width: 100%;
    max-width: 600px;
    max-height: 92vh;
    margin: auto auto 0;
    padding: 0;
    border: 0;
    border-radius: var(--store-radius-lg) var(--store-radius-lg) 0 0;
    overflow: auto;
}
.sheet-dialog::backdrop { background: var(--store-overlay); }

/* 12. Option groups ---------------------------------------------------- */

.product-form { margin-top: 8px; }

.option-group {
    min-width: 0;
    margin: 0;
    padding: 20px 0;
    border: 0;
    border-top: 1px solid var(--store-border);
    scroll-margin-top: 16px;
}
.option-group__legend {
    float: right; /* keeps the legend inside the box instead of on the top border */
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-bottom: 2px;
    padding: 0;
    font-weight: 700;
    font-size: 1.0625rem;
}
.option-group__legend .badge { margin-inline-start: auto; }
.option-group__legend ~ * { clear: both; }
.option-group__hint { margin-top: 2px; font-size: 0.875rem; color: var(--store-muted); }
.option-group__free {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--store-success-bg);
    color: var(--store-success);
    font-size: 0.875rem;
    font-weight: 700;
}
.option-group__counter {
    margin-top: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--store-muted);
}
.option-group__counter.is-max {
    padding: 8px 12px;
    border-radius: var(--store-radius-sm);
    background: var(--store-warning-bg);
    color: var(--store-warning-text);
}
.option-group__error {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 10px;
    padding: 8px 12px;
    border-radius: var(--store-radius-sm);
    background: var(--store-danger-bg);
    color: var(--store-danger-text);
    font-weight: 600;
    font-size: 0.9375rem;
}
.option-group.has-error .option-choice__body { border-color: var(--store-danger); }
.option-group__body { margin-top: 12px; }

/* Choice tiles (size, dough) and choice list (drinks, sauces). */
.choice-tiles {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}
.choice-list { display: grid; gap: 8px; }

.option-choice { position: relative; display: block; min-width: 0; }
.option-choice__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    cursor: pointer;
    z-index: 1;
}
.option-choice__input:disabled { cursor: not-allowed; }
/* The group's maximum is reached: the other choices look unavailable until one is unchecked. */
.option-choice.is-limited .option-choice__body { opacity: 0.45; }
.option-choice__body {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-height: 64px;
    padding: 10px 6px;
    border: 1px solid var(--store-border-strong);
    border-radius: var(--store-radius-sm);
    background: var(--store-surface);
    text-align: center;
    line-height: 1.25;
}
.option-choice__name { font-weight: 600; }
.option-choice__price { font-size: 0.875rem; color: var(--store-muted); font-variant-numeric: tabular-nums; }
.option-choice__sub { font-size: 0.8125rem; color: var(--store-muted); }
.option-choice__input:checked + .option-choice__body .option-choice__sub { color: var(--store-text); }
.option-choice__check {
    position: absolute;
    top: -8px;
    inset-inline-end: -6px;
    display: none;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--store-brand-ink);
    color: var(--store-surface);
    box-shadow: 0 0 0 2px var(--store-surface);
}
.option-choice__check .icon { width: 14px; height: 14px; stroke-width: 3; }

.option-choice__input:checked + .option-choice__body {
    border-color: var(--store-brand-ink);
    background: var(--store-brand-soft);
    box-shadow: inset 0 0 0 1px var(--store-brand-ink);
}
.option-choice__input:checked + .option-choice__body .option-choice__name { font-weight: 700; }
.option-choice__input:checked + .option-choice__body .option-choice__price { color: var(--store-text); }
.option-choice__input:checked + .option-choice__body .option-choice__check { display: grid; }
.option-choice__input:focus-visible + .option-choice__body { outline: 3px solid var(--store-focus); outline-offset: 2px; }
.option-choice__input:hover:not(:disabled):not(:checked) + .option-choice__body { background: var(--store-surface-2); }
.option-choice__input:disabled + .option-choice__body {
    border-style: dashed;
    border-color: var(--store-border-strong);
    background: var(--store-surface-2);
    color: var(--store-muted);
}

/* List layout: radio dot at start, name, price at end. */
.choice-list > .option-choice > .option-choice__body {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 52px;
    padding: 10px 14px;
    text-align: start;
}
/* The photo of the dish a choice is linked to (a side in a meal). A soft tile when one has no photo. */
.option-choice__thumb {
    flex: none;
    width: 56px;
    height: 42px;
    overflow: hidden;
    border-radius: var(--store-radius-sm);
    background: var(--store-brand-soft);
}
.option-choice__thumb img { width: 100%; height: 100%; object-fit: cover; }
.option-choice__input:disabled + .option-choice__body .option-choice__thumb { filter: grayscale(1); opacity: 0.6; }
.choice-list > .option-choice > .option-choice__body:has(.option-choice__thumb) { padding-block: 8px; }
.choice-list > .option-choice > .option-choice__body::before {
    content: "";
    flex: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--store-border-strong);
    border-radius: 50%;
    background: var(--store-surface);
}
.choice-list > .option-choice > .option-choice__input[type="checkbox"] + .option-choice__body::before { border-radius: 5px; }
.choice-list > .option-choice > .option-choice__input:checked + .option-choice__body::before {
    border: 7px solid var(--store-brand-ink);
}
.choice-list > .option-choice > .option-choice__input[type="checkbox"]:checked + .option-choice__body::before {
    border-width: 2px;
    border-color: var(--store-brand-ink);
    background: var(--store-brand-ink) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 16px no-repeat;
}
.choice-list > .option-choice .option-choice__check { display: none !important; }
.choice-list > .option-choice .option-choice__price { margin-inline-start: auto; white-space: nowrap; }
.choice-list > .option-choice .option-choice__meta { display: flex; flex-direction: column; min-width: 0; }
.choice-list > .option-choice .option-choice__meta + .option-choice__thumb { margin-inline-start: auto; }
.choice-list > .option-choice .option-choice__sub { font-size: 0.875rem; color: var(--store-muted); }

/* Locked choice inside a combo (e.g. size fixed to family). */
.locked-choice {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 10px 14px;
    border: 1px dashed var(--store-border-strong);
    border-radius: var(--store-radius-sm);
    background: var(--store-surface-2);
}
.locked-choice__label { font-weight: 700; }
.locked-choice__note { margin-inline-start: auto; font-size: 0.875rem; color: var(--store-muted); }

/* Nested options for a product chosen inside a combo. */
.nested-options {
    margin: 4px 0 4px;
    padding: 4px 0 4px 0;
    padding-inline-start: 14px;
    border-inline-start: 3px solid var(--store-brand-ink);
}
.nested-options__title {
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--store-muted);
    margin: 8px 0 4px;
}
.nested-options .option-group { padding: 14px 0; }
.nested-options .option-group:first-of-type { border-top: 0; }
.nested-options[hidden] { display: none; }

.more-toggle { margin-top: 4px; }

/* Topping rows with half-and-half. */
.option-rows { margin: 12px 0 0; padding: 0; list-style: none; }

.half-legend {
    display: flex;
    justify-content: flex-end;
    gap: 4px;
    padding-bottom: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--store-muted);
}
.half-legend span { width: 44px; text-align: center; }

.option-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 56px;
    padding: 4px 0;
    border-top: 1px solid var(--store-border);
}
.option-row:last-child { border-bottom: 1px solid var(--store-border); }
.option-row__info { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.option-row__name { font-weight: 500; line-height: 1.3; }
.option-row__price {
    font-size: 0.875rem;
    color: var(--store-muted);
    font-variant-numeric: tabular-nums;
}
.option-row__price s { text-decoration-thickness: 1px; }
.option-row.is-selected .option-row__name { font-weight: 700; }
.option-row.is-selected .option-row__price { color: var(--store-text); font-weight: 600; }
.option-row.is-sold-out .option-row__name { color: var(--store-muted); }
.option-row .badge { margin-inline-start: 6px; vertical-align: 1px; }

/* 13. Half-and-half toggle -------------------------------------------- */

.half-toggle {
    display: flex;
    gap: 4px;
    flex: none;
}
.half-toggle__btn {
    --ht-ring: var(--store-border-strong);
    --ht-part: color-mix(in srgb, var(--store-border-strong) 30%, var(--store-surface));
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ht-ring);
    transition: background-color 0.12s ease, box-shadow 0.12s ease;
}
.half-toggle__btn:hover:not(:disabled):not([aria-disabled="true"]) { background: var(--store-surface-2); }
.half-toggle__btn[aria-pressed="true"] {
    --ht-ring: var(--store-brand-ink);
    --ht-part: var(--store-brand-ink);
    background: var(--store-brand-soft);
    box-shadow: inset 0 0 0 2px var(--store-brand-ink);
}
.half-toggle__btn:disabled,
.half-toggle__btn[aria-disabled="true"] { opacity: 0.4; cursor: not-allowed; }
.half-toggle__btn:disabled { opacity: 0.3; }

.half-icon { width: 28px; height: 28px; overflow: visible; }

/* Single on/off toggle for groups without halves (same row layout). */
.row-toggle {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 2px solid var(--store-border-strong);
    border-radius: var(--store-radius-sm);
    background: var(--store-surface);
    color: transparent;
}
.row-toggle[aria-pressed="true"] { background: var(--store-brand-ink); border-color: var(--store-brand-ink); color: var(--store-surface); }

/* Quantity stepper. */
.stepper {
    display: inline-flex;
    align-items: center;
    flex: none;
    border: 1px solid var(--store-border-strong);
    border-radius: var(--store-radius-button);
    background: var(--store-surface);
}
.stepper__btn {
    display: grid;
    place-items: center;
    width: 44px;
    height: 46px;
    padding: 0;
    border: 0;
    border-radius: var(--store-radius-button);
    background: transparent;
    color: var(--store-text);
}
.stepper__btn:hover:not(:disabled) { background: var(--store-surface-2); }
.stepper__btn:disabled { color: var(--store-border-strong); cursor: not-allowed; }
.stepper__value {
    min-width: 28px;
    text-align: center;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.stepper--sm .stepper__btn { width: 44px; height: 40px; }

/* 14. Cart ------------------------------------------------------------- */

.page-title { font-size: 1.5rem; margin-bottom: 16px; }

.card {
    padding: 16px;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    background: var(--store-surface);
}
.card + .card { margin-top: 16px; }
.card__title { font-size: 1.125rem; margin-bottom: 12px; }

.cart-lines { margin: 0; padding: 0; list-style: none; }
.cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 12px;
    padding: 16px 0;
    border-bottom: 1px solid var(--store-border);
}
.cart-line:first-child { padding-top: 0; }
.cart-line__name { font-size: 1.0625rem; }
.cart-line__price { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cart-line__options {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: 0.9375rem;
    color: var(--store-muted);
}
.cart-line__options b { font-weight: 600; color: var(--store-text); }
.cart-line__note { grid-column: 1 / -1; font-size: 0.9375rem; color: var(--store-muted); font-style: italic; }
.cart-line__actions {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    gap: 4px 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.cart-line__actions .stepper { margin-inline-end: auto; }
.cart-line.has-problem { padding-inline: 12px; margin-inline: -12px; background: var(--store-danger-bg); border-radius: var(--store-radius-sm); border-bottom-color: transparent; }
.cart-line__problem {
    grid-column: 1 / -1;
    display: flex;
    gap: 8px;
    align-items: flex-start;
    color: var(--store-danger-text);
    font-weight: 600;
    font-size: 0.9375rem;
}
.cart-line__problem .icon { margin-top: 2px; }
.cart-line.has-problem .cart-line__options s { color: var(--store-danger-text); }

.summary { margin: 0; }
.summary__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 0;
}
.summary__row dt { color: var(--store-muted); }
.summary__row dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }
.summary__row--total {
    margin-top: 6px;
    padding-top: 12px;
    border-top: 1px solid var(--store-border);
    font-size: 1.125rem;
    font-weight: 800;
}
.summary__row--total dt { color: var(--store-text); }
.summary__row--discount dt,
.summary__row--discount dd { color: var(--store-success); font-weight: 700; }

/* The club at the checkout (docs/SPEC-loyalty.md, section 5.E): above the totals, on the brand's soft tint. */
.club-box {
    display: grid;
    gap: 10px;
    margin: 4px 0 14px;
    padding: 14px;
    border-radius: var(--store-radius-sm);
    background: var(--store-brand-soft);
}
.club-box__title { display: flex; align-items: center; gap: 8px; font-size: 1rem; }
.club-box__title .icon { color: var(--store-brand-ink); }
.club-box__text { font-size: 0.9375rem; }
.club-box__status { display: flex; align-items: flex-start; gap: 6px; color: var(--store-success); font-weight: 600; font-size: 0.9375rem; }
.club-box__status .icon { margin-top: 3px; }
.club-box__more { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 0.9375rem; }
.club-box__use { padding: 4px 0; }
.club-box__use .muted { display: block; font-size: 0.875rem; }
.club-box .field__hint { margin-top: -4px; }

.min-order { margin-top: 12px; }
.meter {
    display: block;
    width: 100%;
    height: 10px;
    margin-top: 10px;
    border: 0;
    border-radius: 999px;
    overflow: hidden;
    appearance: none;
    background: rgba(122, 75, 0, 0.18);
}
.meter::-webkit-progress-bar { background: rgba(122, 75, 0, 0.18); border-radius: 999px; }
.meter::-webkit-progress-value { background: var(--store-warning-text); border-radius: 999px; }
.meter::-moz-progress-bar { background: var(--store-warning-text); border-radius: 999px; }

.fulfillment-line {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cart-actions { display: grid; gap: 10px; margin-top: 20px; }
.cart-actions__note { font-size: 0.875rem; color: var(--store-muted); text-align: center; }

.empty-state {
    display: grid;
    justify-items: center;
    gap: 8px;
    padding: 48px 16px;
    text-align: center;
}
.empty-state__art {
    display: grid;
    place-items: center;
    width: 96px;
    height: 96px;
    margin-bottom: 8px;
    border-radius: 50%;
    background: var(--store-brand-soft);
    color: var(--store-brand-ink);
}
.empty-state__art .icon { width: 44px; height: 44px; stroke-width: 1.5; }
.empty-state__title { font-size: 1.25rem; }
.empty-state p { color: var(--store-muted); max-width: 32ch; }
.empty-state .btn { margin-top: 12px; }

/* 15. Forms and checkout ---------------------------------------------- */

.form-section {
    min-width: 0;
    margin: 0;
    padding: 16px;
    border: 1px solid var(--store-border);
    border-radius: var(--store-radius);
    background: var(--store-surface);
}
.form-section + .form-section { margin-top: 16px; }
.form-section__title {
    float: right; /* lets legend sit inside the box like a heading */
    width: 100%;
    margin: 0 0 12px;
    padding: 0;
    font-family: var(--store-heading-font);
    font-weight: var(--store-heading-weight);
    font-size: 1.125rem;
}
/* Everything after the title starts below it. Not just the next element: with a single way to receive the order
   the next one is a hidden input, and the pickup line beside the float was squeezed out of the card. */
.form-section__title ~ * { clear: both; }
.form-grid { display: grid; gap: 14px; }

.field { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; }
.field__label { font-weight: 600; }
.field__optional { font-weight: 400; color: var(--store-muted); font-size: 0.875rem; }
.field__hint { font-size: 0.875rem; color: var(--store-muted); }
.field__error {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--store-danger);
}
.field__error .icon { margin-top: 2px; }

.input, .select, .textarea {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--store-border-strong);
    border-radius: var(--store-radius-sm);
    background: var(--store-surface);
    font-size: 1rem;
}
.textarea { min-height: 88px; resize: vertical; }
.select {
    appearance: none;
    padding-inline-start: 12px;
    padding-inline-end: 40px; /* room for the chevron, which sits at the end (left in RTL) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6b7a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: left 12px center;
    background-size: 18px;
}
.input[dir="ltr"] { text-align: right; }
.input::placeholder, .textarea::placeholder { color: var(--store-muted); opacity: 1; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--store-brand-ink); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] {
    border-color: var(--store-danger);
    box-shadow: inset 0 0 0 1px var(--store-danger);
}
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }

/* Radio cards: time, payment method. */
.choice-cards { display: grid; gap: 8px; }
.choice-card { position: relative; display: block; }
.choice-card__input {
    position: absolute;
    top: 18px;
    inset-inline-start: 14px;
    width: 22px;
    height: 22px;
    margin: 0;
    accent-color: var(--store-brand-ink);
    cursor: pointer;
}
.choice-card__body {
    display: block;
    min-height: 56px;
    padding: 14px 14px 14px 14px;
    padding-inline-start: 48px;
    border: 1px solid var(--store-border-strong);
    border-radius: var(--store-radius-sm);
    background: var(--store-surface);
    cursor: pointer;
}
.choice-card__title { display: flex; align-items: center; gap: 8px; font-weight: 700; }
.choice-card__title .icon { color: var(--store-muted); }
.choice-card__desc { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--store-muted); }
.choice-card__input:checked + .choice-card__body {
    border-color: var(--store-brand-ink);
    background: var(--store-brand-soft);
    box-shadow: inset 0 0 0 1px var(--store-brand-ink);
}
.choice-card__input:checked + .choice-card__body .choice-card__title .icon { color: var(--store-brand-ink); }
.choice-card__input:disabled + .choice-card__body { background: var(--store-surface-2); color: var(--store-muted); cursor: not-allowed; }
.choice-card__extra { margin-top: 12px; }

/* Slot picker for scheduled orders. */
.slot-picker { display: grid; gap: 12px; margin-top: 12px; }
.slot-group { min-width: 0; margin: 0; padding: 0; border: 0; }
.slot-group__legend { padding: 0; margin-bottom: 8px; font-weight: 600; font-size: 0.9375rem; }
.slot-days {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 6px; /* keeps focus rings inside the scroll area */
    margin: -6px;
    -webkit-mask-image: linear-gradient(to left, transparent 0, #000 24px);
    mask-image: linear-gradient(to left, transparent 0, #000 24px);
}
.slot-days::-webkit-scrollbar { display: none; }
.slot-times { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.slot { position: relative; display: block; flex: none; }
.slot__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.slot__label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 72px;
    min-height: 48px;
    padding: 6px 10px;
    border: 1px solid var(--store-border-strong);
    border-radius: var(--store-radius-sm);
    background: var(--store-surface);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.2;
    pointer-events: none;
}
.slot__label small { font-weight: 400; font-size: 0.8125rem; color: var(--store-muted); }
.slot__input:checked + .slot__label {
    background: var(--store-brand);
    border-color: var(--store-brand);
    color: var(--store-brand-text);
}
.slot__input:checked + .slot__label small { color: inherit; }
.slot__input:focus-visible + .slot__label { outline: 3px solid var(--store-focus); outline-offset: 2px; }
.slot__input:disabled + .slot__label { border-style: dashed; color: var(--store-muted); background: var(--store-surface-2); text-decoration: line-through; }

.check {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 44px;
    padding: 8px 0;
    cursor: pointer;
}
.check input {
    flex: none;
    width: 22px;
    height: 22px;
    margin: 1px 0 0;
    accent-color: var(--store-brand-ink);
    cursor: pointer;
}
.check__text { font-size: 0.9375rem; }
.check[data-invalid] .check__text { color: var(--store-danger-text); }
.check[data-invalid] input { outline: 2px solid var(--store-danger); outline-offset: 2px; }

.error-summary {
    padding: 16px;
    margin-bottom: 16px;
    border: 2px solid var(--store-danger);
    border-radius: var(--store-radius);
    background: var(--store-danger-bg);
    color: var(--store-danger-text);
}
.error-summary:focus { outline: 3px solid var(--store-focus); outline-offset: 2px; }
.error-summary__title { display: flex; align-items: center; gap: 8px; font-family: var(--store-font); font-weight: 700; font-size: 1.0625rem; }
.error-summary__list { margin: 8px 0 0; padding-inline-start: 22px; }
.error-summary__list li + li { margin-top: 4px; }
.error-summary a { color: inherit; font-weight: 700; }

.order-summary > summary {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
    font-weight: 700;
    cursor: pointer;
    list-style: none;
}
.order-summary > summary::-webkit-details-marker { display: none; }
.order-summary > summary .icon { margin-inline-start: auto; transition: transform 0.2s; }
.order-summary[open] > summary .icon { transform: rotate(180deg); }
.order-summary__lines { margin: 8px 0 12px; padding: 0; list-style: none; font-size: 0.9375rem; }
.order-summary__lines li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.order-summary__lines li span:first-child { color: var(--store-muted); }
.order-summary__lines li span:last-child { flex: none; white-space: nowrap; font-variant-numeric: tabular-nums; }

.checkout-layout__aside { margin-top: 16px; }
.submit-block {
    margin-top: 0;
    padding: 16px;
    border-radius: var(--store-radius);
    background: var(--store-surface);
    border: 1px solid var(--store-border);
}
.submit-block__when {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-weight: 600;
}
.submit-block__note { margin-top: 10px; font-size: 0.875rem; color: var(--store-muted); text-align: center; }

/* 16. Order tracking --------------------------------------------------- */

.order-hero {
    padding: 20px;
    border-radius: var(--store-radius);
    background: var(--store-surface);
    border: 1px solid var(--store-border);
    text-align: center;
}
.order-hero__number {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 999px;
    background: var(--store-surface-2);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.order-hero__title { margin-top: 10px; font-size: 1.625rem; }
.order-hero__eta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    padding: 10px 16px;
    border-radius: var(--store-radius-sm);
    background: var(--store-brand-soft);
    font-size: 1.0625rem;
}
.order-hero__eta strong { font-size: 1.375rem; color: var(--store-brand-ink); font-variant-numeric: tabular-nums; }
.order-hero__updated { margin-top: 10px; font-size: 0.875rem; color: var(--store-muted); }
/* In a business with an order screen: which number to watch (docs/SPEC-order-screen.md, section 6). */
.order-hero__screen { margin: 12px auto 0; max-width: 32rem; font-size: 0.9375rem; color: var(--store-muted); }

.timeline { margin: 20px 0 0; padding: 0; list-style: none; }
.timeline__step {
    position: relative;
    display: flex;
    gap: 14px;
    padding-bottom: 20px;
}
.timeline__step:last-child { padding-bottom: 0; }
.timeline__step::before {
    /* connector line */
    content: "";
    position: absolute;
    top: 30px;
    bottom: 2px;
    inset-inline-start: 13px;
    width: 2px;
    background: var(--store-border-strong);
}
.timeline__step:last-child::before { display: none; }
.timeline__step.is-done::before { background: var(--store-brand-ink); }
.timeline__marker {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    flex: none;
    width: 28px;
    height: 28px;
    border: 2px solid var(--store-border-strong);
    border-radius: 50%;
    background: var(--store-surface);
    color: var(--store-surface);
}
.timeline__marker .icon { width: 16px; height: 16px; stroke-width: 3; }
.timeline__step.is-done .timeline__marker { background: var(--store-brand-ink); border-color: var(--store-brand-ink); }
.timeline__step.is-current .timeline__marker {
    border-color: var(--store-brand-ink);
    box-shadow: 0 0 0 5px var(--store-brand-soft);
}
.timeline__step.is-current .timeline__marker::after {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--store-brand-ink);
}
.timeline__text { padding-top: 2px; }
.timeline__label { font-weight: 600; }
.timeline__step.is-current .timeline__label { font-weight: 800; }
.timeline__step:not(.is-done):not(.is-current) .timeline__label { color: var(--store-muted); }
.timeline__time { font-size: 0.875rem; color: var(--store-muted); font-variant-numeric: tabular-nums; }

.contact-card {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.contact-card__text { flex: 1; min-width: 180px; }

.kv { margin: 0; display: grid; gap: 10px; }
.kv > div { display: grid; gap: 2px; }
.kv dt { font-size: 0.875rem; color: var(--store-muted); }
.kv dd { margin: 0; }

/* 17. Footer ----------------------------------------------------------- */

.store-footer {
    padding: 20px var(--store-gutter) 24px;
    text-align: center;
    font-size: 0.875rem;
    color: var(--store-muted);
    border-top: 1px solid var(--store-border);
    background: var(--store-bg);
}
.store-footer__links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 16px;
    margin: 0 0 6px;
    padding: 0;
    list-style: none;
}
.store-footer__links a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--store-muted);
}
.store-main--with-cart-bar + .store-footer { padding-bottom: 100px; }
/* The cart bar floats over the page end: leave room for it under the footer too. */
.store:has(.cart-bar) .store-footer { padding-bottom: 96px; }

/* 18. Wide screens ----------------------------------------------------- */

@media (min-width: 640px) {
    :root { --store-gutter: 24px; }
    .product-list { grid-template-columns: repeat(var(--store-menu-columns-wide), minmax(0, 1fr)); }
    .store-header__name { font-size: var(--store-header-name-size-wide); }
    .fulfillment { grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: center; }
    .closed-card__actions { grid-template-columns: repeat(2, max-content); }
    .slot-times { grid-template-columns: repeat(4, minmax(0, 1fr)); }
    .sheet { margin: 40px auto; border-radius: var(--store-radius-lg); }
    .sheet__grabber { display: none; }
    .sheet__footer { border-radius: 0 0 var(--store-radius-lg) var(--store-radius-lg); }
    .sheet-dialog { margin: auto; border-radius: var(--store-radius-lg); }
    .cart-actions { grid-template-columns: 1fr; }
}

@media (min-width: 900px) {
    /* The cover becomes a card in the menu's column: the edges line up and the 3:1 photo shows whole. */
    .store-header { --store-logo-size: var(--store-logo-size-wide); }
    .store-cover {
        width: min(100% - 2 * var(--store-gutter), var(--store-max-width) - 2 * var(--store-gutter));
        height: var(--store-cover-height-wide);
        margin: 16px auto 0;
        border-radius: var(--store-radius-lg);
    }
    /* Clear the card's rounded corner. Equal margins keep a centred logo (boutique) centred. */
    .store-header:not(.store-header--no-cover) .store-logo { margin-inline: 20px; }
    .store-main { padding-top: 28px; }
    .checkout-layout {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 320px;
        gap: 24px;
        align-items: start;
    }
    .checkout-layout__aside { position: sticky; top: 80px; margin-top: 0; }
}

/* 19. Motion and forced colours --------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
    }
}

@media (forced-colors: active) {
    .half-toggle__btn[aria-pressed="true"],
    .option-choice__input:checked + .option-choice__body,
    .choice-card__input:checked + .choice-card__body,
    .segmented__input:checked + .segmented__label,
    .slot__input:checked + .slot__label,
    .category-nav__link[aria-current="true"] {
        outline: 3px solid Highlight;
        outline-offset: -3px;
    }
    .half-toggle__btn { --ht-ring: ButtonText; --ht-part: GrayText; }
    .half-toggle__btn[aria-pressed="true"] { --ht-ring: Highlight; --ht-part: Highlight; }
}

/* 20. Components added for spec 5.3 and 6.2 (kashrut, notice, text groups) */

/* Kashrut chip in the header (spec 5.3). Own background, readable on any header. */
.kosher-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid var(--store-border);
    border-radius: 999px;
    background: var(--store-surface);
    color: var(--store-text);
    font-size: 0.875rem;
    font-weight: 600;
}
.kosher-chip::after { content: ""; position: absolute; inset: -5px 0; } /* a 44px tap area */
.kosher-chip .icon { color: var(--store-muted); }
.kosher-chip:hover { background: var(--store-surface-2); }
a.kosher-chip { text-decoration: none; }
.kosher-chip__action { color: var(--store-brand-ink); text-decoration: underline; text-underline-offset: 2px; }

.store-dialog {
    width: min(92vw, 420px);
    max-height: 88vh;
    padding: 0;
    border: 0;
    border-radius: var(--store-radius);
    background: var(--store-surface);
    color: var(--store-text);
    box-shadow: var(--store-shadow-lg);
}
.store-dialog::backdrop { background: var(--store-overlay); }
.store-dialog__head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 16px; padding-inline-start: 16px; }
.store-dialog__head h2 { font-size: 1.125rem; }
.store-dialog__head .icon-btn { margin-inline-start: auto; }
.store-dialog__body { padding: 0 16px 16px; }
.store-dialog__image { aspect-ratio: 3 / 4; border: 1px solid var(--store-border); border-radius: var(--store-radius-sm); overflow: hidden; }

/* Category schedule and product lead time (spec 6.2). */
.menu-section__schedule {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--store-surface-2);
    font-size: 0.875rem;
    font-weight: 600;
}
.badge--notice { background: var(--store-info-bg); color: var(--store-info-text); }

.lead-time {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: var(--store-radius-sm);
    background: var(--store-info-bg);
    color: var(--store-info-text);
    font-size: 0.9375rem;
}
.lead-time .icon { margin-top: 2px; }
.lead-time strong { display: block; }

/* Small on/off chip inside a row, e.g. double quantity (max_qty_per_option = 2). */
.chip-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    align-self: flex-start;
    min-height: 30px;
    margin-top: 4px;
    padding: 0 10px;
    border: 1px solid var(--store-border-strong);
    border-radius: 999px;
    background: var(--store-surface);
    color: var(--store-text);
    font-size: 0.8125rem;
    font-weight: 600;
}
.chip-toggle::after { content: ""; position: absolute; inset: -7px -4px; } /* 44px hit area */
.chip-toggle[aria-pressed="true"] { background: var(--store-brand-ink); border-color: var(--store-brand-ink); color: var(--store-surface); }
.chip-toggle[hidden] { display: none; }

/* Text group (kind = text): dedication, greeting card. */
.text-group__input-wrap { position: relative; }
.text-group__meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 6px;
    font-size: 0.875rem;
    color: var(--store-muted);
}
.text-group__count { font-variant-numeric: tabular-nums; white-space: nowrap; }
.text-group__count.is-near { color: var(--store-warning-text); font-weight: 700; }

.icon--flip { transform: scaleX(-1); }

/* A store without a single product photo: every theme shows a one-column list
   without empty tiles (spec section 11, design decisions). */
body.store.store--no-photos {
    --store-menu-columns: 1;
    --store-menu-columns-wide: 2;
    --store-menu-gap: 12px;
    --store-card-direction: row;
    --store-card-media-width: 0px;
    --store-card-placeholder: none;
    --store-card-gap: 0;
    --store-card-bg: var(--store-surface);
    --store-card-border: 1px solid var(--store-border);
    --store-card-padding: 12px 14px;
}
body.store.store--no-photos .product-card__media { display: none; }
