/* ==========================================================================
   Kilnstore — Plinth Commerce. Design tokens are LOCKED (handoff doc 05 §1).
   Do not substitute hex values, families, radii or the single shadow.
   Mobile-first: base styles target 375px, widened with min-width queries.
   Two families only: Space Grotesk (everything) + Instrument Serif italic
   (one accent word inside a Space Grotesk headline, never body, never alone).
   ========================================================================== */

:root {
  /* colour — §1 */
  --cream: #F7F3EC;
  --cream-deep: #EFE7DA;
  --line: #E6DED0;
  --line-warm: #D8CDBB;
  --ink: #22201E;
  --ink-soft: #57504A;
  --clay: #C4552F;
  --sky: #D9E4E8;

  /* product placeholder gradients — shown as CSS wells only.
     Real photography is never loaded by this build (assets/img/products/). */
  --prod-1: linear-gradient(145deg, #E9E0D2, #D2C4AE);
  --prod-2: linear-gradient(145deg, #DDE7E9, #BFD2D6);
  --prod-3: linear-gradient(145deg, #EEDCD3, #D9B5A4);

  /* type — §1 */
  --sans: "Space Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, serif;

  /* shape — §1 */
  --r-tile: 16px;
  --r-well: 12px;
  --r-pill: 999px;
  --shadow: 0 14px 30px rgba(34, 32, 30, .10);

  /* space */
  --max: 1240px;
  --pad-x: 20px;
  --sec: 36px;
  --bar-h: 62px;
}

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

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  /* room for the sticky cart bar so it never covers the last row or footer */
  padding-bottom: calc(var(--bar-h) + 24px);
}

body.no-bar {
  padding-bottom: 0;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

h1 {
  font-size: clamp(26px, 3vw, 38px);
}

h2 {
  font-size: clamp(24px, 3vw, 34px);
}

h3 {
  font-size: 17px;
}

p {
  margin: 0;
}

a {
  color: inherit;
}

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

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

/* the only italic serif in the system: one accent word per headline */
.em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
  letter-spacing: 0;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--cream);
  padding: 12px 18px;
  border-radius: var(--r-pill);
  text-decoration: none;
}

.skip:focus {
  left: 12px;
  top: 12px;
}

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

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

/* ==========================================================================
   Header — sticky, cream 94% + blur, 1px line (§2 Home 1)
   ========================================================================== */

.site-head {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px var(--pad-x);
  background: rgba(247, 243, 236, .94);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
  margin-right: auto;
}

.brand span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
}

.nav {
  display: none;
  gap: 22px;
  font-size: 14px;
  font-weight: 500;
}

.nav a {
  text-decoration: none;
  color: var(--ink-soft);
  padding: 6px 0;
}

.nav a:hover,
.nav a[aria-current="page"] {
  color: var(--ink);
}

.cart-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-pill);
  background: var(--cream);
  font-size: 12px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.cart-pill:hover {
  border-color: var(--ink);
}

.cart-pill b {
  font-weight: 700;
}

/* ==========================================================================
   Buttons and pills
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--cream);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}

.btn:hover {
  background: #33302C;
}

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-warm);
}

.btn-ghost:hover {
  background: var(--cream-deep);
  border-color: var(--ink);
}

.btn-clay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: var(--r-pill);
  background: var(--clay);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background 200ms ease;
}

.btn-clay:hover {
  background: #AE4826;
}

.btn-clay[disabled] {
  background: #C08D7C;
  cursor: not-allowed;
}

.btn-block {
  width: 100%;
  min-height: 52px;
}

/* ==========================================================================
   Section furniture
   ========================================================================== */

.section {
  padding: var(--sec) 0;
}

.section-tight {
  padding: 22px 0;
}

.sec-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.kicker {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}

.lede {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-soft);
  max-width: 62ch;
}

.narrow {
  max-width: 46ch;
}

.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }

.link {
  color: var(--clay);
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid rgba(196, 85, 47, .35);
}

