/* ============================================================
   Zevara Collection — design system (§8)
   Tokens first, then shell, components, pages, admin, responsive.
   ============================================================ */

:root {
  /* Colour (§8) */
  --bg: #FBF7EC;
  --header: #F5EBC8;
  --surface: #FFFDF7;
  --ink: #2A2518;
  --footer: #2E2514;
  --gold: #C9A94B;
  --muted: #6A5A2E;
  --line: #E3D9B8;
  --sale: #9A4A28;

  /* Type */
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Lora', Georgia, 'Times New Roman', serif;

  /* Space + shape */
  --gutter: 16px;
  --shell: 1200px;
  --radius: 6px;
  --radius-lg: 12px;
  --shadow: 0 1px 2px rgba(42, 37, 24, .06), 0 8px 24px rgba(42, 37, 24, .05);
}

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

/* The drawer sets display:flex, which would otherwise beat the hidden attribute. */
[hidden] { display: none !important; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background-color: var(--bg);
  /* Faint dotted texture from the mockups */
  background-image: radial-gradient(var(--line) 1px, transparent 1px);
  background-size: 26px 26px;
  overflow-x: hidden;
}

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

h1, h2, h3, .wordmark__name { font-family: var(--font-display); font-weight: 600; letter-spacing: -.01em; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 10px 16px;
}
.skip-link:focus { left: 8px; top: 8px; }

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

/* ── Layout helpers ───────────────────────────────────────── */

.shell { width: 100%; max-width: var(--shell); margin: 0 auto; padding: 0 var(--gutter); }
.shell--narrow { max-width: 840px; }
.section { padding-block: 48px; }  /* block-only: never clobbers .shell's gutter */
.section__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section__title { font-size: 26px; margin: 0; }
.center { text-align: center; }
.right { text-align: right; }
.muted { color: var(--muted); font-size: 14px; }
.stack { display: grid; gap: 10px; }
.button-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.empty { color: var(--muted); padding: 48px 0; text-align: center; }
.prose p { margin: 0 0 1em; }

/* ── Header + nav (§16) ───────────────────────────────────── */

.site-header {
  background: var(--header);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 40;
}
.site-header__inner {
  max-width: var(--shell); margin: 0 auto;
  padding: 12px var(--gutter);
  display: flex; align-items: center; gap: 24px;
}

.wordmark { text-decoration: none; display: grid; gap: 2px; line-height: 1; }
.wordmark__name { font-size: 26px; }
.wordmark__sub {
  font-size: 9px; letter-spacing: 6.5px; text-transform: uppercase;
  color: var(--muted);
}
.wordmark--small .wordmark__name { font-size: 20px; }

.site-header__burger {
  display: none; flex-direction: column; justify-content: center; gap: 4px;
  width: 36px; height: 36px; padding: 0; border: 0; background: none; cursor: pointer;
}
.site-header__burger span { display: block; height: 1.5px; background: var(--ink); border-radius: 2px; }

.site-nav { flex: 1; display: flex; justify-content: center; min-width: 0; }
.site-nav__list { display: flex; gap: 28px; margin: 0; padding: 0; list-style: none; }
.site-nav__item { position: relative; }
.site-nav__link {
  display: inline-block; padding: 8px 0; text-decoration: none; font-size: 15px;
  border-bottom: 2px solid transparent; background: none; border-top: 0; border-left: 0; border-right: 0;
  font-family: var(--font-body); color: inherit; cursor: pointer;
}
.site-nav__link:hover, .site-nav__link.is-active { border-bottom-color: var(--gold); }

.site-nav__dropdown {
  position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  min-width: 180px; padding: 10px 0; display: none;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); z-index: 50;
}
.site-nav__item:hover .site-nav__dropdown,
.site-nav__item:focus-within .site-nav__dropdown { display: block; }
.site-nav__dropdown a { display: block; padding: 7px 18px; text-decoration: none; font-size: 14px; white-space: nowrap; }
.site-nav__dropdown a:hover { background: var(--header); }

