/* ==========================================================================
   Shop: /shop and /shop/<item>. Generated by _baseline/tools/build_shop.py.
   Uses the tokens in styles.css; nothing here defines a new color family.
   Product photos sit in white wells: they are listing shots, mostly on light
   backdrops, and read as cut-outs against the black page.
   ========================================================================== */

/* --- Index ---------------------------------------------------------------- */
.shop-hero { padding-bottom: 32px; }
.shop-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin-bottom: 12px; }
.shop-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.shop-pill {
  display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: 8px 16px;
  font: inherit; font-size: 16px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.shop-pill span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.shop-pill:hover { border-color: var(--blue); }
.shop-pill[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: var(--btn-ink); }
.shop-pill[aria-pressed="true"] span { color: var(--btn-ink); }
.shop-pill:focus-visible, .shop-thumb:focus-visible, .shop-card a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

.shop-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.shop-check { display: inline-flex; align-items: center; gap: .5em; min-height: 44px; font-size: 16px; cursor: pointer; }
.shop-check input { width: 20px; height: 20px; accent-color: var(--blue); }
.shop-sort { display: inline-flex; align-items: center; gap: .6em; font-size: 16px; color: var(--muted); }
.shop-sort select {
  min-height: 44px; padding: 8px 12px; font: inherit; font-size: 16px;
  color: var(--ink); background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.shop-count { font-size: 15px; color: var(--muted); margin: 0 0 20px; }
.shop-empty { text-align: center; color: var(--muted); padding: 40px 0; }
.shop-reset { font: inherit; color: var(--blue); background: none; border: 0; text-decoration: underline; cursor: pointer; padding: 0 0 0 .3em; }

.shop-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.shop-card { margin: 0; font-size: inherit; }
.shop-card a {
  display: flex; flex-direction: column; height: 100%; color: var(--ink); text-decoration: none;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  transition: border-color .15s, transform .15s;
}
.shop-card a:hover { border-color: var(--blue); transform: translateY(-2px); }
.shop-card__img { display: block; aspect-ratio: 1; max-width: 100%; background: #fff; }
.shop-card__img img { width: 100%; height: 100%; object-fit: contain; }
.shop-card__body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; flex: 1; }
.shop-card__line { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); min-height: 1.5em; }
.shop-card__title {
  margin: 0; font-family: var(--font); font-weight: 400; font-size: 16px; line-height: 1.4; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.shop-card__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; margin-top: auto; padding-top: 6px; }
.shop-card__price { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.shop-card__fmt { font-size: 13px; color: var(--muted); }
.shop-badge {
  margin-left: auto; padding: 2px 8px; font-size: 13px; font-weight: 600; letter-spacing: .03em;
  color: var(--blue); border: 1px solid var(--blue); border-radius: 6px; white-space: nowrap;
}
.shop-cta { margin-top: 56px; padding: 32px; text-align: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.shop-cta p { color: var(--muted); margin: 0; }
.shop-cta .btn-row { justify-content: center; }

.shop-crumbs--center { justify-content: center; margin-bottom: 12px; }
.shop-browse { margin-top: 56px; }
.shop-browse h2 { font-size: 24px; text-align: center; }
.shop-browse ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.shop-browse li { margin: 0; font-size: 16px; }
.shop-browse a {
  display: inline-flex; align-items: center; gap: .45em; min-height: 44px; padding: 8px 16px;
  color: var(--ink); text-decoration: none; background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; transition: border-color .15s;
}
.shop-browse a span { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.shop-browse a:hover, .shop-browse a[aria-current="page"] { border-color: var(--blue); }
.shop-browse a[aria-current="page"] { background: var(--blue); color: var(--btn-ink); }
.shop-browse a[aria-current="page"] span { color: var(--btn-ink); }
.shop-cta--empty { margin-top: 0; }

/* --- Item ----------------------------------------------------------------- */
.shop-item { padding-top: 32px; }
.shop-crumbs { display: flex; gap: .5em; font-size: 15px; color: var(--muted); margin-bottom: 20px; }
.shop-crumbs a { color: var(--muted); }
.shop-crumbs a:hover { color: var(--blue); }
.shop-item__grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 48px; align-items: start; }

.shop-gallery__main { aspect-ratio: 1; max-width: 100%; background: #fff; border-radius: var(--radius-lg); overflow: hidden; }
.shop-gallery__main img { width: 100%; height: 100%; object-fit: contain; }
.shop-gallery__thumbs { list-style: none; margin: 12px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.shop-gallery__thumbs li { margin: 0; }
.shop-thumb { display: block; width: 100%; aspect-ratio: 1; padding: 0; background: #fff; border: 2px solid transparent; border-radius: 8px; overflow: hidden; cursor: pointer; opacity: .7; transition: opacity .15s, border-color .15s; }
.shop-thumb img { width: 100%; height: 100%; object-fit: contain; }
.shop-thumb:hover { opacity: 1; }
.shop-thumb[aria-current="true"] { border-color: var(--blue); opacity: 1; }

.shop-buy { position: sticky; top: calc(var(--header-h) + 16px); }
.shop-line { font-size: 14px; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); margin: 0 0 .4em; }
.shop-line a { color: inherit; text-decoration: none; }
.shop-line a:hover { text-decoration: underline; }
.shop-title { font-size: 28px; line-height: 1.35; text-wrap: balance; margin-bottom: .6em; }
.shop-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 20px; }
.shop-price__label { flex-basis: 100%; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.shop-price__amount { font-size: 40px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.shop-price__offer { font-size: 16px; color: var(--muted); }
.shop-ebay { min-height: 56px; font-size: 20px; font-weight: 600; }
.shop-note { font-size: 15px; color: var(--muted); margin: 12px 0 24px; }
.shop-facts { margin: 0; border-top: 1px solid var(--line); }
.shop-fact { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
.shop-fact dt { color: var(--muted); }
.shop-fact dd { margin: 0; }

.shop-desc { max-width: 760px; margin-top: 56px; }
.shop-desc h2, .shop-related h2 { font-size: 28px; }
.shop-desc p, .shop-desc li { color: var(--muted); }
.shop-desc strong { color: var(--ink); }
.shop-related .shop-card__title { font-size: 15px; }
.shop-more { text-align: center; margin-top: 32px; }

/* --- Responsive ----------------------------------------------------------- */
@media (max-width: 1100px) {
  .shop-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  /* Four related pieces in three columns leaves one stranded; show three. */
  .shop-related .shop-card:nth-child(4) { display: none; }
}
@media (max-width: 900px) {
  .shop-related .shop-card:nth-child(4) { display: block; }
}
@media (max-width: 900px) {
  .shop-item__grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .shop-buy { position: static; }
  .shop-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
}
@media (max-width: 600px) {
  /* nowrap matters: a WRAPPING flex column sizes itself to its widest item,
     which is the unbroken pill row, and the page scrolled sideways at 800px. */
  .shop-tools { flex-direction: column; flex-wrap: nowrap; align-items: stretch; }
  .shop-pills, .shop-controls { min-width: 0; }
  .shop-pills { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
  .shop-pill { flex: none; }
  .shop-controls { justify-content: space-between; }
  .shop-card__body { padding: 10px 12px 12px; }
  .shop-card__title { font-size: 15px; }
  .shop-card__price { font-size: 18px; }
  .shop-badge { margin-left: 0; }
  .shop-title { font-size: 22px; }
  .shop-price__amount { font-size: 34px; }
  .shop-cta { padding: 24px 16px; }
}

/* --- Sold / no longer available ------------------------------------------- */
.shop-item--sold .shop-gallery__main { position: relative; }
.shop-item--sold .shop-gallery__main img { opacity: .82; }
.shop-sold-badge {
  position: absolute; top: 16px; left: 16px; z-index: 1; padding: 6px 14px;
  font-size: 15px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; background: rgba(0, 0, 0, .78); border: 1px solid var(--line); border-radius: 6px;
}
.shop-price__amount--sold { font-size: 32px; color: var(--muted); }
.shop-sold-actions { display: grid; gap: 10px; margin: 0 0 24px; }
.shop-card--sold .shop-card__img img { opacity: .75; }