.link:hover {
  border-bottom-color: var(--clay);
}

/* ==========================================================================
   Bento hero — §1 signature element 1 and §3 responsive table.
   Mobile: 2 columns, 150px rows, editorial spans both.
   ≥1000: 4 columns, 180px rows, the 2×2 + 2-wide spans come back.
   ========================================================================== */

.bento {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-auto-rows: 150px;
  gap: 14px;
  margin-top: 18px;
}

.tile {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  border-radius: var(--r-tile);
  background: var(--cream-deep);
  overflow: hidden;
  text-decoration: none;
  color: var(--ink);
}

/* image well inside a bento tile — gradient only, no bitmap is loaded */
.tile .well {
  position: absolute;
  inset: 0;
  border-radius: 0;
}

.tile > * {
  position: relative;
  z-index: 1;
}

.tile-a .well { background: var(--prod-1); }
.tile-b .well { background: var(--prod-2); }
.tile-c .well { background: var(--prod-3); }

.tile-a { grid-column: span 2; }

.tile-tag {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: var(--r-pill);
  background: rgba(247, 243, 236, .92);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
}

.tile-label {
  margin-top: auto;
  padding-top: 10px;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.tile-label small {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: .02em;
}

/* editorial tile: Space Grotesk headline with one italic serif accent word */
.tile-editorial {
  grid-column: span 2;
  justify-content: center;
  background: var(--cream-deep);
  padding: 18px;
}

.tile-editorial h1,
.tile-editorial h2 {
  font-size: clamp(22px, 3vw, 34px);
}

.tile-editorial p {
  margin-top: 8px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 34ch;
}

/* sale tile — clay, white "Sale" pill top-left, label bottom-left */
.tile-sale {
  grid-column: span 2;
  justify-content: space-between;
  background: var(--clay);
  color: #fff;
}

.tile-sale .tile-tag {
  align-self: flex-start;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
}

.tile-sale .tile-label {
  font-size: 14px;
  font-weight: 500;
  padding-top: 0;
}

.tile-sale .tile-label small {
  color: rgba(255, 255, 255, .9);
}

.tile-promise {
  grid-column: span 2;
  justify-content: center;
  gap: 6px;
  background: var(--sky);
  border: 1px solid var(--line);
  color: var(--ink);
}

.tile-promise p {
  font-size: 14px;
  font-weight: 500;
}

.tile-promise small {
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
}

/* ==========================================================================
   Category pills (instant colour change, no animation — §1 Motion)
   ========================================================================== */

.pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px;
  scrollbar-width: none;
}

.pills::-webkit-scrollbar {
  display: none;
}

.pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: none;
}

.pill span {
  color: var(--ink-soft);
  font-size: 11px;
}

.pill:hover {
  border-color: var(--ink);
}

.pill[aria-pressed="true"],
.pill.is-on {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.pill[aria-pressed="true"] span,
.pill.is-on span {
  color: rgba(247, 243, 236, .72);
}

/* ==========================================================================
   Sort control
   ========================================================================== */

.sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}

.sort select {
  min-height: 44px;
  padding: 0 34px 0 14px;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-pill);
  background-color: var(--cream);
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 13px) 20px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink);
  appearance: none;
  cursor: pointer;
}

/* ==========================================================================
   Product grid + card
   Mobile 2 columns; 3 at 1000; 4 at 1280. Never 5 (§3).
   ========================================================================== */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--r-tile);
  background: transparent;
  transition: transform 250ms ease, box-shadow 250ms ease;
}

