/* The Linen House
   Palette: dusty rose + warm charcoal on white. Type: Gilda Display (headings), Jost (text). */

:root {
  --rose: #ead4cf;
  --rose-50: #fbf5f3;
  --rose-100: #f5e9e6;
  --rose-300: #dcbab3;
  --rose-600: #9e6f66;
  --charcoal: #34302f;
  --charcoal-hover: #4b4544;
  --ink-soft: #5b5452;
  --stone: #6e6663;
  --line: #ece2de;
  --line-strong: #d6c8c3;
  --paper: #ffffff;
  --error: #a23b2f;
  --success: #3e6b4f;

  --font-serif: 'Gilda Display', 'Iowan Old Style', Georgia, serif;
  --font-sans: 'Jost', 'Avenir Next', system-ui, sans-serif;

  --max: 1360px;
  --gutter: clamp(16px, 4vw, 48px);
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  --header-h: 76px;
  --section-space: clamp(72px, 9vw, 136px);
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--charcoal);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  line-height: 1.12;
  letter-spacing: -0.005em;
  margin: 0;
  text-wrap: balance;
}

h1 { font-size: clamp(2.25rem, 4vw, 3.25rem); }
h2 { font-size: clamp(1.875rem, 3vw, 2.625rem); }
h3 { font-size: 1.25rem; }

p { margin: 0; text-wrap: pretty; }

a { color: inherit; }

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

button { cursor: pointer; }

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

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

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--charcoal); color: var(--paper); padding: 10px 16px; border-radius: 999px;
}
.skip-link:focus { top: 12px; }

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

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

.muted { color: var(--stone); }

.plain-list { list-style: none; margin: 0; padding: 0; }

.text-link {
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  text-decoration-color: var(--rose-300);
  transition: text-decoration-color 0.2s;
}
.text-link:hover { text-decoration-color: currentColor; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 28px;
  border: 1px solid var(--charcoal); border-radius: 999px;
  font-size: 0.9375rem; font-weight: 500; letter-spacing: 0.02em;
  text-decoration: none; white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn-dark { background: var(--charcoal); color: var(--paper); }
.btn-dark:hover { background: var(--charcoal-hover); border-color: var(--charcoal-hover); }
.btn-outline { background: transparent; color: var(--charcoal); }
.btn-outline:hover { background: var(--charcoal); color: var(--paper); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 20px; }
.btn[disabled], .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; }

.text-btn {
  background: none; border: 0; padding: 8px 4px; font-weight: 500;
  text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--rose-300);
}

.icon-btn {
  position: relative; display: inline-grid; place-items: center;
  width: 44px; height: 44px; padding: 0;
  background: none; border: 0; border-radius: 50%; color: var(--charcoal);
  text-decoration: none;
}
.icon-btn:hover { background: rgba(52, 48, 47, 0.06); }

.badge {
  position: absolute; top: 5px; right: 3px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--charcoal); color: var(--paper);
  font-size: 0.6875rem; line-height: 18px; text-align: center; font-weight: 500;
}
.badge[hidden] { display: none; }

.round-btn {
  display: inline-grid; place-items: center; width: 44px; height: 44px;
  border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper);
  transition: border-color 0.2s, opacity 0.2s;
}
.round-btn:hover { border-color: var(--charcoal); }
.round-btn:disabled { opacity: 0.35; cursor: default; border-color: var(--line-strong); }

/* ---------- Header ---------- */

.announcement {
  background: var(--charcoal); color: #f4e6e2;
  text-align: center; font-size: 0.8125rem; letter-spacing: 0.02em;
  padding: 8px var(--gutter);
}

.site-header { position: sticky; top: 0; z-index: 50; background: var(--rose); }

.header-inner {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  max-width: var(--max); height: var(--header-h); margin-inline: auto; padding-inline: var(--gutter);
}

.logo {
  justify-self: start;
  font-family: var(--font-serif); font-size: 1.625rem; line-height: 1;
  letter-spacing: 0.01em; text-decoration: none; white-space: nowrap;
}

