/* Base reset: carried over from the page wrapper the sample was published in, so nothing shifts. */
:root { color-scheme: light; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Pantry design tokens (design/README.md). Use only these colours. */
:root {
  --brand: #2F4A3A;   /* forest green: logo, hero panel, headings, prices, links */
  --brand2: #22382B;  /* deep forest: top bar, footer, sticky mobile cart */
  --buy: #B8572E;     /* terracotta: ONLY buy actions */
  /* Lifted from #C9A15A so small ochre text on --brand passes WCAG AA (4.52:1). */
  --ochre: #CFAC6E;   /* accent words in headings, "Offer" badges, eyebrow labels on green */
  --sage: #DCE3D5;    /* free-delivery band, soft panels, selected-option backgrounds */
  --bg: #F6F1E8;      /* sand: page background */
  --white: #FFFFFF;   /* product cards, form fields */
  --ink: #22201C;     /* body text */
  --grey: #6B655C;    /* sizes, captions, secondary text; also form-field borders (5.77:1 on white) */
  --line: #E4DCCD;    /* borders and dividers */
  --photo: #F4EFE4;   /* square panel behind product photos */
  /* Darker ochre for the focus ring on light backgrounds, where --ochre is under 3:1. */
  --focus: #997A44;
  --error: #A12B1E;   /* error text and outlines (7.29:1 on white) */

  --g: max(clamp(16px, 4vw, 56px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --display: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-control: 12px;
  --r-card: 14px;
  --r-panel: 22px;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body); }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; line-height: 1.08; color: var(--brand); text-wrap: balance; }
h2 { font-size: 32px; }
a { color: var(--brand); }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* On the dark surfaces the focus ring is plain ochre. */
.promo :focus-visible, .hero :focus-visible, .foot :focus-visible, .toast :focus-visible, .sticky-cart:focus-visible { outline-color: var(--ochre); }

/* ---------- Top bar ---------- */
.promo {
  padding: 9px var(--g); background: var(--brand2); color: var(--bg);
  font-size: 13px; font-weight: 600; letter-spacing: 0.02em; text-align: center;
}
.promo:empty::before { content: "\a0"; } /* keeps the bar one line tall until its text loads */

/* ---------- Header ---------- */
.site-head {
  display: flex; align-items: center; gap: 12px 36px;
  padding: 18px var(--g); background: var(--bg); border-bottom: 1px solid var(--line);
}
.logo { display: inline-block; padding-block: 3px; font: 800 30px/1 var(--display); color: var(--brand); text-decoration: none; }
.logo span {
  display: block; margin-top: 5px;
  font: 600 11px/1 var(--body); letter-spacing: 0.16em; text-transform: uppercase; color: var(--grey);
}
.nav { display: flex; gap: 30px; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); font-weight: 600; text-decoration: none; }
.nav a:hover { text-decoration: underline; text-underline-offset: 4px; }
.head-space { flex: 1; }
.cart-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 16px;
  border: 1.5px solid var(--brand); border-radius: 999px; color: var(--brand); font-weight: 700; text-decoration: none;
}
.cart-link:hover { background: var(--white); }
.cart-icon { flex: none; }
.cart-count {
  min-width: 24px; padding: 2px 8px; border-radius: 999px;
  background: var(--buy); color: var(--white); font-size: 12px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums;
}

