/* Taystrades: "the swap counter". Tokens first, then base, components, pages. */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "Figtree";
  src: url("../fonts/figtree.woff2") format("woff2");
  font-weight: 300 900;
  font-display: swap;
}

:root {
  --paper: #F7F9FB;
  --ink: #1C2B3A;
  --sky: #DCEBF5;
  --harbour: #2A6483;
  --mint: #CFEADF;
  --marigold: #FFC94D;
  --marigold-press: #F2B42A;
  --slate: #4D5E6E;
  --white: #FFFFFF;
  --brick: #A33A22;
  --line: #C9D6E1;
  --mint-line: #9CCBB6;

  --r-panel: 22px;
  --r-md: 12px;
  --r-btn: 8px;
  --r-xs: 4px;

  --gut: 16px;
  --max: 1200px;
  --bar: 60px;

  --display: "Bricolage Grotesque", "Arial Narrow", system-ui, sans-serif;
  --body: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gut: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 76px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}
body.zone-mint { background: var(--mint); }
img { max-width: 100%; display: block; }
a { color: var(--harbour); text-underline-offset: 3px; text-decoration-thickness: 1.5px; }
a:hover { text-decoration-thickness: 2.5px; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--harbour); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { margin: 0; font-family: var(--display); color: var(--ink); text-wrap: balance; }
h1 { font-size: 2.25rem; line-height: 1.02; font-weight: 800; font-stretch: 80%; letter-spacing: -0.01em; }
h2 { font-size: 1.75rem; line-height: 1.1; font-weight: 700; font-stretch: 88%; }
h3 { font-size: 1.125rem; line-height: 1.25; font-weight: 650; font-stretch: 95%; }
p { margin: 0; max-width: 68ch; }
@media (min-width: 900px) {
  h1 { font-size: 3.5rem; }
  h2 { font-size: 2.5rem; }
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--white); padding: 12px 16px; z-index: 100; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.muted { color: var(--slate); }
.icon { width: 24px; height: 24px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon.fill { fill: currentColor; stroke: none; }

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

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 10px 20px;
  border: 2px solid var(--ink); border-radius: var(--r-btn);
  background: var(--white); color: var(--ink);
  font-weight: 650; font-size: 1rem; line-height: 1.2; text-decoration: none; text-align: center;
  cursor: pointer;
}
.btn:hover { background: var(--paper); text-decoration: none; }
.btn:active { translate: 0 1px; }
.btn-primary { background: var(--marigold); }
.btn-primary:hover { background: var(--marigold-press); }
.btn-mint { background: var(--mint); }
.btn-mint:hover { background: #BBE0D0; }
.btn-ink { background: var(--ink); color: var(--paper); }
.btn-ink:hover { background: #2A3D50; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.0625rem; }
.btn .wa { color: #1E8E4E; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.textlink { font-weight: 600; }

.trust {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 10px; color: var(--slate); font-size: 1rem; line-height: 1.35;
}
.trust .icon { width: 20px; height: 20px; color: var(--harbour); margin-top: 1px; }

/* ---------- The swing tag ---------- */

.tag {
  position: absolute; top: -4px; right: 18px; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  transform-origin: 50% 0;
  rotate: var(--tilt, -5deg);
  filter: drop-shadow(0 1.5px 0 rgba(28, 43, 58, 0.45));
  pointer-events: none;
}
.tag::before { /* eyelet on the photo */
  content: ""; width: 10px; height: 10px; border-radius: 50%;
  background: var(--paper); border: 2px solid var(--ink); margin-bottom: -3px; z-index: 1;
}
.tag-string { width: 2px; height: var(--string, 18px); background: var(--ink); margin-bottom: -12px; position: relative; z-index: 1; }
.tag-body {
  display: block;
  min-width: 78px; padding: 20px 12px 9px;
  background: var(--marigold); color: var(--ink); text-align: center;
  clip-path: polygon(24% 0, 76% 0, 100% 17%, 100% 100%, 0 100%, 0 17%);
  -webkit-mask: radial-gradient(circle at 50% 10px, transparent 4.5px, #000 5px);
  mask: radial-gradient(circle at 50% 10px, transparent 4.5px, #000 5px);
}
.price {
  font-family: var(--display); font-weight: 750; font-stretch: 100%;
  font-variation-settings: "opsz" 96;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1; letter-spacing: -0.02em; white-space: nowrap;
}
.price .cur { font-size: 0.78em; vertical-align: 0.1em; margin-right: 1px; font-weight: 650; }
.price .p { font-size: 0.5em; vertical-align: 0.72em; margin-left: 1px; font-weight: 700; }
.tag .price { font-size: 1.5rem; }
.tag-md .tag-body { min-width: 92px; padding: 22px 14px 10px; }
.tag-md .price { font-size: 1.75rem; }
.tag-lg { top: -6px; right: 28px; }
.tag-lg .tag-body { min-width: 132px; padding: 26px 18px 14px; -webkit-mask: radial-gradient(circle at 50% 12px, transparent 6px, #000 6.5px); mask: radial-gradient(circle at 50% 12px, transparent 6px, #000 6.5px); }
.tag-lg .price { font-size: 2.75rem; }
.tag-lg .tag-string { height: 26px; margin-bottom: -14px; }
.tag-empty .tag-body { padding: 24px 16px 14px; min-width: 150px; }
.tag-empty .tag-note { font-family: var(--display); font-weight: 650; font-size: 1.25rem; font-stretch: 90%; line-height: 1.1; }
.tag-sold .tag-body { background: var(--white); }

/* The one ambient motion: hero tags swing in and settle. */
@keyframes swing {
  0% { rotate: calc(var(--tilt) + 42deg); }
  22% { rotate: calc(var(--tilt) - 24deg); }
  44% { rotate: calc(var(--tilt) + 12deg); }
  64% { rotate: calc(var(--tilt) - 6deg); }
  82% { rotate: calc(var(--tilt) + 2deg); }
  100% { rotate: var(--tilt); }
}
.hero .tag { animation: swing 1.5s cubic-bezier(.3, .1, .3, 1) both; animation-delay: var(--delay, 0s); }
@media (prefers-reduced-motion: reduce) {
  .hero .tag { animation: none; }
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}

/* ---------- Condition badge and marks ---------- */

.grade {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 8px; border: 1.5px solid var(--harbour); border-radius: var(--r-xs);
  color: var(--harbour); font-weight: 650; font-size: 1rem; line-height: 1.3; background: var(--white);
}
.pips { display: inline-flex; gap: 2px; }
.pips i { width: 5px; height: 12px; border-radius: 1px; background: currentColor; }
.pips i.off { background: transparent; box-shadow: inset 0 0 0 1.5px currentColor; opacity: .45; }
.new-mark {
  position: absolute; left: 10px; bottom: 10px; z-index: 1;
  padding: 2px 8px; border-radius: var(--r-xs);
  background: var(--ink); color: var(--paper); font-weight: 650; font-size: 1rem;
}

/* ---------- Top bar, menu, bottom bar ---------- */

.topbar {
  position: sticky; top: 0; z-index: 30;
  background: rgba(247, 249, 251, 0.96); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(1.4) blur(6px);
}
.zone-mint .topbar { background: rgba(207, 234, 223, 0.96); border-color: var(--mint-line); }
.topbar .wrap { display: flex; align-items: center; gap: 8px; height: var(--bar); }
.logo {
  display: inline-flex; align-items: center; gap: 8px; margin-right: auto;
  color: var(--ink); text-decoration: none;
  font-family: var(--display); font-weight: 800; font-stretch: 78%; font-size: 1.625rem; letter-spacing: -0.01em;
}
.logo svg { width: 26px; height: 26px; }
.icon-btn {
  display: inline-grid; place-items: center; width: 48px; height: 48px;
  border: 0; background: transparent; border-radius: var(--r-btn); cursor: pointer; color: var(--ink);
}
.icon-btn:hover { background: var(--sky); }
.nav-desktop, .search-desktop { display: none; }
.menu {
  position: fixed; inset: var(--bar) 0 auto 0; z-index: 29;
  background: var(--paper); border-bottom: 1px solid var(--line);
  padding: 8px var(--gut) 24px;
}
.menu[hidden] { display: none; }
.menu a:not(.btn) {
  display: block; padding: 14px 0; border-bottom: 1px solid var(--line);
  font-family: var(--display); font-weight: 700; font-stretch: 88%; font-size: 1.5rem; color: var(--ink); text-decoration: none;
}
.menu a[aria-current="page"] { color: var(--harbour); }
.menu .btn { margin-top: 20px; }
@media (min-width: 900px) {
  .nav-desktop { display: flex; gap: 4px; margin-right: 16px; }
  .nav-desktop a { padding: 10px 12px; border-radius: var(--r-btn); color: var(--ink); font-weight: 600; text-decoration: none; }
  .nav-desktop a:hover { background: var(--sky); }
  .nav-desktop a[aria-current="page"] { box-shadow: inset 0 -3px 0 var(--harbour); border-radius: 0; }
  .search-desktop { display: block; width: 240px; }
  .search-desktop input { width: 100%; min-height: 44px; }
  .topbar .icon-btn { display: none; }
  .menu { display: none; }
}

.bottombar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 25;
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 10px var(--gut) calc(10px + env(safe-area-inset-bottom));
  background: var(--paper); border-top: 1px solid var(--line);
}
.zone-mint .bottombar { background: var(--mint); border-color: var(--mint-line); }
body { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
@media (min-width: 900px) {
  .bottombar { display: none; }
  body { padding-bottom: 0; }
}

/* ---------- Forms ---------- */

input[type="search"], input[type="text"], input[type="email"], select, textarea {
  width: 100%; min-height: 48px; padding: 10px 14px;
  border: 1.5px solid var(--slate); border-radius: var(--r-md); background: var(--white);
  font-size: 1rem;
}
textarea { min-height: 96px; resize: vertical; }
select { appearance: none; padding-right: 40px; background: var(--white) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231C2B3A' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center / 20px; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline-offset: 0; border-color: var(--harbour); }
.field { display: grid; gap: 6px; }
.field > label, .field legend { font-weight: 650; }
.hint { color: var(--slate); }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 6px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; margin: 0; }
.choice span {
  display: inline-flex; align-items: center; min-height: 48px; padding: 8px 16px;
  border: 1.5px solid var(--slate); border-radius: var(--r-btn); background: var(--white); cursor: pointer;
}
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); font-weight: 650; }
.choice input:focus-visible + span { outline: 3px solid var(--harbour); outline-offset: 2px; }
.error { color: var(--brick); font-weight: 600; }
.field[data-invalid] input, .field[data-invalid] select { border-color: var(--brick); border-width: 2px; }

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

.photo {
  position: relative; display: block; aspect-ratio: 1; border-radius: var(--r-md);
  background: var(--white); border: 1px solid var(--line);
}
.photo img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
/* Most listing photos are portrait iPhone shots (3:4), so cards use the same shape and fill edge to edge. */
.card .photo { aspect-ratio: 3 / 4; }
.card { position: relative; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.card h3 { font-family: var(--body); font-size: 1rem; font-weight: 600; line-height: 1.35; font-stretch: 100%; }
.card h3 a { color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card h3 a:hover { text-decoration: underline; }
.card .meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; }
.card .ship { color: var(--slate); }
.card .body { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.card .btn { margin-top: auto; }
.card .trust { margin-top: 0; }

/* Mobile shop rows: photo left, details right */
.rows { display: grid; gap: 28px; }
.rows .card { display: grid; grid-template-columns: minmax(124px, 40%) 1fr; gap: 14px; align-items: start; }
.rows .card .body { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.rows .tag .price { font-size: 1.375rem; }
.rows .tag .tag-body { min-width: 70px; padding: 19px 10px 8px; }
.rows .tag { right: 8px; }
@media (min-width: 640px) {
  .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 24px; }
  .rows .card { display: flex; }
  .rows .tag .price { font-size: 1.5rem; }
}
@media (min-width: 1100px) { .rows { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.scroller {
  display: grid; grid-auto-flow: column; grid-auto-columns: 232px; gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px var(--gut) 12px; margin: 0 calc(var(--gut) * -1);
  scrollbar-width: thin; scroll-padding-inline: var(--gut);
}
.scroller > * { scroll-snap-align: start; }
.grid4 { display: grid; gap: 36px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) {
  .scroller { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; margin: 0; padding: 4px 0 0; gap: 40px 24px; }
  .grid4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Sections ---------- */

.section { padding: 48px 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 24px; }
.section-head p { margin-top: 8px; }
@media (min-width: 900px) { .section { padding: 72px 0; } }

/* Hero */
.hero { background: var(--sky); overflow: hidden; }
.hero .wrap { display: grid; gap: 8px; padding-top: 24px; padding-bottom: 0; }
.hero h1 { font-size: 2.5rem; line-height: 0.98; font-stretch: 76%; max-width: 15ch; }
.hero .lede { margin-top: 12px; font-size: 1.0625rem; max-width: 40ch; }
.hero .btn-row { margin-top: 18px; gap: 10px; }
.hero .btn-row .btn { flex: 1 1 200px; }
.rack { position: relative; height: 262px; margin: 14px calc(var(--gut) * -1) 0; }
.rack::before { /* the counter edge */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 30px; background: var(--paper);
  border-top: 2px solid var(--ink);
}
.hang { position: absolute; left: var(--x); top: var(--y); width: var(--w); rotate: var(--r, 0deg); z-index: var(--z, 1); }
.hang .photo { border: 2px solid var(--ink); }
.hang .photo img { border-radius: 10px; }
@media (min-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr 1.05fr; align-items: center; padding-top: 56px; padding-bottom: 0; }
  .hero h1 { font-size: 4.75rem; }
  .hero .copy { padding-bottom: 64px; }
  .hero .lede { font-size: 1.25rem; margin-top: 20px; }
  .hero .btn-row { margin-top: 28px; }
  .hero .btn-row .btn { flex: 0 0 auto; }
  .rack { height: 520px; margin: 0; align-self: end; }
  .rack::before { left: -50vw; right: -50vw; }
}

/* Trust row */
.trustrow { background: var(--paper); border-bottom: 1px solid var(--line); }
.trustrow ul { list-style: none; margin: 0; padding: 20px 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px 16px; }
.trustrow li { display: flex; gap: 10px; align-items: flex-start; }
.trustrow .icon { color: var(--harbour); margin-top: 1px; }
.trustrow b { display: block; font-family: var(--display); font-weight: 700; font-size: 1.25rem; font-stretch: 90%; line-height: 1.1; }
.trustrow a { color: inherit; text-decoration: none; }
.trustrow a:hover b { text-decoration: underline; }
@media (min-width: 900px) { .trustrow ul { grid-template-columns: repeat(4, 1fr); padding: 28px 0; } }

/* Category tiles */
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tile {
  display: flex; flex-direction: column; gap: 18px; padding: 18px; min-height: 132px;
  background: var(--sky); border-radius: var(--r-md); color: var(--ink); text-decoration: none;
}
.tile:hover { background: #CDE2F0; }
.tile .icon { width: 36px; height: 36px; stroke-width: 1.75; }
.tile b { font-family: var(--display); font-size: 1.25rem; font-weight: 700; font-stretch: 90%; line-height: 1.1; margin-top: auto; }
.tile span { color: var(--slate); }
@media (min-width: 900px) { .tiles { grid-template-columns: repeat(4, 1fr); gap: 20px; } .tile { min-height: 168px; padding: 24px; } }

/* Trade-in band */
.band { background: var(--mint); }
.band .wrap { display: grid; gap: 28px; padding-top: 40px; padding-bottom: 44px; }
.band p { margin-top: 12px; font-size: 1.125rem; }
.band .btn-row { margin-top: 24px; }
.band-art { position: relative; height: 240px; }
@media (min-width: 900px) {
  .band-outer { padding: 0 var(--gut); }
  .band { max-width: calc(var(--max) - 2 * var(--gut)); margin: 0 auto; border-radius: var(--r-panel); }
  .band .wrap { grid-template-columns: 1.3fr 1fr; align-items: center; padding: 56px; }
  .band-art { height: 260px; }
}

/* "Your item" outline with the empty tag */
.your-item {
  position: absolute; left: 50%; top: 18px; translate: -50% 0; width: 190px; aspect-ratio: 1;
  border: 2.5px dashed var(--ink); border-radius: var(--r-md); display: grid; place-items: center;
  color: var(--ink); font-weight: 650; background: rgba(255, 255, 255, .45);
  align-items: end; padding-bottom: 16px; translate: -70% 0;
}
.your-item .tag { right: -96px; top: -6px; }

/* Reviews */
.stars { display: inline-flex; gap: 2px; color: #B7791F; }
.stars .icon { width: 20px; height: 20px; }
.quotes { display: grid; gap: 28px; }
.quote { margin: 0; display: grid; gap: 10px; align-content: start; padding-top: 18px; border-top: 2px solid var(--ink); }
.quote blockquote { margin: 0; font-size: 1.0625rem; }
.quote footer { color: var(--slate); }
.quote footer b { color: var(--ink); }
@media (min-width: 900px) { .quotes { grid-template-columns: repeat(3, 1fr); gap: 32px; } }
.rating-big { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rating-big .num { font-family: var(--display); font-weight: 800; font-size: 4rem; line-height: 1; font-variant-numeric: tabular-nums; }

/* Steps: genuine sequences, so they are numbered */
.steps-wrap { display: grid; gap: 40px; }
.steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 18px; counter-reset: s; }
.steps li { display: grid; grid-template-columns: 40px 1fr; gap: 14px; counter-increment: s; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--ink); font-family: var(--display); font-weight: 750; font-size: 1.25rem;
}
.steps.trade li::before { background: var(--mint); }
.steps.buy li::before { background: var(--marigold); }
.steps b { display: block; }
@media (min-width: 900px) { .steps-wrap { grid-template-columns: 1fr 1fr; gap: 64px; } }

/* Footer */
.foot { background: var(--ink); color: var(--paper); padding: 48px 0 32px; }
.foot a { color: var(--paper); }
.foot .cols { display: grid; gap: 28px; }
.foot h2 { color: var(--paper); font-size: 1.25rem; margin-bottom: 10px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot .small { margin-top: 36px; padding-top: 20px; border-top: 1px solid #3A4B5C; color: #C4D0DB; display: grid; gap: 6px; }
.foot .logo { color: var(--paper); }
@media (min-width: 900px) { .foot .cols { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }

/* ---------- Shop ---------- */

.shop-head { padding-block: 24px 8px; }
.shop-tools { position: sticky; top: var(--bar); z-index: 10; background: var(--paper); padding: 10px 0; border-bottom: 1px solid var(--line); }
.shop-tools .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.shop-tools .searchbox { grid-column: 1 / -1; }
.searchbox { position: relative; }
.searchbox .icon { position: absolute; left: 12px; top: 50%; translate: 0 -50%; color: var(--slate); pointer-events: none; }
.searchbox input { padding-left: 44px; }
.shop-body { display: grid; gap: 24px; padding-block: 20px 48px; }
.result-line { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-height: 40px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 4px 6px 4px 12px;
  border: 1.5px solid var(--ink); border-radius: var(--r-btn); background: var(--white); cursor: pointer; font-weight: 600;
}
.chip .icon { width: 18px; height: 18px; }
.filters { display: grid; gap: 24px; align-content: start; align-self: start; }
.filters fieldset { display: grid; gap: 4px; }
.filters legend { font-family: var(--display); font-weight: 700; font-size: 1.125rem; }
.check { display: flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--ink); margin: 0; }
.check .count { margin-left: auto; color: var(--slate); }
.sheet-head, .sheet-foot { display: none; }
@media (max-width: 899px) {
  .filters {
    position: fixed; inset: auto 0 0 0; z-index: 40; max-height: 88vh; overflow-y: auto;
    background: var(--paper); border-radius: var(--r-panel) var(--r-panel) 0 0;
    padding: 0 var(--gut) calc(16px + env(safe-area-inset-bottom));
    box-shadow: 0 -2px 0 var(--ink);
  }
  .filters:not(.open) { display: none; }
  .sheet-head { display: flex; justify-content: space-between; align-items: center; position: sticky; top: 0; background: var(--paper); padding: 12px 0; border-bottom: 1px solid var(--line); z-index: 1; }
  .sheet-foot { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; position: sticky; bottom: 0; background: var(--paper); padding: 12px 0 0; }
  .scrim { position: fixed; inset: 0; background: rgba(28, 43, 58, .5); z-index: 39; }
}
@media (min-width: 900px) {
  .shop-tools { position: static; border: 0; padding: 0; background: none; }
  .shop-tools .wrap { grid-template-columns: 1fr 240px; }
  .shop-tools .searchbox { grid-column: auto; }
  .shop-tools .filter-btn { display: none; }
  .shop-body { grid-template-columns: 240px 1fr; gap: 40px; }
  .scrim { display: none; }
}
.empty { padding: 32px 24px; background: var(--sky); border-radius: var(--r-md); display: grid; gap: 14px; justify-items: start; }
.sample-note { background: var(--sky); padding: 10px 0; }
.sample-note p { max-width: none; }

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

.crumbs { padding-block: 16px 12px; display: flex; flex-wrap: wrap; gap: 6px; color: var(--slate); }
.crumbs a { color: var(--slate); }
.product { display: grid; gap: 16px; padding-bottom: 32px; grid-template-areas: "title" "gallery" "buy"; }
.product > * { min-width: 0; }
.p-title { grid-area: title; }
.gallery { grid-area: gallery; }
.buy { grid-area: buy; }
.gallery .main { aspect-ratio: 4 / 5; }
@media (min-width: 900px) { .gallery .main { aspect-ratio: 3 / 4; } }
.gallery .main { width: 100%; padding: 0; cursor: zoom-in; }
.gallery .main img { pointer-events: none; -webkit-user-select: none; user-select: none; }
.gallery .main { touch-action: pan-y pinch-zoom; }
.stage { position: relative; }
.g-nav {
  position: absolute; top: 50%; translate: 0 -50%; width: 44px; height: 44px; border-radius: 50%;
  border: 2px solid var(--ink); background: rgba(255, 255, 255, .92); color: var(--ink);
  display: grid; place-items: center; cursor: pointer; z-index: 2;
}
.g-nav:hover { background: var(--marigold); }
.g-nav .icon { width: 22px; height: 22px; }
.g-prev { left: 10px; } .g-next { right: 10px; }
.g-count {
  position: absolute; right: 12px; bottom: 12px; z-index: 2; padding: 3px 10px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: .875rem; font-weight: 600; pointer-events: none;
}
.thumbs { display: flex; gap: 8px; margin-top: 10px; overflow-x: auto; padding: 3px; }
.thumbs button { flex: none; width: 60px; height: 60px; padding: 0; border: 1.5px solid var(--line); border-radius: var(--r-btn); background: var(--white); cursor: pointer; overflow: hidden; }
.thumbs button[aria-current="true"] { border: 2.5px solid var(--ink); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.gallery .hint { margin-top: 8px; }
.p-title h1 { font-size: 1.625rem; line-height: 1.15; font-weight: 700; font-stretch: 92%; }
.price-line { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 4px; }
.price-line .price { font-size: 2.5rem; }
.condition { margin-top: 24px; padding: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); display: grid; gap: 8px; }
.buy .actions { display: grid; gap: 10px; margin-top: 16px; }
.buy .grade { margin-top: 6px; }
.buy .actions .two { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 8px; }
.specs { margin: 0; display: grid; grid-template-columns: minmax(110px, 40%) 1fr; }
.specs dt, .specs dd { margin: 0; padding: 10px 0; border-bottom: 1px solid var(--line); }
.specs dt { color: var(--slate); padding-right: 12px; }
.detail-block { margin-top: 28px; }
.detail-block h2 { font-size: 1.375rem; margin-bottom: 8px; }
.collect { margin-top: 8px; padding: 14px; border: 1px solid var(--mint-line); border-radius: var(--r-md); background: var(--mint); display: grid; gap: 8px; }
.collect-head { display: flex; gap: 8px; align-items: flex-start; font-size: 1.125rem; line-height: 1.3; }
.collect-head .icon { width: 20px; height: 20px; color: var(--harbour); margin-top: 3px; flex: none; }
.collect-note { color: var(--ink); font-size: .9375rem; line-height: 1.4; }
.collect .btn { background: var(--white); }
.collect-mail { font-size: .9375rem; }
@media (min-width: 560px) { .buy .actions .two { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) {
  .product { grid-template-columns: 7fr 5fr; grid-template-rows: auto 1fr; grid-template-areas: "gallery title" "gallery buy"; gap: 18px 48px; padding-top: 8px; }
  .gallery { align-self: start; }
  .buy { position: sticky; top: calc(var(--bar) + 20px); align-self: start; }
  .p-title h1 { font-size: 2.125rem; }
}
.sold { background: var(--sky); border-radius: var(--r-panel); padding: 28px 20px 28px; display: grid; gap: 14px; margin: 16px 0 8px; }
.sold-art { position: relative; height: 96px; }
.sold-art .tag { left: 24px; right: auto; top: 0; }
@media (min-width: 900px) { .sold { grid-template-columns: 200px 1fr; padding: 40px; align-items: center; } }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 60; background: #101A24; color: var(--paper); display: grid; grid-template-rows: auto 1fr auto; }
.lb[hidden] { display: none; }
.lb-top { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 20px; }
.lb-close { min-height: 48px; padding: 8px 16px; border: 2px solid var(--paper); border-radius: var(--r-btn); background: transparent; color: var(--paper); font-weight: 650; display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.lb-close:hover { background: rgba(255, 255, 255, .1); }
.lb :focus-visible { outline-color: var(--marigold); }
.lb-stage { position: relative; overflow: hidden; touch-action: none; display: grid; place-items: center; user-select: none; }
.lb-track { display: flex; height: 100%; width: 100%; }
.lb-img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: 0 0; will-change: transform; -webkit-user-drag: none; }
.lb-img.anim { transition: transform .22s ease-out; }
.lb-nav { position: absolute; top: 50%; translate: 0 -50%; width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--paper); background: rgba(16, 26, 36, .6); color: var(--paper); display: none; place-items: center; cursor: pointer; }
.lb-prev { left: 16px; } .lb-next { right: 16px; }
.lb-thumbs { display: flex; gap: 8px; justify-content: center; overflow-x: auto; padding: 12px 12px calc(14px + env(safe-area-inset-bottom)); }
.lb-thumbs button { flex: none; width: 56px; height: 56px; padding: 0; border: 2px solid transparent; border-radius: var(--r-btn); background: var(--white); opacity: .6; cursor: pointer; overflow: hidden; }
.lb-thumbs button[aria-current="true"] { border-color: var(--marigold); opacity: 1; }
.lb-thumbs img { width: 100%; height: 100%; object-fit: contain; }
@media (hover: hover) and (pointer: fine) { .lb-nav { display: grid; } }
@media (prefers-reduced-motion: no-preference) {
  .lb:not([hidden]) { animation: lb-in .18s ease-out; }
  @keyframes lb-in { from { opacity: 0; } }
}

/* ---------- Trade-in ---------- */

.ti-hero { padding-block: 32px 8px; }
.ti-hero h1 { max-width: 16ch; }
.ti-hero p { margin-top: 14px; font-size: 1.125rem; }
.ti-cats { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.ti-cats button {
  width: 100%; display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 8px 12px;
  border: 1.5px solid var(--mint-line); border-radius: var(--r-btn); background: rgba(255, 255, 255, .55); cursor: pointer; text-align: left; font-weight: 600;
}
.ti-cats button:hover { background: var(--white); border-color: var(--ink); }
@media (min-width: 900px) { .ti-cats { grid-template-columns: repeat(4, 1fr); } }
.ti-main { display: grid; gap: 28px; padding-block: 32px 48px; }
.ti-art { position: relative; height: 200px; }
.ti-art .your-item { width: 160px !important; }
@media (min-width: 900px) { .ti-art .your-item { width: 230px !important; } }
.ti-form { background: var(--white); border-radius: var(--r-panel); padding: 24px 18px; display: grid; gap: 22px; border: 1.5px solid var(--mint-line); }
.ti-form h2 { font-size: 1.625rem; }
.ti-alt { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.faq details { border-top: 1.5px solid var(--ink); }
.faq details:last-child { border-bottom: 1.5px solid var(--ink); }
.faq summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0; cursor: pointer; font-weight: 650; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { transition: rotate .15s; }
.faq details[open] summary .icon { rotate: 180deg; }
.faq details p { padding: 0 0 18px; }
@media (min-width: 900px) {
  .ti-main { grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
  .ti-art { height: 340px; position: sticky; top: calc(var(--bar) + 24px); }
  .ti-form { padding: 36px; }
}

/* ---------- Contact, reviews, privacy ---------- */

.page-head { padding-block: 32px 8px; }
.page-head p { margin-top: 12px; font-size: 1.125rem; }
.contact-grid { display: grid; gap: 32px; padding-block: 24px 48px; }
.contact-actions { display: grid; gap: 12px; max-width: 420px; }
.facts { margin: 0; display: grid; gap: 18px; }
.facts dt { font-family: var(--display); font-weight: 700; font-size: 1.125rem; }
.facts dd { margin: 4px 0 0; }
.map { border-radius: var(--r-md); overflow: hidden; background: var(--sky); min-height: 300px; display: grid; }
.map iframe { width: 100%; height: 100%; min-height: 360px; border: 0; }
.map .placeholder { display: grid; align-content: center; justify-items: start; gap: 12px; padding: 24px; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: 1fr 1.2fr; gap: 56px; } }
.prose { padding-block: 8px 56px; display: grid; gap: 14px; }
.prose h2 { font-size: 1.5rem; margin-top: 18px; }
.feedback-line { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 20px; padding: 18px; background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md); }
.attrib { color: var(--slate); }

/* Hero tags hang off the photo's corner rather than covering it. */
.hang .tag { right: -14px; top: -6px; --string: 30px; }
.hang .tag-md .tag-body { min-width: 68px; padding: 19px 9px 8px; }
.hang .tag-md .price { font-size: 1.25rem; }
@media (min-width: 900px) {
  .hang .tag { right: -22px; --string: 40px; }
  .hang .tag-md .tag-body { min-width: 96px; padding: 22px 14px 10px; }
  .hang .tag-md .price { font-size: 1.875rem; }
}

/* Category tiles on the rack while the live site has no synced listings yet */
.cat-photo { display: grid; place-items: center; background: var(--paper); color: var(--harbour); }
.cat-photo > .icon { width: 44%; height: 44%; stroke-width: 1.25; }
.hang .tag-empty .tag-body { min-width: 0; padding: 19px 10px 8px; }
.hang .tag-empty .tag-note { font-size: 1rem; display: block; max-width: 8ch; }
.cat-photo .tag { right: -10px; }
@media (min-width: 900px) { .hang .tag-empty .tag-note { font-size: 1.25rem; max-width: none; white-space: nowrap; } .hang .tag-empty .tag-body { padding: 22px 14px 10px; } }