.card:hover,
.card:focus-within {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-media {
  position: relative;
  border-radius: var(--r-well);
  overflow: hidden;
  background: var(--cream-deep);
  aspect-ratio: 1 / 1;
  display: block;
  text-decoration: none;
}

/* CSS gradient product well — no bitmap image is requested on this build.
   A real photo would replace .well-bg with an <img> in assets/img/products/. */
.well-bg {
  position: absolute;
  inset: 0;
  background: var(--prod-1);
}

.well-g2 { background: var(--prod-2); }
.well-g3 { background: var(--prod-3); }

.well-note {
  position: absolute;
  left: 8px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  background: rgba(247, 243, 236, .82);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.card-body {
  padding: 10px 2px 0;
}

.card-name {
  display: block;
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
  text-decoration: none;
  line-height: 1.35;
}

.card-name:hover {
  color: var(--clay);
}

.card-price {
  margin-top: 2px;
  font-size: 15px;
  font-weight: 700;
}

/* Stock honesty line — exactly three states (§1 signature 4) */
.stock {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 500;
  color: var(--ink-soft);
}

.stock::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.stock-in { color: #4C6A4F; }
.stock-low { color: var(--clay); }
.stock-out { color: #8A8179; }

.card.is-out .well-bg {
  filter: grayscale(.55) opacity(.72);
}

/* Quick-add — 40px ink circle, white +, bottom-right (§1 signature 2).
   Always visible on mobile; on desktop it appears on hover/focus-within. */
.quick-add {
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: transform 250ms cubic-bezier(.34, 1.56, .64, 1), background 200ms ease, opacity 200ms ease;
}

.quick-add:hover {
  background: #3A3631;
  transform: scale(1.12);
}

.quick-add[disabled] {
  background: #A9A29A;
  cursor: not-allowed;
  transform: none;
}

/* ==========================================================================
   Shop layout: mobile bottom-sheet filters, desktop left rail (§2 Shop)
   ========================================================================== */

.shop-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.filter-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-pill);
  background: var(--cream);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.filter-btn b {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--cream);
  font-size: 10px;
  display: inline-grid;
  place-items: center;
}

.rail {
  display: block;
}

.rail-inner {
  display: grid;
  gap: 22px;
}

/* Below 1000px the same rail element becomes a bottom sheet. One copy of the
   inputs only — duplicating them would create duplicate ids and break labels. */
@media (max-width: 999px) {
  .rail {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: none;
    padding: 0;
    background: rgba(34, 32, 30, .38);
  }

  .rail.is-open {
    display: block;
  }

  .rail-inner {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 86vh;
    overflow-y: auto;
    padding: 18px var(--pad-x) 24px;
    background: var(--cream);
    border-radius: 16px 16px 0 0;
    border-top: 1px solid var(--line);
    animation: sheet-up 220ms ease;
  }

  .rail-close {
    display: flex;
  }
}

.rail-close {
  display: none;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.rail-close h2 {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: var(--ink);
  margin: 0;
}

.rail-close button {
  min-height: 44px;
  min-width: 44px;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-pill);
  background: transparent;
  cursor: pointer;
  font-size: 16px;
}

.rail h2 {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.checks {
  display: grid;
  gap: 2px;
}

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  font-size: 14px;
  cursor: pointer;
}

.check input {
  width: 18px;
  height: 18px;
  accent-color: var(--ink);
  flex: 0 0 auto;
}

.check .n {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-soft);
}

.range-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-row output {
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-soft);
}

input[type="range"] {
  width: 100%;
  accent-color: var(--clay);
}

/* legacy sheet classes are no longer used by the shop page; kept minimal */
.sheet {
  display: none;
}

@keyframes sheet-up {
  from { transform: translateY(24px); opacity: .4; }
  to { transform: translateY(0); opacity: 1; }
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.sheet-actions .btn {
  flex: 1;
}

/* empty state */
.empty {
  padding: 40px 20px;
  text-align: center;
  border: 1px dashed var(--line-warm);
  border-radius: var(--r-tile);
}

.empty p {
  color: var(--ink-soft);
}

.load-row {
  display: flex;
  justify-content: center;
  margin-top: 26px;
}

/* ==========================================================================
   Product page
   ========================================================================== */

.product {
  display: grid;
  gap: 26px;
}

.gallery {
  display: grid;
  gap: 10px;
}

.gallery-main {
  position: relative;
  border-radius: var(--r-well);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--prod-1);
}