.site-nav ul { display: flex; gap: clamp(24px, 3vw, 44px); list-style: none; margin: 0; padding: 0; }
.site-nav a {
  font-size: 0.9375rem; letter-spacing: 0.02em; text-decoration: none;
  padding-block: 8px; background-image: linear-gradient(currentColor, currentColor);
  background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%;
  transition: background-size 0.25s;
}
.site-nav a:hover, .site-nav a[aria-current='page'] { background-size: 100% 1px; }

.header-actions { justify-self: end; display: flex; gap: 2px; }

.nav-toggle { display: none; }

.search-panel { border-top: 1px solid rgba(52, 48, 47, 0.12); background: var(--rose); }
.search-form {
  display: flex; align-items: center; gap: 12px;
  max-width: 720px; margin-inline: auto; padding: 14px var(--gutter);
}
.search-form input {
  flex: 1; min-width: 0; height: 48px; border: 0; background: transparent;
  font-family: var(--font-serif); font-size: 1.375rem; outline: none;
}
.search-form input::placeholder { color: var(--ink-soft); opacity: 0.8; }
.search-form:focus-within { box-shadow: inset 0 -1px 0 var(--charcoal); }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  min-height: min(calc(100svh - var(--header-h) - 36px), 860px);
}

.hero-copy {
  display: flex; flex-direction: column; justify-content: center; gap: 28px;
  padding: clamp(48px, 7vw, 96px) clamp(32px, 5vw, 80px) clamp(48px, 7vw, 96px) var(--edge);
}

.hero h1 {
  font-size: clamp(2.875rem, 5.4vw, 5.5rem);
  line-height: 1.02;
  letter-spacing: -0.015em;
  max-width: 11ch;
}

.hero-lede { max-width: 42ch; font-size: 1.0625rem; color: var(--ink-soft); }

.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 8px; }

.hero-media { position: relative; margin: 0; background: var(--rose-100); overflow: hidden; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 50% 12%;
}
/* A dashed seam line, like a stitch along a hem */
.hero-media::after {
  content: ''; position: absolute; inset: clamp(14px, 1.6vw, 24px);
  border: 1px dashed rgba(255, 255, 255, 0.75); pointer-events: none;
}
.hero-media figcaption {
  position: absolute; left: clamp(30px, 3vw, 48px); bottom: clamp(30px, 3vw, 48px); z-index: 1;
  background: rgba(255, 255, 255, 0.94); padding: 10px 16px; font-size: 0.875rem; border-radius: 999px;
}
.hero-media figcaption a { text-decoration: none; }
.hero-media figcaption a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Section heads ---------- */

.section-head {
  display: flex; align-items: end; justify-content: space-between; gap: 24px;
  margin-bottom: clamp(28px, 3.5vw, 48px);
}
.section-sub { display: flex; align-items: center; gap: 10px; margin-top: 12px; color: var(--stone); font-size: 0.9375rem; }

/* ---------- Categories ---------- */

.category-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 3vw, 40px) clamp(16px, 2vw, 28px);
}

.category-tile { display: flex; flex-direction: column; gap: 14px; text-decoration: none; }
.category-tile-lead { grid-row: span 2; }

.category-img { position: relative; display: block; overflow: hidden; background: var(--rose-100); aspect-ratio: 1 / 0.92; }
.category-tile-lead .category-img { aspect-ratio: auto; flex: 1; min-height: 420px; }
.category-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

.category-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.category-name { font-family: var(--font-serif); font-size: 1.5rem; line-height: 1.2; }
.category-tile-lead .category-name { font-size: 1.875rem; }
.category-count { font-size: 0.875rem; color: var(--stone); }
.category-tile:hover .category-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 6px; }

/* ---------- Product cards ---------- */

.scroller-controls { display: flex; align-items: center; gap: 10px; }
.scroller-controls .text-link { margin-right: 14px; }

.scroller {
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(236px, 23vw, 312px);
  gap: clamp(16px, 2vw, 28px);
  overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: var(--edge);
  padding: 4px var(--edge) 16px;
  scrollbar-width: none;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > .card { scroll-snap-align: start; }

.product-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 248px), 1fr));
  gap: clamp(36px, 4vw, 56px) clamp(16px, 2vw, 28px);
}

.card { display: flex; flex-direction: column; min-width: 0; }

.card-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--rose-100); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.tag {
  position: absolute; top: 12px; left: 12px;
  background: var(--paper); padding: 3px 12px; border-radius: 999px;
  font-size: 0.75rem; letter-spacing: 0.02em;
}