/* ---------- Buttons ---------- */
/* .btn is the secondary button; .btn-buy (and .card-add) are the terracotta buy actions. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 24px;
  border: 1.5px solid var(--brand); border-radius: var(--r-control); background: transparent; color: var(--brand);
  font: 700 16px/1.2 var(--body); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--white); }
.btn-buy { border-color: var(--buy); background: var(--buy); color: var(--white); }
.btn-buy:hover { border-color: var(--buy); background: var(--buy); filter: brightness(0.92); }
.btn[disabled] { border-color: var(--line); background: var(--line); color: var(--grey); cursor: not-allowed; filter: none; }
.btn-small { min-height: 44px; padding: 10px 16px; }
.btn-block { display: flex; width: 100%; }

input[type="search"] {
  width: 100%; min-height: 48px; padding: 12px 16px; border: 1px solid var(--grey); border-radius: var(--r-control);
  background: var(--white); color: var(--ink); font: inherit;
}

/* ---------- Layout ---------- */
.section { max-width: 1440px; margin-inline: auto; padding: 40px var(--g) 52px; }
.section > h2 { margin-bottom: 22px; }
.head {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px;
  margin-bottom: 22px; padding-bottom: 12px; border-bottom: 1px solid var(--line);
}
.head a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.page-title { margin-bottom: 22px; font-size: clamp(32px, 4vw, 44px); color: var(--brand); }
.status { min-height: 40vh; }
/* At least a screen tall, so the footer starts below the first screen and never jumps as a page loads. */
#view { min-height: 100vh; }
.empty { display: grid; justify-items: start; gap: 14px; }
.muted { color: var(--grey); }

/* ---------- Home ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin: 32px var(--g) 56px; border-radius: 24px; background: var(--brand); color: var(--white); overflow: hidden;
}
.hero-copy { min-width: 0; padding: 56px 52px; }
.eyebrow { margin-bottom: 18px; color: var(--ochre); font-size: 13px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; }
.hero h1 { font-size: clamp(38px, 4.6vw, 64px); letter-spacing: -1px; color: var(--white); }
.hero h1 em { font-style: italic; color: var(--ochre); }
.hero-sub { margin: 20px 0 28px; max-width: 30em; font-size: 18px; color: var(--sage); }
.hero-search { display: flex; gap: 10px; max-width: 540px; }
.hero-search label { flex: 1; min-width: 0; }
.hero-search input { min-height: 52px; border-color: var(--white); }
.hero-search .btn { min-height: 52px; white-space: nowrap; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 26px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 600; color: var(--sage); }
.trust li::before { content: "✓ "; }

.collage { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 2px; min-height: 420px; background: var(--brand2); }
.tile { position: relative; display: block; min-width: 0; overflow: hidden; padding: 14%; background: var(--photo); text-decoration: none; }
.tile img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.tile-1 { grid-row: span 2; padding: 16% 12%; }
.tile-2 { background: var(--line); }
.tile-3 { background: var(--sage); }
.tile:hover img { transform: scale(1.03); }
.tile-name { display: grid; place-items: center; height: 100%; font-weight: 600; color: var(--brand); text-align: center; }
/* No photo: the sand photo panel with the product's initial. */
.photo-none { display: grid; place-items: center; width: 100%; height: 100%; aspect-ratio: 1; font: 700 3rem/1 var(--display); color: var(--grey); user-select: none; }
.tile .photo-none { background: var(--photo); font-size: 4rem; }
.product-photo .photo-none { font-size: clamp(4rem, 18vw, 8rem); }
.line-photo .photo-none { font-size: 1.6rem; }
.card-photo, .line-photo { text-decoration: none; }

/* Product page photos: main photo, and thumbnails when there's more than one. */
.gallery { display: grid; gap: 12px; align-content: start; min-width: 0; }
.gallery .product-photo { position: relative; touch-action: pan-y; }
.photo-count { position: absolute; right: 12px; bottom: 10px; margin: 0; padding: 2px 10px; border-radius: 12px; background: var(--white); color: var(--ink); font-size: 14px; font-weight: 700; }
.thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.thumb { display: block; aspect-ratio: 1; min-height: 44px; padding: 8%; border: 2px solid var(--line); border-radius: 10px; background: var(--photo); cursor: pointer; }
.thumb img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.thumb[aria-pressed="true"] { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); }
.thumb:hover { border-color: var(--brand); }
.tag { position: absolute; left: 16px; top: 16px; padding: 5px 12px; border-radius: 999px; background: var(--brand); color: var(--white); font-size: 12px; font-weight: 600; }
.collage :focus-visible { outline-color: var(--ochre); outline-offset: -5px; }