.gallery-main .well-bg {
  background: var(--prod-1);
}

.thumbs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.thumbs::-webkit-scrollbar {
  display: none;
}

.thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 0;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-well);
  background: var(--prod-1);
  cursor: pointer;
  overflow: hidden;
  position: relative;
}

.thumb[aria-current="true"] {
  border-color: var(--ink);
  box-shadow: 0 0 0 1px var(--ink);
}

.buy h1 {
  font-size: clamp(24px, 3vw, 34px);
}

.buy-price {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.buy .stock {
  margin-top: 8px;
}

.field-label {
  display: block;
  margin: 18px 0 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: .04em;
  color: var(--ink-soft);
}

.variants {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.variant {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-pill);
  background: var(--cream);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.variant[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--cream);
}

.variant[disabled] {
  opacity: .45;
  text-decoration: line-through;
  cursor: not-allowed;
}

.variant-note {
  margin-top: 8px;
  font-size: 12px;
  color: var(--clay);
  font-weight: 500;
  min-height: 18px;
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.qty button {
  width: 44px;
  height: 44px;
  border: 0;
  background: transparent;
  font-size: 17px;
  cursor: pointer;
}

.qty button[disabled] {
  color: #B4ADA4;
  cursor: not-allowed;
}

.qty output {
  min-width: 30px;
  text-align: center;
  font-size: 14px;
  font-weight: 500;
}

.buy-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
}

.buy-row .btn {
  flex: 1;
}

.spec {
  margin-top: 30px;
  border-top: 1px solid var(--line);
}

.spec dl {
  display: grid;
  gap: 0;
  margin: 0;
}

.spec-row {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.spec-row dt {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 500;
  padding-top: 2px;
}

.spec-row dd {
  margin: 0;
}

/* ==========================================================================
   Cart / checkout
   ========================================================================== */

.lines {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.line {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 16px 0;
  border-bottom: 1px solid var(--line);
}

.line-thumb {
  width: 64px;
  height: 64px;
  border-radius: var(--r-well);
  background: var(--prod-1);
  position: relative;
  overflow: hidden;
}

.line-name {
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
}

.line-name a {
  text-decoration: none;
}

.line-name a:hover {
  color: var(--clay);
}

.line-meta {
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.line-qty {
  margin-top: 10px;
}

.line-qty .qty button {
  width: 38px;
  height: 38px;
}

.line-end {
  text-align: right;
  display: grid;
  gap: 6px;
  justify-items: end;
}

.line-price {
  font-size: 14px;
  font-weight: 700;
}

.remove {
  border: 0;
  background: none;
  padding: 4px;
  font-size: 12px;
  color: var(--ink-soft);
  text-decoration: underline;
  cursor: pointer;
}

.remove:hover {
  color: var(--clay);
}

.totals {
  margin-top: 18px;
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.totals .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.totals .row.total {
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  font-weight: 700;
}

.totals .note {
  font-size: 12px;
  color: var(--ink-soft);
}

.checkout {
  display: grid;
  gap: 26px;
}

.steps {
  counter-reset: step;
  display: grid;
  gap: 18px;
}

.step {
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  padding: 16px;
  background: var(--cream);
}

.step h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  margin-bottom: 4px;
}

.step h2::before {
  counter-increment: step;
  content: counter(step);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--cream-deep);
  color: var(--ink);
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.step p.hint {
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 12px;
}

.fields {
  display: grid;
  gap: 14px;
}

.fields.two {
  grid-template-columns: 1fr;
}

.f {
  display: grid;
  gap: 6px;
}

.f label {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-soft);
}

.f input,
.f select,
.f textarea {
  min-height: 46px;
  padding: 11px 14px;
  border: 1px solid var(--line-warm);
  border-radius: var(--r-well);
  background: var(--cream);
  font-size: 15px;
  width: 100%;
}

.f textarea {
  min-height: 84px;
  resize: vertical;
}

.f input:focus,
.f select:focus,
.f textarea:focus {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
  border-color: var(--ink);
}

.f .err {
  min-height: 16px;
  font-size: 12px;
  font-weight: 500;
  color: var(--clay);
}

.f[data-invalid="true"] input,
.f[data-invalid="true"] select,
.f[data-invalid="true"] textarea {
  border-color: var(--clay);
  background: #FBF1EC;
}

.summary {
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--cream-deep);
  padding: 16px;
}

.summary h2 {
  font-size: 15px;
  margin-bottom: 12px;
}

.sum-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
}

.sum-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.sum-list .q {
  color: var(--ink-soft);
}

.sum-totals {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line-warm);
  display: grid;
  gap: 7px;
  font-size: 13px;
}

