/*
 * The store front.
 *
 * Its OWN stylesheet. It deliberately shares nothing with the donor design system or
 * the supplies shop: a jewellery store wearing a campaign's accent colour, Hanken
 * Grotesk, the YSPI lockup and a footer reading "A purchase of fundraising supplies is
 * not a donation" is the mistake this replaces.
 *
 * The palette and type are The Celtic Collection's own, so a customer crossing from
 * thecelticcollection.ie sees one brand. Every colour is a VARIABLE the layout
 * overrides per store from the database; the values here are the shipped defaults and
 * are what renders when a store has set none.
 *
 * Measured, not eyeballed: the shipped ink reads 17.01:1 on the ground and the gold
 * 9.83:1. A store that retunes them gets a contrast reading in the panel.
 */

/* ---------------------------------------------------------------- faces */

@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-500-italic.woff2') format('woff2');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/cormorant-garamond-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url('../fonts/jost-300-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/jost-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Jost';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/jost-500-normal.woff2') format('woff2');
}

/* ---------------------------------------------------------------- tokens */

:root {
  --st-ground: #021208;
  --st-surface: #04250c;
  --st-surface-2: #0b3318;
  --st-ink: #f3f1ea;
  --st-accent: #d9dcdf;
  --st-highlight: #e8b04a;
  --st-font-display: 'Cormorant Garamond', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --st-font-body: 'Jost', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;

  --st-line: color-mix(in srgb, var(--st-accent) 14%, transparent);
  --st-line-strong: color-mix(in srgb, var(--st-accent) 32%, transparent);
  --st-muted: color-mix(in srgb, var(--st-ink) 72%, transparent);
  /* The one colour that says something is wrong. MEASURED on the shipped theme:
     6.34:1 on the panel surface and 7.40:1 on the ground, so it clears 4.5:1 at
     the 0.8rem an error message is set in. It is never the ONLY signal — every
     message is prefixed and every bad field carries aria-invalid — because a
     store may retune the ground underneath it. */
  --st-bad: #e08a7a;

  --st-radius: 2px;
  --st-pill: 999px;
  --st-tracking-label: 0.24em;
  --st-tracking-button: 0.14em;
  --st-leading-display: 1.04;
  --st-leading-body: 1.7;
  --st-measure: 62ch;
  --st-gutter: 24px;
  --st-max: 1180px;
  --st-section-y: clamp(3rem, 7vw, 6rem);
}

/* ---------------------------------------------------------------- reset */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--st-ground);
  color: var(--st-ink);
  font-family: var(--st-font-body);
  font-weight: 300;
  font-size: 1.0625rem;
  line-height: var(--st-leading-body);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--st-ink); text-decoration-color: var(--st-line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--st-highlight); }

h1, h2, h3 {
  font-family: var(--st-font-display);
  font-weight: 500;
  line-height: var(--st-leading-display);
  margin: 0 0 0.5em;
  letter-spacing: 0.01em;
}
h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.25rem; }

.st-skip {
  position: absolute; left: -9999px;
}
.st-skip:focus {
  left: 12px; top: 12px; z-index: 50;
  background: var(--st-ink); color: var(--st-ground);
  padding: 10px 16px; border-radius: var(--st-radius);
}

/* A label, not a heading: small, letterspaced, quiet. */
.st-eyebrow {
  font-size: 0.72rem;
  letter-spacing: var(--st-tracking-label);
  text-transform: uppercase;
  color: var(--st-muted);
  margin: 0 0 1rem;
}

.st-wrap {
  max-width: var(--st-max);
  margin: 0 auto;
  padding: 0 var(--st-gutter);
}

/* ---------------------------------------------------------------- header */