.home-section { padding-top: 8px; }
.home-section .head h2 { color: var(--brand); }

.aisles { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; }
.aisle {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px; min-height: 96px; padding: 18px 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
  color: var(--brand); font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none;
}
.aisle-icon { font-size: 24px; line-height: 1; filter: saturate(0.6); }
.aisle:hover { border-color: var(--brand); }

/* ---------- Product cards ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.card {
  display: flex; flex-direction: column; min-width: 0; padding: 14px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
}
.card:hover { border-color: var(--brand); }
.card-link { display: flex; flex-direction: column; flex: 1; color: var(--ink); text-decoration: none; }
.card-link:hover .card-name { text-decoration: underline; }
/* Photo panels: the padding is the margin round the photo, so any shape of photo fits inside the square. */
.card-photo { display: block; flex: none; aspect-ratio: 1; max-width: 100%; margin-bottom: 12px; padding: 10%; overflow: hidden; border-radius: 10px; background: var(--photo); }
.card-photo img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.card-name { min-height: 2.6em; font-weight: 600; line-height: 1.3; }
.card-size { margin: 2px 0 10px; color: var(--grey); font-size: 14px; }
.card-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; }
.card-price { font-size: 19px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.card-add, .card-choose {
  display: inline-flex; align-items: center; min-height: 44px; padding: 9px 18px; border-radius: 10px;
  font: 700 15px var(--body); text-decoration: none; cursor: pointer;
}
.card-add { border: 0; background: var(--buy); color: var(--white); }
.card-add:hover { filter: brightness(0.92); }
.card-choose { border: 1.5px solid var(--brand); color: var(--brand); }
.card-choose:hover { background: var(--sage); }

/* ---------- Free-delivery band ---------- */
.band {
  display: flex; align-items: center; gap: 32px; margin: 0 var(--g) 56px; padding: 34px 44px;
  border-radius: 20px; background: var(--sage); color: var(--brand2);
}
.band h2 { font-size: 34px; color: var(--brand2); }
.band p { margin-top: 6px; font-weight: 500; }
.band-bar { flex: 1; max-width: 420px; }
.band-track { height: 10px; overflow: hidden; border-radius: 99px; background: var(--white); }
.band-fill { display: block; height: 100%; width: 0; border-radius: 99px; background: var(--brand); transition: width 0.3s ease; }
.band-note { margin-top: 8px; font-size: 14px; font-weight: 700; }
@media (prefers-reduced-motion: reduce) {
  .band-fill, .tile img { transition: none; }
  .tile:hover img { transform: none; }
}

/* ---------- Shop ---------- */
.tools { display: grid; gap: 14px; margin-bottom: 18px; }
.tools label { display: block; max-width: 540px; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px;
  border: 1.5px solid var(--brand); border-radius: 999px; color: var(--brand); font-size: 15px; font-weight: 600; text-decoration: none;
}
.pill:hover { background: var(--white); }
.pill[aria-current="page"] { background: var(--brand); color: var(--white); }
.count { margin-bottom: 14px; color: var(--grey); font-size: 15px; }

/* ---------- Product page ---------- */
.back { display: inline-flex; align-items: center; min-height: 44px; margin-bottom: 12px; font-weight: 600; }
.product { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 4vw, 56px); }
.product-photo { aspect-ratio: 1; max-width: 100%; padding: 9%; overflow: hidden; background: var(--photo); border: 1px solid var(--line); border-radius: var(--r-card); }
.product-photo img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.product-info { min-width: 0; }
.product-info h1 { font-size: clamp(30px, 3.6vw, 44px); color: var(--brand); }
.price { margin-top: 12px; font-size: 28px; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.size { color: var(--grey); }
.buy { margin-top: 18px; }
.notice { margin-top: 12px; max-width: 34em; font-weight: 600; }
.buy + .notice { margin-top: 16px; }
.text { margin-top: 22px; max-width: 38em; }
.related { margin-top: clamp(40px, 6vw, 72px); }
.related h2 { margin-bottom: 20px; }

.options { margin: 20px 0 0; padding: 0; border: 0; }
.options legend { margin-bottom: 10px; padding: 0; font-weight: 700; }
.option-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.option {
  position: relative; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 18px;
  background: var(--white); border: 1.5px solid var(--grey); border-radius: 999px; cursor: pointer;
}
/* The radio stays in the page for keyboards and screen readers; the pill is what people see. */
.option-input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: inherit; }
.option:has(.option-input:checked) { background: var(--sage); border: 2px solid var(--brand); padding: 7.5px 17.5px; }
.option:has(.option-input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.option-label { font-weight: 600; color: var(--ink); }
.option-price { font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.option-size { color: var(--grey); font-size: 15px; }
.option-label + .option-size::before, .option-size + .option-price::before, .option-label + .option-price::before { content: "· "; color: var(--grey); font-weight: 400; }
.options-label { display: block; margin-bottom: 10px; font-weight: 700; }
.option-select {
  display: block; width: 100%; max-width: 520px; min-height: 48px; padding: 10px 14px;
  border: 1px solid var(--grey); border-radius: var(--r-control); background: var(--white); color: var(--ink); font: 600 16px var(--body);
}
.line-preview { font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.option-out { border-style: dashed; background: transparent; cursor: not-allowed; }
.option-out .option-label { color: var(--grey); text-decoration: line-through; }
.option-out .option-price { font-weight: 600; color: var(--grey); }

/* Quantity on its own line, then a full-width Add to cart. */
.buy-row { display: grid; justify-items: start; gap: 12px; margin-top: 22px; max-width: 520px; }
.buy-row .buy { width: 100%; min-height: 52px; margin-top: 0; }
.qty { display: inline-flex; align-items: stretch; overflow: hidden; border: 1px solid var(--grey); border-radius: var(--r-control); background: var(--white); }
.qty-btn {
  width: 44px; min-height: 44px; border: 0; background: none; color: var(--brand);
  font: 700 20px/1 var(--body); cursor: pointer;
}
.qty-btn:hover { background: var(--sage); }
.qty-input {
  width: 52px; border: 0; border-inline: 1px solid var(--line); background: none; color: var(--ink);
  font: 700 16px var(--body); text-align: center; -moz-appearance: textfield;
}
.qty-input::-webkit-inner-spin-button, .qty-input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- About ---------- */
.prose { max-width: 760px; }
.prose h2 { margin: 28px 0 8px; font-size: 24px; }
.prose p { max-width: 38em; }

/* ---------- Cart ---------- */
.cart { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); gap: clamp(20px, 4vw, 48px); align-items: start; }
.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.line {
  display: grid; grid-template-columns: 88px minmax(0, 1fr) auto; grid-template-areas: "photo info total" "photo controls controls";
  gap: 8px 16px; padding: 14px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card);
}
.line-photo { grid-area: photo; display: block; width: 88px; aspect-ratio: 1; padding: 9%; overflow: hidden; border-radius: 10px; background: var(--photo); }
.line-photo img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.line-info { grid-area: info; min-width: 0; }
.line-name { font-weight: 700; }
.line-detail, .line-unit { color: var(--grey); font-size: 15px; }
.line-controls { grid-area: controls; display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.line-total { grid-area: total; font-weight: 700; color: var(--brand); font-variant-numeric: tabular-nums; }
.link-btn {
  min-height: 44px; padding: 0 4px; border: 0; background: none; color: var(--brand);
  font: 600 16px var(--body); text-decoration: underline; cursor: pointer;
}

.cart-side { display: grid; gap: 16px; min-width: 0; }
.cart-side > * { min-width: 0; }
.cart-band { display: grid; gap: 12px; padding: 22px; border-radius: 20px; background: var(--sage); color: var(--brand2); }
.cart-band > * { min-width: 0; }
/* A text box defaults to about 20 characters wide; start it at zero and let it grow, so the row fits a 360px screen. */
.postcode-row input { width: 0; }
.cart-band h2 { font-size: 24px; color: var(--brand2); }
.cart-band .progress { color: var(--brand2); }
.cart-band .band-track { height: 10px; }
.summary { display: grid; gap: 16px; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); }
.summary h2 { font-size: 24px; }
.postcode label { display: block; margin-bottom: 6px; font-weight: 700; }
.postcode-row { display: flex; gap: 8px; }
.postcode input {
  flex: 1; min-width: 0; min-height: 44px; padding: 10px 12px; border: 1px solid var(--grey); border-radius: var(--r-control);
  background: var(--white); color: var(--ink); font: inherit; text-transform: uppercase;
}
.postcode-msg { margin-top: 6px; color: var(--brand2); font-size: 15px; }
.postcode-msg:empty { display: none; }
.sums { display: grid; gap: 8px; margin: 0; }
.sums div { display: flex; justify-content: space-between; gap: 12px; }
.sums dt { margin: 0; }
.sums dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.sum-total { padding-top: 10px; border-top: 1px solid var(--line); font-size: 18px; }
.sum-total dd { color: var(--brand); }
.progress { font-weight: 600; color: var(--brand); }
.progress:empty { display: none; }

.notices { margin-bottom: 20px; padding: 14px 16px; max-width: 760px; background: var(--sage); border-radius: var(--r-control); }
.notices ul { margin: 6px 0 0; padding-left: 20px; }

/* "Added to your cart" message */
.toast {
  position: fixed; z-index: 20; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom, 0px)); width: min(560px, calc(100% - 32px));
  padding: 14px 18px; border-radius: var(--r-card); background: var(--brand2); color: var(--white);
}
.toast a { color: var(--ochre); font-weight: 700; }

