/* the shop page (prints.html + shop.js). Loaded after style.css; colours are style.css tokens, except the two dark tile fills the
   design gate set (11-08): the poster vanished on --raised, so dark product tiles are paper and the empty tile one step up from the ground */
.vh, .shop .opts legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* a little wider than the reading column; the lockup keeps to the same left edge. Header: lockup, bag, then the theme circle */
.shop .top, .shop .doc { max-width: 760px; }
.shop .bagcount { position: static; margin: 0 12px 0 auto; }
.shop .doc { padding-top: 16px; }

/* the tiles: 3 across, 2 on a phone (the placeholder takes the 3rd place). Each tile is a column whose action sits at the
   bottom, so the rows' "Choose a size" / "Add to bag" line up across a row (rows are equal height in a grid) */
.shop #wares, .shop .static { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px 24px; margin: 24px 0 0; }
.shop #wares:empty { display: none; } /* the fallback: the static cards start where the live ones would */
.shop.live .static { display: none; } /* style.css hides it with .live .static; restated after the grid rule */
.shop .item { margin: 0; display: flex; flex-direction: column; font-size: var(--t-s); line-height: 1.35; }
.shop .item img { aspect-ratio: 1; width: 100%; height: auto; object-fit: contain; background: var(--ink1); } /* dark: #F2EEE7 paper */
html[data-theme="light"] .shop .item img { background: #F8F5EF; border: 1px solid #17130F; box-sizing: border-box; } /* Jack 11-08: light only, cream tile with a thin ink outline */
.shop .item img { box-sizing: border-box; border: 1px solid transparent; transition: background-color .25s, border-color .25s; }
html .shop .item img.inv { background: #17130F; border-color: #F2EEE7; } /* Jack 11-09: White selected = the inverse tile, both modes; only the photo flips */
@media (prefers-reduced-motion: reduce) { .shop .item img { transition: none; } }
.shop figcaption { flex: 1; display: flex; flex-direction: column; align-items: flex-start; margin-top: 10px; font-size: var(--t-s); }
.shop .static figcaption { display: block; }
.shop #wares figcaption b { display: block; }
.shop .price { display: block; color: var(--ink2); font-variant-numeric: lining-nums tabular-nums; }
.shop .opts { flex-wrap: wrap; column-gap: 7px; margin: 2px 0 0; } /* 8 tee sizes (S to 5XL) on one row on desktop */
/* 40px tall, as wide as the word; the hidden radio reaches half the gap either side, so the whole row is tappable */
.shop .opts label { min-width: 0; min-height: 40px; padding: 0; justify-content: flex-start; }
.shop .opts input { inset: 0 -3px; }
.shop .opts label:not(.sw label) { font-size: 14px; }
.shop .add, .shop .add:disabled { margin-top: auto; min-height: 40px; color: var(--ink1); }

/* the shirt colour: two 14px swatches on the price line, 40px hits; the chosen one is ringed */
.shop .row { display: flex; align-items: center; justify-content: space-between; align-self: stretch; }
.shop .opts.sw { margin: -10px -10px -10px 0; column-gap: 0; flex-wrap: nowrap; } /* the last ring ends on the tile edge */
.shop .opts.sw label { width: 40px; min-width: 40px; justify-content: center; }
.shop .opts.sw input { inset: 0; }
.shop .dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--ink2); box-sizing: border-box; text-decoration: none; } /* #27: a visible ring in both modes */
.shop .dot.black { background: #080808; } /* the shirt colours themselves (Fourthwall's swatches), not page colours */
.shop .dot.white { background: #FFFFFF; }
.shop .opts.sw input:checked + .dot { box-shadow: 0 0 0 2px var(--ground), 0 0 0 3.5px var(--ink1); }

/* the empty third tile: two lines */
.shop .more { align-self: start; aspect-ratio: 1; background: #1E1B17; display: flex; align-items: center; justify-content: center; padding: 0 16px; text-align: center;
  text-wrap: balance; color: var(--ink3); font-size: var(--t-s); font-style: italic; user-select: none; }
.shop .more small { display: block; margin-top: 4px; font-size: var(--t-xs); opacity: .75; } /* the quieter second line */
html[data-theme="light"] .shop .more { background: var(--raised); }

@media (max-width: 639px) {
  .shop #wares, .shop .static { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 16px; }
  .shop .opts { column-gap: 8px; } /* 7 tee sizes at 14px need 168px of the 171px tile */
  .shop .opts label { font-size: 14px; }
  .shop .opts input { inset: 0 -4px; } /* half the narrower gap */
}
.js .shop:not(.live):not(.dead) .static { visibility: hidden; } /* #25: no flash of the static cards' close crop before the live tiles; they show only if the live shop fails (or without JS) */
/* phone: S to 5XL won't fit one row in a 171px tile, so sizes sit in even rows of four (never one size alone) */
@media (max-width: 639px) { .shop .opts[data-k="s"] { display: grid; grid-template-columns: repeat(4, max-content); column-gap: 10px; } }
/* sold out (12-03): the size is struck and dim, and its button says so in the accent */
.shop .opts input.out + span { text-decoration: line-through; opacity: .45; }
.shop .add.out, .shop .add.out:disabled { color: var(--lit); }
