/* ════════════════════════════════════════════════════════════════
   TillStack storefront
   Hand-written CSS, mobile first from 360px. No framework.

   Colours are NOT set here. Each shop chooses its own in the BMS
   (Online Store > Shop Settings) and the page sends them as custom
   properties: --brand, --brand-text, --action, --action-deep, --tint,
   --tint-edge, --ink, --muted, --success, --success-tint, --motif.
   The values below are only the look of a shop that has chosen nothing.

   Shape:  16px card corners, pill buttons
   Type:   Bricolage Grotesque for headings, prices and shelf tickets;
           the device's own font for everything else
   ════════════════════════════════════════════════════════════════ */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --brand: #1D4ED8;
  --brand-text: #1D4ED8;
  --action: #1D4ED8;
  --action-deep: #173EAD;
  --tint: #F4F6FD;
  --tint-edge: #D7DFF8;
  --ink: #1F1F1F;
  --muted: #5F5F5F;
  --success: #1E7A46;
  --success-tint: #EAF5EE;
  --motif: none;
  --line: #E6E1DF;
  --white: #FFFFFF;

  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --radius: 16px;
  --radius-small: 10px;
  --pill: 999px;
  --wrap: 1200px;
  --pad: 16px;
  --tap: 44px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 140px;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.5;
  color: var(--ink);
  background: var(--white);
  overflow-wrap: break-word;
}

img, svg { max-width: 100%; }
img { height: auto; }
svg.icon { flex: none; vertical-align: -0.2em; }

h1, h2, h3, p, ul, ol, dl, dd, figure, address { margin: 0; }
ul, ol { padding: 0; list-style: none; }
address { font-style: normal; }

a { color: var(--action); text-underline-offset: 0.18em; }
a:hover { color: var(--action-deep); }

button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 2px;
  border-radius: 4px;
}
main:focus { outline: none; }

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

.skip-link {
  position: absolute;
  left: 8px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--pill);
}
.skip-link:focus { top: 8px; color: var(--white); }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--pad);
}

/* ── Top strip ─────────────────────────────────────────────────── */

.strip {
  background: var(--tint);
  color: var(--ink);
  font-size: 0.8125rem;
}
.strip-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-block: 6px;
}
.strip a { white-space: nowrap; font-weight: 600; }
.strip-city { display: none; }

