:root {
  --navy: #12233A;
  --navy-2: #1B3252;
  --navy-3: #0C1826;
  --amber: #F2A413;
  --amber-2: #FFBE3D;
  --paper: #F7F8FA;
  --line: rgba(18, 35, 58, 0.10);
  --ink: #12233A;
  --ink-2: #4A5A72;
  --ink-3: #7B8AA1;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(18,35,58,.06), 0 8px 24px rgba(18,35,58,.07);
  --shadow-lift: 0 2px 4px rgba(18,35,58,.08), 0 16px 40px rgba(18,35,58,.14);
  --font: "Public Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --display: "Bricolage Grotesque", "Public Sans", -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap { width: min(1240px, 100% - 48px); margin-inline: auto; }

/* ---------- header ---------- */
header.site {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 40;
  box-shadow: 0 1px 0 rgba(255,255,255,.06);
}
.bar { display: flex; align-items: center; gap: 22px; height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.brand img { height: 34px; width: auto; display: block; }

.search {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,.09);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 999px;
  padding: 0 18px;
  height: 44px;
  transition: background .15s, border-color .15s;
}
.search:focus-within { background: rgba(255,255,255,.15); border-color: var(--amber); }
.search svg { width: 17px; height: 17px; flex: 0 0 auto; opacity: .7; }
.search input {
  flex: 1;
  background: none;
  border: 0;
  outline: 0;
  color: #fff;
  font-size: 15px;
  font-family: inherit;
}
.search input::placeholder { color: rgba(255,255,255,.5); }

.count { font-size: 13px; color: rgba(255,255,255,.62); white-space: nowrap; }

/* ---------- category rail ---------- */
nav.cats { background: var(--navy-2); }
nav.cats .wrap { display: flex; gap: 6px; overflow-x: auto; padding: 10px 0; scrollbar-width: none; }
nav.cats .wrap::-webkit-scrollbar { display: none; }
.chip {
  flex: 0 0 auto;
  border: 1px solid rgba(255,255,255,.16);
  background: transparent;
  color: rgba(255,255,255,.82);
  font: 500 13.5px/1 var(--font);
  padding: 9px 15px;
  border-radius: 999px;
  cursor: pointer;
  white-space: nowrap;
  transition: .15s;
}
.chip:hover { background: rgba(255,255,255,.1); color: #fff; }
.chip[aria-pressed="true"] { background: var(--amber); border-color: var(--amber); color: var(--navy-3); font-weight: 650; }

/* ---------- hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 55%, #24446F 100%);
  color: #fff;
  padding: 56px 0 60px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute; inset: auto -80px -160px auto;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(242,164,19,.30), transparent 68%);
}
.hero h1 { font-family: var(--display); font-weight: 800; margin: 0 0 14px; font-size: clamp(30px, 4.4vw, 50px); line-height: 1.04; letter-spacing: -.025em; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--amber); }
.hero p { margin: 0; font-size: 17px; line-height: 1.55; color: rgba(255,255,255,.76); max-width: 58ch; }
.hero .stats { display: flex; gap: 34px; margin-top: 30px; flex-wrap: wrap; }
.hero .stats div span { display: block; font-family: var(--display); font-size: 27px; font-weight: 800; letter-spacing: -.02em; color: var(--amber); }
.hero .stats div small { font-size: 12.5px; color: rgba(255,255,255,.58); letter-spacing: .04em; text-transform: uppercase; }

.hero .wrap { position: relative; z-index: 1; }
.hero-art { display: none; }
@media (min-width: 1020px) {
  .hero .wrap {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
    gap: 48px;
    align-items: center;
  }
  .hero-art {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .hero-tile {
    aspect-ratio: 300 / 220;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 16px 34px rgba(4, 14, 28, .36);
    border: 1px solid rgba(255,255,255,.12);
  }
  .hero-tile:nth-child(2) { transform: translateY(-18px); }
  .hero-tile:nth-child(4) { transform: translateY(14px); }
  .hero-tile:nth-child(6) { transform: translateY(-10px); }
  .hero-tile svg { width: 100%; height: 100%; display: block; }
}

/* ---------- toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 26px 0 16px; }
.toolbar h2 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -.02em; }
.toolbar .spacer { flex: 1; }
.seg { display: flex; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 4px; }
.seg button {
  border: 0; background: none; cursor: pointer;
  font: 500 13px/1 var(--font); color: var(--ink-2);
  padding: 8px 14px; border-radius: 999px; transition: .15s;
}
.seg button:hover { color: var(--ink); }
.seg button[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* ---------- grid ---------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
  gap: 22px;
  padding-bottom: 64px;
}

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }

.art { position: relative; aspect-ratio: 4 / 3; display: block; }
.art svg { width: 100%; height: 100%; display: block; }
.art .cat {
  position: absolute; left: 12px; top: 12px;
  background: rgba(255,255,255,.92);
  color: var(--ink);
  font: 600 11px/1 var(--font);
  letter-spacing: .04em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 6px;
}

.body { padding: 16px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.body h3 { margin: 0; font-family: var(--display); font-weight: 700; font-size: 16px; line-height: 1.26; letter-spacing: -.017em; }
.body p { margin: 0; font-size: 13.2px; line-height: 1.5; color: var(--ink-2); }
.price { margin-top: auto; padding-top: 6px; font-size: 14px; color: var(--ink-3); }
.price b { color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 700; letter-spacing: -.02em; }

.buys { display: grid; gap: 8px; padding: 0 16px 16px; }
.buy {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border-radius: 10px; padding: 11px 14px;
  font: 650 13.5px/1 var(--font);
  border: 1px solid transparent; cursor: pointer; transition: .15s;
}
.buy small { font-weight: 500; opacity: .72; font-size: 11.5px; }
.buy.amazon { background: var(--amber); color: var(--navy-3); }
.buy.amazon:hover { background: var(--amber-2); }
.buy.ebay { background: #fff; color: var(--ink); border-color: var(--line); }
.buy.ebay:hover { border-color: var(--ink-3); }

.empty { padding: 70px 0; text-align: center; color: var(--ink-2); }
.empty b { display: block; font-family: var(--display); font-weight: 700; font-size: 19px; color: var(--ink); margin-bottom: 6px; }

/* ---------- disclosure + footer ---------- */
.disclosure {
  background: rgba(242, 164, 19, 0.07);
  border: 1px solid rgba(242, 164, 19, 0.28);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 8px 0 34px;
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-2);
}
.disclosure b { color: var(--ink); }

footer.site { background: var(--navy-3); color: rgba(255,255,255,.62); padding: 44px 0 52px; font-size: 13.5px; line-height: 1.7; }
footer.site .wrap { display: grid; gap: 26px; grid-template-columns: 1.4fr 1fr 1fr; }
footer.site img { height: 30px; margin-bottom: 12px; }
footer.site h4 { margin: 0 0 10px; color: #fff; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
footer.site a:hover { color: var(--amber); }
footer.site .fine { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.1); padding-top: 20px; font-size: 12.5px; color: rgba(255,255,255,.45); }

@media (max-width: 860px) {
  .bar { height: auto; padding: 14px 0; flex-wrap: wrap; }
  .search { order: 3; flex-basis: 100%; }
  .count { display: none; }
  footer.site .wrap { grid-template-columns: 1fr; }
}

/* ================= card as a link (on-site first) ================= */

.card { color: inherit; text-decoration: none; }
.art { aspect-ratio: 300 / 220; }

.card-foot {
  margin-top: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
}
.srcs { display: flex; gap: 6px; }
.src {
  font: 600 11px/1 var(--font);
  letter-spacing: .03em; text-transform: uppercase;
  padding: 5px 8px; border-radius: 5px;
  background: var(--paper-2, #f1f3f7); color: var(--ink-3);
  border: 1px solid var(--line);
}
.src.amazon { background: rgba(242,164,19,.14); border-color: rgba(242,164,19,.4); color: #7a5405; }
.go { font: 650 13px/1 var(--font); color: var(--ink-2); white-space: nowrap; }
.card:hover .go { color: var(--ink); }

/* ================= product detail page ================= */

header.site .back { font: 600 13.5px/1 var(--font); color: rgba(255,255,255,.8); }
header.site .back:hover { color: var(--amber); }

.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: 13px; color: var(--ink-3); padding: 26px 0 18px;
}
.crumbs a { color: var(--ink-2); }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.crumbs b { color: var(--ink); font-weight: 600; }

.detail-grid { display: grid; gap: 30px; align-items: start; }

.detail-art {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 300 / 220;
}
.detail-art svg { width: 100%; height: 100%; display: block; }
.detail-art .cat {
  position: absolute; left: 14px; top: 14px;
  background: rgba(255,255,255,.93); color: var(--ink);
  font: 600 11px/1 var(--font);
  letter-spacing: .04em; text-transform: uppercase;
  padding: 7px 10px; border-radius: 6px;
}

.detail-copy h1 {
  margin: 0 0 10px; font-family: var(--display);
  font-weight: 800; font-size: clamp(27px, 3.4vw, 40px);
  line-height: 1.1; letter-spacing: -.028em;
}
.detail-copy .lead { margin: 0 0 22px; font-size: 16.5px; line-height: 1.6; color: var(--ink-2); }

.price-block { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 16px 0; margin-bottom: 20px; }
.price-block .price { font-size: 15px; color: var(--ink-3); }
.price-block .price b { font-family: var(--display); font-size: 30px; font-weight: 700; color: var(--ink); letter-spacing: -.025em; }
.price-block small { display: block; margin-top: 7px; font-size: 12.5px; line-height: 1.5; color: var(--ink-3); }

.detail-copy .buys { padding: 0; gap: 10px; }
.detail-copy .buy { padding: 14px 18px; font-size: 14.5px; }

.how { margin-top: 24px; background: var(--paper-2, #f5f6f9); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.how h3 { margin: 0 0 8px; font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: -.01em; }
.how p { margin: 0; font-size: 13.6px; line-height: 1.62; color: var(--ink-2); }
.how b { color: var(--ink); }

.note { margin: 36px 0 0; max-width: 62ch; }
.note h2, .related h2 {
  font-family: var(--display); font-weight: 700;
  font-size: 20px; letter-spacing: -.018em; margin: 0 0 12px;
}
.note p { margin: 0; font-size: 15.5px; line-height: 1.65; color: var(--ink-2); }

.related { margin: 44px 0 34px; }
.rel-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.rel {
  display: flex; flex-direction: column; gap: 10px;
  color: inherit; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; background: #fff; transition: .15s;
}
.rel:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
.rel-art { aspect-ratio: 300 / 220; }
.rel-art svg { width: 100%; height: 100%; display: block; }
.rel > div:last-child { padding: 0 13px 14px; display: flex; flex-direction: column; gap: 3px; }
.rel b { font-family: var(--display); font-weight: 700; font-size: 14px; line-height: 1.3; letter-spacing: -.012em; }
.rel span { font-size: 12.5px; color: var(--ink-3); }

@media (min-width: 900px) {
  .detail-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 44px; }
  .crumbs { padding: 34px 0 22px; }
}

/* ---------------------------------------------- own-inventory (wholesale)
 * Third rail. Unlike the Amazon and eBay buttons this one does not leave the
 * site: we hold the stock and Stripe takes the payment here. It is styled as
 * the primary action because an on-site sale is worth far more than a ~3%
 * marketplace commission. Zero products use it yet. */
.buy.direct {
  background: var(--amber);
  border-color: var(--amber);
  color: var(--navy);
}
.buy.direct span { color: var(--navy); }
.buy.direct small { color: rgba(18, 35, 58, .72); }

/* Stock we own but cannot sell yet: no Stripe link on the record. Rendered
 * flat and unclickable rather than as a button that goes nowhere. */
.buy.direct.pending {
  background: rgba(18, 35, 58, .05);
  border-color: rgba(18, 35, 58, .16);
  cursor: not-allowed;
}
.buy.direct.pending span { color: rgba(18, 35, 58, .62); }
.buy.direct.pending small { color: rgba(18, 35, 58, .45); }

.src.wholesale {
  background: rgba(242, 164, 19, .16);
  color: #8a5b00;
}

/* A real photograph only ever appears on own-inventory items, where we hold
 * the distribution rights. It has to fill the same box the generated SVG
 * occupies, hence the matching aspect ratio upstream. */
.card .art img,
.detail-art img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
