:root {
  --ink: #1c1917;
  --ink-soft: #57534e;
  --cream: #fdfaf5;
  --cream-2: #f5ede1;
  --red: #8b1a1a;
  --red-dark: #6d1414;
  --gold: #c8901f;
  --line: #e4d8c6;
  --ok: #157f3d;
  --bad: #b00020;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(28, 25, 23, 0.12);
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", sans-serif;
}

* { box-sizing: border-box; }

/* Components below set `display`, which would otherwise beat the [hidden]
   attribute the scripts toggle. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 .5rem; }
a { color: var(--red); }
img { max-width: 100%; }

.skip {
  position: absolute; left: -9999px;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip:focus { left: 1rem; top: 1rem; }

/* ---------- Header ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 1rem;
  padding: .7rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(253, 250, 245, .95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .6rem; text-decoration: none; color: inherit; margin-right: auto; }
.brand-mark {
  display: grid; place-items: center;
  width: 42px; height: 42px; border-radius: 12px;
  background: var(--red); font-size: 1.3rem;
}
.brand-text { display: flex; flex-direction: column; }
.brand strong { font-size: 1.05rem; }
.brand small { color: var(--ink-soft); font-size: .78rem; }

.topnav { display: flex; gap: 1.25rem; }
.topnav a { color: var(--ink-soft); text-decoration: none; font-size: .92rem; font-weight: 600; }
.topnav a:hover { color: var(--red); }

.cart-button {
  display: inline-flex; align-items: center; gap: .45rem;
  border: 1px solid var(--line); background: #fff;
  padding: .55rem .9rem; border-radius: 999px;
  font: inherit; font-weight: 700; cursor: pointer;
}
.cart-button:hover { border-color: var(--red); }
.cart-total { color: var(--ink-soft); font-weight: 600; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1100px 420px at 78% -10%, rgba(200, 144, 31, .28), transparent 60%),
    linear-gradient(160deg, #2b1512, #4a1a17 55%, #6d1414);
  color: #fff5ea;
}
.hero-inner { max-width: 1100px; margin: 0 auto; padding: clamp(3rem, 8vw, 5.5rem) clamp(1rem, 4vw, 2.5rem); }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .74rem; color: var(--gold); margin: 0 0 .8rem; font-weight: 700; }
.hero h1 { font-size: clamp(2.1rem, 5.5vw, 3.6rem); }
.lede { max-width: 46ch; color: #f0dcc8; font-size: 1.06rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.6rem 0 1.5rem; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 1.1rem; list-style: none; padding: 0; margin: 0; font-size: .9rem; color: #e8d2ba; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; border: 0; cursor: pointer;
  padding: .8rem 1.4rem; border-radius: 999px;
  font: inherit; font-weight: 700; text-decoration: none; text-align: center;
}
.btn-primary { background: var(--gold); color: #2b1512; }
.btn-primary:hover { background: #dda335; }
.btn-primary:disabled { opacity: .6; cursor: progress; }
.btn-ghost { border: 1px solid rgba(255, 245, 234, .5); color: #fff5ea; }
.btn-ghost:hover { background: rgba(255, 245, 234, .12); }
.btn-block { width: 100%; }

.icon-btn {
  border: 1px solid var(--line); background: #fff; cursor: pointer;
  width: 30px; height: 30px; border-radius: 8px; font: inherit; line-height: 1;
}
.icon-btn:hover { border-color: var(--red); color: var(--red); }

/* ---------- Sections ---------- */
main, .strip { max-width: 1100px; margin: 0 auto; padding: clamp(2.5rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem); }
.strip { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 1.5rem; }
.section-head h2 { font-size: clamp(1.5rem, 3.5vw, 2.1rem); }
.section-head p { color: var(--ink-soft); margin: 0; }

