/* ============================================================
   Mirio Shop — picks strips, shop page and homepage promo banners (assets/js/picks.js).
   Strips sit on pages with very different themes (dark homepage, light Track Race landing),
   so colours derive from the page's own text colour instead of fixed tokens.
   ============================================================ */

.picks {
  --pk-line: color-mix(in srgb, currentColor 14%, transparent);
  --pk-card: color-mix(in srgb, currentColor 5%, transparent);
  --pk-dim: color-mix(in srgb, currentColor 66%, transparent);
  --pk-accent: var(--brand, #f2682c);
  padding: clamp(36px, 6vw, 64px) 16px;
}
.picks[hidden] { display: none; }
.picks-inner { max-width: 1180px; margin: 0 auto; }

.picks-head {
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between;
  gap: 12px 24px; margin-bottom: 20px;
}
.picks-eyebrow {
  display: block; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--pk-accent); margin-bottom: 6px;
}
.picks-title { margin: 0; font-size: clamp(1.45rem, 2.6vw, 2rem); line-height: 1.1; color: inherit; }
.picks-blurb { margin: 8px 0 0; color: var(--pk-dim); font-weight: 600; max-width: 60ch; }
.picks-more {
  display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .92rem;
  color: inherit; text-decoration: none; padding: 9px 14px; border-radius: 10px;
  border: 1px solid var(--pk-line);
}
.picks-more:hover { border-color: var(--pk-accent); color: var(--pk-accent); }

/* Every product card on the site is one small size: a short row with a 76px photo on the left,
   about 273 x 100px at most (the size of the Connect 4 picks on the homepage). Phones swipe a row
   of them; wider screens lay them out without stretching them past that size. */
.picks-row {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(273px, 80%);
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px;
  -webkit-overflow-scrolling: touch; scrollbar-width: thin;
}
@media (min-width: 1000px) {
  .picks-row { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 273px)); overflow: visible; }
}
.picks-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 273px)); }