.site-nav__more { position: relative; }
.site-nav__more .site-nav__dropdown--more { left: auto; right: 0; transform: none; }
.site-nav__more .site-nav__dropdown--more.is-open { display: block; }
.site-nav__dropdown--more strong { display: block; padding: 8px 18px 2px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.site-header__cart { position: relative; text-decoration: none; display: inline-flex; padding: 6px; }
.site-header__cart-count {
  position: absolute; top: -1px; right: -1px; min-width: 17px; height: 17px;
  display: grid; place-items: center; padding: 0 4px;
  background: var(--footer); color: var(--header);
  border-radius: 999px; font-size: 10px; line-height: 1;
}
.site-header__secure { margin: 0; font-size: 14px; color: var(--muted); }

.checkout-steps { flex: 1; display: flex; justify-content: center; gap: 10px; font-size: 14px; }
.checkout-steps a { color: var(--muted); }

/* Mobile drawer */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(42, 37, 24, .45); z-index: 60; }
.site-nav-mobile {
  position: fixed; inset: 0 auto 0 0; width: min(320px, 84vw); z-index: 70;
  background: var(--header); display: flex; flex-direction: column;
  padding: 16px; overflow-y: auto;
}
.site-nav-mobile__head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.site-nav-mobile__close {
  width: 40px; height: 40px; margin-right: -8px; display: grid; place-items: center;
  font-size: 26px; line-height: 1; background: none; border: 0; cursor: pointer; color: var(--ink);
}
.site-nav-mobile__list { list-style: none; margin: 0; padding: 0; flex: 1; }
.site-nav-mobile__list > li { border-bottom: 1px solid var(--line); }
.site-nav-mobile__cat {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 16px 4px; background: none; border: 0; cursor: pointer;
  font-family: var(--font-display); font-size: 19px; color: inherit;
}
.site-nav-mobile__cat[aria-expanded="true"] svg { transform: rotate(90deg); }
.site-nav-mobile__cat svg { transition: transform .15s ease; }
.site-nav-mobile__subs { display: grid; gap: 2px; padding: 0 4px 12px 14px; }
.site-nav-mobile__subs a { padding: 7px 0; text-decoration: none; color: var(--muted); }
.site-nav-mobile__foot { display: grid; gap: 4px; padding: 16px 4px 4px; margin-top: 16px; border-top: 1px solid var(--line); }
.site-nav-mobile__foot a { padding: 8px 0; }
.site-nav-mobile__foot a { text-decoration: none; }

/* ── Buttons, chips, fields ───────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: var(--radius); border: 1px solid transparent;
  font-family: var(--font-body); font-size: 15px; line-height: 1.2;
  text-decoration: none; cursor: pointer; transition: filter .12s ease, background .12s ease;
}
.btn:hover { filter: brightness(.96); }
.btn--gold { background: var(--gold); color: var(--ink); font-weight: 600; }
.btn--dark { background: var(--footer); color: var(--header); font-weight: 600; }
.btn--outline { background: var(--surface); color: var(--ink); border-color: var(--line); }
.btn--ghost { background: none; color: var(--muted); border-color: transparent; text-decoration: underline; }
.btn--block { width: 100%; }
.btn--small { padding: 7px 12px; font-size: 14px; }
.btn--lg { padding: 15px 20px; font-size: 16px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.link-quiet { color: var(--muted); font-size: 14px; }
.link-strong { font-weight: 600; text-decoration: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 0; }
.chip {
  padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface); text-decoration: none; font-size: 14px;
}
.chip.is-active { background: var(--footer); color: var(--header); border-color: var(--footer); }

.size-chip {
  min-width: 34px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 4px;
  background: var(--surface); font-family: var(--font-body); font-size: 13px; cursor: pointer; color: inherit;
}
.size-chip.is-selected { background: var(--footer); color: var(--header); border-color: var(--footer); }
.size-chip--lg { min-width: 64px; padding: 11px 14px; font-size: 15px; }

.badge {
  position: absolute; top: 10px; left: 10px; z-index: 2;
  padding: 4px 10px; border-radius: 999px; background: var(--surface);
  font-size: 12px; letter-spacing: .02em;
}
.badge--new { color: var(--sale); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span, .field legend { font-size: 14px; color: var(--muted); }
.field small { font-size: 12px; }
.field--inline { display: flex; align-items: center; gap: 8px; margin: 0; }
.field--inline > span { white-space: nowrap; }
.field--tight { max-width: 110px; }
.field__hint { font-size: 13px; color: var(--muted); margin: -6px 0 14px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-row--3 { grid-template-columns: 1fr 1fr 1fr; }

input[type="text"], input[type="tel"], input[type="email"], input[type="url"],
input[type="number"], input[type="search"], input[type="password"], select, textarea {
  width: 100%; padding: 11px 12px; font-family: var(--font-body); font-size: 15px;
  color: var(--ink); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
}
textarea { resize: vertical; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input--tight { max-width: 90px; }
.checkbox-row { display: flex; gap: 16px; }
.checkbox { display: inline-flex; align-items: center; gap: 7px; font-size: 15px; }
.checkbox input { width: auto; }
fieldset.field { border: 0; padding: 0; margin: 0 0 14px; }

.form-error { color: var(--sale); background: #fdf1ec; border: 1px solid #f0d6cb; border-radius: var(--radius); padding: 10px 12px; font-size: 14px; }
.notice { background: var(--header); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; margin: 0 0 16px; }
.notice--ok { border-color: var(--gold); }

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; margin-bottom: 20px;
}
.card__title { font-size: 19px; margin: 0 0 16px; }
.card__title--spaced { margin-top: 26px; }

.breadcrumb { display: flex; flex-wrap: wrap; gap: 2px 8px; font-size: 13px; color: var(--muted); padding: 20px 0 0; }
.breadcrumb a { text-decoration: none; }
.page-title { font-size: 34px; margin: 10px 0 18px; }

/* ── Product grid + card ──────────────────────────────────── */

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.product-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; display: flex; flex-direction: column;
}
.product-card__media { position: relative; display: block; background: var(--header); aspect-ratio: 3 / 4; }
.product-card__media img { width: 100%; height: 100%; object-fit: cover; }
.product-card__body { padding: 14px; display: grid; gap: 8px; }
.product-card__title { font-size: 16px; margin: 0; }
.product-card__title a { text-decoration: none; }
.product-card__descriptor { margin: 0; font-size: 13px; color: var(--muted); }
.product-card__price { margin: 0; font-weight: 600; }
.product-card__sizes { display: flex; flex-wrap: wrap; gap: 6px; }

