/* Single-item pages generated from data/: release, product and news post layouts, breadcrumbs, link tiles. */

/* ---------- breadcrumbs and hero ---------- */
.detail-kicker { margin: 0 0 8px; color: var(--accent-2); text-shadow: var(--glow-2); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; }
.detail-hero .glitch { overflow-wrap: anywhere; }
.page-hero.detail-hero { padding-bottom: 8px; }
.detail-hero p a { display: inline-block; padding-block: 2px; }

/* ---------- release and product: artwork beside the facts ---------- */
.release, .product { display: grid; grid-template-columns: minmax(0, 480px) minmax(0, 1fr); gap: 48px; align-items: start; }
.release-art, .product-art { margin: 0; border: 1px solid var(--line); box-shadow: 6px -4px 0 color-mix(in srgb, var(--accent-2) 35%, transparent); }
.release-art, .product-art:not(.cover) { background: var(--panel); }
.release-art img, .product-art img { display: block; width: 100%; height: auto; }
.product-art.cover { border-bottom: 1px solid var(--line); font-size: clamp(2rem, 6vw, 3.4rem); }
.release-info .lede, .product-info .lede { margin-top: 0; font-size: 1.05rem; }
.release-info .platforms-label { margin: 28px 0 12px; }
.detail-buy { margin: 28px 0 12px; }
/* the purchase panel: price, live availability, the buy control and what happens after paying (js/store.js fills it) */
.buy-panel { display: grid; gap: 14px; margin: 22px 0 30px; padding: 20px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.buy-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 16px; }
.buy-price { font-size: 2rem; font-weight: 700; line-height: 1.1; }
.buy-state { padding: 2px 10px; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.buy-panel .detail-buy { margin: 0; }
.buy-panel .detail-buy .btn { flex: 1 1 auto; justify-content: center; text-align: center; }
.buy-points { list-style: none; display: grid; gap: 6px; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.buy-points li { position: relative; padding-left: 18px; }
.buy-points li::before { content: "✓"; position: absolute; left: 0; color: var(--accent); }
.buy-points a { display: inline-block; padding-block: 2px; }
.product-info .facts { margin-bottom: 8px; }
.product-info .note { color: var(--muted); font-size: .85rem; }
.product-info .note a { display: inline-block; padding-block: 2px; }
.preview { margin: 0 0 22px; }
.preview figcaption { color: var(--accent-2); text-shadow: var(--glow-2); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; margin-bottom: 8px; }
.preview audio { width: 100%; }
.included-head { font-size: 1.6rem; margin: 0 0 8px; }
/* the licence box: which licence the product has, what it allows and doesn't (scripts/lib/rich-text.js licenseBox) */
.license-box { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.license-box .license-lists { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px 24px; }
.license-box .license-lists h3 { margin: 10px 0 4px; font-size: 1rem; }
.license-box ul { margin: 0; padding-left: 18px; }
.license-box li + li { margin-top: 4px; }
.license-box .small-print a { display: inline-block; padding-block: 2px; }
.included { margin: 0 0 18px; padding-left: 20px; color: var(--muted); }
.facts .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-head { margin: 48px 0 0; font-size: clamp(1.8rem, 4vw, 2.4rem); text-transform: uppercase; }

/* ---------- tracklist ---------- */
.tracklist { list-style: none; counter-reset: track; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tracklist li { counter-increment: track; display: grid; grid-template-columns: auto 1fr auto; gap: 4px 18px; align-items: baseline; padding: 14px 0; border-bottom: 1px solid var(--line); }
.tracklist li::before { content: counter(track, decimal-leading-zero); color: var(--accent-2); text-shadow: var(--glow-2); }
.tracklist .track-title { color: var(--accent); text-shadow: var(--glow); font-weight: 700; }
.tracklist time { color: var(--muted); }
.tracklist .isrc { grid-column: 2 / -1; color: var(--accent-dim); font-size: .8rem; }

/* ---------- link tiles: related products, posts and releases ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.tile { display: grid; gap: 6px; padding: 18px; color: var(--text); text-shadow: none; border: 1px solid var(--line); background: var(--bg); box-shadow: 4px -3px 0 color-mix(in srgb, var(--accent-2) 28%, transparent); transition: border-color .15s, box-shadow .18s var(--snap); }
.tile:hover { color: var(--text); text-shadow: none; border-color: var(--accent-2); box-shadow: 0 0 14px color-mix(in srgb, var(--accent-2) 30%, transparent); }
.tile strong { color: var(--accent); text-shadow: var(--glow); }
.tile time { color: var(--accent-dim); font-size: .85rem; }

/* ---------- news post ---------- */
.article { display: grid; gap: 36px; max-width: 760px; }
.article-body { font-size: 1.05rem; }
.article-body p { margin: 0 0 14px; }
.article-body a { display: inline-block; padding-block: 2px; }
.release-tile { grid-template-columns: 96px 1fr; align-items: center; gap: 18px; background: var(--panel); }
.release-tile img { display: block; width: 96px; height: 96px; }
.release-tile > span { display: grid; gap: 4px; }
.release-tile > span > span:last-child { color: var(--accent-2); text-shadow: var(--glow-2); }

.detail-more { display: flex; flex-wrap: wrap; gap: 12px; }

@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
}

@media (max-width: 860px) {
  .release, .product { grid-template-columns: 1fr; gap: 32px; }
  .release-art, .product-art { max-width: 480px; }
}
@media (max-width: 600px) {
  .release-art, .product-art { box-shadow: 3px -2px 0 color-mix(in srgb, var(--accent-2) 28%, transparent); }
  .tracklist li { grid-template-columns: auto 1fr auto; gap: 2px 12px; }
  .detail-more .btn, .detail-buy .btn { flex: 1 1 100%; display: block; }
}
/* the licence box is a <section>: keep project skins' section spacing off it */
.product-info section.license-box { padding: 18px 20px; }
/* computers: the artwork stays in view while the details scroll */
@media (min-width: 861px) { .product > .product-art { position: sticky; top: 80px; } }
/* a fact the store fills in later (download size) sits in a wrapper that keeps the dt/dd grid */
.facts > div { display: contents; }
.facts > div[hidden] { display: none; }
/* the product page's wishlist button (js/wishlist.js sets aria-pressed) and the "You might also like" row (css/store.css) */
.buy-panel .wish-btn[aria-pressed="true"] { border-color: var(--coral); color: var(--coral); }
.buy-panel .wish-btn[aria-pressed="true"]::before { content: "♥ "; }
.similar-section[hidden] { display: none; }
