/* Shared route primitives for market packs. Pack stylesheets compose on top. */

.pack-layer {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  mix-blend-mode: multiply;
  opacity: 0.22;
}
.pack-layer .pack-motif {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
body.journey-txn .pack-layer {
  opacity: 0.08;
  mix-blend-mode: normal;
}
@media (prefers-reduced-motion: reduce) {
  .pack-layer { opacity: 0.08; }
  body.rm-static .pack-layer { display: none; }
}

.catalog-shell,
.product-shell,
.txn-shell {
  position: relative;
  z-index: 2;
}

.chapter-reel {
  display: grid;
  gap: 0;
}
.chapter-card {
  display: block;
  min-height: 70vh;
  padding: clamp(2rem, 6vw, 5rem);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 0%, transparent), color-mix(in srgb, var(--accent) 10%, transparent));
}
.chapter-index {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  opacity: 0.7;
}
.finder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
}
.finder-pin {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md, 10px);
  text-decoration: none;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
}
.finder-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
  flex: 0 0 auto;
}
.product-index {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.index-row {
  display: grid;
  grid-template-columns: 3rem 1fr auto;
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
}
.index-num { font-variant-numeric: tabular-nums; opacity: 0.55; }
.compare-board .product-card {
  border: 1px solid var(--line);
}

body.view-home .site-header,
body.view-catalog .site-header,
body.view-product .site-header { position: sticky; top: 0; z-index: 8; }

.product-page {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.4rem;
  padding: 2rem 0 4rem;
  align-items: start;
}
.product-page .gallery { min-width: 0; }
.product-page .buy { min-width: 0; }
.product-page .gallery-frame img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
}

.step-nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.4rem;
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
}
.step-nav li {
  border-bottom: 2px solid var(--line);
  padding: 0.4rem 0;
  cursor: pointer;
}
.step-nav li.on { border-bottom-color: var(--accent); font-weight: 600; }

@media (max-width: 860px) {
  .product-page { grid-template-columns: 1fr; }
  .chapter-card { min-height: 52vh; }
}

@media (max-width: 800px) {
  body.view-home .block-hero {
    min-height: 0 !important;
  }
  body.view-home .block-hero.variant-cinematic,
  body.view-home .block-hero.variant-poster {
    min-height: 28vh !important;
  }
}

.motion-pause {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 20;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  background: var(--header);
  color: var(--text);
  font: inherit;
  cursor: pointer;
}
body.fx-reduced .motion-pause { display: none; }