/* ── Header ────────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.header-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas: "brand . basket" "search search search";
  align-items: center;
  gap: 8px 12px;
  padding-block: 8px 10px;
}
.brand { grid-area: brand; display: block; line-height: 0; border-radius: 8px; }
.brand img { width: auto; height: 50px; }
.brand-name {
  display: block;
  max-width: 46vw;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--brand-text);
}
.brand { text-decoration: none; }

.search { grid-area: search; position: relative; }
.search-input {
  width: 100%;
  height: var(--tap);
  padding: 0 52px 0 18px;
  border: 1.5px solid var(--muted);
  border-radius: var(--pill);
  background: var(--white);
  font-size: 1rem;
  appearance: none;
}
.search-input::placeholder { color: var(--muted); opacity: 1; }
.search-input::-webkit-search-cancel-button { display: none; }
.search-input:focus-visible { outline-offset: 0; border-color: var(--ink); border-radius: var(--pill); }
.search-go {
  position: absolute;
  right: 4px; top: 4px;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--action);
  color: var(--white);
}
.search-go:hover { background: var(--action-deep); }

.suggest {
  position: absolute;
  left: 0; right: 0; top: calc(100% + 6px);
  z-index: 30;
  max-height: min(70vh, 460px);
  overflow-y: auto;
  padding: 6px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(31, 31, 31, 0.16);
}
.suggest-item {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: var(--tap);
  padding: 10px 12px;
  border-radius: var(--radius-small);
  cursor: pointer;
}
.suggest-item[aria-selected="true"], .suggest-item:hover { background: var(--tint); }
.suggest-name { font-weight: 600; }
.suggest-meta { color: var(--muted); font-size: 0.875rem; white-space: nowrap; }
.suggest-aisle .suggest-name { font-weight: 400; }
.suggest-all { color: var(--action); font-weight: 600; }

.basket-link {
  grid-area: basket;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 14px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--white);
  font-weight: 600;
  text-decoration: none;
}
.basket-link:hover { background: #000; color: var(--white); }
.basket-word { display: none; }
.basket-count {
  min-width: 24px;
  padding: 0 6px;
  border-radius: var(--pill);
  background: var(--brand);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  line-height: 24px;
}
.basket-count.is-bumped { animation: bump 0.35s ease-out; }
@keyframes bump { 40% { transform: scale(1.3); } }

.aisles { border-top: 1px solid var(--line); }
.aisles-list {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-block: 4px;
}
.aisles-list::-webkit-scrollbar { display: none; }
.aisles-list a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--pill);
  color: var(--ink);
  font-size: 0.9375rem;
  text-decoration: none;
  white-space: nowrap;
}
.aisles-list a:hover { background: var(--tint); }
.aisles-list a[aria-current="page"] { background: var(--ink); color: var(--white); }
.aisles-list .aisle-offers { color: var(--action); font-weight: 700; }
.aisles-list .aisle-offers[aria-current="page"] { background: var(--action); color: var(--white); }

/* ── Buttons ───────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 22px;
  border: 2px solid transparent;
  border-radius: var(--pill);
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
}
.btn-primary { background: var(--action); color: var(--white); }
.btn-primary:hover { background: var(--action-deep); color: var(--white); }
.btn-quiet { background: var(--white); border-color: var(--ink); color: var(--ink); }
.btn-quiet:hover { background: var(--ink); color: var(--white); }
.btn-light { background: var(--white); color: var(--ink); }
.btn-light:hover { background: var(--tint); color: var(--ink); }
.btn-block { display: flex; width: 100%; }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 0.9375rem; }

.icon-btn {
  display: grid;
  place-items: center;
  width: var(--tap); height: var(--tap);
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); }

.link-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: var(--tap);
  padding: 0 4px;
  border: 0;
  background: none;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}
.link-btn:hover { color: var(--action-deep); }

/* ── Messages ──────────────────────────────────────────────────── */

.flash-wrap { padding-top: 12px; }
.flash {
  margin-bottom: 8px;
  padding: 12px 16px;
  border-radius: var(--radius-small);
  border: 1px solid var(--line);
  background: var(--white);
}
.flash-ok { background: var(--success-tint); border-color: var(--success); color: var(--ink); }
.flash-info { background: var(--tint); border-color: var(--tint-edge); }
.flash-error { background: #FFF0F0; border-color: #F3B6B6; color: #8A0002; }

.toast {
  position: fixed;
  left: 50%; bottom: 16px;
  z-index: 60;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border-radius: var(--pill);
  background: var(--ink);
  color: var(--white);
  font-size: 0.9375rem;
  text-align: center;
  transform: translate(-50%, 140%);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  pointer-events: none;
}
.toast.is-shown { transform: translate(-50%, 0); opacity: 1; }
.toast.is-error { background: #8A0002; }

/* ── Page furniture ────────────────────────────────────────────── */

.page-head { padding-top: 16px; }
.page-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}
.page-intro { color: var(--muted); max-width: 60ch; margin-bottom: 8px; }

.crumbs { font-size: 0.875rem; margin-bottom: 8px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 4px 8px; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 8px; color: var(--line); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--action-deep); }

.section { padding-block: 20px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 4.4vw, 1.75rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.section-more { font-weight: 600; white-space: nowrap; }

/* ── Welcome panel and slider ──────────────────────────────────── */

.welcome, .slider { padding-top: 16px; }

.welcome-panel, .slide {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--tint);
}
.welcome-panel { padding: 28px 20px 32px; }
.welcome-text { position: relative; z-index: 1; max-width: 34rem; }
/* Large headings in the brand colour use --brand-text, which is always readable on the tint. */
.welcome-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 11vw, 4.5rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.03em;
  color: var(--brand-text);
}
.welcome-lead { margin-top: 14px; font-size: 1.0625rem; max-width: 30rem; }
.welcome-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.welcome-motif, .slide-motif {
  position: absolute;
  right: -24px; bottom: -36px;
  color: var(--brand);
  opacity: 0.12;
  line-height: 0;
}