.wish-btn {
  position: absolute; top: 8px; right: 8px;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%; background: rgba(255, 255, 255, 0.92); color: var(--charcoal);
}
.wish-btn[aria-pressed='true'] svg, .wish-toggle[aria-pressed='true'] svg { fill: currentColor; }

.card-body { display: flex; flex-direction: column; flex: 1; padding-top: 16px; }
.card-title { font-size: 1.1875rem; line-height: 1.25; }
.card-title a { text-decoration: none; }
.card-title a:hover { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.card-colour { font-size: 0.875rem; color: var(--stone); margin-top: 2px; }
.card-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

.price { font-weight: 500; font-variant-numeric: lining-nums; }
.unit { font-weight: 400; color: var(--stone); font-size: 0.875rem; }

.rating { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; }

.card-add { margin-top: auto; padding-top: 16px; }

.quick-sizes { border: 0; margin: 0; padding: 0; min-width: 0; }
.quick-sizes legend { font-size: 0.8125rem; color: var(--stone); padding: 0; margin-bottom: 8px; }
.quick-size-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }

.size-chip {
  height: 40px; padding: 0 4px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: var(--paper);
  font-size: 0.8125rem; font-weight: 500;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.size-chip:hover { border-color: var(--charcoal); }
.card.is-choosing [data-quick-add] { display: none; }

/* ---------- Stars ---------- */

.stars {
  --star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 13'%3E%3Cpath d='M6.5.4l1.86 3.98 4.36.5-3.22 2.98.87 4.3L6.5 10l-3.87 2.16.87-4.3L.28 4.88l4.36-.5z'/%3E%3C/svg%3E");
  position: relative; display: inline-block; flex: none;
  width: 69px; height: 13px; background: var(--line-strong);
  -webkit-mask: var(--star) 0 0 / 14px 13px repeat-x; mask: var(--star) 0 0 / 14px 13px repeat-x;
}
.stars-fill { position: absolute; inset: 0 auto 0 0; background: var(--rose-600); }

/* ---------- Story ---------- */

.story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(36px, 7vw, 112px); align-items: center; }
.story-media { aspect-ratio: 4 / 5; overflow: hidden; background: var(--rose-100); }
.story-media img { width: 100%; height: 100%; object-fit: cover; }
.story-copy { display: flex; flex-direction: column; gap: 24px; max-width: 520px; }
.story-copy > p { color: var(--ink-soft); font-size: 1.0625rem; }

.facts { margin: 8px 0; }
.facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 16px 0; border-top: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--font-serif); font-size: 1.25rem; line-height: 1.4; }
.facts dd { margin: 0; color: var(--ink-soft); }

/* ---------- Testimonials ---------- */

.testimonials { padding-bottom: var(--section-space); }
.quote-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(28px, 4vw, 64px); }
.quote { display: flex; flex-direction: column; gap: 18px; margin: 0; padding-top: 28px; border-top: 1px solid var(--line-strong); }
.quote blockquote { margin: 0; }
.quote blockquote p { font-family: var(--font-serif); font-size: clamp(1.25rem, 1.6vw, 1.4375rem); line-height: 1.45; }
.quote figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: auto; font-size: 0.9375rem; }
.quote-name { font-weight: 500; }
.quote-product { color: var(--stone); text-underline-offset: 4px; text-decoration-color: var(--rose-300); }

/* ---------- Footer ---------- */

.site-footer { background: var(--rose); }

.footer-inner {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(36px, 4vw, 64px);
  max-width: var(--max); margin-inline: auto; padding: clamp(56px, 7vw, 88px) var(--gutter) 56px;
}

.footer-inner > section { display: flex; flex-direction: column; gap: 14px; }
.footer-brand > p { color: var(--ink-soft); max-width: 34ch; }
.footer-title { font-family: var(--font-serif); font-size: 1.3125rem; margin-top: 4px; }
.footer-brand .footer-title { margin-top: 16px; }

.newsletter { display: flex; gap: 8px; max-width: 400px; }
.newsletter input {
  flex: 1; min-width: 0; height: 44px; padding: 0 18px;
  border: 1px solid rgba(52, 48, 47, 0.28); border-radius: 999px; background: var(--paper);
}
.form-note { font-size: 0.875rem; color: var(--ink-soft); min-height: 1.4em; }