/* ── Home ─────────────────────────────────────────────────── */

.home-hero { background: var(--header); border-bottom: 1px solid var(--line); padding: 64px 0; text-align: center; }
.home-hero__eyebrow { margin: 0; font-size: 11px; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.home-hero__title { font-size: 42px; margin: 12px 0 10px; }
.home-hero__text { margin: 0 auto; max-width: 540px; color: var(--muted); }
.home-hero__actions { display: flex; gap: 12px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }

.promises { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; border-top: 1px solid var(--line); }
.promise h3 { font-size: 17px; margin: 0 0 6px; }
.promise p { margin: 0; color: var(--muted); font-size: 14px; }

/* ── Listing ──────────────────────────────────────────────── */

.listing-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.listing-title { font-size: 38px; margin: 10px 0 0; }
.listing-count { color: var(--muted); font-size: 14px; margin: 0; }

.listing-toolbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: 20px 0 28px; padding: 12px 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
}
.listing-toolbar__search { flex: 1; min-width: 220px; display: flex; align-items: center; gap: 8px; color: var(--muted); }
.listing-toolbar__search input { border: 0; background: none; padding: 6px 0; }
.listing-toolbar__search input:focus { outline: none; }

.listing-foot { text-align: center; padding: 36px 0 8px; display: grid; gap: 14px; justify-items: center; }
.listing-foot__count { margin: 0; font-size: 14px; color: var(--muted); }

/* ── Product page ─────────────────────────────────────────── */

.product { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding: 18px 0 8px; align-items: start; }
.product-gallery { display: grid; grid-template-columns: 86px 1fr; gap: 14px; }
.product-gallery__thumbs { display: grid; gap: 12px; align-content: start; }
.product-gallery__thumb { padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--header); cursor: pointer; aspect-ratio: 3 / 4; }
.product-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-gallery__thumb.is-active { border-color: var(--gold); }
.product-gallery__main { position: relative; margin: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--header); aspect-ratio: 3 / 4; }
.product-gallery__main img { width: 100%; height: 100%; object-fit: cover; }

