/* The shop page. It borrows the collection page's cards, tabs and tiles
   (collection.css) and adds only what selling needs: a price, a buy button,
   the numbered set, and the list of purchases. */

/* ---- the part being looked at ---- */
.shop-kind { margin: 0 0 8px; min-height: 18px; font-size: 13px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.shop-kind b { font-weight: 800; color: var(--tier, var(--accent)); }
.shop-buy { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; margin-top: 24px; }
.shop-price { min-width: 96px; font-size: 40px; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.shop-price small { display: block; margin-top: 6px; font-size: 13px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.shop-buy .button { width: auto; min-width: 210px; margin-top: 0; padding: 0 28px; }
.shop-fine { margin: 18px 0 0; max-width: 460px; font-size: 13px; line-height: 1.55; color: var(--muted); }
/* A payment begun and not finished: finish it, or give its copy back. */
.shop-open { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; max-width: 460px; margin-top: 14px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 16px; font-size: 14px; line-height: 1.45; color: var(--soft); }
.shop-open[hidden] { display: none; }
.shop-open span { flex: 1 1 100%; }
.shop-open-go { padding: 0; border: 0; background: none; font: inherit; font-weight: 800; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.shop-open-go:hover { color: var(--accent-bright); }
.shop-open-go:disabled { color: var(--muted); cursor: default; }

/* ---- a price on a tile ---- */
.shop-tag { font-size: 13px; font-weight: 800; color: var(--text); }
.shop-tag.mine { color: var(--accent); }
.shop .col-tile.locked .look { filter: none; } /* in the shop nothing is greyed out: it is all there to be looked at */
.shop .col-tile.locked .col-tile-name { color: var(--text); }

/* ---- limited sets ----
   The label itself (.limited-label) is in collection.css, which this page loads too. */
.shop-kind .limited-label { margin-right: 4px; vertical-align: 1px; }
.shop-limited-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.shop-limited .shop-group { margin: 24px 0 0; font-size: 12px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.shop-limited .shop-set { margin-top: 12px; }

/* ---- the numbered set ---- */
/* Six parts: one row on a wide screen, two rows of three on a middling one, three rows of two on a phone. Never a lone one left over. */
.shop-set { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.shop-edition {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 20px 12px 16px;
  border: 2px solid transparent; border-radius: 22px;
  background: var(--field); color: var(--text);
  font: inherit; text-align: center;
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}
.shop-edition:hover { transform: translateY(-2px); background: #20202a; }
.shop-edition[aria-pressed='true'] { border-color: var(--accent); background: #1d1a2c; }
.shop-edition .look { margin-bottom: 8px; }
/* As on the tiles: the name takes the room that is left, so the price and the count under it are level across a row. */
.shop-edition-name { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 800; line-height: 1.2; text-wrap: balance; }
.shop-edition-left { font-size: 12px; font-weight: 700; color: var(--muted); }
.shop-edition-left.low { color: #fde68a; }

/* ---- your purchases ---- */
.shop-orders { margin-top: 18px; }
.shop-order { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding: 14px 0; border-top: 1px solid var(--line); font-size: 15px; }
.shop-order:first-child { border-top: 0; }
.shop-order-name { flex: 1 1 200px; font-weight: 800; }
.shop-order-name small { margin-left: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
.shop-order-when, .shop-order-price { color: var(--soft); }
.shop-order-price { min-width: 64px; text-align: right; font-weight: 700; }
.shop-order.back .shop-order-name, .shop-order.back .shop-order-price { color: var(--muted); text-decoration: line-through; }

/* ---- the part that was bought ---- */
.col-overlay .col-reveal:first-child { margin-top: 0; }

@media (max-width: 1040px) {
  .shop-set { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .shop-set { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .shop-edition { padding: 16px 8px 14px; }
  .shop-buy .button { flex: 1 1 100%; }
  .shop-price { font-size: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .shop-edition { transition: none; }
}