.footer-faq details { border-bottom: 1px solid rgba(52, 48, 47, 0.16); }
.footer-faq details:first-of-type { border-top: 1px solid rgba(52, 48, 47, 0.16); }
.footer-faq summary {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 13px 0; cursor: pointer; list-style: none; font-weight: 500;
}
.footer-faq summary::-webkit-details-marker { display: none; }
.footer-faq summary::after { content: '+'; font-weight: 400; font-size: 1.25rem; line-height: 1.2; }
.footer-faq details[open] summary::after { content: '\2212'; }
.footer-faq details p { padding-bottom: 16px; color: var(--ink-soft); font-size: 0.9375rem; max-width: 52ch; }

.footer-contact li + li { margin-top: 6px; }
.footer-contact a { text-decoration: none; }
.footer-contact a:hover { text-decoration: underline; text-underline-offset: 4px; }
.footer-contact li:last-child { color: var(--ink-soft); }
.footer-address address { font-style: normal; color: var(--ink-soft); }
.footer-address .text-link { text-decoration-color: rgba(52, 48, 47, 0.35); }

.footer-base {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-inline: var(--edge); padding: 22px 0 28px;
  border-top: 1px solid rgba(52, 48, 47, 0.16); font-size: 0.875rem; color: var(--ink-soft);
}
.secure-note { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Toast ---------- */

.toast {
  position: fixed; right: 24px; bottom: 24px; z-index: 80;
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px;
  width: min(380px, calc(100vw - 32px)); padding: 12px 18px 12px 12px;
  background: var(--paper); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -12px rgba(52, 48, 47, 0.22); border-radius: 14px;
  font-size: 0.9375rem; line-height: 1.4;
  animation: toast-in 0.28s ease-out;
}
.toast[hidden] { display: none; }
.toast-img { width: 48px; height: 60px; object-fit: cover; background: var(--rose-100); border-radius: 6px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ---------- Inner pages ---------- */

.page-bottom { padding-bottom: var(--section-space); }
.page-head { padding-block: clamp(40px, 5vw, 72px) clamp(24px, 3vw, 40px); }
.search-inline { display: flex; gap: 10px; max-width: 560px; margin-top: 24px; }
.search-inline .input { border-radius: 999px; height: 44px; padding: 0 20px; }
.page-head p { color: var(--stone); margin-top: 10px; }

.breadcrumb { font-size: 0.875rem; color: var(--stone); padding-top: 28px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: '/'; margin-right: 8px; color: var(--line-strong); }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; text-underline-offset: 3px; }

.toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px 24px; flex-wrap: wrap;
  padding-bottom: 24px; margin-bottom: clamp(28px, 3vw, 40px); border-bottom: 1px solid var(--line);
}
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px;
  border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.875rem; text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.chip:hover { border-color: var(--charcoal); }
.chip[aria-current='page'] { background: var(--rose); border-color: var(--rose); }

.sort { display: flex; align-items: center; gap: 10px; font-size: 0.875rem; color: var(--stone); }
.select, .input {
  height: 48px; padding: 0 16px; border: 1px solid var(--line-strong); border-radius: 10px;
  background: var(--paper); color: var(--charcoal); width: 100%;
}
.sort .select { width: auto; height: 40px; border-radius: 999px; padding-right: 36px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%2334302f' stroke-width='1.4'%3E%3Cpath d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
}
.input:focus, .select:focus { outline: none; border-color: var(--charcoal); box-shadow: 0 0 0 3px rgba(52, 48, 47, 0.1); }

.empty { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; padding-block: 24px 40px; }
.empty p { color: var(--stone); max-width: 48ch; }

/* ---------- Product page ---------- */

.pdp {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 88px); padding-top: 24px; align-items: start;
}