.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.chip {
  border: 1px solid var(--line); background: #fff; color: var(--ink-soft);
  padding: .45rem 1rem; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer;
}
.chip.is-active { background: var(--red); border-color: var(--red); color: #fff; }

.grid { display: grid; gap: 1.1rem; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column;
  transition: transform .15s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.card-art {
  height: 120px; display: grid; place-items: center; font-size: 3.2rem;
  background: linear-gradient(140deg, var(--cream-2), #eadfcd);
}
.card-body { padding: 1rem 1.1rem 1.2rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.card h3 { font-size: 1.06rem; margin: 0; }
.blurb { color: var(--ink-soft); font-size: .88rem; margin: 0; flex: 1; }
.sizes { display: grid; gap: .4rem; }
.size {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  border: 1px solid var(--line); background: var(--cream); border-radius: 10px;
  padding: .5rem .75rem; font: inherit; cursor: pointer; text-align: left;
}
.size:hover { border-color: var(--red); background: #fff; }
.size strong { color: var(--red); }

.loading, .empty { color: var(--ink-soft); }
.free-note { margin-top: 1.5rem; color: var(--ink-soft); font-size: .92rem; }

.steps { max-width: 60ch; padding-left: 1.2rem; }
.steps li { margin-bottom: .6rem; }
.find-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.find-grid p { margin: 0; }

.footer {
  border-top: 1px solid var(--line); text-align: center;
  padding: 2rem 1rem; color: var(--ink-soft); font-size: .9rem;
}
.small { font-size: .84rem; color: var(--ink-soft); }
.centred { text-align: center; }
.hint { color: var(--ink-soft); font-weight: 400; font-size: .8rem; }

/* ---------- Basket drawer ---------- */
.drawer-backdrop, .modal-backdrop {
  position: fixed; inset: 0; background: rgba(28, 25, 23, .45); z-index: 50;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 60;
  width: min(430px, 100%); background: var(--cream);
  display: flex; flex-direction: column; box-shadow: var(--shadow);
}
body.drawer-open { overflow: hidden; }
.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); background: #fff;
}
.drawer-head h2 { margin: 0; font-size: 1.15rem; }
.drawer-body { padding: 1.2rem; overflow-y: auto; }

.cart-line {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: .6rem;
  padding: .75rem 0; border-bottom: 1px solid var(--line);
}
.cart-line small { display: block; color: var(--ink-soft); font-size: .8rem; }
.qty { display: flex; align-items: center; gap: .45rem; }
.line-total { font-weight: 700; min-width: 5rem; text-align: right; }
.remove { color: var(--ink-soft); }

.checkout { margin-top: 1.4rem; display: grid; gap: .9rem; }
.checkout label { display: grid; gap: .3rem; font-weight: 600; font-size: .9rem; }
.checkout input, .checkout textarea, .lookup input {
  font: inherit; padding: .6rem .7rem; border: 1px solid var(--line);
  border-radius: 10px; background: #fff; color: var(--ink);
}
.checkout input:focus, .checkout textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.checkout fieldset { border: 0; padding: 0; margin: 0; }
.checkout legend { font-weight: 700; font-size: .9rem; padding: 0 0 .4rem; }

.radio-list { display: grid; gap: .45rem; }
.radio {
  display: flex; align-items: flex-start; gap: .6rem;
  border: 1px solid var(--line); border-radius: 10px; padding: .6rem .75rem;
  background: #fff; cursor: pointer; font-weight: 400;
}
.radio:has(input:checked) { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.radio small { display: block; color: var(--ink-soft); font-size: .8rem; }

.totals { border-top: 1px solid var(--line); padding-top: .8rem; display: grid; gap: .35rem; font-size: .93rem; }
.totals div { display: flex; justify-content: space-between; gap: 1rem; }
.totals .grand { font-size: 1.15rem; font-weight: 800; border-top: 1px solid var(--line); padding-top: .5rem; margin-top: .3rem; }
.nudge { color: var(--ok); font-size: .84rem; margin: .3rem 0 0; }
.form-error { background: #fdecef; color: var(--bad); border-radius: 10px; padding: .6rem .8rem; margin: 0; font-size: .9rem; }

/* ---------- Confirmation ---------- */
.modal-backdrop { display: grid; place-items: center; padding: 1rem; }
.modal {
  background: var(--cream); border-radius: var(--radius); padding: 1.6rem;
  width: min(460px, 100%); max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow);
}
.reference {
  font-size: 1.9rem; font-weight: 800; letter-spacing: .06em;
  color: var(--red); margin: .3rem 0 .8rem;
}
.banking { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: .9rem 1rem; margin: 1rem 0; }
.banking dl { display: grid; grid-template-columns: auto 1fr; gap: .25rem .9rem; margin: .6rem 0; font-size: .9rem; }
.banking dt { color: var(--ink-soft); }
.banking dd { margin: 0; font-weight: 600; }

/* ---------- Track & admin ---------- */
.page { max-width: 780px; margin: 0 auto; padding: clamp(2rem, 6vw, 3.5rem) clamp(1rem, 4vw, 2.5rem); }
.lookup { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0; }
.lookup input { flex: 1 1 12rem; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; margin-bottom: 1rem; }
.status {
  display: inline-block; padding: .15rem .6rem; border-radius: 999px;
  font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  background: var(--cream-2); color: var(--ink-soft);
}
.status[data-status="paid"] { background: #e3f5e9; color: var(--ok); }
.status[data-status="delivered"] { background: #e6efff; color: #1b4fa0; }
.status[data-status="cancelled"] { background: #fdecef; color: var(--bad); }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: .5rem .4rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--ink-soft); font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
select { font: inherit; padding: .35rem .5rem; border: 1px solid var(--line); border-radius: 8px; background: #fff; }

@media (max-width: 720px) {
  .topnav { display: none; }
  .cart-line { grid-template-columns: 1fr auto auto; }
  .line-total { grid-column: 2 / 4; text-align: left; }
}

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