.st-top {
  border-bottom: 1px solid var(--st-line);
  background: color-mix(in srgb, var(--st-ground) 92%, #000);
  position: sticky; top: 0; z-index: 20;
  backdrop-filter: blur(6px);
}
.st-top__in {
  max-width: var(--st-max);
  margin: 0 auto;
  padding: 14px var(--st-gutter);
  display: flex; align-items: center; gap: 16px;
}
.st-top__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; margin-right: auto; }
.st-top__logo { height: 44px; width: auto; }
.st-top__name {
  font-family: var(--st-font-display);
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}
/* ---- the nav band ---------------------------------------------------------------
 *
 * A band of its OWN, below the sticky header rather than inside it. Two measured
 * reasons, both of which bite at 390px:
 *
 *  - `.st-aside` is `position: sticky; top: 92px` — a hard-coded clearance for the
 *    header's height. Growing the header silently mis-offsets the basket panel on
 *    every product page, and nothing would fail to say so.
 *  - `.st-top__in` is one flex row with no wrap, and the brand plus the basket pill
 *    already fill the 358px a phone has to give. A third child crushes both.
 *
 * It WRAPS rather than scrolling sideways. That is not a preference: `.st-shelves`
 * records what a sideways strip did — it sliced the last item through the middle at
 * the screen edge, and a control that looks broken is one nobody touches.
 */
.st-nav {
  border-bottom: 1px solid var(--st-line);
  background: color-mix(in srgb, var(--st-ground) 96%, #000);
}
.st-nav__in {
  max-width: var(--st-max);
  margin: 0 auto;
  padding: 10px var(--st-gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 22px;
  list-style: none;
}
.st-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 4px 0;
  font-size: 0.78rem;
  letter-spacing: var(--st-tracking-button);
  text-transform: uppercase;
  text-decoration: none;
  color: var(--st-muted);
  /* Reserve the underline's room up front, so the row does not shift by a pixel when
     one item becomes current or somebody hovers. */
  border-bottom: 1px solid transparent;
}
/* SHOP, which is the only item in the row that goes to the goods.

   500 rather than 600 or 700: the store loads Jost at 300, 400 and 500 only, so
   anything heavier is a weight the browser synthesises — a smeared fake bold that
   looks like a rendering fault beside real type. The row inherits body weight 300,
   so 500 is two real steps up, and full ink against the muted rest carries the
   rest of the difference. Identity is never weight alone either: it is also the
   first shop item in the row. */
.st-nav__link--primary { font-weight: 500; color: var(--st-ink); }
.st-nav__link:hover { color: var(--st-ink); }
.st-nav__link[aria-current='page'] {
  color: var(--st-ink);
  border-bottom-color: var(--st-highlight);
}
/* The way back to the brand site, set apart from the shop's own pages by the arrow
   and a rule after it — it is the only item that LEAVES, and a customer scanning for
   it should not have to read five labels to find it. */
.st-nav__link--back {
  color: var(--st-ink);
  text-transform: none;
  letter-spacing: 0.02em;
  font-size: 0.82rem;
}

/* ---- the FAQ ---------------------------------------------------------------------
 *
 * `<details>`, so it opens with JavaScript off and is announced as a disclosure
 * without a line of ARIA. The footer's old Returns block had NO CSS at all — the
 * browser's bare triangle in muted 0.85rem type — which is half the reason nobody
 * ever found it.
 */
.st-faqs { max-width: var(--st-measure); }
.st-faq {
  border-bottom: 1px solid var(--st-line);
  padding: 2px 0;
}
.st-faq__q {
  cursor: pointer;
  list-style: none;
  padding: 16px 28px 16px 0;
  position: relative;
  font-family: var(--st-font-display);
  font-size: 1.15rem;
  color: var(--st-ink);
}
.st-faq__q::-webkit-details-marker { display: none; }
/* Drawn rather than the native triangle, which cannot be coloured and sits at a
   different size in every browser. */
.st-faq__q::after {
  content: '';
  position: absolute;
  right: 4px;
  top: 50%;
  width: 9px; height: 9px;
  border-right: 1.5px solid var(--st-highlight);
  border-bottom: 1.5px solid var(--st-highlight);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.18s ease;
}
.st-faq[open] .st-faq__q::after { transform: translateY(-20%) rotate(-135deg); }
.st-faq__q:focus-visible { outline: 2px solid var(--st-highlight); outline-offset: 3px; }
.st-faq__a {
  padding: 0 0 18px;
  /* NOT var(--st-muted): this is the answer somebody opened the row to read, and the
     quiet tier measured 4.10:1 the last time it was used for body copy. */
  color: var(--st-ink);
}
.st-faq__a ul, .st-faq__a ol { padding-left: 1.35rem; margin: 0.5rem 0; }

/* ---- a page of words -------------------------------------------------------------- */

.st-prose { max-width: var(--st-measure); }
.st-prose h2, .st-prose h3, .st-prose h4 {
  margin: 1.8em 0 0.5em;
}
.st-prose h2 { font-size: 1.6rem; }
.st-prose h3 { font-size: 1.25rem; }
.st-prose p, .st-prose ul, .st-prose ol { margin: 0 0 1em; }
.st-prose ul, .st-prose ol { padding-left: 1.35rem; }
.st-prose li { margin: 0.25em 0; }
.st-prose address { font-style: normal; margin: 0 0 1em; }

.st-foot__links { margin: 0 0 4px; }
.st-foot__links a { margin-right: 2px; }

.st-basket-link {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--st-line-strong);
  border-radius: var(--st-pill);
  padding: 8px 16px;
  font-size: 0.8rem;
  letter-spacing: var(--st-tracking-button);
  text-transform: uppercase;
  text-decoration: none;
}
.st-basket-link:hover { border-color: var(--st-highlight); color: var(--st-highlight); }
.st-basket-link__count {
  min-width: 20px; height: 20px;
  display: inline-grid; place-items: center;
  border-radius: var(--st-pill);
  background: var(--st-highlight); color: #1a1205;
  font-size: 0.7rem; font-weight: 500;
}