.gallery { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; }
.gallery.single { grid-template-columns: minmax(0, 1fr); }
.gallery-thumbs { display: flex; flex-direction: column; gap: 12px; }
.gallery-thumbs button {
  padding: 0; border: 1px solid transparent; background: var(--rose-100);
  aspect-ratio: 4 / 5; overflow: hidden; opacity: 0.7; transition: opacity 0.2s, border-color 0.2s;
}
.gallery-thumbs button[aria-current='true'] { opacity: 1; border-color: var(--charcoal); }
.gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery-main { margin: 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--rose-100); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info { position: sticky; top: calc(var(--header-h) + 24px); display: flex; flex-direction: column; gap: 22px; }
.pdp-info h1 { font-size: clamp(2.125rem, 3.4vw, 3rem); }
.pdp-meta { display: flex; align-items: center; gap: 10px; font-size: 0.9375rem; flex-wrap: wrap; margin-top: -8px; }
.pdp-price { font-size: 1.375rem; font-weight: 500; }
.pdp-price .tax { display: block; font-size: 0.8125rem; font-weight: 400; color: var(--stone); margin-top: 2px; }
.pdp-desc { color: var(--ink-soft); max-width: 52ch; }

.pdp-options { display: flex; flex-direction: column; gap: 22px; }
.pdp-options > .option-head { margin: 0; }
.option-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.option-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 0.9375rem; }
.option-head legend, .option-head .label { font-weight: 500; padding: 0; }
.option-head .muted { font-size: 0.875rem; }
.size-options { display: flex; flex-wrap: wrap; gap: 8px; }
.size-options input { position: absolute; opacity: 0; pointer-events: none; }
.size-options label {
  display: grid; place-items: center; min-width: 56px; height: 46px; padding: 0 14px;
  border: 1px solid var(--line-strong); border-radius: 999px; cursor: pointer; font-weight: 500; font-size: 0.875rem;
  transition: border-color 0.15s, background-color 0.15s, color 0.15s;
}
.size-options label:hover { border-color: var(--charcoal); }
.size-options input:checked + label { background: var(--charcoal); border-color: var(--charcoal); color: var(--paper); }
.size-options input:focus-visible + label { outline: 2px solid var(--charcoal); outline-offset: 3px; }
.field-error { color: var(--error); font-size: 0.875rem; margin-top: 8px; }

.size-guide summary { cursor: pointer; font-size: 0.875rem; color: var(--stone); text-decoration: underline; text-underline-offset: 4px; }
.size-guide table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 0.875rem; }
.size-guide th, .size-guide td { padding: 8px 6px; border-bottom: 1px solid var(--line); text-align: left; }
.size-guide th { font-weight: 500; }

.buy-row { display: flex; gap: 12px; align-items: stretch; }
.buy-row .btn-dark { flex: 1; min-height: 52px; }

.stepper {
  display: inline-flex; align-items: center; height: 52px;
  border: 1px solid var(--line-strong); border-radius: 999px; overflow: hidden; flex: none;
}
.stepper button { display: grid; place-items: center; width: 42px; height: 100%; border: 0; background: none; }
.stepper button:hover { background: var(--rose-50); }
.stepper input {
  width: 40px; height: 100%; border: 0; text-align: center; font-weight: 500; background: transparent;
  -moz-appearance: textfield; appearance: textfield;
}
.stepper input::-webkit-inner-spin-button, .stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.stepper-sm { height: 42px; }
.stepper-sm button { width: 36px; }

.wish-toggle {
  display: grid; place-items: center; width: 52px; height: 52px; flex: none; padding: 0;
  border: 1px solid var(--line-strong); border-radius: 50%; background: var(--paper);
}
.wish-toggle:hover { border-color: var(--charcoal); }

.delivery-note { display: flex; gap: 12px; align-items: flex-start; font-size: 0.9375rem; color: var(--ink-soft); padding: 16px 18px; background: var(--rose-50); border-radius: 12px; }
.delivery-note svg { flex: none; margin-top: 1px; color: var(--charcoal); }

.accordion details { border-top: 1px solid var(--line); }
.accordion details:last-child { border-bottom: 1px solid var(--line); }
.accordion summary {
  display: flex; justify-content: space-between; align-items: center; padding: 18px 0;
  cursor: pointer; list-style: none; font-family: var(--font-serif); font-size: 1.1875rem;
}
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '+'; font-family: var(--font-sans); font-size: 1.375rem; font-weight: 300; }
.accordion details[open] summary::after { content: '\2212'; }
.accordion .panel { padding-bottom: 20px; color: var(--ink-soft); }
.accordion ul { margin: 0; padding-left: 18px; }
.accordion li + li { margin-top: 4px; }