/* ---------- Checkout ---------- */
.checkout { display: grid; gap: 18px; min-width: 0; padding: clamp(18px, 3vw, 28px); background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); }
.checkout fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 16px; min-width: 0; }
.checkout legend { margin-bottom: 4px; padding: 0; font-family: var(--display); font-size: 24px; font-weight: 600; color: var(--brand); }
.field label { display: block; font-weight: 700; }
.hint { color: var(--grey); font-size: 15px; }
.field input, .field textarea {
  display: block; width: 100%; max-width: 540px; min-height: 48px; margin-top: 6px; padding: 11px 14px;
  border: 1px solid var(--grey); border-radius: var(--r-control); background: var(--white); color: var(--ink); font: inherit;
}
.field textarea { resize: vertical; }
#f-postcode { max-width: 200px; text-transform: uppercase; }
.field-invalid { padding-left: 14px; border-left: 4px solid var(--error); }
.field-invalid input, .field-invalid textarea { border: 2px solid var(--error); }
.field-error { margin-top: 4px; color: var(--error); font-weight: 700; }
.error-summary { padding: 16px 18px; border: 2px solid var(--error); border-radius: var(--r-card); background: var(--white); }
.error-summary h2 { font-size: 22px; color: var(--ink); }
.error-summary ul { margin: 8px 0 0; padding-left: 20px; }
.error-summary a { color: var(--error); font-weight: 700; }
.form-error { padding: 12px 14px; border-left: 4px solid var(--error); border-radius: 4px; background: var(--white); color: var(--error); font-weight: 600; }
.pay-note { max-width: 38em; }
/* Hidden from people; bots that fill every field give themselves away. */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.mini-lines { list-style: none; margin: 0 0 6px; padding: 0; display: grid; gap: 8px; }
.mini-lines li { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.mini-lines .mini-what { flex: 1; min-width: 0; }
.mini-photo { flex: none; display: block; width: 44px; height: 44px; padding: 4px; overflow: hidden; border-radius: 8px; background: var(--photo); }
.mini-photo img { display: block; width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.mini-photo .photo-none { font-size: 1.1rem; }
.mini-lines li > span:last-child { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Confirmation ---------- */
.confirm { display: grid; gap: 24px; }
.confirm .page-title { margin-bottom: 0; }
.ref-box { max-width: 560px; padding: 22px 24px; border-radius: 20px; background: var(--sage); color: var(--brand2); }
.ref-label { font-weight: 600; }
.ref { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 6px; font: 600 clamp(30px, 6vw, 44px)/1.1 var(--display); color: var(--brand); overflow-wrap: anywhere; }
.pay-box { display: grid; gap: 12px; max-width: 560px; padding: 22px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); }
.pay-box h2 { font-size: 26px; }
.bank { display: grid; gap: 10px; margin: 0; }
.bank div { display: grid; gap: 2px; }
.bank dt { color: var(--grey); font-size: 15px; }
.bank dd { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; font-size: 18px; font-weight: 700; font-variant-numeric: tabular-nums; }
.copy-btn {
  min-height: 44px; padding: 6px 14px; border: 1.5px solid var(--brand); border-radius: var(--r-control);
  background: var(--white); color: var(--brand); font: 700 14px var(--body); cursor: pointer;
}
.copy-btn:hover { background: var(--sage); }
.ref .copy-btn { font-family: var(--body); }
.pay-callout { padding: 12px 16px; border-left: 4px solid var(--brand); border-radius: 4px; background: var(--bg); color: var(--brand2); font-size: 18px; font-weight: 600; }
.confirm .cart h2 { margin-bottom: 12px; font-size: 24px; }

/* ---------- Sticky mobile cart bar ---------- */
.sticky-cart { display: none; }
@media (max-width: 700px) {
  .sticky-cart:not([hidden]) {
    position: fixed; z-index: 15; left: 16px; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px));
    display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding: 14px 20px;
    border-radius: var(--r-card); background: var(--brand2); color: var(--white); font-weight: 700; text-decoration: none;
    box-shadow: 0 8px 24px rgb(0 0 0 / 0.18);
  }
  /* Room at the bottom so the bar never covers the end of the page, and the toast sits above it. */
  body.has-sticky { padding-bottom: 92px; }
  body.has-sticky .toast { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }
}