.pick {
  display: flex; flex-direction: row; align-items: stretch; scroll-snap-align: start;
  max-width: 273px; min-width: 0;
  border-radius: 12px; overflow: hidden; text-decoration: none; color: inherit;
  background: var(--pk-card); border: 1px solid var(--pk-line);
  transition: transform .2s, border-color .2s, box-shadow .2s;
}
.pick:hover { transform: translateY(-3px); border-color: var(--pk-accent); box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.pick:focus-visible { outline: 3px solid var(--pk-accent); outline-offset: 2px; }
/* Retailer photos are shot on white, so the image tile is always white. */
.pick-img { display: block; width: 76px; flex: none; background: #fff; padding: 6px; }
.pick-img img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pick-body { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; flex: 1; min-width: 0; }
.pick-label, .pick-brand { display: none; }
.pick-title {
  font-weight: 700; font-size: .8rem; line-height: 1.3;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-price { font-weight: 800; font-size: .92rem; margin-top: auto; padding-top: 2px; }
.pick-cta {
  display: block; font-size: .72rem; font-weight: 800; color: var(--pk-accent);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pick-cta svg { vertical-align: -2px; }

.picks-disclosure { margin: 14px 0 0; font-size: .8rem; color: var(--pk-dim); font-weight: 600; }

/* ---- homepage promo banners (extend the .banner card in styles.css) ---- */
.promo-slot { display: block; }
.promo-slot-mid { margin-bottom: 8px; }
@media (max-width: 640px) { .wrap.promo-slot { padding: 0 16px; } }
.promo-banner { --cat: var(--brand); min-height: 220px; }
.promo-banner.promo-pick { min-height: 0; }
.promo-banner .promo-pattern {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(circle at 85% 30%, color-mix(in srgb, var(--cat) 55%, transparent), transparent 55%),
    radial-gradient(circle at 10% 90%, color-mix(in srgb, var(--cat-puzzle, #3b82f6) 40%, transparent), transparent 50%),
    var(--surface-2);
}
/* A single product ("Our pick"): a slim bar no taller than a product card, with a 76px photo
   on white at the left and the copy in one short block beside it. */
.promo-pick {
  flex-direction: row; align-items: center; justify-content: flex-start; gap: 14px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cat) 22%, #0d1320), #0d1320 70%);
}
.promo-pick::after { display: none; }
.promo-pick:hover { transform: translateY(-3px); }
.promo-pick:hover .banner-art { transform: none; }
.promo-banner .promo-product {
  position: relative; inset: auto; order: -1; flex: none; align-self: stretch;
  width: 76px; min-height: 99px;
  background-size: contain; background-repeat: no-repeat; background-position: center;
  background-color: #fff; background-origin: content-box; padding: 6px;
}
.promo-pick .banner-top { padding: 0; flex: none; }
.promo-pick .banner-body {
  flex: 1; min-width: 0; padding: 8px 16px 8px 0;
  flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px 14px;
}
.promo-pick .banner-title {
  flex-basis: 100%; font-size: 1rem; line-height: 1.3; text-shadow: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.promo-pick .banner-desc { display: none; }
.promo-pick .banner-actions { margin: 0; }
.promo-pick .play-btn { padding: 6px 12px; font-size: .8rem; border-radius: 8px; box-shadow: none; }
.promo-price { margin: 0; font-weight: 800; font-size: 1rem; color: #fff; }
.promo-disclosure { margin: 0; flex-basis: 100%; font-size: .68rem; color: rgba(255,255,255,.72); font-weight: 600; }
@media (max-width: 640px) {
  .promo-pick .banner-top { display: none; }
  .promo-pick .banner-body { gap: 2px 10px; padding: 6px 12px 6px 0; }
  .promo-pick .banner-title { font-size: .9rem; }
  .promo-pick .play-btn { padding: 4px 10px; font-size: .74rem; }
  .promo-price { font-size: .92rem; }
  .promo-disclosure { font-size: .6rem; line-height: 1.25; }
}

/* ---- /shop/ page ---- */
.shop-toolbar { display: flex; justify-content: flex-end; margin: 0 0 28px; }
.shop-sort[hidden] { display: none; }
.shop-sort select {
  font: inherit; font-weight: 700; padding: 8px 12px; border-radius: 10px;
  color: var(--text); background: var(--surface); border: 1px solid var(--border-2);
}
.shop-collection { margin-bottom: 48px; }
.shop-empty { padding: 48px 0; color: var(--text-dim); font-weight: 600; text-align: center; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---- picks around a homepage game card (assets/js/picks.js wrapCard) ---- */
.anchor-wrap { container-type: inline-size; min-width: 0; display: flex; }
.anchor-wrap.anchor-span { grid-column: 1 / -1; }
.anchor-inner { flex: 1; display: grid; gap: 12px; min-width: 0; }
/* .featured-grid .banner-wide spans the whole grid; inside the wrapper the wrapper spans instead. */
.anchor-inner > .banner { min-width: 0; grid-column: auto; }
.featured-grid .anchor-inner > .banner-wide { grid-column: auto; }
.anchor-left  { grid-template-columns: clamp(210px, 26%, 273px) 1fr; }
.anchor-right { grid-template-columns: 1fr clamp(210px, 26%, 273px); }
.anchor-above { grid-template-rows: auto 1fr; }
.anchor-below { grid-template-rows: 1fr auto; }

.anchor-picks {
  --pk-line: var(--border-2, rgba(255,255,255,.14));
  --pk-card: var(--surface, #131b2a);
  --pk-dim: var(--text-dim, #9db0c7);
  --pk-accent: var(--brand, #2fb35a);
  display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--text, #e9eef6);
}
.anchor-list { display: grid; gap: 10px; }
/* Beside the card the small cards stack in a column, centred on the card's height. */
.anchor-left .anchor-list, .anchor-right .anchor-list { flex: 1; align-content: center; }
.anchor-above .anchor-list, .anchor-below .anchor-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
.anchor-note { margin: 0; font-size: .7rem; line-height: 1.35; color: var(--pk-dim); font-weight: 600; }

/* A narrow grid cell has no room beside the card: put the picks under it as a row. */
@container (max-width: 560px) {
  .anchor-left, .anchor-right { grid-template-columns: 1fr; }
  .anchor-left > .anchor-picks { order: 2; }
  .anchor-left .anchor-list, .anchor-right .anchor-list { grid-template-columns: repeat(auto-fill, minmax(min(100%, 190px), 1fr)); }
}