/* ---------------------------------------------------------------- masthead */

.st-mast {
  background:
    radial-gradient(120% 90% at 30% 20%,
      color-mix(in srgb, var(--st-surface-2) 85%, var(--st-ground)) 0%,
      var(--st-surface) 45%,
      var(--st-ground) 100%);
  border-bottom: 1px solid var(--st-line);
  padding: var(--st-section-y) 0;
}
.st-mast__in {
  max-width: var(--st-max);
  margin: 0 auto;
  padding: 0 var(--st-gutter);
  display: grid;
  grid-template-columns: minmax(0, 620px) minmax(0, 330px);
  gap: 48px;
  align-items: center;
}
/* With nothing beside it, the copy takes the SAME 800px column the card below uses —
   change one and change the other, or the hero and the card stop lining up. */
.st-mast__in--single { grid-template-columns: minmax(0, 800px); max-width: 800px; }

/* ---- a photograph or a film behind the hero -------------------------------------
 *
 * Four layers, in this order, and the order is the whole trick:
 *
 *   1. the still, as the section's own background-image
 *   2. the video, absolutely positioned over it (when one is playing)
 *   3. the SCRIM, over both
 *   4. the words, over everything
 *
 * The scrim cannot be folded into the background-image the way a gradient over a
 * picture usually is, because the video would then sit on top of it and the heading
 * would be over bare film. It is a separate layer on purpose.
 *
 * `isolation: isolate` keeps these z-indexes to themselves: the sticky basket panel
 * further down the page is positioned too, and a hero that joins the same stacking
 * context can paint over it while scrolling.
 */
.st-mast--picture {
  position: relative;
  isolation: isolate;
  /* Content-sized is right for words on a gradient and wrong for a photograph: a
     picture in a 180px band reads as a texture rather than as the shop's best shot. */
  min-height: 420px;
  display: grid;
  align-items: center;
  background-image: var(--st-hero-image);
  background-size: cover;
  background-position: var(--st-hero-focus, center);
  background-repeat: no-repeat;
}
.st-mast--picture > .st-mast__in { position: relative; z-index: 2; }
/* A piece's own page gets the same hero, SHORTER. What somebody came for is the
   photograph of the thing and the Add button; a full band above them is brand at the
   expense of the thing being sold.

   `min-height` ALONE does nothing here, which measuring is the only way to learn: the
   band is content-sized and the content is a display-face h1 inside 96px of section
   padding, so it stood at 413px with a 240px minimum declared and ignored. The levers
   that actually move it are the PADDING and the heading, and the h1's bottom margin,
   which is pure waste when the heading is the last thing in the band. */