/* ---------- Footer ---------- */
.foot {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px 32px;
  margin-top: 32px; padding: 40px var(--g); background: var(--brand2); color: var(--sage); font-size: 15px;
}
.foot .logo { color: var(--white); }
.foot-about { display: grid; gap: 10px; align-content: start; }
.foot h2 { margin-bottom: 10px; font: 700 15px var(--body); color: var(--white); }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--sage); text-decoration: none; }
.foot a:hover { color: var(--white); text-decoration: underline; }
.foot .logo:hover { text-decoration: none; }
.foot-copy { color: var(--sage); font-size: 14px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .aisles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .hero-copy { padding: 44px 36px; }
}
@media (max-width: 1000px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 800px) {
  .product, .cart { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 700px) {
  h2 { font-size: 26px; }
  .site-head { gap: 12px; padding: 14px var(--g); }
  .nav { display: none; }
  .logo { font-size: 24px; }
  .hero { grid-template-columns: minmax(0, 1fr); margin: 16px var(--g) 36px; }
  .hero-copy { padding: 30px 22px; }
  .hero-sub { font-size: 16px; }
  .hero-search { flex-direction: column; }
  .trust { gap: 10px 16px; }
  .collage { min-height: 0; grid-template-rows: 140px 140px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .grid-home .card:nth-child(n+5) { display: none; }
  .aisles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .aisle:nth-child(n+7) { display: none; }
  .card-price { font-size: 17px; }
  .card-add, .card-choose { padding: 8px 12px; }
  .band { flex-direction: column; align-items: flex-start; gap: 18px; padding: 24px; }
  .band h2 { font-size: 26px; }
  .band-bar { width: 100%; max-width: none; }
  .foot { grid-template-columns: 1fr 1fr; }
  .foot-about { grid-column: 1 / -1; }
}
@media (max-width: 340px) { .cart-word { display: none; } }
@media (max-width: 420px) {
  .line { grid-template-columns: 64px minmax(0, 1fr); grid-template-areas: "photo info" "controls controls" "total total"; }
  .line-photo { width: 64px; }
  .line-total { text-align: right; }
}