.slides {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius);
}
.slides::-webkit-scrollbar { display: none; }
.slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  display: grid;
  min-height: 220px;
  color: var(--ink);
}
.slide-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
  padding: 24px 20px;
}
.slide-heading {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 7vw, 3rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}
.slide-offer { font-size: 1.0625rem; max-width: 28rem; }
.slide-light { color: var(--white); }
.slide-light .slide-motif { color: var(--white); opacity: 0.16; }
.slide-picture { position: relative; display: block; height: 150px; line-height: 0; }
.slide-picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.slide.has-image { grid-template-rows: 150px 1fr; }
.slide.has-image .slide-picture { order: -1; }

.slider-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 10px;
}
.slider-dots { display: flex; gap: 4px; }
.dot {
  width: 28px; height: 28px;
  padding: 0;
  border: 0;
  background: none;
  display: grid; place-items: center;
}
.dot::before {
  content: "";
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--muted);
}
.dot[aria-current="true"]::before { background: var(--action); border-color: var(--action); width: 22px; border-radius: var(--pill); }

/* ── Aisle tiles ───────────────────────────────────────────────── */

.aisle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.aisle-tile {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  min-height: 84px;
  height: 100%;
  padding: 12px 14px;
  border-radius: var(--radius);
  background: var(--tint);
  border: 1px solid var(--tint-edge);
  color: var(--ink);
  text-decoration: none;
}
.aisle-tile:hover { background: var(--white); border-color: var(--ink); color: var(--ink); }
.aisle-name { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; line-height: 1.15; }
.aisle-count { color: var(--muted); font-size: 0.8125rem; }

/* ── Product grid, rail and cards ──────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
}
.rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(158px, 46%);
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  margin-inline: calc(var(--pad) * -1);
  padding-inline: var(--pad);
  padding-bottom: 6px;
  scroll-padding-inline: var(--pad);
}
.rail > li { scroll-snap-align: start; }
.grid > li, .rail > li { display: flex; }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--white);
  overflow: hidden;
  scroll-margin-top: 150px;
}
.card:target { border-color: var(--ink); }
.card-link {
  display: flex;
  flex-direction: column;
  flex: 1;
  color: var(--ink);
  text-decoration: none;
}
.card-link:hover { color: var(--ink); }
.card-link:hover .card-name { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.16em; }
.card-link:focus-visible { outline-offset: -3px; border-radius: var(--radius); }

.card-media {
  display: block;
  aspect-ratio: 1 / 1;
  background: var(--white);
  line-height: 0;
}
.card-media img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.card-name {
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  padding: 8px 12px 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* The shelf ticket: a product with no photo shows its name as the label. */
.ticket {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 12px 14px;
  background: var(--tint);
  border-bottom: 2px dashed var(--tint-edge);
  line-height: 1.2;
}
.card .ticket {
  aspect-ratio: auto;
  min-height: 148px;
  flex: 1;
  /* The shop's chosen decoration, faint, in the corner of every ticket. */
  background-image: var(--motif);
  background-repeat: no-repeat;
  background-position: right 4px bottom 6px;
  background-size: 44px auto;
}
.ticket-aisle { color: var(--muted); font-size: 0.75rem; line-height: 1.2; }
.card-ticket .card-name {
  padding: 0;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  -webkit-line-clamp: 5;
}
.card.has-ribbon .ticket, .card:has(.ribbon) .ticket { padding-top: 40px; }

.ribbon {
  position: absolute;
  top: 10px; left: 0;
  padding: 4px 16px 4px 10px;
  background: var(--action);
  color: var(--white);
  font-family: var(--font-display);
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.2;
  clip-path: polygon(0 0, 100% 0, calc(100% - 8px) 50%, 100% 100%, 0 100%);
  pointer-events: none;
}
.ribbon-inline { position: static; display: inline-block; flex: none; }