.st-mast--picture-compact {
  min-height: 200px;
  padding: clamp(1.5rem, 3vw, 2.5rem) 0;
}
.st-mast--picture-compact h1 {
  font-size: clamp(1.75rem, 2.8vw, 2.3rem);
  margin-bottom: 0;
}
.st-mast--picture::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  /* The brand's own ground colour, not black: a shop with a deep green page should
     not have a grey hero. */
  background: color-mix(in srgb, var(--st-ground) var(--st-hero-overlay, 55%), transparent);
}
.st-mast__video {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  /* Without this the video keeps its own aspect ratio inside a band it does not
     match and letterboxes itself against the ground colour. */
  object-fit: cover;
  object-position: var(--st-hero-focus, center);
  /* A full-bleed element over the hero would otherwise swallow a click meant for
     anything that ends up in the band — and on some browsers a tap on a video is a
     play/pause gesture, which is not a control this shop is offering. */
  pointer-events: none;
}

.st-mast__logo { max-height: 70px; width: auto; margin-bottom: 1.5rem; }
.st-mast h1 { margin-bottom: 0.4em; }
.st-mast__intro { color: var(--st-muted); max-width: var(--st-measure); margin: 0; }

.st-promises { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.st-promise {
  border-left: 2px solid var(--st-highlight);
  padding-left: 14px;
}
.st-promise__title { display: block; font-size: 0.95rem; letter-spacing: 0.02em; }
.st-promise__detail { display: block; font-size: 0.8rem; color: var(--st-muted); }

/* ---------------------------------------------------------------- shelf */

.st-main { padding: var(--st-section-y) 0; }

.st-shelves {
  display: flex;
  /* WRAPPING, not scrolling. A sideways strip sliced the last pill through the middle
     at the screen edge, and a filter that looks broken is a filter nobody touches. A
     scroll fade cannot fix it either: the pills are opaque and paint over the strip's
     own background. Wrapping costs one row and shows every shelf at once. */
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 2.5rem;
  padding: 0;
  list-style: none;
}
.st-shelf {
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--st-line-strong);
  border-radius: var(--st-pill);
  padding: 7px 15px;
  font-size: 0.78rem;
  letter-spacing: var(--st-tracking-button);
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  white-space: nowrap;
}
.st-shelf:hover { border-color: var(--st-highlight); }
.st-shelf[aria-current='true'] {
  background: var(--st-ink); color: var(--st-ground); border-color: var(--st-ink);
}

.st-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 28px;
}

/* ---------------------------------------------------------------- card */