.related { padding-bottom: var(--section-space); }
.suggestions { padding-top: 48px; }

/* ---------- Cart ---------- */

.cart-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: clamp(32px, 5vw, 80px); align-items: start; padding-bottom: var(--section-space); }

.cart-lines { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.cart-line {
  display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 8px 24px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.cart-line-img { grid-row: span 2; aspect-ratio: 4 / 5; background: var(--rose-100); overflow: hidden; }
.cart-line-img img { width: 100%; height: 100%; object-fit: cover; }
.cart-line h2 { font-size: 1.25rem; }
.cart-line h2 a { text-decoration: none; }
.cart-line h2 a:hover { text-decoration: underline; text-underline-offset: 4px; }
.cart-line-meta { font-size: 0.875rem; color: var(--stone); margin-top: 4px; }
.cart-line-total { font-weight: 500; text-align: right; }
.cart-line-actions { grid-column: 2 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; align-self: end; }
.cart-line-actions form { display: flex; align-items: center; gap: 8px; }
.remove-btn { background: none; border: 0; padding: 6px 0; font-size: 0.875rem; color: var(--stone); text-decoration: underline; text-underline-offset: 4px; }
.remove-btn:hover { color: var(--charcoal); }

.summary { position: sticky; top: calc(var(--header-h) + 24px); padding: clamp(24px, 3vw, 36px); background: var(--rose-50); border-radius: 18px; }
.summary h2 { font-size: 1.625rem; margin-bottom: 20px; }
.summary-rows { margin: 0; }
.summary-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; }
.summary-rows dt { color: var(--ink-soft); }
.summary-rows dd { margin: 0; font-weight: 500; }
.summary-rows .total { border-top: 1px solid var(--line-strong); margin-top: 10px; padding-top: 16px; }
.summary-rows .total dt { color: var(--charcoal); font-weight: 500; }
.summary-rows .total dd { font-family: var(--font-serif); font-size: 1.625rem; font-weight: 400; line-height: 1.2; }
.summary .btn { margin-top: 20px; }
.summary-note { font-size: 0.8125rem; color: var(--stone); margin-top: 14px; display: flex; gap: 8px; align-items: center; justify-content: center; }

.ship-progress { margin-bottom: 20px; font-size: 0.875rem; color: var(--ink-soft); }
.ship-bar { height: 4px; margin-top: 10px; background: var(--rose); border-radius: 2px; overflow: hidden; }
.ship-bar span { display: block; height: 100%; background: var(--charcoal); border-radius: 2px; }

/* ---------- Checkout ---------- */

.checkout-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 440px); gap: clamp(32px, 5vw, 80px); align-items: start; padding-bottom: var(--section-space); }