.card-foot {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 8px 12px 12px;
}
.card-brand { color: var(--muted); font-size: 0.8125rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.card-price {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 8px;
}
.card.is-out .card-media img { opacity: 0.55; }
.soldout {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--tap);
  border-radius: var(--pill);
  background: #F1EEED;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.9375rem;
}

/* ── Add button and stepper ────────────────────────────────────── */

.buy { display: block; }
.btn-add { width: 100%; padding-inline: 12px; }
.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--tap);
  border: 2px solid var(--action);
  border-radius: var(--pill);
  background: var(--white);
}
.step {
  display: grid;
  place-items: center;
  width: 40px; height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--action);
}
.step:hover:not(:disabled) { background: var(--tint); }
.step:disabled { color: #B9B4B2; cursor: not-allowed; }
.step-qty {
  min-width: 2ch;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  text-align: center;
}
.buy.is-busy { opacity: 0.6; pointer-events: none; }
.buy-large { max-width: 20rem; }
.buy-large .btn-add, .buy-large .stepper { min-height: 52px; font-size: 1.0625rem; }
.buy-large .step { width: 48px; height: 48px; }

/* ── Sort and filter bar ───────────────────────────────────────── */

.filters {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-block: 8px 12px;
}
.filters-count { color: var(--muted); font-size: 0.9375rem; }
.filters-fields { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.field { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 150px; }
.field-label { font-size: 0.8125rem; color: var(--muted); }
.field select {
  height: var(--tap);
  width: 100%;
  padding: 0 36px 0 14px;
  border: 1.5px solid var(--muted);
  border-radius: var(--pill);
  background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%231F1F1F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 14px center;
  appearance: none;
  text-overflow: ellipsis;
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: var(--tap);
  padding: 0 14px 0 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--pill);
  cursor: pointer;
  white-space: nowrap;
}
.check:has(input:checked) { border-color: var(--ink); background: var(--tint); }
.check input { width: 20px; height: 20px; margin: 0; accent-color: var(--action); }
.filters-clear { display: inline-flex; align-items: center; min-height: var(--tap); font-weight: 600; }

.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 12px;
  padding-block: 24px 8px;
}
.pager-pages { display: flex; flex-wrap: wrap; gap: 4px; }
.pager-pages a, .pager-gap {
  display: grid;
  place-items: center;
  min-width: var(--tap); height: var(--tap);
  padding: 0 8px;
  border-radius: var(--pill);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.pager-pages a:hover { background: var(--tint); }
.pager-pages a[aria-current="page"] { background: var(--ink); color: var(--white); }
.pager-step {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: var(--tap);
  padding: 0 14px;
  border: 1.5px solid var(--ink);
  border-radius: var(--pill);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
}
.pager-step:hover { background: var(--ink); color: var(--white); }

/* ── Empty states ──────────────────────────────────────────────── */

.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 32px 16px;
  text-align: center;
  color: var(--muted);
}
.empty-wide { margin-block: 16px; border-radius: var(--radius); background: var(--tint); padding-block: 40px; }
.empty-mark { color: var(--brand); line-height: 0; }
.empty-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
}
.empty .btn { margin-top: 10px; }
.empty .welcome-actions { justify-content: center; margin-top: 4px; }

/* ── Product page ──────────────────────────────────────────────── */

.product { display: grid; gap: 16px; padding-bottom: 12px; }
.product-media {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  line-height: 0;
  background: var(--white);
}
.product-media img { width: 100%; aspect-ratio: 1 / 1; object-fit: contain; padding: 16px; }
.ticket-large {
  position: relative;
  min-height: 120px;
  border: 0;
  border-bottom: 2px dashed var(--tint-edge);
  background: var(--tint);
  padding: 16px;
}
.ticket-large .ticket-aisle { font-size: 0.875rem; }
.ticket-motif { position: absolute; right: 12px; bottom: 4px; color: var(--brand); opacity: 0.16; line-height: 0; }