.st-card {
  display: flex; flex-direction: column;
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  overflow: hidden;
}
.st-card__media {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: color-mix(in srgb, var(--st-surface) 70%, #000);
}
.st-card__media img { width: 100%; height: 100%; object-fit: cover; }
.st-card__media--empty { display: grid; place-items: center; color: var(--st-muted); font-size: 0.8rem; }

.st-card__body { padding: 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.st-card__shelf {
  font-size: 0.68rem; letter-spacing: var(--st-tracking-label);
  text-transform: uppercase; color: var(--st-muted);
  display: flex; align-items: center; gap: 6px;
}
.st-card__name { font-family: var(--st-font-display); font-size: 1.35rem; margin: 0; }
.st-card__name a { text-decoration: none; }
.st-card__desc {
  margin: 0; font-size: 0.9rem; color: var(--st-muted);
  /* A floor, and only where space is genuinely tight — see the media query. */
  overflow: hidden;
}
.st-card__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--st-line);
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.st-card__price { font-family: var(--st-font-display); font-size: 1.25rem; color: var(--st-highlight); }

.st-flag {
  position: absolute; top: 10px; left: 10px;
  background: color-mix(in srgb, var(--st-ground) 86%, transparent);
  border: 1px solid var(--st-line-strong);
  border-radius: var(--st-pill);
  padding: 4px 11px;
  font-size: 0.66rem; letter-spacing: var(--st-tracking-label); text-transform: uppercase;
}
.st-flag--out { color: var(--st-ink); }
.st-flag--featured { color: var(--st-highlight); border-color: var(--st-highlight); }
/* A chosen badge, or the scarcity line. The SAME treatment as --featured rather
   than a new colour: that pairing is measured at 9.83:1 on the forest ground,
   and a badge nobody validated is a badge nobody can read. The two never appear
   together (ShopBadge picks one), and the words carry the difference — identity
   is never colour alone. */
.st-flag--badge { color: var(--st-highlight); border-color: var(--st-highlight); }

/* ---------------------------------------------------------------- feature */

.st-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  background: var(--st-surface);
  border: 1px solid var(--st-line-strong);
  border-radius: var(--st-radius);
  overflow: hidden;
  margin-bottom: 36px;
}
.st-feature__media {
  /* The IMAGE is capped, never the box. A percentage height on the image resolves
     against a parent whose row is sized by the image itself — cyclic, so the browser
     drops it, and the picture renders at its intrinsic size and paints over the title
     below. A pixel cap cannot be cyclic. overflow:hidden is the guard; the card's own
     clip does nothing to stop a picture painting over the row beneath it. */
  overflow: hidden;
  background: color-mix(in srgb, var(--st-surface) 70%, #000);
  /* MEASURED: without this the `.st-flag` inside resolves against the INITIAL
     containing block and is painted at 10,10 — the page's top-left corner, 641px
     above the card it belongs to and underneath the sticky header. The grid card
     has carried `position: relative` all along; this one never did, so the featured
     piece showed neither "Signature piece" nor, far worse, "Sold out". Nothing looks
     wrong in the rule: `top: 10px; left: 10px` is honoured exactly, against the
     wrong box. overflow:hidden does not clip it either — a clipper BELOW the
     abspos element's containing block never clips it. */
  position: relative;
  /* And it must not be able to collapse. With no photograph the box is a grid row
     sized by its own content, which is nothing: 382x552 of empty dark panel on a
     desktop and h=0 on a phone, so the signature piece had no picture area at all.
     A floor plus the same centred notice the grid card gives. */
  min-height: 240px;
}
.st-feature__media--empty {
  display: grid; place-items: center;
  color: var(--st-muted); font-size: 0.8rem;
}
.st-feature__media img { width: 100%; height: 100%; max-height: 460px; object-fit: cover; }
.st-feature__body { padding: clamp(20px, 3vw, 36px); display: flex; flex-direction: column; gap: 12px; }
.st-feature__body h2 { margin: 0; }

/* ---------------------------------------------------------------- controls */

.st-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--st-font-body);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: var(--st-tracking-button);
  text-transform: uppercase;
  padding: 11px 20px;
  border-radius: var(--st-radius);
  border: 1px solid var(--st-ink);
  background: var(--st-ink);
  color: var(--st-ground);
  cursor: pointer;
  text-decoration: none;
  /* Width is honoured on a <button> and ignored on an <a>, which stays inline — that
     is how a button once drew itself across the small print above it. Any full-width
     control here sets display:flex, so both elements behave the same. */
}
.st-btn:hover { background: var(--st-highlight); border-color: var(--st-highlight); color: #1a1205; }
.st-btn[disabled], .st-btn--disabled {
  background: transparent; color: var(--st-muted); border-color: var(--st-line);
  cursor: not-allowed;
}
.st-btn--ghost { background: transparent; color: var(--st-ink); border-color: var(--st-line-strong); }
.st-btn--ghost:hover { border-color: var(--st-highlight); background: transparent; color: var(--st-highlight); }
.st-btn--block { display: flex; width: 100%; }
.st-btn--lg { padding: 14px 26px; font-size: 0.84rem; }

/* Size pickers are one-tap PILLS, not a <select>: a dropdown on a phone hides both the
   choice and what is sold out, and sold-out has to be visible because it is a control
   rather than decoration. */
.st-sizes { border: 0; margin: 0; padding: 0; }
.st-sizes__legend {
  padding: 0;
  font-size: 0.7rem; letter-spacing: var(--st-tracking-label); text-transform: uppercase;
  color: var(--st-muted);
  margin-bottom: 8px;
}
.st-sizes__row { display: flex; flex-wrap: wrap; gap: 8px; }
.st-size { position: relative; }
.st-size input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.st-size span {
  display: inline-flex; align-items: center;
  border: 1px solid var(--st-line-strong);
  border-radius: var(--st-radius);
  padding: 8px 14px;
  font-size: 0.82rem;
  cursor: pointer;
}
.st-size input:checked + span { background: var(--st-ink); color: var(--st-ground); border-color: var(--st-ink); }
.st-size input:focus-visible + span { outline: 2px solid var(--st-highlight); outline-offset: 2px; }
.st-size input:disabled + span {
  color: var(--st-muted); border-style: dashed; cursor: not-allowed;
  text-decoration: line-through;
}
.st-sizes__note { font-size: 0.78rem; color: var(--st-muted); margin: 8px 0 0; }

.st-field { display: grid; gap: 6px; }
.st-field label {
  font-size: 0.7rem; letter-spacing: var(--st-tracking-label); text-transform: uppercase;
  color: var(--st-muted);
}
.st-field input, .st-field select, .st-field textarea {
  font-family: var(--st-font-body); font-size: 1rem;
  background: color-mix(in srgb, var(--st-ground) 70%, #000);
  border: 1px solid var(--st-line-strong);
  border-radius: var(--st-radius);
  color: var(--st-ink);
  padding: 11px 13px;
}
.st-field input:focus, .st-field select:focus, .st-field textarea:focus {
  outline: 2px solid var(--st-highlight); outline-offset: 1px;
}

/* ---------------------------------------------------------------- delivery form

   The page Stripe cannot be. `.st-field` existed and was unused; these are the
   pieces a real address form needs around it. */

.st-form { display: grid; gap: 26px; }

/* A fieldset, because "Your details" and "Delivery address" are two questions and a
   run of ten unbroken boxes is the form people abandon. No border: the panel already
   draws one, and a box inside a box reads as a fault. */
.st-fieldset { border: 0; margin: 0; padding: 0; display: grid; gap: 16px; }
.st-fieldset__legend {
  font-family: var(--st-font-display); font-size: 1.15rem; font-weight: 600;
  padding: 0; margin-bottom: 2px;
}

/* First/last and town/county sit side by side where there is room. On a phone they
   stack: two 150px-wide text inputs is how an address gets typed into the wrong one. */
.st-form__pair { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }

/* Lower case and unspaced, so it reads as an aside to the label rather than as part
   of the field's name — the label is already upper case and letterspaced. */
.st-field__optional {
  text-transform: none; letter-spacing: 0; font-size: 0.85em;
  color: var(--st-muted); font-style: italic;
}
.st-field__hint { font-size: 0.78rem; color: var(--st-muted); margin: 0; }
.st-field__error { font-size: 0.8rem; color: var(--st-bad); margin: 0; }
/* The country on a one-country shop: the fact, drawn where the control would be, so
   it lines up with the Eircode box beside it rather than floating. */
.st-field__static { margin: 0; padding: 11px 0; }

.st-field input[aria-invalid="true"], .st-field select[aria-invalid="true"] {
  border-color: var(--st-bad);
}

/* ---------------------------------------------------------------- product page */

.st-product { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 48px; }
.st-gallery { display: grid; gap: 12px; }
.st-gallery__main {
  aspect-ratio: 1 / 1; overflow: hidden;
  /* Same reason as `.st-feature__media`: without it a `.st-flag` inside resolves
     against the INITIAL containing block and is painted at the page corner under
     the header. Caught before it shipped only because the featured card had just
     done it. */
  position: relative;
  border: 1px solid var(--st-line);
  background: color-mix(in srgb, var(--st-surface) 70%, #000);
}
.st-gallery__main img { width: 100%; height: 100%; object-fit: cover; }
.st-gallery__strip { display: flex; flex-wrap: wrap; gap: 10px; }
.st-gallery__thumb {
  width: 72px; height: 72px; overflow: hidden;
  border: 1px solid var(--st-line-strong); border-radius: var(--st-radius);
  padding: 0; background: none; cursor: pointer;
}
.st-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.st-gallery__thumb[aria-current='true'] { border-color: var(--st-highlight); }

.st-product__price {
  font-family: var(--st-font-display); font-size: 2rem; color: var(--st-highlight);
  margin: 0 0 1rem;
}
.st-specs { margin: 1.5rem 0 0; display: grid; gap: 0; border-top: 1px solid var(--st-line); }
.st-specs div {
  display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 12px;
  padding: 10px 0; border-bottom: 1px solid var(--st-line);
  font-size: 0.9rem;
}
.st-specs dt { color: var(--st-muted); margin: 0; }
.st-specs dd { margin: 0; }

/* ---------------------------------------------------------------- basket */

.st-panel {
  background: var(--st-surface);
  border: 1px solid var(--st-line);
  border-radius: var(--st-radius);
  padding: 22px;
}
.st-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.st-line { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: start; }
.st-line__thumb { width: 64px; height: 64px; object-fit: cover; border-radius: var(--st-radius); }
.st-line__name { font-size: 0.95rem; }
.st-line__meta { font-size: 0.78rem; color: var(--st-muted); }
.st-line__controls { display: flex; align-items: center; gap: 10px; margin-top: 8px; }

.st-step { display: inline-flex; align-items: center; border: 1px solid var(--st-line-strong); border-radius: var(--st-radius); }
.st-step button {
  background: none; border: 0; color: var(--st-ink);
  width: 32px; height: 32px; cursor: pointer; font-size: 1rem;
}
/* Floored at one AND disabled there. The − used to be the bottom of the control: one
   more press at a quantity of one deleted the line, which is a deletion carried out by
   accident. A control that looks available and does nothing is worse than one that
   looks unavailable. */
.st-step button[disabled] { color: var(--st-muted); cursor: not-allowed; }
.st-step__qty { min-width: 2.2rem; text-align: center; font-size: 0.9rem; }

.st-remove {
  background: none; border: 0; cursor: pointer; padding: 6px;
  color: color-mix(in srgb, #e08a7a 85%, var(--st-ink));
}
.st-remove:hover { color: #e08a7a; }

.st-totals { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--st-line-strong); display: grid; gap: 8px; }
.st-totals div { display: flex; justify-content: space-between; font-size: 0.9rem; }
.st-totals__grand { font-family: var(--st-font-display); font-size: 1.4rem; color: var(--st-highlight); }

.st-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 36px; align-items: start; }
/* Nothing beside it: no 330px hole where a sidebar would have been. */
.st-layout--single { grid-template-columns: minmax(0, 1fr); max-width: 800px; margin-inline: auto; }
.st-aside { position: sticky; top: 92px; }

/* The onward slot, under the card.

   It lived below the footer until 2026-12-01, and each page carried its own
   inline padding-bottom (2rem, 2rem and 3rem) to lift it off the bottom of the
   document. Now that the layout places it inside <main>, main's own section
   padding does that job and all three pages want the same one gap above. No
   colour of its own: a bare <a> already inherits --st-ink at ~17:1 on the ground,
   which is why the link was readable all along and simply in the wrong place. */
.st-after {
  margin-top: 28px;
  /* THE SAME MEASURE AS THE CARD, so the link starts where the card does.
     `.st-layout--single` centres the card at 800 inside a 1180 wrap, so a slot
     that only inherited `.st-wrap` began 166px to its left at 1280px — a link
     floating off the side of the thing it belongs to. MEASURED, not guessed.

     Change one of these two 800s and change the other; a test asserts they
     agree. Every page that uses this slot is single-column (the basket, the
     delivery page, the thank-you); a two-column page wanting it would need to
     opt out of the measure rather than inherit a cap meant for one column. */
  max-width: 800px;
  margin-inline: auto;
}

.st-note { font-size: 0.8rem; color: var(--st-muted); }
.st-alert {
  border: 1px solid var(--st-line-strong);
  border-left: 2px solid var(--st-highlight);
  border-radius: var(--st-radius);
  padding: 12px 14px; margin-bottom: 20px; font-size: 0.9rem;
}
.st-alert--bad { border-left-color: var(--st-bad); }

.st-empty { text-align: center; padding: var(--st-section-y) 0; color: var(--st-muted); }

/* ---------------------------------------------------------------- footer */

.st-foot {
  border-top: 1px solid var(--st-line);
  margin-top: var(--st-section-y);
  padding: 36px 0;
  font-size: 0.85rem;
  color: var(--st-muted);
}
.st-foot a { color: var(--st-ink); }
.st-foot__crisis {
  border: 1px solid var(--st-line-strong);
  border-radius: var(--st-radius);
  padding: 12px 14px;
  margin-bottom: 20px;
  color: var(--st-ink);
}
.st-foot__legal { margin-top: 18px; font-size: 0.78rem; }

/* ---------------------------------------------------------------- phone */

@media (max-width: 900px) {
  .st-mast__in { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .st-product { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .st-layout { grid-template-columns: minmax(0, 1fr); }
  .st-aside { position: static; }
  .st-feature { grid-template-columns: minmax(0, 1fr); }
  .st-feature__media img { max-height: 300px; }
}

@media (max-width: 620px) {
  :root { --st-gutter: 16px; --st-section-y: 2.25rem; }

  /* Two 150px text inputs side by side is how a surname ends up in the first-name
     box. The pairs stack, and the form gets taller rather than wronger. */
  .st-form__pair { grid-template-columns: minmax(0, 1fr); }

  /* MEASURED: stacked, the four promises took 232px of a 444px masthead and pushed the
     first product to y=688 — nearly two phone screens before anything could be bought,
     which is the "spent the first screen on a picture" failure this shop exists to
     avoid. Two columns and a tighter rhythm say the same four things in a third of the
     height. */
  .st-promises { grid-template-columns: 1fr 1fr; gap: 10px 14px; }
  .st-promise { padding-left: 10px; }
  .st-promise__title { font-size: 0.82rem; line-height: 1.35; }
  .st-promise__detail { font-size: 0.72rem; line-height: 1.35; }
  /* 420px is over half a phone screen, so the first thing a customer sees would be
     a picture and nothing to buy. MEASURED at 390px: 300 leaves the heading, the
     intro and the top of the first card above the fold. */
  .st-mast--picture { min-height: 300px; }
  /* The phone override has to be repeated for the compact heading: a media query adds
     no specificity, so `.st-mast--picture-compact h1` keeps beating `.st-mast h1`
     inside it and the piece's name would render LARGER on a phone than on a desktop. */
  .st-mast--picture-compact { min-height: 150px; padding: 1.25rem 0; }
  .st-mast--picture-compact h1 { font-size: 1.6rem; }

  .st-mast__logo { max-height: 48px; margin-bottom: 1rem; }
  .st-mast h1 { font-size: 1.95rem; }
  .st-mast__intro { font-size: 0.95rem; }

  /* A column of 4:5 pictures is six screens of scrolling, so a card becomes a ROW. */
  .st-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .st-card { flex-direction: row; align-items: stretch; }
  /* MEASURED: the square below LOST to the row's `align-items: stretch`, which gives
     the thumbnail a definite height and a definite height beats `aspect-ratio`. It
     rendered 96x231 — a vertical sliver of the picture, and on a catalogue of
     jewellery photographed on a model that sliver was her chin. `align-self` lets
     the media keep the square this line always said it wanted while the body still
     fills the row. */
  .st-card__media { aspect-ratio: 1 / 1; width: 96px; flex: 0 0 96px; align-self: flex-start; }
  .st-card__body { padding: 14px; }
  .st-card__name { font-size: 1.1rem; }
  /* Clamped only where space is genuinely tight. In the grid a row is already as tall
     as its tallest card, so clipping a sentence there makes room for nothing. */
  .st-card__desc {
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  }
  .st-card__foot { padding-top: 10px; }
  .st-feature__media img { max-height: 220px; }
  .st-top__logo { height: 36px; }
  .st-top__name { font-size: 1.1rem; }

  /* The band must not cost a second row on a phone: the repo already measured that
     stacking the promises put the first product at y=688, "nearly two phone screens
     before anything could be bought". Tighter tracking and a smaller gap keep five
     items on one line; MEASURE it after changing either. */
  .st-nav__in { gap: 2px 14px; padding: 8px var(--st-gutter); }
  .st-nav__link { font-size: 0.72rem; letter-spacing: 0.08em; }
  .st-nav__link--back { font-size: 0.76rem; }

  /* Terms and Returns leave the band on a phone and stay in the footer. MEASURED:
     with them, six items wrapped to two rows and 82px — and the shop already carries
     a note about a masthead that pushed the first product to y=688, "nearly two phone
     screens before anything could be bought". FAQs stays: it is the one of the three
     somebody actually goes looking for. */
  .st-nav__item--minor { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }

  /* store.js never hands the browser a hero film when this preference is set, which
     is the only thing that actually prevents the download. This is the second line,
     for a preference that changes AFTER the page loaded: the element stops being
     drawn and the still it was covering is what remains. */
  .st-mast__video { display: none; }
}