.sum-totals .row {
  display: flex;
  justify-content: space-between;
}

.sum-totals .row.total {
  font-size: 16px;
  font-weight: 700;
}

/* mobile: summary collapses to the top of the page */
.summary summary {
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  list-style: none;
}

.summary summary::-webkit-details-marker {
  display: none;
}

.summary summary::after {
  content: "+";
  font-size: 18px;
  color: var(--ink-soft);
}

.summary details[open] summary::after {
  content: "–";
}

.summary details > div {
  padding-top: 10px;
}

/* ==========================================================================
   Sticky cart bar — signature 3. Floating pill, 12px inset, clay Checkout.
   ========================================================================== */

.cart-bar {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: 12px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--cream);
  box-shadow: var(--shadow);
}

.cart-bar[hidden] {
  display: none;
}

.cb-info {
  display: grid;
  line-height: 1.25;
  margin-right: auto;
}

.cb-count {
  font-size: 12px;
  font-weight: 500;
  color: rgba(247, 243, 236, .78);
}

.cb-total {
  font-size: 15px;
  font-weight: 700;
}

.cart-bar .btn-clay {
  min-height: 42px;
  padding: 0 18px;
}

/* ==========================================================================
   Toast
   ========================================================================== */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--bar-h) + 26px);
  transform: translate(-50%, 12px);
  z-index: 80;
  max-width: calc(100% - 32px);
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: var(--ink);
  color: var(--cream);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-foot {
  margin-top: 44px;
  padding: 30px var(--pad-x) 34px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 24px;
  font-size: 13px;
  color: var(--ink-soft);
}

.foot-brand p:first-child {
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.foot-brand span {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--clay);
}

.site-foot h2 {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 8px;
}

.site-foot ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}

.site-foot a {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
}

.site-foot a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.foot-legal {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  font-size: 11px;
}

/* ==========================================================================
   About / Contact / 404
   ========================================================================== */

.page-head {
  padding: 26px 0 8px;
}

.prose {
  display: grid;
  gap: 16px;
  max-width: 66ch;
}

.prose h2 {
  font-size: clamp(20px, 2.4vw, 26px);
  margin-top: 10px;
}

.prose ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}

.two-up {
  display: grid;
  gap: 20px;
}

.tilebox {
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--cream-deep);
  padding: 18px;
}

.faq {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.faq details {
  border-bottom: 1px solid var(--line);
}

.faq summary {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  list-style: none;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  margin-left: auto;
  color: var(--ink-soft);
  font-size: 17px;
}

.faq details[open] summary::after {
  content: "–";
}

.faq details > p {
  padding: 0 0 16px;
  font-size: 14px;
  color: var(--ink-soft);
  max-width: 60ch;
}

.notfound {
  padding: 60px 0 80px;
}

.confirm {
  padding: 34px 0 20px;
}

.order-meta {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-tile);
  background: var(--cream-deep);
  font-size: 14px;
}

.order-meta .row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.next-steps {
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: ns;
  display: grid;
  gap: 12px;
}

.next-steps li {
  counter-increment: ns;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  font-size: 14px;
  color: var(--ink-soft);
}

.next-steps li::before {
  content: counter(ns);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--cream);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}

/* ==========================================================================
   Breakpoints — §3 responsive table
   ========================================================================== */

