/*
 * Page-specific styles for the Product Template Expansions listing page.
 * Sandbox-only reference at /product-template-expansions (and rendered
 * for any /products/:product/expansions match, hydrated from the API).
 *
 * Port of the handoff's inline <style> block in
 * `Imaginando Product Template Expansions.html`.
 *
 * Already in /style.css (intentionally NOT duplicated):
 *   :root tokens, html/body/a/button resets, ::selection, .mono, .wrap,
 *   .btn / .btn.primary / .btn .arrow, .crumbs (+ .sep / .here), .reveal.
 *
 * The page uses the global --accent (no per-pack hue on <main>); each
 * card carries its OWN hue inline on `.exp-art` / `.exp-tag` / `.exp-wave`,
 * the same convention as the related-packs grid on the detail page.
 */

/* ============================================================
 * PAGE HEAD — crumbs + 1.4fr/1fr grid (copy left, stats right).
 * Distinct from the global `.page-head` (products/about) — this is
 * the expansions handoff's `.ph-head` with the accent-radial wash.
 * ============================================================ */
.ph-head {
  padding: 36px 0 48px;
  border-bottom: 0.5px solid var(--line);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(ellipse 60% 50% at 80% 15%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 60%),
    radial-gradient(ellipse 70% 55% at 15% 90%, color-mix(in oklab, var(--accent-2) 10%, transparent), transparent 60%);
}

.ph-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
  position: relative;
}
@media (max-width: 1000px) { .ph-grid { grid-template-columns: 1fr; gap: 32px; } }

.ph-eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--fg-faint);
  margin-bottom: 16px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ph-eyebrow .pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
  animation: ph-pulse 1.8s ease-in-out infinite;
}
@keyframes ph-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.5; transform: scale(1.4); }
}
@media (prefers-reduced-motion: reduce) { .ph-eyebrow .pulse { animation: none; } }

.ph-head h1 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(56px, 8.4vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
.ph-head h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.ph-head .lede {
  margin: 24px 0 0;
  color: var(--fg-dim);
  font-size: 17px;
  line-height: 1.55;
  max-width: 48ch;
  text-wrap: pretty;
}

.ph-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 0.5px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
}
.ph-stats .cell { padding: 18px 20px; border-right: 0.5px solid var(--line); display: flex; flex-direction: column; gap: 4px; }
.ph-stats .cell:last-child { border-right: 0; }
.ph-stats .num { font-family: var(--display); font-weight: 500; font-size: 32px; letter-spacing: -0.02em; line-height: 1; }
.ph-stats .num em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.ph-stats .lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--fg-faint); }

/* ============================================================
 * FILTER BAR — sticky under the nav. Category chips on the left,
 * sort dropdown on the right.
 * ============================================================ */
.filter-bar {
  padding: 18px 0;
  border-bottom: 0.5px solid var(--line);
  background: color-mix(in oklab, var(--bg) 92%, transparent);
  position: sticky;
  top: 64px;
  z-index: 40;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.fb-row { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips.count-only { align-items: center; }
.chip {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-dim);
  padding: 7px 14px;
  border-radius: 999px;
  border: 0.5px solid var(--line);
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--fg); }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.sort {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-faint);
}
.sort select {
  font: inherit;
  color: var(--fg);
  background: transparent;
  border: 0.5px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
}

/* ============================================================
 * LISTING GRID — 3-col pack cards.
 * ============================================================ */
.listing { padding: 56px 0 96px; }
.exp-empty {
  border: 0.5px dashed var(--line-strong);
  border-radius: 18px;
  padding: 48px 32px;
  text-align: center;
  color: var(--fg-dim);
  font-size: 15px;
}
/* `.exp-card` and its children now live in the global sheet
 * (public/style.css → "Shared expansion-pack CARD") so the product
 * pages and the pack detail page render packs identically. Only the
 * listing-page grid gutter override stays page-local. */
.exp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 1100px) { .exp-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 700px)  { .exp-grid { grid-template-columns: 1fr; } }

/* ============================================================
 * BUNDLE STRIP — accent-tinted banner under the grid.
 * ============================================================ */
.bundle-strip {
  margin-top: 40px;
  border: 0.5px solid color-mix(in oklab, var(--accent) 30%, var(--line));
  border-radius: 18px;
  background: linear-gradient(135deg, color-mix(in oklab, var(--accent) 8%, var(--card)), var(--card));
  padding: 36px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
@media (max-width: 800px) { .bundle-strip { grid-template-columns: 1fr; padding: 28px; } }
.bundle-strip .l { display: flex; flex-direction: column; gap: 10px; }
.bundle-strip .l .mono { color: var(--accent); }
.bundle-strip h3 {
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(24px, 2.8vw, 36px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
.bundle-strip h3 em { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--accent); }
.bundle-strip p { margin: 0; color: var(--fg-dim); font-size: 14px; line-height: 1.55; max-width: 48ch; }
.bundle-strip .r { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.bundle-strip .price { display: flex; align-items: baseline; gap: 8px; }
.bundle-strip .price .num { font-family: var(--display); font-weight: 500; font-size: 64px; letter-spacing: -0.03em; line-height: 1; color: var(--fg); }
.bundle-strip .price .strike { font-family: var(--display); font-size: 18px; color: var(--fg-faint); text-decoration: line-through; letter-spacing: -0.01em; }
.bundle-strip .save { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--accent); }
@media (max-width: 800px) {
  .bundle-strip .r { align-items: flex-start; }
}
