/* Threadset shop: ivory, serif wordmark, small spaced capitals, five across. */
:root {
  --ink: #1a1a18;
  --muted: #6e6a61;
  --line: #e6e2da;
  --plate: #efece6;
  --ground: #fbfaf7;
  --serif: "Cormorant Garamond", Georgia, serif;
  --bad: #b3261e;
  --gutter: clamp(16px, 4vw, 48px);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--ground); color: var(--ink); font: 400 15px/1.5 "Hanken Grotesk", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }
img { display: block; max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.err { color: var(--bad); margin: 0; }

/* Delivery strip, then search · wordmark · bag */
.strip { background: var(--ink); color: #f3f1ec; text-align: center; font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; padding: 10px 16px; }
.caps, .search, .basket-link, .side-link { font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; }
.top { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 36px var(--gutter) 28px; border-bottom: 1px solid var(--line); }
.title { font-family: var(--serif); font-size: clamp(40px, 6vw, 76px); font-weight: 400; letter-spacing: 0.02em; line-height: 1; text-align: center; }
.title:hover { color: var(--ink); }
.search { justify-self: start; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid transparent; padding: 6px 0; max-width: 220px; }
.search:focus-within { border-bottom-color: var(--ink); }
.search input { border: 0; outline: none; background: transparent; min-width: 0; width: 100%; font: inherit; letter-spacing: inherit; text-transform: uppercase; color: var(--ink); }
.search input::placeholder { color: var(--ink); }
.basket-link, .side-link { justify-self: end; white-space: nowrap; padding: 6px 0; }
.side-link { justify-self: start; }
@media (max-width: 640px) {
  .top { grid-template-columns: 1fr auto; padding-top: 24px; }
  .title { grid-column: 1 / -1; grid-row: 1; }
  .search, .side-link { grid-row: 2; }
  .basket-link { grid-row: 2; }
}

/* Sidebar + content */
.layout { display: flex; flex-wrap: wrap; gap: 64px; padding: 56px var(--gutter) 88px; }
.cats { flex: 1 1 180px; max-width: 200px; display: flex; flex-direction: column; gap: 14px; font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.cats .cats-label { display: none; }
.cats a { align-self: start; padding: 0 0 2px; color: var(--muted); border-bottom: 1px solid transparent; }
.cats a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 40px; min-height: 50vh; }
@media (max-width: 720px) {
  .layout { gap: 20px; padding-top: 20px; }
  .cats { flex-basis: 100%; max-width: none; flex-direction: row; gap: 18px; overflow-x: auto; white-space: nowrap; padding-bottom: 6px; }
  .cats .cats-label { display: none; }
}

.head { display: flex; flex-direction: column; gap: 10px; }
.head p { margin: 0; font-size: 14px; }
.head h1 { margin: 0; font-size: 30px; font-weight: 400; letter-spacing: -0.01em; }

/* Product grid: five across on a wide screen, centred captions */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 44px 24px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 12px; } }
.card { display: flex; flex-direction: column; gap: 8px; text-align: center; }
.card .plate { margin-bottom: 8px; }
.plate { aspect-ratio: 3 / 4; background: var(--plate); display: flex; align-items: center; justify-content: center; overflow: hidden; color: #8a8a8a; font-size: 13px; text-align: center; padding: 0; }
.plate img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .plate img { transform: scale(1.03); }
.card-name { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; }
.card .price { font-size: 13px; color: var(--muted); }
.card:hover { color: var(--ink); }
.draft { font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--bad); border: 1px solid currentColor; padding: 1px 5px; margin-left: 6px; vertical-align: 2px; }

/* One product */
.product { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); gap: 48px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; gap: 24px; } }
.gallery { display: flex; flex-direction: column; gap: 12px; }
.gallery .main-img { aspect-ratio: 4 / 5; background: var(--plate); display: flex; align-items: center; justify-content: center; color: #8a8a8a; overflow: hidden; }
.gallery .main-img img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.thumbs button { padding: 0; border: 1px solid transparent; background: var(--plate); aspect-ratio: 1; cursor: pointer; overflow: hidden; }
.thumbs button[aria-pressed="true"] { border-color: var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info { display: flex; flex-direction: column; gap: 16px; align-self: start; }
.info h1 { margin: 0; font-size: clamp(26px, 3vw, 34px); font-weight: 400; letter-spacing: -0.02em; line-height: 1.1; }
.info p { margin: 0; }
.back { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.big-price { font-size: 20px; }
.details { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 4px; color: #333333; }
.buy { display: flex; flex-direction: column; gap: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.label { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.field { border: 1px solid var(--line); padding: 12px 14px; background: #ffffff; border-radius: 0; }
.field:focus { outline: none; border-color: var(--ink); }
.qty { max-width: 96px; }
.small { font-size: 13px; color: var(--muted); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 24px; border: 1px solid var(--ink); background: var(--ink); color: #ffffff; cursor: pointer; font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; }
.btn:hover { background: #3a3a36; color: #ffffff; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--plate); }
.btn.sm { min-height: 36px; min-width: 36px; padding: 0 10px; font-size: 14px; letter-spacing: 0; }
.btn.block { width: 100%; }

/* Basket */
.basket { list-style: none; margin: 0; padding: 0; }
.basket li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto auto; gap: 16px; align-items: center; padding: 16px 0; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .basket li { grid-template-columns: 64px minmax(0, 1fr) auto; } .basket-qty { grid-column: 2; } }
.thumb { width: 64px; aspect-ratio: 4 / 5; background: var(--plate); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.basket-qty { display: inline-flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.totals { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding-top: 16px; border-top: 1px solid var(--ink); }
.checkout { display: flex; flex-direction: column; gap: 12px; max-width: 420px; margin-left: auto; width: 100%; }

/* Plain pages (delivery and returns) */
.prose { max-width: 680px; display: flex; flex-direction: column; gap: 12px; }
.prose h1 { margin: 0 0 8px; font-size: 30px; font-weight: 400; letter-spacing: -0.02em; }
.prose h2 { margin: 20px 0 0; font-size: 17px; font-weight: 600; }
.prose p { margin: 0; color: #333333; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 24px var(--gutter) 40px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #ffffff; padding: 12px 18px; font-size: 14px; z-index: 10; }
