/* Snac Fresh Customer Portal: the shop theme in the Snac Fresh brand (snacfresh.food; docs/UI_THEME.md), on top of
   the shared theme (assets/theme/theme.css, Bootstrap 5.3). Neo-brutalist: cream page, pink pill header bar, ink
   borders with hard offset shadows, chunky uppercase Space Grotesk headings, DM Sans text, JetBrains Mono labels,
   teal footer. Mobile first from 320 px (NFR-02), 44 px touch targets on phones (NFR-03).
   Contrast: brand pink #E93372 carries only large text, borders and shadows; anything with small text on pink uses
   --sf-pink-ink #C8215D (white 5.5:1). Ink on teal 5.8:1, ink on cream 11:1. Fonts and logos are local copies
   (assets/theme/brand, from resources/theme/brand) because the security policy only loads files from this site. */

@font-face { font-family: "Space Grotesk"; src: url("theme/brand/fonts/space-grotesk.woff2") format("woff2"); font-weight: 300 700; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("theme/brand/fonts/dm-sans.woff2") format("woff2"); font-weight: 100 1000; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("theme/brand/fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

/* ─── Tokens ─────────────────────────────────────────────────────────── */
body.app-customer {
  --sf-pink: #E93372; --sf-pink-ink: #C8215D; --sf-pink-dark: #a8194c; --sf-pink-soft: #fde3ec;
  --sf-teal: #00CACC; --sf-teal-soft: #d6f6f6; --sf-ink: #383838; --sf-cream: #FDF7F0; --sf-cream-2: #f7ece0;
  --sf-green: #7EBF50; --sf-green-soft: #e6f3dc; --sf-orange: #FF6B1A; --sf-orange-soft: #ffe6d6;
  --sf-muted: #5c5c5c; --sf-line: #383838; --sf-hair: #e7ddd2;
  --sf-border: 3px solid var(--sf-ink); --sf-border-thick: 4px solid var(--sf-ink); --sf-border-thin: 2px solid var(--sf-ink);
  --sf-radius: 16px; --sf-shadow: 6px 6px 0 0 var(--sf-ink); --sf-shadow-sm: 4px 4px 0 0 var(--sf-ink); --sf-shadow-xs: 3px 3px 0 0 var(--sf-ink);
  --sf-shadow-lg: 10px 10px 0 0 var(--sf-ink);
  --sf-head: "Space Grotesk", "Arial Narrow", system-ui, sans-serif; --sf-body: "DM Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sf-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  /* the platform's colour names (used in page markup) and Bootstrap's, in the brand */
  --ink: var(--sf-ink); --muted: var(--sf-muted); --line: var(--sf-hair); --bg: var(--sf-cream); --teal: var(--sf-pink-ink); --teal-soft: var(--sf-pink-soft);
  --pink: var(--sf-pink-ink); --pink-soft: var(--sf-pink-soft); --err: #b42318; --ok: #2f6b14; --shadow: var(--sf-shadow-sm); --seashell: var(--sf-cream);
  --bs-primary: #C8215D; --bs-primary-rgb: 200,33,93; --bs-link-color: #C8215D; --bs-link-color-rgb: 200,33,93; --bs-link-hover-color: #a8194c; --bs-link-hover-color-rgb: 168,25,76;
  --bs-body-color: #383838; --bs-secondary-color: #5c5c5c; --bs-border-color: #383838; --bs-body-font-family: var(--sf-body);
  background: var(--sf-cream); color: var(--sf-ink); font-family: var(--sf-body); font-size: .9375rem; display: flex; flex-direction: column; min-height: 100vh;
}
body.app-customer a { color: var(--sf-pink-ink); text-underline-offset: .15em; }
body.app-customer a:hover { color: var(--sf-pink-dark); }
body.app-customer :is(h1, h2, h3, .h5, .h6) { font-family: var(--sf-head); color: var(--sf-ink); }
.sr { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px !important; border: 0 !important; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
img { max-width: 100%; }

/* Buttons: pink pills with an ink border and a hard shadow that presses in */
body.app-customer button:not([class*="btn-"]):not(.btn-plain):not(.link):not(.secondary):not(.dropdown-item), body.app-customer .btn:not([class*="btn-"]):not(.secondary) {
  background: var(--sf-pink-ink); border: var(--sf-border); color: #fff; border-radius: 50rem; font-family: var(--sf-body); font-weight: 800; text-transform: uppercase;
  letter-spacing: .02em; font-size: .8rem; padding: .4rem 1rem; box-shadow: var(--sf-shadow-xs); transition: transform .1s ease, box-shadow .1s ease, background .15s; }
body.app-customer button:not([class*="btn-"]):not(.btn-plain):not(.link):not(.secondary):not(.dropdown-item):hover, body.app-customer .btn:not([class*="btn-"]):not(.secondary):hover {
  background: var(--sf-pink-dark); border-color: var(--sf-ink); color: #fff; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--sf-ink); }
body.app-customer :is(button:not([class*="btn-"]):not(.btn-plain):not(.link):not(.dropdown-item), .btn:not([class*="btn-"])):active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 0 var(--sf-ink); }
body.app-customer button.secondary, body.app-customer .btn.secondary { color: var(--sf-ink) !important; background: #fff !important; border: var(--sf-border) !important; border-radius: 50rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .02em; font-size: .8rem; box-shadow: var(--sf-shadow-xs); transition: transform .1s ease, box-shadow .1s ease, background .15s; }
body.app-customer button.secondary:hover, body.app-customer .btn.secondary:hover { background: var(--sf-teal) !important; color: var(--sf-ink) !important; transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--sf-ink); }
body.app-customer button.link { color: var(--sf-pink-ink) !important; text-transform: none; letter-spacing: 0; box-shadow: none; }
body.app-customer button:disabled, body.app-customer .btn[aria-disabled="true"] { background: #e9e2da !important; color: var(--sf-muted) !important; box-shadow: none !important; transform: none !important; opacity: 1; }
body.app-customer .btn-primary { --bs-btn-bg: #C8215D; --bs-btn-border-color: #383838; --bs-btn-hover-bg: #a8194c; --bs-btn-hover-border-color: #383838; --bs-btn-active-bg: #a8194c; --bs-btn-active-border-color: #383838;
  --bs-btn-disabled-bg: #C8215D; --bs-btn-disabled-border-color: #383838; border-width: 3px; border-radius: 50rem; font-weight: 800; }
body.app-customer .btn-outline-primary, body.app-customer .btn-outline-secondary { --bs-btn-color: #383838; --bs-btn-border-color: #383838; --bs-btn-hover-bg: #00CACC; --bs-btn-hover-color: #383838; --bs-btn-hover-border-color: #383838;
  --bs-btn-active-bg: #00CACC; --bs-btn-active-color: #383838; border-width: 2px; border-radius: 50rem; font-weight: 700; }
body.app-customer .bg-primary { background-color: var(--sf-pink-ink) !important; }
body.app-customer .text-primary { color: var(--sf-pink-ink) !important; }
body.app-customer :is(button, .btn, a, summary, select, input, textarea):focus-visible { outline: 3px solid var(--sf-pink-ink); outline-offset: 2px; box-shadow: none; }
body.app-customer .content :is(input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=file]):not([type=submit]), select, textarea) {
  border: var(--sf-border-thin); border-radius: 10px; background-color: #fff; color: var(--sf-ink); }
body.app-customer .content :is(input, select, textarea):focus { border-color: var(--sf-ink); box-shadow: var(--sf-shadow-xs); }
body.app-customer input[type=checkbox], body.app-customer input[type=radio] { accent-color: var(--sf-pink-ink); }
.btn-plain { background: none; border: 0; padding: 0; color: inherit; font: inherit; cursor: pointer; }
.dropdown-menu { border: var(--sf-border); border-radius: 14px; box-shadow: var(--sf-shadow-sm); padding: .4rem; font-family: var(--sf-body); }
.dropdown-item { border-radius: 8px; font-weight: 600; min-height: 40px; display: flex; align-items: center; }
.dropdown-item:hover, .dropdown-item:focus { background: var(--sf-teal-soft); color: var(--sf-ink); }
.dropdown-item:active { background: var(--sf-pink-ink); color: #fff; }
.dropdown-divider { border-top: 2px solid var(--sf-ink); opacity: .15; }

/* ─── Shell ──────────────────────────────────────────────────────────── */
.sf-wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding-left: 16px; padding-right: 16px; }
@media (min-width: 768px) { .sf-wrap { padding-left: 24px; padding-right: 24px; } }

/* Ticker strip (static: no motion, nothing to pause) */
.sf-utility { background: var(--sf-ink); color: #fff; font-family: var(--sf-mono); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sf-utility .sf-wrap { display: flex; align-items: center; justify-content: space-between; gap: .75rem; min-height: 34px; }
.sf-utility p { margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-utility .tick { color: var(--sf-teal); margin: 0 .6rem; }
.sf-utility nav { display: none; gap: 1.1rem; flex: none; }
.sf-utility a { color: #fff !important; text-decoration: none; display: inline-flex; align-items: center; min-height: 34px; }
.sf-utility a:hover { color: var(--sf-teal) !important; }
@media (min-width: 768px) { .sf-utility nav { display: flex; } }

/* Header: the pink pill bar (logo, search, tools), then address and category chips on cream */
.sf-header { background: var(--sf-cream); position: relative; z-index: 1020; padding-top: 14px; border-bottom: var(--sf-border); }
@media (min-width: 992px) and (min-height: 900px) { .sf-header { position: sticky; top: 0; } }
.sf-head { display: flex; align-items: center; gap: .6rem 1.25rem; min-height: 66px; padding-top: .55rem; padding-bottom: .55rem;
  background: var(--sf-pink); border: var(--sf-border-thick); border-radius: 50rem; box-shadow: var(--sf-shadow); max-width: calc(1280px - 32px); width: calc(100% - 32px); padding-left: 1.4rem; padding-right: .6rem; }
@media (min-width: 768px) { .sf-head { width: calc(100% - 48px); max-width: calc(1280px - 48px); } }
.sf-logo { display: inline-flex; align-items: center; text-decoration: none; flex: none; min-width: 0; line-height: 1; }
.sf-logo img { height: 28px; width: auto; display: block; }

.search { position: relative; flex: 1 1 auto; max-width: 640px; display: none; }
.sf-search { display: flex; margin: 0; border: var(--sf-border); border-radius: 50rem; background: #fff; overflow: hidden; }
.sf-search input { flex: 1; min-width: 0; border: 0; padding: 0 1.1rem; min-height: 42px; font-size: .95rem; background: transparent; color: var(--sf-ink); font-family: var(--sf-body); }
.sf-search input::placeholder { color: #6b6b6b; }
.sf-search input:focus { outline: 0; }
.sf-search:focus-within { outline: 3px solid #fff; outline-offset: 2px; }
.sf-search .btn-search { flex: none; width: 54px; border: 0; border-left: var(--sf-border); background: var(--sf-teal); color: var(--sf-ink); font-size: 1.1rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.sf-search .btn-search:hover { background: #2fe0e2; }
.suggest { list-style: none; margin: .5rem 0 0; padding: .4rem; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border: var(--sf-border); border-radius: 16px; box-shadow: var(--sf-shadow-sm); z-index: 1050; max-height: 60vh; overflow: auto; }
.suggest[hidden] { display: none; }
.suggest a { display: flex; gap: .65rem; align-items: center; padding: .4rem .6rem; min-height: 44px; color: var(--sf-ink) !important; text-decoration: none; border-radius: 10px; font-weight: 600; }
.suggest li[aria-selected="true"] a, .suggest a:hover { background: var(--sf-teal-soft); }
.suggest .thumb { width: 36px; height: 36px; flex: none; object-fit: contain; border-radius: 8px; background: var(--sf-cream); border: 2px solid var(--sf-ink); }
.suggest small { display: block; color: var(--sf-muted); font-weight: 400; }
.search .close { display: none; min-height: 44px; margin-top: .5rem; align-self: flex-end; }
@media (min-width: 768px) { .search { display: block; } }
@media (max-width: 767.98px) {
  .search.open { display: flex; flex-direction: column-reverse; position: fixed; left: 0; right: 0; bottom: 0; top: auto; z-index: 1060; max-width: none;
    background: var(--sf-cream); border-top: var(--sf-border-thick); padding: .75rem; max-height: 100vh; }
  .search.open .suggest { position: static; max-height: calc(100vh - 160px); margin-bottom: .6rem; box-shadow: none; }
  .search .close { display: inline-flex; align-items: center; }
}
/* The phone search sheet sits inside the header: lift the header above the bottom bar while it is open */
.sf-header:has(.search.open) { z-index: 1070; }

.sf-tools { margin-left: auto; display: flex; align-items: center; gap: .45rem; flex: none; }
.sf-tool { position: relative; display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 .5rem;
  border-radius: 50rem; background: #fff; border: var(--sf-border); color: var(--sf-ink) !important; text-decoration: none; font-weight: 800; font-size: .78rem; line-height: 1.1; }
.sf-tool:hover { background: var(--sf-teal); }
.sf-tool > i { font-size: 1.15rem; }
.sf-tool-text { display: none; text-align: left; text-transform: uppercase; letter-spacing: .02em; }
.sf-tool-text small { display: block; font-weight: 500; font-size: .68rem; color: var(--sf-muted); text-transform: none; letter-spacing: 0; }
.sf-account.dropdown-toggle::after { display: none; }
.sf-count { position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 5px; border-radius: 50rem; background: var(--sf-teal); color: var(--sf-ink); border: 2px solid var(--sf-ink);
  font-family: var(--sf-mono); font-size: .68rem; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.sf-count-alert { background: #fff; color: var(--sf-pink-ink); }
.sf-basket { position: relative; display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; min-width: 44px; justify-content: center; padding: 0 .65rem;
  border-radius: 50rem; background: var(--sf-ink); border: var(--sf-border); color: #fff !important; text-decoration: none; font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.sf-basket:hover { background: #1f1f1f; }
.sf-basket > i { font-size: 1.15rem; }
.sf-basket .sf-count { position: static; }
.sf-apply { padding: 0 1.1rem; white-space: nowrap; }
@media (max-width: 440px) { .sf-apply { display: none; } }
@media (min-width: 992px) { .sf-tool-text { display: block; } .sf-tool { padding: 0 .9rem 0 .6rem; } .sf-basket { padding: 0 1rem 0 .85rem; } }
@media (max-width: 767.98px) { .sf-head { border-radius: 26px; padding-left: 1rem; min-height: 60px; } .sf-logo img { height: 22px; } }
/* Narrow phones: notifications stay in the Account menu; the logo shrinks */
@media (max-width: 379.98px) {
  .sf-tools .bell { display: none; }
  .sf-head { gap: .4rem; padding-left: .8rem; padding-right: .45rem; }
  .sf-logo img { height: 19px; }
}

/* Under the bar: the phone search field and the delivery address */
.sf-subhead { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; padding-top: .85rem; }
.sf-msearch { flex: 1 1 100%; display: flex; align-items: center; gap: .6rem; min-height: 46px; padding: 0 1rem; border: var(--sf-border); border-radius: 50rem; background: #fff;
  color: #6b6b6b !important; text-decoration: none; box-shadow: var(--sf-shadow-xs); overflow: hidden; }
.sf-msearch i { color: var(--sf-ink); font-size: 1.05rem; }
.sf-msearch span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.deliver { display: flex; gap: .45rem; align-items: center; margin: 0; min-width: 0; font-size: .85rem; }
.deliver label { white-space: nowrap; color: var(--sf-ink); font-family: var(--sf-mono); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; margin: 0; }
.deliver label i { color: var(--sf-pink-ink); }
.deliver select { min-height: 38px; max-width: 240px; min-width: 0; padding: 0 2rem 0 .8rem; border: var(--sf-border-thin); border-radius: 50rem; background-color: #fff;
  font-weight: 700; font-size: .85rem; color: var(--sf-ink); appearance: none; font-family: var(--sf-body);
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23383838' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat; background-position: right .7rem center; background-size: 12px 10px; }
.deliver button { min-height: 38px; }
@media (min-width: 768px) { .sf-msearch { display: none; } .sf-subhead:not(:has(.deliver)) { display: none; } }
@media (max-width: 767.98px) { .deliver select { min-height: 44px; flex: 1; max-width: none; } .deliver { flex: 1 1 100%; } }

/* Category chips: scroll sideways on small screens */
.sf-cats .sf-wrap { display: flex; gap: .5rem; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; padding-top: .8rem; padding-bottom: .9rem; }
.sf-cats .sf-wrap::-webkit-scrollbar { display: none; }
.sf-cats a { flex: none; display: inline-flex; align-items: center; gap: .4rem; min-height: 40px; padding: 0 .95rem; color: var(--sf-ink) !important; text-decoration: none;
  font-weight: 800; font-size: .78rem; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; background: #fff; border: var(--sf-border-thin); border-radius: 50rem; }
.sf-cats a:hover { background: var(--sf-teal); }
.sf-cats a[aria-current] { background: var(--sf-pink-ink); color: #fff !important; }
.sf-cats-extra { margin-left: auto; background: var(--sf-cream) !important; border-style: dashed !important; }
.sf-cats-extra ~ .sf-cats-extra { margin-left: 0; }
.sf-cats-extra:hover { background: var(--sf-teal) !important; }
@media (max-width: 767.98px) { .sf-cats a { min-height: 44px; } }

/* Page */
.sf-main { padding-top: 1.75rem; padding-bottom: 3rem; flex: 1 0 auto; outline: 0; }
.sf-main .content { padding: 0 !important; max-width: none; gap: 1.5rem; }
.sf-messages { display: grid; gap: .75rem; margin-bottom: 1.25rem; }
.content h1 { font-size: 2rem; font-weight: 700; letter-spacing: -.02em; text-transform: uppercase; line-height: 1.05; }
.content h2 { font-size: 1.3rem; font-weight: 700; letter-spacing: -.01em; text-transform: uppercase; }
.content h3 { font-weight: 700; }
@media (max-width: 767.98px) { body.app-customer { padding-bottom: 64px; } .sf-main { padding-top: 1.25rem; } .content h1 { font-size: 1.55rem; } .content h2 { font-size: 1.1rem; } }

/* Cards, messages, tables and labels in the brand */
body.app-customer .card { background: #fff; border: var(--sf-border); border-radius: var(--sf-radius); box-shadow: var(--sf-shadow-sm); }
body.app-customer .flash { border: var(--sf-border); border-radius: 14px; box-shadow: var(--sf-shadow-xs); color: var(--sf-ink); font-weight: 500; }
body.app-customer .flash.ok { background: var(--sf-green-soft); }
body.app-customer .flash.err { background: var(--sf-pink-soft); }
body.app-customer .flash.warn { background: var(--sf-orange-soft); }
body.app-customer .flash.info, body.app-customer .flash:not(.ok):not(.err):not(.warn) { background: var(--sf-teal-soft); }
body.app-customer .flash a { color: var(--sf-ink); text-decoration: underline; }
body.app-customer .content table:not(.table) th { font-family: var(--sf-mono); font-size: .66rem; letter-spacing: .1em; color: var(--sf-ink); background: var(--sf-cream); border-bottom: var(--sf-border-thin); }
body.app-customer .content table:not(.table) td { border-bottom: 1px solid var(--sf-hair); }
body.app-customer .content table:not(.table) tbody tr:hover > td { background: #fffaf4; }
body.app-customer .content table button:not(.link), body.app-customer .content table .btn { box-shadow: none; padding: .25rem .8rem; }
body.app-customer .pill, body.app-customer .tag { font-family: var(--sf-mono); font-size: .64rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border: 2px solid var(--sf-ink);
  background: #fff; color: var(--sf-ink); padding: .2em .6em; }
.muted, .hint { color: var(--sf-muted); }

/* Account area: side menu on desktop (phones use the Account menu in the bottom bar) */
.sf-acct { display: grid; gap: 1.75rem; }
.sf-acct-nav { display: none; }
@media (min-width: 992px) {
  .sf-acct { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .sf-acct-nav { display: block; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; background: #fff; border: var(--sf-border); border-radius: var(--sf-radius);
    box-shadow: var(--sf-shadow-sm); padding: 1rem .8rem; }
}
.sf-acct-name { display: flex; gap: .5rem; align-items: center; font-family: var(--sf-head); font-weight: 700; text-transform: uppercase; margin: 0 .5rem .25rem; }
.sf-acct-name i { color: var(--sf-pink-ink); }
.sf-acct-nav h3 { font-family: var(--sf-mono) !important; font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sf-pink-ink) !important; margin: 1rem .5rem .15rem !important; }
.sf-acct-nav ul { margin: .25rem 0 0 !important; }
.sf-acct-nav li a { min-height: 36px !important; font-size: .875rem; font-weight: 600; }
.menu-list li a[aria-current], dialog.menu li a[aria-current] { background: var(--sf-pink-ink); color: #fff !important; font-weight: 800; }

/* Footer: teal with ink */
.sf-footer { background: var(--sf-teal); color: var(--sf-ink); margin-top: auto; border-top: var(--sf-border-thick); }
.sf-foot-cols { display: grid; gap: 1.75rem; padding-top: 2.75rem; padding-bottom: 2rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .sf-foot-cols { grid-template-columns: 1fr 1fr; } }
@media (min-width: 992px) { .sf-foot-cols { grid-template-columns: 1.6fr 1fr 1fr 1.2fr; } }
.sf-foot-brand p { margin: 1rem 0 0; max-width: 340px; font-size: .9rem; line-height: 1.55; font-weight: 500; }
.sf-footer h2 { font-family: var(--sf-mono) !important; color: var(--sf-ink); font-size: .7rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .5rem; }
.sf-footer ul { list-style: none; margin: 0; padding: 0; }
.sf-footer li a { display: inline-flex; align-items: center; min-height: 36px; color: var(--sf-ink) !important; text-decoration: none; font-size: .9rem; font-weight: 700; }
.sf-footer li a:hover { text-decoration: underline; text-decoration-thickness: 2px; }
.sf-foot-base { border-top: var(--sf-border-thin); padding-top: 1rem; padding-bottom: 1rem; font-family: var(--sf-mono); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.sf-foot-base p { margin: 0; }
@media (max-width: 767.98px) { .sf-footer { padding-bottom: 4.5rem; } .sf-footer li a { min-height: 44px; } }

/* Bottom navigation on phones (NFR-02) */
.bottom { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1030; display: grid; grid-template-columns: repeat(5, 1fr); background: #fff; border-top: var(--sf-border); }
.bottom a { min-height: 58px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em;
  color: var(--sf-ink) !important; text-decoration: none; }
.bottom a i { font-size: 1.25rem; line-height: 1; }
.bottom [aria-current] { color: var(--sf-pink-ink) !important; box-shadow: inset 0 -4px 0 var(--sf-pink); }
.bottom [data-basket-count] { display: none; }
@media (min-width: 768px) { .bottom { display: none; } }

/* Sign-in: teal brand panel beside the form */
.sf-auth { min-height: 100vh; display: grid; background: var(--sf-cream); }
.sf-auth-brand { background: repeating-linear-gradient(135deg, var(--sf-teal) 0 22px, #0bd3d5 22px 44px); color: var(--sf-ink); padding: 1.75rem 1.25rem; border-bottom: var(--sf-border-thick); }
.sf-auth-brand .sf-logo img { height: 30px; }
.sf-auth-brand h2 { font-family: var(--sf-head); font-size: 1.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: -.02em; line-height: 1.05; margin: 1.25rem 0 0; color: var(--sf-ink); }
.sf-auth-brand ul { display: none; list-style: none; padding: 0; margin: 1.75rem 0 0; gap: .8rem; }
.sf-auth-brand li { display: flex; gap: .75rem; align-items: center; font-size: .95rem; font-weight: 600; background: #fff; border: var(--sf-border); border-radius: 14px; padding: .65rem .9rem; box-shadow: var(--sf-shadow-xs); }
.sf-auth-brand li i { color: var(--sf-pink-ink); font-size: 1.15rem; }
.sf-auth .login-wrapper { min-height: 0; background: none; justify-content: flex-start; padding: 2rem 16px 2.5rem; }
.sf-auth .login-wrapper .card { background: #fff; border: var(--sf-border-thick); box-shadow: var(--sf-shadow); border-radius: 20px; padding: 1.75rem; }
.sf-auth .login-wrapper .card h1 { font-family: var(--sf-head); font-size: 1.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: -.02em; }
.sf-auth .login-wrapper label { font-family: var(--sf-mono); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.sf-auth .login-wrapper input:not([type=checkbox]):not([type=radio]):not([type=hidden]) { min-height: 46px; border: var(--sf-border-thin); border-radius: 12px; }
.sf-auth .login-wrapper .card button[type=submit]:not(.lnk) { min-height: 50px; margin-top: 1.4rem; width: 100%; font-size: .9rem; box-shadow: var(--sf-shadow-sm); }
/* Two-step screens (shared login_verify / login_setup): "Back" is a text link, not a second big button. */
.sf-auth .login-wrapper .card button.lnk { width: auto; min-height: 0; margin: 0; padding: 0; border: 0; background: none; box-shadow: none; color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sf-auth .login-wrapper .card .lg-row form, .sf-auth .login-wrapper .card > form:last-child:not(.lg-f) { margin: 0; display: inline-flex; }
.sf-auth .login-wrapper .flash { max-width: 400px; }
/* Sign-in: "Forgot password?" beside the Password label, Show / Hide inside the password field (app.js). */
.sf-auth .lg-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: .75rem 0 .25rem; }
.sf-auth .lg-row label { margin: 0; }
.sf-auth .lg-row .lnk { font-size: .85rem; font-weight: 700; color: var(--sf-ink); }
.sf-auth .lg-pw { position: relative; display: block; }
.sf-auth .lg-pw input { padding-right: 70px !important; }
.sf-auth .lg-pw .lnk { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 4px; min-height: 32px; font: inherit; font-size: .85rem; font-weight: 700; color: var(--sf-ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sf-auth .lg-pw .lnk[hidden] { display: none; }
.sf-auth-foot { max-width: 400px; width: 100%; text-align: center; font-size: .85rem; color: var(--sf-muted); margin: 0; }
@media (min-width: 900px) {
  .sf-auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .sf-auth-brand { padding: 3.5rem; display: flex; flex-direction: column; justify-content: center; border-bottom: 0; border-right: var(--sf-border-thick); }
  .sf-auth-brand h2 { font-size: 2.8rem; max-width: 520px; }
  .sf-auth-brand ul { display: grid; max-width: 460px; }
  .sf-auth .login-wrapper { justify-content: center; padding: 3rem 2rem; }
  .sf-auth .login-wrapper .card { padding: 2.5rem; }
}

/* ─── Shop components ────────────────────────────────────────────────── */
.grid { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.grid > * { min-width: 0; }
@media (max-width: 575.98px) { .grid:has(> .pcard) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; } }
@media (max-width: 359.98px) { .grid:has(> .pcard) { grid-template-columns: minmax(0, 1fr); } }
.cols { display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .cols { grid-template-columns: 260px 1fr; align-items: start; } }
.row { align-items: center; }
.crumbs { font-family: var(--sf-mono); font-size: .7rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin: 0; color: var(--sf-muted); }
.crumbs a { color: var(--sf-ink) !important; display: inline-block; padding: .35rem 0; text-decoration: none; } .crumbs a:hover { color: var(--sf-pink-ink) !important; text-decoration: underline; }
.tap { display: flex; align-items: center; min-height: 44px; }
main summary { min-height: 40px; display: flex; align-items: center; cursor: pointer; }
@media (max-width: 767.98px) { button, .btn, .content input:not([type=checkbox]):not([type=radio]), .content select { min-height: 44px; } }
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.sec-head h2 { margin: 0; }
.sec-head a { font-weight: 800; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; text-decoration: none; display: inline-flex; align-items: center; gap: .25rem; min-height: 32px; }
.sec-head .muted { font-family: var(--sf-mono); font-size: .7rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }

/* Product cards */
.pcard { position: relative; background: #fff; border: var(--sf-border); border-radius: var(--sf-radius); display: flex; flex-direction: column; min-width: 0; overflow: hidden;
  box-shadow: var(--sf-shadow-sm); transition: transform .12s ease, box-shadow .12s ease; }
.pcard:hover { transform: translate(-2px, -2px); box-shadow: var(--sf-shadow); }
.pcard .img { position: relative; aspect-ratio: 1 / 1; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; border-bottom: var(--sf-border); }
.pcard .img img { width: 100%; height: 100%; object-fit: contain; padding: .5rem; transition: transform .25s ease; }
.pcard:hover .img img { transform: scale(1.04); }
.pcard .badges { position: absolute; top: .6rem; left: .6rem; right: .6rem; display: flex; flex-wrap: wrap; gap: .3rem; pointer-events: none; z-index: 1; }
.ph { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 2.8rem; color: var(--sf-ink);
  background: repeating-linear-gradient(135deg, var(--ph-a) 0 14px, var(--ph-b) 14px 28px); --ph-a: #fdf7f0; --ph-b: #f7ece0; }
.ph.tone-dairy { --ph-a: #fff6d9; --ph-b: #fdeec2; } .ph.tone-meat { --ph-a: #fde3ec; --ph-b: #fbd3e1; } .ph.tone-fish { --ph-a: #d6f6f6; --ph-b: #c3f0f0; }
.ph.tone-veg { --ph-a: #e6f3dc; --ph-b: #d8ecc9; } .ph.tone-bakery { --ph-a: #fbeedd; --ph-b: #f5e2c8; } .ph.tone-frozen { --ph-a: #e5ebfb; --ph-b: #d7e0f8; }
.ph.tone-drinks { --ph-a: #d6f6f6; --ph-b: #c3f0f0; } .ph.tone-alcohol { --ph-a: #f3e4f5; --ph-b: #ead4ee; } .ph.tone-pack { --ph-a: #eeeeee; --ph-b: #e3e3e3; }
.ph.tone-dry { --ph-a: #ffe6d6; --ph-b: #ffd8c0; }
.pcard .body { padding: .85rem .9rem .95rem; display: flex; flex-direction: column; gap: .3rem; flex: 1; }
.pcard .supplier { margin: 0; font-family: var(--sf-mono); font-size: .64rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sf-pink-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pcard h3 { font-family: var(--sf-head); font-weight: 700; font-size: 1rem; line-height: 1.2; margin: 0; }
.pcard h3 a { color: var(--sf-ink) !important; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.pcard h3 a:hover { text-decoration: underline; }
.pcard h3 a::after { content: ""; position: absolute; inset: 0; z-index: 0; }
.pcard .body > *:not(h3) { position: relative; z-index: 1; }
.pcard .pack { margin: 0; font-size: .8rem; color: var(--sf-muted); }
.price { font-family: var(--sf-head); font-size: 1.45rem; font-weight: 700; color: var(--sf-ink); letter-spacing: -.02em; line-height: 1.15; }
.price small { font-family: var(--sf-body); font-size: .72rem; font-weight: 600; color: var(--sf-muted); letter-spacing: 0; }
.pcard .unit { margin: 0; font-size: .78rem; color: var(--sf-muted); }
.pcard .avail { margin: 0; display: flex; flex-wrap: wrap; gap: .25rem .5rem; align-items: center; font-size: .78rem; color: var(--sf-ink); font-weight: 600; }
.pcard .avail i { color: var(--sf-pink-ink); }
.pcard form.add { display: flex; gap: .45rem; margin-top: auto; padding-top: .55rem; }
.pcard form.add input { width: 62px !important; flex: none; text-align: center; min-height: 42px; padding: .25rem .35rem !important; font-weight: 700; }
.pcard form.add button { flex: 1; padding: 0 .5rem !important; min-height: 42px; gap: .35rem; }
.pcard .signin { margin: auto 0 0; padding-top: .5rem; }
.pcard .signin .btn { width: 100%; }
.pcard.out { opacity: .8; } .pcard.out .img { filter: grayscale(1); }
.pcard .muted { font-size: .78rem; }
@media (max-width: 575.98px) {
  .pcard .body { padding: .65rem; } .pcard h3 { font-size: .9rem; } .price { font-size: 1.15rem; }
  .pcard form.add { flex-wrap: wrap; } .pcard form.add input { flex: 1 1 56px; width: auto !important; } .pcard form.add button { flex: 1 1 100%; }
}
body.app-customer .tag.in_stock { background: var(--sf-green-soft); } body.app-customer .tag.low { background: #fff1c2; } body.app-customer .tag.out { background: var(--sf-pink-soft); }
body.app-customer .tag.untracked { background: #fff; color: var(--sf-muted); }
body.app-customer .tag.chilled { background: var(--sf-teal); } body.app-customer .tag.frozen { background: #dfe6fb; } body.app-customer .tag.ambient { background: #fbeedd; }
body.app-customer .tag.cert { background: #fff; } body.app-customer .tag.bought { background: var(--sf-ink); color: #fff; }
.why { font-size: .8rem; color: #b42318; font-weight: 700; margin: 0; }
button.added { background: var(--sf-ink) !important; }

/* Category tiles */
.cats { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 160px), 1fr)); }
@media (max-width: 575.98px) { .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; } }
.cat { background: #fff; border: var(--sf-border); border-radius: var(--sf-radius); overflow: hidden; box-shadow: var(--sf-shadow-xs); transition: transform .12s ease, box-shadow .12s ease; display: flex; flex-direction: column; }
.cat:hover { transform: translate(-2px, -2px); box-shadow: var(--sf-shadow-sm); }
.cat > a { display: flex; flex-direction: column; align-items: center; text-align: center; gap: .55rem; padding: 1.1rem .6rem .9rem; color: var(--sf-ink) !important; text-decoration: none;
  font-family: var(--sf-head); font-weight: 700; font-size: .95rem; text-transform: uppercase; line-height: 1.15; flex: 1; }
.cat .cat-icon { width: 68px; height: 68px; border-radius: 50%; border: var(--sf-border); display: flex; align-items: center; justify-content: center; font-size: 1.7rem; }
.cat .muted { font-family: var(--sf-mono); font-size: .64rem; font-weight: 700; letter-spacing: .08em; }
.cat details { border-top: var(--sf-border-thin); padding: 0 .75rem; }
.cat summary { font-family: var(--sf-mono); font-size: .64rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sf-ink); justify-content: center; min-height: 36px; }
.cat ul { list-style: none; margin: 0 0 .5rem; padding: 0; } .cat li a { display: flex; justify-content: space-between; min-height: 34px; align-items: center; font-size: .85rem; font-weight: 600; text-decoration: none; }

/* Hero banners: cream stripes, ink frame, chunky capitals */
.hero { position: relative; overflow: hidden; color: var(--sf-ink); border: var(--sf-border-thick); border-radius: 24px; padding: 1.75rem 1.25rem; box-shadow: var(--sf-shadow);
  background: repeating-linear-gradient(135deg, #fffaf4 0 22px, #f6ebde 22px 44px); }
.hero > * { position: relative; z-index: 1; }
.hero .eyebrow { display: inline-flex; align-items: center; gap: .45rem; margin: 0 0 .9rem; padding: .3rem .8rem; border-radius: 50rem; background: var(--sf-teal); border: var(--sf-border-thin);
  font-family: var(--sf-mono); font-size: .66rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sf-ink); }
.hero h1 { font-family: var(--sf-head); font-size: 2.1rem; font-weight: 700; color: var(--sf-ink); margin: 0 0 .6rem; letter-spacing: -.03em; line-height: 1; text-transform: uppercase; max-width: 720px; }
.hero p { color: var(--sf-ink); max-width: 600px; font-weight: 500; }
.hero a:not(.btn) { color: var(--sf-pink-ink) !important; }
.hero .hero-ctas { display: flex; flex-wrap: wrap; gap: .8rem; margin: 1.25rem 0 0; }
body.app-customer .hero a.btn { min-height: 50px; padding: 0 1.5rem; font-size: .85rem; box-shadow: var(--sf-shadow-sm); display: inline-flex; align-items: center; }
.hero .sticker { position: absolute; right: 1.5rem; top: 1.5rem; z-index: 2; width: 108px; height: 108px; border-radius: 50%; background: var(--sf-pink); border: var(--sf-border-thick); box-shadow: var(--sf-shadow-sm);
  display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; transform: rotate(-12deg); color: #fff; font-family: var(--sf-head); font-weight: 700; font-size: 1.25rem; line-height: .95; text-transform: uppercase; }
.hero .sticker small { font-family: var(--sf-mono); font-size: .55rem; letter-spacing: .1em; margin-bottom: .25rem; font-weight: 700; }
@media (min-width: 768px) { .hero { padding: 2.75rem 2.5rem; } .hero h1 { font-size: 3.2rem; } .hero .sticker { display: flex; } .hero:has(.sticker) h1, .hero:has(.sticker) p { max-width: calc(100% - 130px); } }

/* Promise strip (why Snac Fresh) */
.usps { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); list-style: none; margin: 0; padding: 0; }
.usps li { display: flex; gap: .8rem; align-items: center; background: #fff; border: var(--sf-border); border-radius: var(--sf-radius); padding: .9rem 1rem; box-shadow: var(--sf-shadow-xs); }
.usps li:nth-child(4n+1) { background: var(--sf-pink-soft); } .usps li:nth-child(4n+2) { background: var(--sf-teal-soft); } .usps li:nth-child(4n+3) { background: var(--sf-green-soft); } .usps li:nth-child(4n+4) { background: var(--sf-orange-soft); }
.usps i { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: #fff; border: var(--sf-border-thin); color: var(--sf-ink); font-size: 1.2rem; }
.usps strong { display: block; font-family: var(--sf-head); font-size: .95rem; text-transform: uppercase; } .usps span { font-size: .82rem; color: var(--sf-ink); }

/* Signed-in home: welcome banner and account panel */
.welcome { display: grid; gap: 1.5rem; }
@media (min-width: 992px) { .welcome { grid-template-columns: minmax(0, 1fr) 350px; align-items: stretch; } }
.glance { background: #fff; border: var(--sf-border-thick); border-radius: 24px; box-shadow: var(--sf-shadow); padding: 1.2rem 1.3rem; display: grid; gap: .85rem; align-content: start; }
.glance h2 { font-size: 1.05rem; margin: 0; }
.glance .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.glance .tile { box-shadow: none; background: var(--sf-cream); border: var(--sf-border-thin); border-radius: 12px; }
.shortcuts { display: flex; flex-wrap: wrap; gap: .65rem; }
.shortcuts a { display: inline-flex; align-items: center; gap: .45rem; min-height: 42px; padding: 0 1rem; border-radius: 50rem; background: #fff; border: var(--sf-border-thin);
  color: var(--sf-ink) !important; text-decoration: none; font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; box-shadow: var(--sf-shadow-xs); transition: transform .1s, box-shadow .1s, background .15s; }
.shortcuts a i { color: var(--sf-pink-ink); font-size: 1rem; }
.shortcuts a:hover { background: var(--sf-teal); transform: translate(-1px, -1px); box-shadow: 4px 4px 0 0 var(--sf-ink); }

/* Filters */
.filters details { background: #fff; border-radius: var(--sf-radius); border: var(--sf-border); box-shadow: var(--sf-shadow-xs); }
.filters summary { min-height: 48px; padding: 0 1rem; font-family: var(--sf-head); font-weight: 700; text-transform: uppercase; }
.filters .in { padding: 0 1rem 1rem; }
.filters label:not(.opt), .filters legend { font-family: var(--sf-mono); font-size: .66rem !important; font-weight: 700 !important; letter-spacing: .1em; text-transform: uppercase; }
.filters fieldset { border: 0; margin: .6rem 0 0; padding: 0; }
.filters .opt { display: flex; gap: .5rem; align-items: center; min-height: 34px; margin: 0; font-weight: 500; }
@media (min-width: 900px) { .filters { position: sticky; top: 16px; } }
/* The header only stays on screen on tall desktops (above); only there do the side menu and filters sit below it. */
@media (min-width: 992px) and (min-height: 900px) { .sf-acct-nav { top: 228px; max-height: calc(100vh - 248px); } .filters { top: 228px; } }

/* Tables (compare, orders): the best offer highlighted */
table.sheet tr.best td { background: var(--sf-teal-soft) !important; }

/* Tiles, credit meter, quick actions, checklist, pager */
.tiles { display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 170px), 1fr)); }
.tile { background: #fff; border-radius: 14px; border: var(--sf-border); padding: .65rem .9rem; box-shadow: var(--sf-shadow-xs); color: var(--sf-muted); font-size: .8rem; }
.tile .muted { font-family: var(--sf-mono); font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sf-ink); }
.tile b { display: block; font-family: var(--sf-head); font-size: 1.3rem; font-weight: 700; color: var(--sf-ink); letter-spacing: -.02em; }
.meter { height: 16px; border-radius: 50rem; background: #fff; border: var(--sf-border-thin); overflow: hidden; } .meter > div { height: 100%; background: var(--sf-teal); border-right: 2px solid var(--sf-ink); }
.meter.warn > div { background: var(--sf-pink); }
.actions { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); }
.actions a { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 60px; padding: .5rem; background: #fff; border: var(--sf-border); border-radius: var(--sf-radius);
  color: var(--sf-ink) !important; font-weight: 800; text-transform: uppercase; font-size: .8rem; text-decoration: none; box-shadow: var(--sf-shadow-xs); transition: transform .1s, box-shadow .1s, background .15s; }
.actions a:hover { background: var(--sf-teal); transform: translate(-1px, -1px); box-shadow: var(--sf-shadow-sm); }
.check { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.check li > a { display: flex; align-items: center; min-height: 32px; }
.check li { display: flex; gap: .6rem; align-items: center; justify-content: space-between; flex-wrap: wrap; border: var(--sf-border-thin); border-radius: 12px; padding: .55rem .8rem; min-height: 52px; background: var(--sf-cream); font-weight: 600; }
.pager { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; justify-content: center; }
.pager a, .pager span { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; padding: 0 .6rem; border: var(--sf-border-thin); border-radius: 50rem;
  background: #fff; color: var(--sf-ink) !important; text-decoration: none; font-weight: 800; box-shadow: var(--sf-shadow-xs); }
.pager a:hover { background: var(--sf-teal); }
.pager [aria-current] { background: var(--sf-pink-ink); color: #fff !important; }

/* Basket drawer (FR-CB-09) and account menu: off-canvas panels from the right */
.drawer, dialog.menu { margin: 0 0 0 auto; height: 100%; max-height: 100vh; width: min(420px, 100vw); max-width: 100vw; padding: 0; background: var(--sf-cream); border-left: var(--sf-border-thick) !important; }
dialog.menu { width: min(360px, 100vw); padding: 1rem; }
.drawer-body { padding: 1rem; display: grid; gap: .4rem; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; gap: .6rem; position: sticky; top: 0; background: var(--sf-cream); padding-bottom: .6rem; border-bottom: var(--sf-border-thin); z-index: 1; }
.drawer-head h2 { font-family: var(--sf-head); text-transform: uppercase; }
.drawer-line { display: grid; grid-template-columns: 1fr auto; gap: .4rem .6rem; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--sf-hair); }
.drawer-line form:last-child { grid-column: 2; justify-self: end; }
.drawer-total { display: flex; justify-content: space-between; font-family: var(--sf-head); font-weight: 700; font-size: 1.15rem; margin: .75rem 0 0; }
dialog.menu h2 { font-family: var(--sf-head); text-transform: uppercase; }
dialog.menu h3, .menu-list h3 { font-family: var(--sf-mono); font-size: .66rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--sf-pink-ink); }
dialog.menu ul, .menu-list ul { list-style: none; padding: 0; margin: .4rem 0 1rem; }
dialog.menu li a, .menu-list li a { display: flex; align-items: center; min-height: 40px; padding: 0 .7rem; border-radius: 50rem; color: var(--sf-ink) !important; text-decoration: none; font-weight: 600; }
dialog.menu li a:hover, .menu-list li a:hover { background: var(--sf-teal-soft); }

/* Add to list (FR-SL-02) */
.addlist summary { min-height: 36px; font-weight: 800; font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--sf-pink-ink); }
.addlist form { display: grid; gap: .4rem; padding: .4rem 0; }
.pcard .addlist form { display: grid; }
.pcard .addlist form input, .pcard .addlist form button { width: 100% !important; }

/* Facts, segmented filters, pay-selected bar, unread markers */
.facts { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .4rem .75rem; margin: .75rem 0 0; }
.facts dt { font-weight: 500; color: var(--sf-muted); } .facts dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; font-weight: 700; }
.seg { display: flex; flex-wrap: wrap; gap: .5rem; margin: .75rem 0; }
.seg a { min-height: 40px; display: inline-flex; align-items: center; padding: 0 1rem; border: var(--sf-border-thin); border-radius: 50rem; background: #fff; color: var(--sf-ink) !important; text-decoration: none;
  font-weight: 800; font-size: .75rem; text-transform: uppercase; letter-spacing: .03em; }
.seg a:hover { background: var(--sf-teal); }
.seg a[aria-current] { background: var(--sf-pink-ink); color: #fff !important; }
.paybar { position: sticky; bottom: 70px; z-index: 5; margin-top: .75rem; }
@media (min-width: 768px) { .paybar { bottom: .5rem; } }
.state-overdue { color: #b42318; font-weight: 700; }
.unread { border-left: 6px solid var(--sf-pink) !important; }

/* Product page: picture and buy box */
.pdp { display: grid; gap: 1.75rem; }
@media (min-width: 900px) { .pdp { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; } }
.pdp-media { background: #fff; border: var(--sf-border-thick); border-radius: 24px; overflow: hidden; box-shadow: var(--sf-shadow); }
.pdp-media .main { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.pdp-media .main img { width: 100%; height: 100%; object-fit: contain; padding: 1rem; }
.pdp-media .main .ph { font-size: 6rem; }
@media (max-width: 899.98px) { .pdp-media .main { aspect-ratio: 4 / 3; } }
.pdp-thumbs { display: flex; gap: .5rem; padding: .75rem; border-top: var(--sf-border); overflow-x: auto; }
.pdp-thumbs img { width: 64px; height: 64px; object-fit: contain; border: var(--sf-border-thin); border-radius: 10px; background: #fff; flex: none; }
.pdp-info h1 { font-size: 2.2rem; margin: 0 0 .6rem; }
@media (max-width: 767.98px) { .pdp-info h1 { font-size: 1.6rem; } }
.offer { background: #fff; border: var(--sf-border); border-radius: 20px; padding: 1.15rem 1.25rem; display: grid; gap: .4rem; box-shadow: var(--sf-shadow-sm); }
.offer h3 { font-size: 1.05rem; margin: 0; text-transform: uppercase; }
.offer form.row { margin-top: .6rem !important; flex-wrap: nowrap; }
.offer form.row button { min-height: 50px; font-size: .9rem; }
.offer form.row input { min-height: 50px; text-align: center; font-weight: 700; }
.offer .deliv { display: flex; gap: .5rem; align-items: flex-start; margin: .25rem 0 0; }
.offer .deliv i { color: var(--sf-pink-ink); margin-top: .1rem; }

/* Basket: the lines first; on wide screens the summary, address, promo code and points beside them.
   The checkout form is display: contents so its two halves join the page grid. */
.basket-page { display: flex; flex-direction: column; gap: 1.5rem; }
.basket-page > *, .basket-side, .basket-main { min-width: 0; }
.basket-cols { display: contents; }
.basket-main { order: 1; display: grid; gap: 1.25rem; }
.basket-page > .b-deliver { order: 2; } .basket-page > .b-code { order: 3; } .basket-page > .b-loyalty { order: 4; }
.basket-side { order: 5; display: grid; gap: 1.25rem; }
@media (min-width: 1100px) {
  .basket-page { display: grid; grid-template-columns: minmax(0, 1fr) 390px; grid-template-rows: auto auto auto auto 1fr; gap: 1.5rem; align-items: start; }
  .basket-main { grid-column: 1; grid-row: 1 / -1; }
  .basket-page > .b-deliver, .basket-page > .b-code, .basket-page > .b-loyalty, .basket-side { grid-column: 2; }
  .basket-side { order: 1; }
}
body.app-customer .basket-side .card { border-width: 4px; box-shadow: var(--sf-shadow); }
body.app-customer button.pink { background: var(--sf-pink-ink) !important; border: var(--sf-border-thick) !important; color: #fff !important; font-weight: 800; border-radius: 50rem;
  text-transform: uppercase; letter-spacing: .03em; box-shadow: var(--sf-shadow-sm) !important; }
body.app-customer button.pink:hover { background: var(--sf-pink-dark) !important; box-shadow: var(--sf-shadow) !important; transform: translate(-2px, -2px); }
body.app-customer button.pink:disabled { background: #e9e2da !important; color: var(--sf-muted) !important; box-shadow: none !important; }

/* Notices, help text */
.flash.notice { display: flex; gap: .6rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.flash.notice p { flex: 1 1 240px; min-width: 0; }
.helptext h2 { margin: 1.1rem 0 .4rem; }
.helptext ul { padding-left: 1.25rem; }
.helplink { display: inline-flex; align-items: center; min-height: 40px; font-weight: 700; }

@media print { .bottom, .filters, .sf-header, .sf-utility, .sf-footer, .sf-acct-nav, form { display: none !important; } .sf-acct { display: block; } body.app-customer .card { box-shadow: none; } }

/* A radio or checkbox label laid out as a .row keeps its text beside the control */
label.row:has(> input[type=radio]), label.row:has(> input[type=checkbox]) { flex-wrap: nowrap; align-items: flex-start; gap: .5rem; }
label.row > input[type=radio], label.row > input[type=checkbox] { flex: none; margin-top: .2rem; }

/* Option lists (integrations: scopes, environments, webhook events) */
label.opt { display: flex; gap: .5rem; align-items: flex-start; font-weight: 400; margin: .25rem 0; min-height: 44px; padding-top: .5rem; }
label.opt input { width: auto; min-height: 0; flex: none; margin-top: .2rem; }
label.opt code { overflow-wrap: anywhere; }
.opt-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 0 1rem; }

/* M24a: EPOS codes and suggested orders */
.code-row, .sugg { border-top: 1px solid var(--line); padding: 12px 0; }
.code-row:first-of-type, .sugg:first-of-type { border-top: 0; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: 6px 0; }
.sheet-wrap { overflow-x: auto; }
a.tile { text-decoration: none; color: inherit !important; transition: transform .1s, box-shadow .1s; }
a.tile:hover { transform: translate(-1px, -1px); box-shadow: var(--sf-shadow-sm); }

/* M24b: accounting export */
.acc-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 8px 0 12px; }
.acc-facts dt { font-weight: 700; }
.acc-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; text-align: left; }
@media (max-width: 480px) { .acc-facts { grid-template-columns: 1fr; } .acc-facts dd { margin-bottom: 6px; } }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 0 1rem; }
.conn-cols { margin: 12px 0; }
.card details > summary, details.card > summary { min-height: 32px; padding: 5px 0; cursor: pointer; }

/* M25a: promotions */
body.app-customer .tag.promo { background: var(--sf-orange-soft); color: var(--sf-ink); display: inline-block; border-radius: 8px; line-height: 1.3; white-space: normal; max-width: 100%; text-transform: none; letter-spacing: 0; font-family: var(--sf-body); font-size: .72rem; }
.save { color: #2f6b14; font-weight: 800; }
del { color: var(--sf-muted); }

/* M25b: sponsored products, always labelled */
.sponsored-row { margin: 0; }
.sponsored-row h2 { font-size: 1rem; margin: 0 0 10px; }
.pcard.sponsored { border-style: dashed; }
.sp-label { margin: 0; font-family: var(--sf-mono); font-size: .62rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sf-muted); }

/* M26a: ordering assistant */
.assistant-fab { position: fixed; right: 16px; bottom: 20px; z-index: 1035; display: inline-flex; align-items: center; gap: 6px; padding: .65rem 1.1rem; border-radius: 50rem;
  background: var(--sf-teal); color: var(--sf-ink) !important; border: var(--sf-border); font-weight: 800; text-transform: uppercase; font-size: .8rem; letter-spacing: .03em; text-decoration: none; box-shadow: var(--sf-shadow-sm); }
.assistant-fab:hover, .assistant-fab:focus { color: var(--sf-ink) !important; background: #2fe0e2; transform: translate(-1px, -1px); }
@media (max-width: 767.98px) { .assistant-fab { bottom: 76px; padding: .7rem; } .assistant-fab span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); } .assistant-fab i { font-size: 1.3rem; } }
.chat-log { display: flex; flex-direction: column; gap: 10px; max-height: 60vh; overflow-y: auto; padding: 4px 2px 8px; }
.msg { max-width: 85%; padding: .6rem .85rem; border-radius: 14px; background: #fff; border: var(--sf-border-thin); }
.msg p { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.msg .who { display: block; font-family: var(--sf-mono); font-size: .62rem; font-weight: 700; color: var(--sf-pink-ink); text-transform: uppercase; letter-spacing: .1em; }
.msg.user { align-self: flex-end; background: var(--sf-teal-soft); }
.msg.system { align-self: center; background: var(--sf-orange-soft); }
.confirm-card { border: var(--sf-border-thick); border-radius: 16px; padding: .9rem 1.1rem; margin: 12px 0; background: var(--sf-pink-soft); box-shadow: var(--sf-shadow-sm); }
.confirm-card h3 { font-size: 1.05rem; margin: 0 0 6px; text-transform: uppercase; }
.chat-form { margin-top: 12px; }
/* M26b: assistant suggestions and extra options */
.chips { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.chips form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.chat-more { margin-top: 12px; }
.chat-more summary { cursor: pointer; color: var(--sf-pink-ink); font-weight: 700; }

/* File pickers have a fixed natural width: keep them inside narrow screens */
body.app-customer input[type=file] { max-width: 100%; min-width: 0; font-size: .8rem; }
body.app-customer input[type=file]::file-selector-button { border: var(--sf-border-thin); border-radius: 50rem; background: #fff; font-weight: 700; padding: .3rem .8rem; margin-right: .6rem; cursor: pointer; }

/* Basket order summary: say why nothing (or not everything) can be ordered instead of showing £0.00. */
.sum-blocked { margin: 6px 0 4px; padding: 14px 16px; border-radius: 14px; background: #fff3d6; border: 2px solid #383838; }
.sum-blocked-h { margin: 0 0 6px; font-weight: 800; font-size: 1.05rem; }
.sum-blocked-total { margin: 0 0 8px; }
.sum-blocked ul, .sum-held ul { margin: 0; padding-left: 1.1rem; }
.sum-blocked li, .sum-held li { margin: 4px 0; }
.sum-held { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(56,56,56,.35); }
.sum-held-h { margin: 0 0 4px; font-weight: 800; }
.sum-held li { list-style: none; margin-left: -1.1rem; display: flex; flex-direction: column; }
.sum-held li > span:first-child { display: flex; justify-content: space-between; gap: 8px; }

/* Product card size picker (several sizes of one product) */
.pcard .add .size-pick { flex: 1 0 100%; width: 100%; min-height: 40px; margin-bottom: 6px; }

/* Product page pack sizes (Food Business Portal design): one tile per size, its lowest price and unit price */
.pdp-sizes { margin: .75rem 0; }
.pdp-sizes-h { font-weight: 800; margin: 0 0 .4rem; }
.pdp-size-l { display: flex; flex-wrap: wrap; gap: .6rem; }
.pdp-size { display: flex; flex-direction: column; gap: 2px; min-width: 120px; padding: .6rem .85rem; border: var(--sf-border-thin); border-radius: 12px;
  background: #fff; color: inherit; text-decoration: none; }
.pdp-size:hover { border-color: currentColor; }
.pdp-size.on { border: var(--sf-border); box-shadow: var(--sf-shadow-sm); }
.pdp-size b { font-size: 1.05rem; }
.pdp-size small { color: var(--sf-muted); }

/* Checkout: the three ways to pay as option cards (Food Business Portal design, Oct 2026). */
.b-pay-opt { display: flex; gap: 12px; align-items: flex-start; margin: 8px 0; padding: 14px 16px; border: 1.5px solid var(--line, #d9d4cc); border-radius: 14px; font-weight: 400; cursor: pointer; background: #fff; }
.b-pay-opt input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--ink, #2a2a2a); }
.b-pay-opt b { display: block; }
.b-pay-opt .hint { display: block; margin-top: 2px; }
.b-pay-opt:has(input:checked) { border: 2px solid var(--ink, #2a2a2a); box-shadow: 3px 3px 0 var(--ink, #2a2a2a); }
.b-pay-opt.off { cursor: default; opacity: .72; background: transparent; }
.b-pay-opt.off .hint a { opacity: 1; }

/* Any list table too wide for its box (tables.js adds .st-cards: phones, narrow windows, big zoom): one card per row,
   each value under its column name; the record and the actions take the full width. Tables that fit stay tables. */
.tablewrap:has(> table.st-cards), .sheet-wrap:has(> table.st-cards), div:has(> table.st-cards) { overflow: visible; }
table.st-cards { min-width: 0 !important; width: 100% !important; table-layout: auto; }
table.st-cards thead { display: none; }
table.st-cards, table.st-cards tbody, table.st-cards tfoot, table.st-cards tr, table.st-cards td, table.st-cards tbody th { display: block; width: 100%; }
table.st-cards tbody tr:not(.st-full), table.st-cards tfoot tr:not(.st-full) { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  column-gap: 16px; padding: 12px 0; border-top: 1px solid var(--sf-border-thin, #e7e0d6); background: none; }
table.st-cards tbody tr:first-child { border-top: 0; }
table.st-cards td, table.st-cards tbody th { border: 0 !important; padding: 3px 0 !important; text-align: left !important; white-space: normal !important;
  width: auto !important; min-width: 0 !important; max-width: none !important; overflow-wrap: anywhere; background: none !important; }
table.st-cards td:empty { display: none; }
table.st-cards td[data-label]::before { content: attr(data-label); display: block; margin: 4px 0 1px; font-family: var(--sf-mono, monospace); font-size: 10.5px;
  font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--sf-muted, #6b6b6b); }
table.st-cards tr > td[data-label]:first-of-type, table.st-cards tr > td.st-act + td[data-label]:not(.st-act) { grid-column: 1 / -1; font-size: 15px; }
table.st-cards tr > td[data-label]:first-of-type::before, table.st-cards td.st-act::before { content: none !important; }
table.st-cards tr > td.st-act, table.st-cards tr > td:has(select, textarea, input:not([type=checkbox]):not([type=radio]):not([type=hidden])) { grid-column: 1 / -1; }
table.st-cards tr > td.st-act:last-child { padding-top: 8px !important; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
table.st-cards tr > td.st-act:last-child > .btn, table.st-cards tr > td.st-act:last-child > a.btn, table.st-cards tr > td.st-act:last-child > form { flex: 1 1 auto; justify-content: center; }
table.st-cards td form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
table.st-cards .pill { white-space: normal; max-width: 100%; height: auto; line-height: 1.25; }
table.st-cards tr.st-full td { padding: 10px 0 !important; }
/* Two-step sign-in (FB review S3): the code field at sign-in (emailed code; setup key and recovery code styles are no longer used). */
body.app-customer input.lg-code { font-family: var(--sf-mono); font-size: 1.3rem; letter-spacing: .3em; text-align: center; max-width: 260px; }
body.app-customer .lg-steps { padding-left: 1.25rem; line-height: 1.5; }
body.app-customer .lg-steps li + li { margin-top: .4rem; }
body.app-customer .lg-key { display: inline-block; font-family: var(--sf-mono); font-weight: 700; letter-spacing: .08em; background: #f4f1ec; padding: 2px 8px; border-radius: 8px; word-break: break-all; }
body.app-customer .lg-codes { list-style: none; margin: .75rem 0; padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; max-width: 420px; border: 1.5px dashed #c9c2b8; border-radius: 12px; font-family: var(--sf-mono); font-weight: 700; letter-spacing: .06em; }
body.app-customer .sf-2step { margin-top: 1rem; }
body.app-customer .sf-2step form { margin-top: .75rem; }

/* Reviews (Nov 2026): stars, the review form (radio stars, no script), product page reviews, Your reviews. Shared by the
   Customer Portal and the Food Business Portal (copied by bin/sync-theme.php). */
.rv-st { display: inline-flex; gap: 1px; vertical-align: -1px; color: #c9c2b8; font-size: .95em; }
.rv-st .on { color: #b77900; }
.rv-avg { font-size: 1.05em; }
.rv-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 2px 0; }
.rv-c { margin: 4px 0 0; }
.rv-list { list-style: none; margin: 0; padding: 0; }
.rv-list > li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 12px 0; border-top: 1px solid var(--line, #e6e0d8); }
.rv-list > li:first-child { border-top: 0; }
.rv-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 260px; }
.rv-form fieldset { border: 0; margin: 0 0 14px; padding: 0; }
.rv-form legend { font-weight: 700; margin-bottom: 6px; }
.rv-form textarea { width: 100%; max-width: 640px; }
.rv-in-row { display: inline-flex; flex-direction: row-reverse; gap: 4px; }
.rv-in-row input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.rv-in-row label { cursor: pointer; font-size: 1.9rem; line-height: 1; color: #c9c2b8; padding: 2px; border-radius: 6px; }
.rv-in-row input:checked ~ label, .rv-in-row label:hover, .rv-in-row label:hover ~ label { color: #b77900; }
.rv-in-row input:focus-visible + label { outline: 3px solid var(--sf-pink-ink, #C8215D); outline-offset: 2px; }
.rv-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.rv-tags legend { width: 100%; }
.rv-tag { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1.5px solid var(--line, #e6e0d8); border-radius: 999px; cursor: pointer; font-weight: 400; }
.rv-tag:has(input:checked) { border-color: var(--sf-pink-ink, #C8215D); background: var(--sf-pink-soft, #fde3ec); }
.rv-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.rv-del { margin-top: 8px; }
.rv-rate { white-space: nowrap; }
.rv-prod .rv-sum { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; margin-bottom: 8px; }
.rv-big { margin: 0; font-size: 1.15rem; }
.rv-dist { list-style: none; margin: 0; padding: 0; min-width: 220px; flex: 0 1 320px; }
.rv-dist li { display: grid; grid-template-columns: 4.5em 1fr 2em; gap: 8px; align-items: center; font-size: .9em; }
.rv-bar { display: block; height: 8px; border-radius: 4px; background: #eee8e0; overflow: hidden; }
.rv-bar i { display: block; height: 100%; background: #b77900; }
.rv-mine { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 12px; margin: 8px 0; border-radius: 10px; background: #f7f3ee; }
.rv-pub { list-style: none; margin: 8px 0 0; padding: 0; }
.rv-pub > li { padding: 10px 0; border-top: 1px solid var(--line, #e6e0d8); }
.rv-pub p { margin: 2px 0; }
.rv-tagl .tag { margin-right: 4px; }
.rv-suprate .bi { color: #b77900; }