.product-brand { color: var(--muted); font-size: 0.9375rem; }
.product-name {
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 6vw, 2.375rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.015em;
}
.product-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  margin-top: 10px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.1;
}
.product-unit { font-family: var(--font-body); font-size: 0.9375rem; font-weight: 400; color: var(--muted); }
.offer-box {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-small);
  background: var(--tint);
  font-size: 0.9375rem;
  line-height: 1.35;
}
.stock { display: flex; align-items: center; gap: 6px; margin-block: 12px; font-weight: 600; }
.stock-in { color: var(--success); }
.stock-low { color: #8A4B00; }
.stock-out { color: var(--muted); }
.product .soldout { max-width: 20rem; }
.product-limit { margin-top: 8px; color: var(--muted); font-size: 0.875rem; }
.product-details { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); max-width: 65ch; }
.product-details h2 { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; margin-top: 14px; }
.product-details h2:first-child { margin-top: 0; }
.product-label-note { margin-top: 14px; color: var(--muted); font-size: 0.875rem; }
.product-facts { margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.product-facts div { display: flex; gap: 12px; padding-block: 4px; }
.product-facts dt { color: var(--muted); min-width: 7.5rem; }

/* ── Basket lines (page and drawer) ────────────────────────────── */

.lines { display: flex; flex-direction: column; }
.line {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 12px;
  padding-block: 14px;
  border-bottom: 1px solid var(--line);
  scroll-margin-top: 150px;
}
.line-thumb {
  display: grid;
  place-items: center;
  width: 64px; height: 64px;
  border: 1px solid var(--line);
  border-radius: var(--radius-small);
  background: var(--white);
  color: var(--brand);
  overflow: hidden;
  line-height: 0;
}
.line-thumb img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.line-thumb-ticket { background: var(--tint); border-color: var(--tint-edge); }
.line-thumb-ticket svg { opacity: 0.55; }
.line-name { color: var(--ink); font-weight: 600; line-height: 1.3; text-decoration: none; }
.line-name:hover { color: var(--ink); text-decoration: underline; }
.line-each { color: var(--muted); font-size: 0.875rem; }
.line-promo { color: var(--success); font-size: 0.875rem; font-weight: 600; }
.line-nudge {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 10px;
  border-radius: var(--pill);
  background: var(--tint);
  color: var(--ink);
  font-size: 0.8125rem;
  font-weight: 600;
}
.line-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  margin-top: 8px;
}
.line-controls .stepper { min-width: 124px; }
.line-total {
  margin-left: auto;
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  white-space: nowrap;
}
.line-was { margin-right: 6px; color: var(--muted); font-family: var(--font-body); font-size: 0.875rem; font-weight: 400; }
.basket-clear { padding-block: 4px 12px; }