.product__eyebrow { margin: 0; font-size: 11px; letter-spacing: .22em; color: var(--muted); }
.product-title { font-size: 34px; margin: 8px 0 4px; }
.product__descriptor { margin: 0; color: var(--muted); }
.product-price { font-size: 26px; font-weight: 600; margin: 16px 0 10px; }
.product__colour { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.product__colour p { margin: 0; font-size: 14px; }
.swatch { width: 26px; height: 26px; border-radius: 999px; border: 1px solid var(--line); display: inline-block; }
.product__sizes-head { display: flex; align-items: baseline; justify-content: space-between; }
.product__sizes-head p { margin: 0 0 8px; font-size: 14px; }
.size-row { display: flex; gap: 10px; flex-wrap: wrap; }
.product__actions { display: flex; gap: 12px; margin: 22px 0 10px; }
.product__actions .btn { flex: 1; }
.product__error { color: var(--sale); font-size: 14px; }

.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.qty__btn { width: 36px; height: 44px; border: 0; background: none; font-size: 17px; cursor: pointer; color: inherit; }
.qty__input { width: 46px; text-align: center; border: 0 !important; background: none !important; -moz-appearance: textfield; padding: 0 !important; }
.qty__input::-webkit-outer-spin-button, .qty__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.info-box { list-style: none; margin: 22px 0; padding: 16px 18px; background: var(--header); border: 1px solid var(--line); border-radius: var(--radius-lg); display: grid; gap: 8px; font-size: 14px; }

.accordions { border-top: 1px solid var(--line); }
.accordion { border-bottom: 1px solid var(--line); }
.accordion summary { cursor: pointer; padding: 15px 0; font-family: var(--font-display); font-size: 17px; list-style: none; display: flex; justify-content: space-between; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: '⌄'; color: var(--muted); }
.accordion[open] summary::after { content: '⌃'; }
.accordion__body { padding-bottom: 16px; color: var(--muted); }

.product-sticky { display: none; }

/* ── Checkout + summary ───────────────────────────────────── */

.checkout {
  max-width: var(--shell); margin: 0 auto; padding: 28px var(--gutter) 64px;
  display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 36px; align-items: start;
}
.checkout__terms { text-align: center; font-size: 13px; color: var(--muted); margin-top: 12px; }
.checkout--confirm .confirm-mark {
  width: 46px; height: 46px; display: grid; place-items: center; border-radius: 999px;
  background: var(--gold); color: var(--ink); font-size: 24px;
}
.confirm-lead { font-size: 17px; margin-bottom: 22px; }
.confirm-address { margin: 0 0 14px; line-height: 1.7; }

.option {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; margin-bottom: 10px;
  border: 1.5px solid var(--line); border-radius: var(--radius);
}
.option.is-selected { border-color: var(--ink); }
.option__name { margin: 0; font-weight: 600; }
.option__meta { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.option__price { margin: 0; font-weight: 600; white-space: nowrap; }

.summary {
  background: var(--header); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px; position: sticky; top: 92px;
}
.summary__title { font-size: 21px; margin: 0 0 18px; }
.summary__lines { display: grid; gap: 14px; }
.summary__line { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; }
.summary__thumb { position: relative; }
.summary__thumb img { width: 56px; height: 72px; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); }
.summary__qty {
  position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px;
  display: grid; place-items: center; border-radius: 999px;
  background: var(--footer); color: var(--header); font-size: 11px;
}
.summary__meta { min-width: 0; }
.summary__name { margin: 0; font-size: 15px; }
.summary__variant { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.summary__price { margin: 0; font-weight: 600; font-size: 15px; white-space: nowrap; }
.summary__empty { color: var(--muted); font-size: 14px; margin: 0; }
.summary__totals { margin: 20px 0 14px; padding-top: 16px; border-top: 1px solid var(--line); display: grid; gap: 8px; }
.summary__totals > div { display: flex; justify-content: space-between; }
.summary__totals dt, .summary__totals dd { margin: 0; font-size: 14px; }
.summary__grand { display: flex; align-items: baseline; justify-content: space-between; padding-top: 14px; border-top: 1px solid var(--line); }
.summary__grand strong { font-family: var(--font-display); font-size: 24px; }

.error-status { font-size: 13px; letter-spacing: .3em; color: var(--muted); margin: 40px 0 0; }

/* ── Footer ───────────────────────────────────────────────── */

.site-footer { background: var(--footer); color: #E8DFC6; margin-top: 56px; }
.site-footer__inner {
  max-width: var(--shell); margin: 0 auto; padding: 44px var(--gutter);
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px;
}
.site-footer__brand .wordmark__name { font-size: 24px; color: var(--header); }
.site-footer__brand p { margin: 10px 0 0; font-size: 14px; max-width: 320px; opacity: .8; }
.site-footer__col { display: grid; gap: 8px; align-content: start; }
.site-footer__col h3 { font-family: var(--font-body); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; margin: 0 0 4px; opacity: .65; }
.site-footer__col a { text-decoration: none; font-size: 14px; }
.site-footer__col a:hover { color: var(--gold); }
.site-footer__legal {
  max-width: var(--shell); margin: 0 auto; padding: 16px var(--gutter) 28px;
  border-top: 1px solid rgba(232, 223, 198, .18); font-size: 12px; opacity: .7;
}

/* ── Admin ────────────────────────────────────────────────── */

body.is-admin { background-image: none; background: var(--bg); }
body.is-login { display: grid; place-items: center; min-height: 100vh; }

.admin-bar {
  background: var(--footer); color: var(--header);
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
  padding: 12px var(--gutter);
}
.admin-bar .wordmark__sub { color: var(--gold); }
.admin-bar__nav { display: flex; gap: 20px; flex: 1; }
.admin-bar__nav a { text-decoration: none; font-size: 15px; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.admin-bar__nav a.is-active, .admin-bar__nav a:hover { border-bottom-color: var(--gold); }
.admin-bar__right { display: flex; align-items: center; gap: 14px; }
.admin-bar__right .link-quiet { color: #E8DFC6; }
.admin-bar__who { font-size: 13px; opacity: .75; }
.admin-bar .btn--ghost { color: var(--header); }

.admin-banner { margin: 0; padding: 10px var(--gutter); background: var(--gold); color: var(--ink); font-size: 14px; text-align: center; }

.admin-shell { max-width: var(--shell); margin: 0 auto; padding: 28px var(--gutter) 72px; }
.admin-shell--narrow { max-width: 880px; }
.admin-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.admin-head .page-title { margin: 0; }
.admin-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.table th, .table td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.table th { background: var(--header); font-weight: 600; font-size: 13px; white-space: nowrap; }
.table tr:last-child td { border-bottom: 0; }
.table .thumb { width: 42px; height: 56px; object-fit: cover; border-radius: 4px; }

.status { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; border: 1px solid var(--line); background: var(--header); white-space: nowrap; }
.status--new { background: var(--gold); border-color: var(--gold); }
.status--delivered { background: #e4ecd9; border-color: #cbdbb8; }
.status--cancelled { background: #f6e3dc; border-color: #e8cabd; color: var(--sale); }

.row-form { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.row-form .field { margin-bottom: 0; }
.sub-list { list-style: none; margin: 10px 0 16px; padding: 0 0 0 14px; border-left: 2px solid var(--line); display: grid; gap: 6px; }
.sub-list li { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sub-list .row-form { margin-bottom: 0; }
.admin-list { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.admin-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.image-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; gap: 10px; flex-wrap: wrap; }
.image-list__item { position: relative; width: 92px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: grab; background: var(--header); }
.image-list__item img { width: 92px; height: 122px; object-fit: cover; }
.image-list__item.is-dragging { opacity: .45; }
.image-list__remove { position: absolute; top: 3px; right: 3px; width: 22px; height: 22px; border-radius: 999px; border: 0; background: rgba(42,37,24,.75); color: #fff; cursor: pointer; line-height: 1; }

.login { width: min(420px, 92vw); padding: 24px; }
.login__card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; text-align: center; display: grid; gap: 14px; justify-items: center; }
.login__card .wordmark { justify-items: center; }
.login__title { font-size: 24px; margin: 6px 0 0; }
.login__text { margin: 0; color: var(--muted); font-size: 14px; }
.login__card form { width: 100%; text-align: left; }
.login__foot { margin: 6px 0 0; }
.login__status { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; }
/* A busy button reads as deliberate progress rather than a dead control. */
.btn[aria-busy="true"] { opacity: 0.72; cursor: progress; }
.login__card #admin-login-error { width: 100%; text-align: left; }

/* ── Responsive ───────────────────────────────────────────── */

@media (max-width: 1024px) {
  .product { gap: 28px; }
  .checkout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  /* Header becomes burger · wordmark · cart, with the wordmark truly centred:
     equal 1fr rails either side rather than a flex child that drifts. */
  .site-header__inner {
    display: grid; grid-template-columns: 1fr auto 1fr;
    align-items: center; gap: 10px; padding: 10px var(--gutter);
  }
  .site-header__burger { display: flex; justify-self: start; margin-left: -6px; }
  .site-nav { display: none; }
  .site-header__inner .wordmark { justify-items: center; text-align: center; }
  .site-header__cart, .site-header__secure { justify-self: end; }
  .site-header__cart { margin-right: -6px; }
  .checkout-steps { display: none; }

  /* Desktop air reads as dead space on a phone — tighten the vertical rhythm. */
  .section { padding-block: 34px; }
  .section__head { margin-bottom: 18px; }
  .home-hero { padding: 44px 0; }
  .product { padding-top: 12px; }
  .checkout { padding: 20px var(--gutter) 48px; gap: 26px; }
  .site-footer { margin-top: 40px; }
  .site-footer__inner { padding: 34px var(--gutter); gap: 26px; }
  .empty { padding: 36px 0; }

  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .promises { grid-template-columns: 1fr; gap: 22px; }
  .site-footer__inner { grid-template-columns: 1fr 1fr; }

  .product { grid-template-columns: 1fr; }
  .product-gallery { grid-template-columns: 1fr; }
  .product-gallery__thumbs { grid-auto-flow: column; grid-auto-columns: 72px; overflow-x: auto; order: 2; }
  .product-gallery__main { order: 1; }
  .product__actions .btn { flex: 1; }

  .page-title, .listing-title { font-size: 28px; }
  .home-hero__title { font-size: 32px; }
  .product-title { font-size: 28px; }
  .section__title { font-size: 23px; }

  /* 16px stops iOS zooming the whole page when a field takes focus. */
  input[type="text"], input[type="tel"], input[type="email"], input[type="url"],
  input[type="number"], input[type="search"], input[type="password"], select, textarea { font-size: 16px; }

  /* Thumb-sized targets */
  .btn { padding: 12px 18px; min-height: 44px; }
  .btn--small { min-height: 38px; padding: 8px 12px; }
  .size-chip { min-height: 38px; }
  .chip { display: inline-flex; align-items: center; min-height: 38px; }

  .site-nav-mobile { padding: 14px 18px calc(18px + env(safe-area-inset-bottom)); }

  /* Sticky buy bar from the mobile product frame */
  .product-sticky {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
    display: flex; gap: 10px;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom));
    background: var(--surface); border-top: 1px solid var(--line);
    box-shadow: 0 -6px 18px rgba(42, 37, 24, .07);
  }
  .product-sticky .btn { flex: 1; }
  body.has-sticky-bar { padding-bottom: calc(80px + env(safe-area-inset-bottom)); }

  /* Admin: let the section links scroll instead of wrapping into a ragged block */
  .admin-bar { gap: 12px 16px; padding: 10px var(--gutter); }
  .admin-bar__nav { order: 3; width: 100%; flex: none; gap: 18px; overflow-x: auto; padding-bottom: 2px; }
  .admin-bar__nav a { white-space: nowrap; }
  .admin-bar__right { margin-left: auto; }
  .admin-shell { padding: 20px var(--gutter) 56px; }
}

@media (max-width: 560px) {
  .field-row, .field-row--3 { grid-template-columns: 1fr; }
  .site-footer__inner { grid-template-columns: 1fr; gap: 22px; }
  .product-card__body { padding: 12px; gap: 7px; }

  /* The wordmark carries the trust cue here; the label only crowds it. */
  .site-header__secure { display: none; }

  /* Hand the narrow screen back to the content inside the boxes. */
  .card { padding: 18px 16px; margin-bottom: 16px; }
  .summary { padding: 18px 16px; }
  .info-box { padding: 14px 16px; margin: 18px 0; }
  .section { padding-block: 28px; }
  .home-hero { padding: 36px 0; }

  .page-title, .listing-title { font-size: 26px; }
  .product-title { font-size: 25px; }
  .home-hero__title { font-size: 28px; }
  .section__title { font-size: 21px; }
  .summary__grand strong { font-size: 21px; }
  .breadcrumb { font-size: 12px; padding-top: 16px; }

  .listing-head { flex-wrap: wrap; gap: 2px 12px; }
  .listing-toolbar { padding: 10px 12px; gap: 10px; margin: 16px 0 22px; }
  .listing-toolbar .field--inline { flex: 1 1 100%; }
  .listing-toolbar__search { flex-basis: 100%; min-width: 0; border-top: 1px solid var(--line); padding-top: 6px; }
  .listing-toolbar > .btn { width: 100%; }
  .chips { margin-top: 14px; }

  .product__actions { gap: 10px; margin: 18px 0 10px; }
  .accordion summary { padding: 14px 0; font-size: 16px; }

  /* One control per row beats three ragged half-width ones. */
  .admin-head { gap: 12px; }
  .admin-filters { display: grid; gap: 10px; width: 100%; }
  .admin-filters .btn { width: 100%; }
  .admin-bar__who { display: none; }
  .table th, .table td { padding: 9px 11px; }
  .row-form { gap: 10px 8px; }
  .row-form .field { flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .product-grid { gap: 10px; }
  .product-card__body { padding: 10px; }
  .home-hero__title { font-size: 26px; }
  .btn { padding: 12px 14px; font-size: 14px; }
  .size-chip { min-width: 32px; }
}