.checkout-form { display: flex; flex-direction: column; gap: 40px; }
.form-section { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-section legend { font-family: var(--font-serif); font-size: 1.625rem; padding: 0; margin-bottom: 20px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field-full { grid-column: 1 / -1; }
.field label { font-size: 0.875rem; font-weight: 500; }
.field .hint { font-size: 0.8125rem; color: var(--stone); }
.field .field-error { margin-top: 0; }
.field.has-error .input, .field.has-error .select { border-color: var(--error); }
.field .optional { font-weight: 400; color: var(--stone); }
.form-hint { margin-top: 10px; font-size: 0.8125rem; color: var(--stone); }

.notice {
  padding: 16px 18px; border-radius: 12px; font-size: 0.9375rem;
  background: var(--rose-50); border: 1px solid var(--rose-300);
}
.notice code { font-size: 0.875em; background: var(--paper); padding: 1px 6px; border-radius: 4px; }
.notice-error { background: #fbf0ee; border-color: #e3b5ad; color: var(--error); }
.notice[hidden] { display: none; }

.summary-items { list-style: none; margin: 0 0 20px; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.summary-item { display: grid; grid-template-columns: 60px minmax(0, 1fr) auto; gap: 14px; align-items: center; font-size: 0.9375rem; }
.summary-item-img { position: relative; aspect-ratio: 4 / 5; background: var(--rose-100); border-radius: 6px; }
.summary-item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.summary-item-qty {
  position: absolute; top: -8px; right: -8px; min-width: 22px; height: 22px; padding: 0 6px;
  background: var(--charcoal); color: var(--paper); border-radius: 11px; font-size: 0.75rem; line-height: 22px; text-align: center;
}
.summary-item p { line-height: 1.35; }
.summary-item .muted { font-size: 0.8125rem; }

/* ---------- Order + account ---------- */

.narrow { max-width: 760px; }
.order-card { padding: clamp(24px, 3vw, 36px); border: 1px solid var(--line); border-radius: 18px; margin-top: 32px; }
.order-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 20px 32px; margin: 0 0 28px; }
.order-meta dt { font-size: 0.8125rem; color: var(--stone); }
.order-meta dd { margin: 2px 0 0; }
.status { display: inline-block; padding: 2px 12px; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; background: var(--rose-100); }
.status-paid { background: #e6efe8; color: var(--success); }
.status-failed { background: #fbf0ee; color: var(--error); }

.payment-ref { font-size: 0.8125rem; color: var(--stone); margin-top: 12px; }
.after-order { margin-top: 32px; }
.lookup-error { margin-top: 20px; }
.recent-orders { padding-top: 64px; }
.lookup-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)) auto; gap: 16px; align-items: end; margin-top: 24px; }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .quote-grid { grid-template-columns: minmax(0, 1fr); max-width: 680px; }
}

@media (max-width: 960px) {
  :root { --header-h: 64px; }

  .header-inner { grid-template-columns: auto 1fr auto; gap: 4px; }
  .nav-toggle { display: inline-grid; margin-left: -10px; }
  .logo { font-size: 1.375rem; justify-self: start; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--rose); border-top: 1px solid rgba(52, 48, 47, 0.12);
    padding: 8px var(--gutter) 24px; display: none;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a { display: block; padding: 14px 0; font-family: var(--font-serif); font-size: 1.5rem; background: none; }
  .site-nav li + li { border-top: 1px solid rgba(52, 48, 47, 0.1); }

  .hero { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .hero-copy { padding: 48px var(--gutter) 40px; gap: 22px; }
  .hero h1 { max-width: 12ch; }
  .hero-media { aspect-ratio: 4 / 5; max-height: 80svh; }

  .category-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .category-tile-lead { grid-column: 1 / -1; grid-row: auto; }
  .category-tile-lead .category-img { aspect-ratio: 4 / 3; min-height: 0; flex: none; }

  .story { grid-template-columns: minmax(0, 1fr); }
  .story-media { aspect-ratio: 5 / 4; }

  .pdp { grid-template-columns: minmax(0, 1fr); }
  .pdp-info { position: static; }
  .gallery { grid-template-columns: minmax(0, 1fr); }
  .gallery-thumbs { flex-direction: row; order: 2; }
  .gallery-thumbs button { width: 68px; }

  .cart-layout, .checkout-layout { grid-template-columns: minmax(0, 1fr); }
  .summary { position: static; }
  .checkout-layout .summary { order: -1; }
}

@media (max-width: 640px) {
  .header-actions .icon-account { display: none; }
  .header-actions { gap: 0; margin-right: -8px; }
  .icon-btn { width: 40px; }
  .section-head { flex-wrap: wrap; align-items: center; }
  .scroller-controls .round-btn { display: none; }
  .scroller-controls .text-link { margin-right: 0; }
  .scroller { grid-auto-columns: 72%; }
  .category-grid { gap: 24px 12px; }
  .category-name { font-size: 1.25rem; }
  .category-label { flex-direction: column; gap: 0; }
  .facts > div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .field-grid, .payment-ref { font-size: 0.8125rem; color: var(--stone); margin-top: 12px; }
.after-order { margin-top: 32px; }
.lookup-error { margin-top: 20px; }
.recent-orders { padding-top: 64px; }
.lookup-form { grid-template-columns: minmax(0, 1fr); }
  .cart-line { grid-template-columns: 84px minmax(0, 1fr); gap: 6px 16px; }
  .cart-line-total { grid-column: 2; text-align: left; }
  .cart-line-img { grid-row: span 3; }
  .toast { right: 16px; bottom: 16px; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 12px; }
  .product-grid .card-title { font-size: 1.0625rem; }
  .product-grid .quick-size-row { grid-template-columns: repeat(3, 1fr); }
}

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