/* 430 — same as 375 */
@media (min-width: 430px) {
  :root {
    --pad-x: 22px;
  }
}

@media (min-width: 768px) {
  :root {
    --pad-x: 28px;
    --sec: 48px;
  }

  .fields.two {
    grid-template-columns: 1fr 1fr;
  }

  .two-up {
    grid-template-columns: 1fr 1fr;
  }

  .site-foot {
    grid-template-columns: 1.4fr 1fr 1fr;
  }

  .foot-legal {
    grid-column: 1 / -1;
  }

  .line {
    grid-template-columns: 84px 1fr auto;
  }

  .line-thumb {
    width: 84px;
    height: 84px;
  }
}

/* 820 — product grid stays 2 columns, bento stays 2 columns */
@media (min-width: 820px) {
  .bento {
    grid-auto-rows: 168px;
  }

  .brand {
    font-size: 21px;
  }

  .product {
    grid-template-columns: 1fr;
  }
}

/* 900 — product page goes two-column */
@media (min-width: 900px) {
  .product {
    grid-template-columns: 1.05fr 1fr;
    gap: 40px;
    align-items: start;
  }

  .gallery {
    position: sticky;
    top: 92px;
  }

  .thumb {
    width: 74px;
    height: 74px;
  }
}

/* 1000 — 3-column grid, filter rail appears, nav shows */
@media (min-width: 1000px) {
  :root {
    --pad-x: 32px;
    --sec: 56px;
  }

  .nav {
    display: flex;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .shop-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 32px;
    align-items: start;
  }

  .rail-inner {
    position: sticky;
    top: 92px;
  }

  .filter-btn {
    display: none;
  }

  .sheet {
    display: none !important;
  }

  .checkout {
    grid-template-columns: 1fr 340px;
    gap: 34px;
    align-items: start;
  }

  .checkout .summary {
    order: 2;
    position: sticky;
    top: 92px;
  }

  .checkout .summary details > div {
    display: block;
  }

  .bento {
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 180px;
    gap: 14px;
  }

  .tile-a {
    grid-column: span 2;
    grid-row: span 2;
  }

  .tile-editorial {
    grid-column: span 2;
  }

  .tile-sale {
    grid-column: span 2;
  }

  .tile-promise {
    grid-column: span 2;
  }

  .tile-editorial {
    padding: 24px;
  }

  .wrap {
    padding: 0 var(--pad-x);
  }
}

/* 1280 — 4-column grid, bento keeps its mixed spans */
@media (min-width: 1280px) {
  :root {
    --pad-x: 40px;
    --sec: 64px;
  }

  .grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .shop-layout {
    grid-template-columns: 234px 1fr;
    gap: 40px;
  }

  .checkout {
    grid-template-columns: 1fr 372px;
  }
}

/* 1920 — max width 1240px, grid stays 4 columns, never 5 */
@media (min-width: 1920px) {
  :root {
    --pad-x: 0px;
    --sec: 70px;
    --bar-h: 70px;
  }

  .site-head {
    padding-left: calc((100vw - var(--max)) / 2);
    padding-right: calc((100vw - var(--max)) / 2);
  }

  .site-foot {
    padding-left: calc((100vw - var(--max)) / 2);
    padding-right: calc((100vw - var(--max)) / 2);
  }

  .cart-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(760px, calc(100vw - 24px));
  }
}

/* ==========================================================================
   Reduced motion — transforms off, colour changes kept (§1 Motion)
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .card,
  .card:hover,
  .card:focus-within,
  .quick-add,
  .quick-add:hover {
    transform: none !important;
    transition: background 200ms ease, color 200ms ease, border-color 200ms ease !important;
  }

  .sheet-panel {
    animation: none;
  }

  .toast {
    transition: opacity 200ms ease;
  }

  .card:hover,
  .card:focus-within {
    box-shadow: var(--shadow);
  }
}

/* the sheet's "Show results" button has no meaning in the desktop rail */
@media (min-width: 1000px) {
  .rail-apply {
    display: none;
  }
}