.totals { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.totals-row { display: flex; justify-content: space-between; gap: 12px; }
.totals-saving { color: var(--success); font-weight: 600; }
.totals-total {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 800;
}

.basket-layout { display: grid; gap: 20px; padding-bottom: 24px; }
.summary {
  align-self: start;
  padding: 16px;
  border-radius: var(--radius);
  background: var(--tint);
  border: 1px solid var(--tint-edge);
}
.summary-title { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 10px; }
.summary-note { margin-top: 10px; color: var(--muted); font-size: 0.875rem; text-align: center; }
.summary-soon { margin-bottom: 12px; font-size: 0.9375rem; }
.summary-back { display: block; margin-top: 12px; text-align: center; font-weight: 600; }

/* ── Basket drawer ─────────────────────────────────────────────── */

.drawer {
  position: fixed;
  inset: 0 0 0 auto;
  width: min(420px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: var(--white);
  color: var(--ink);
  flex-direction: column;
  box-shadow: -12px 0 40px rgba(31, 31, 31, 0.2);
}
.drawer[open] { display: flex; animation: drawer-in 0.22s ease-out; }
.drawer::backdrop { background: rgba(31, 31, 31, 0.55); }
@keyframes drawer-in { from { transform: translateX(40px); opacity: 0; } }
.drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 { font-family: var(--font-display); font-size: 1.375rem; font-weight: 700; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0 16px; overscroll-behavior: contain; }
.drawer-note { padding: 24px 0; color: var(--muted); text-align: center; }
.drawer-notice { margin-top: 12px; }
.drawer-foot { padding: 14px 16px 16px; border-top: 1px solid var(--line); background: var(--tint); }
.drawer-foot .btn + .btn { margin-top: 8px; }

/* ── Store and visit ───────────────────────────────────────────── */

.visit, .store-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  background: var(--tint);
  border: 1px solid var(--tint-edge);
}
.visit-line { display: flex; gap: 10px; margin-top: 8px; }
.visit-line svg { color: var(--action); margin-top: 2px; }

/* ── Footer ────────────────────────────────────────────────────── */

.site-footer {
  margin-top: 32px;
  padding-block: 28px 24px;
  background: var(--ink);
  color: #E9E6E5;
  font-size: 0.9375rem;
}
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--tint); }
.site-footer :focus-visible { outline-color: var(--white); }
.footer-grid { display: grid; gap: 24px; }
.footer-logo { width: auto; max-width: 160px; height: auto; max-height: 120px; padding: 10px; border-radius: var(--radius); background: var(--white); }
.footer-name { font-family: var(--font-display); font-size: 1.5rem; font-weight: 800; color: var(--white); line-height: 1.1; }
.footer-tagline { margin-top: 8px; color: #C9C5C3; }
.footer-title { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--white); margin-bottom: 8px; }
.footer-links li { margin-bottom: 2px; }
.footer-links a { display: inline-block; padding-block: 6px; }
.site-footer address + p, .site-footer p + p { margin-top: 8px; }
.footer-base { margin-top: 24px; padding-top: 16px; border-top: 1px solid #3A3A3A; color: #C9C5C3; font-size: 0.8125rem; }

.is-bare .header-row { grid-template-areas: "brand . ."; }
.is-bare .site-footer { margin-top: 0; }

/* ════════════════════════════════════════════════════════════════
   Wider screens
   ════════════════════════════════════════════════════════════════ */

@media (min-width: 420px) {
  .basket-word { display: inline; }
  .strip-city { display: inline; }
}

@media (min-width: 600px) {
  :root { --pad: 24px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
  .rail { grid-auto-columns: minmax(170px, 30%); gap: 14px; }
  .aisle-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filters { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .filters-fields { justify-content: flex-end; }
  .field { flex: 0 1 200px; }
  .visit, .store-card { flex-direction: row; align-items: center; justify-content: space-between; padding: 28px; }
  .footer-grid { grid-template-columns: auto 1fr 1fr; gap: 40px; }
}

@media (min-width: 700px) {
  .slide { min-height: 320px; }
  .slide.has-image { grid-template-rows: none; grid-template-columns: 1fr 1fr; }
  .slide.has-image .slide-picture { order: 0; height: auto; min-height: 320px; }
  .slide-text { padding: 36px 40px; gap: 14px; }
  .welcome-panel { padding: 48px 40px 56px; }
}

@media (min-width: 900px) {
  html { scroll-padding-top: 150px; }
  .header-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas: "brand search basket";
    gap: 24px;
    padding-block: 10px;
  }
  .brand img { height: 60px; }
  .search { max-width: 620px; width: 100%; justify-self: center; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
  .rail {
    grid-auto-flow: row;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    grid-auto-columns: auto;
    gap: 16px;
    overflow: visible;
    margin-inline: 0;
    padding-inline: 0;
  }
  /* One tidy row on a wide screen; the "see all" link leads to the rest. */
  .rail > li:nth-child(n+6) { display: none; }
  .aisle-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .filters-fields { flex-wrap: nowrap; }
  .section { padding-block: 28px; }
  .product { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 40px; align-items: start; padding-top: 8px; }
  .ticket-large { min-height: 320px; border: 0; }
  .basket-layout { grid-template-columns: minmax(0, 1fr) 340px; gap: 40px; align-items: start; }
  .summary { position: sticky; top: 150px; padding: 20px; }
  .line { grid-template-columns: 72px minmax(0, 1fr); }
  .line-thumb { width: 72px; height: 72px; }
}

@media (min-width: 1100px) {
  .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .aisle-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .is-bare .footer-grid { grid-template-columns: auto 1fr; }
}

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

@media print {
  .strip, .site-header, .site-footer, .drawer, .toast, .buy, .filters, .pager, .skip-link { display: none !important; }
  body { color: #000; }
}
