/* Product pages. Builds on styles.css tokens. */

.crumbs { font-size: 13px; color: var(--muted); padding-top: 34px; }
.crumbs a:hover { color: var(--text); }
.crumbs span { margin: 0 8px; opacity: .5; }

/* hero */
.p-hero { display: grid; grid-template-columns: 1fr 1.15fr; gap: 48px; align-items: center; padding: 34px 0 60px; }
.p-hero h1 { font-size: clamp(40px, 5.5vw, 64px); margin: 14px 0 12px; }
.p-hero .lead { margin: 0 0 26px; text-align: left; max-width: 460px; }
.p-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.p-buy { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.p-price { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.p-price small { display: block; font-size: 12px; font-weight: 400; color: var(--muted); letter-spacing: 0; }

/* media frame + video slot */
.media {
  position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--panel-2);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .8), 0 0 0 6px rgba(255, 255, 255, .015);
}
.media > img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.7) contrast(1.1) saturate(.85); }
.media iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.media.media--hardshoulder, .media.media--crime { display: grid; place-items: center; }
.media .cones i { width: 40px; height: 62px; }
.media .cones { gap: 34px; }
.media .chips li { font-size: 13px; padding: 6px 12px; }
.play {
  position: absolute; inset: 0; margin: auto; width: 72px; height: 72px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .25); background: rgba(10, 10, 11, .55); backdrop-filter: blur(6px);
  color: var(--text); cursor: pointer; display: grid; place-items: center; transition: transform .2s, background .2s;
}
.play:hover { transform: scale(1.06); background: rgba(10, 10, 11, .75); }
.play svg { width: 22px; height: 22px; margin-left: 4px; }
.media__soon {
  position: absolute; top: 14px; right: 14px; font: 500 11px var(--mono); color: var(--muted);
  background: rgba(10, 10, 11, .7); border: 1px solid var(--line); padding: 4px 10px; border-radius: 999px;
}

/* sticky sub-nav */
.subnav {
  position: sticky; top: 60px; z-index: 5; border-block: 1px solid var(--line);
  background: rgba(10, 10, 11, .8); backdrop-filter: blur(12px);
}
.subnav .wrap { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.subnav a {
  padding: 13px 12px; font-size: 13px; color: var(--muted); white-space: nowrap;
  border-bottom: 1px solid transparent; margin-bottom: -1px; transition: color .15s, border-color .15s;
}
.subnav a:hover, .subnav a.is-active { color: var(--text); border-color: var(--accent); }

/* content blocks */
.block { padding: 64px 0 8px; scroll-margin-top: 110px; }
.block h2 { margin-bottom: 8px; }
.block > .muted { margin: 0 0 26px; max-width: 620px; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.fcard { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px; transition: border-color .2s; }
.fcard:hover { border-color: #34343b; }
.fcard h4 { margin: 0 0 6px; font-size: 15px; display: flex; align-items: center; gap: 10px; }
.fcard h4::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); }
.fcard p { margin: 0; color: var(--muted); font-size: 14px; }

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; max-width: 760px; }
.steps li {
  counter-increment: step; position: relative; padding: 16px 18px 16px 58px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; color: var(--muted); font-size: 14px;
}
.steps li::before {
  content: counter(step); position: absolute; left: 16px; top: 14px; width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; background: var(--panel-2); border: 1px solid var(--line);
  font: 600 12px var(--mono); color: var(--accent);
}
.steps b { color: var(--text); font-weight: 500; }

/* code */
.code {
  position: relative; background: #0d0d0f; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; max-width: 860px;
}
.code__bar { display: flex; justify-content: space-between; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--line); font: 12px var(--mono); color: var(--muted); }
.code__copy { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; padding: 3px 10px; font: 12px var(--mono); cursor: pointer; }
.code__copy:hover { color: var(--text); border-color: #3a3a40; }
.code pre { margin: 0; padding: 18px; overflow-x: auto; font: 13px/1.65 var(--mono); color: #d4d4d8; }
.code pre code { background: none; padding: 0; font-size: inherit; }
.tok-c { color: #6b6b74; font-style: italic; }
.tok-s { color: #9fd49a; }
.tok-n { color: var(--accent); }
.tok-k { color: #c3a6ff; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; max-width: 980px; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 500; color: var(--muted); background: var(--panel); font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
tr:last-child td { border-bottom: 0; }
td code { white-space: nowrap; }
kbd {
  font: 600 12px var(--mono); padding: 2px 8px; border-radius: 6px; background: var(--panel-2);
  border: 1px solid var(--line); border-bottom-width: 2px; color: var(--text); white-space: nowrap;
}

/* requirements + changelog */
.reqs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.req-item { padding: 16px 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
.req-item span { display: block; font: 11px var(--mono); color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 4px; }
.req-item.is-optional { border-style: dashed; background: transparent; }

.changelog { border-left: 1px solid var(--line); margin-left: 6px; padding-left: 24px; max-width: 720px; }
.release { position: relative; padding-bottom: 20px; }
.release::before { content: ""; position: absolute; left: -29px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px var(--bg); }
.release h4 { margin: 0; font-size: 15px; }
.release time { font: 12px var(--mono); color: var(--muted); }
.release ul { color: var(--muted); font-size: 14px; padding-left: 18px; margin: 8px 0 0; }

/* closing CTA */
.cta-band {
  margin: 80px 0 0; padding: 44px; border: 1px solid var(--line); border-radius: 20px;
  background: radial-gradient(600px 200px at 15% 0%, rgba(245, 179, 1, .09), transparent 70%), var(--panel);
  display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap;
}
.cta-band h3 { margin: 0 0 4px; font-size: 24px; letter-spacing: -.02em; }
.cta-band p { margin: 0; color: var(--muted); }

@media (max-width: 860px) {
  .p-hero { grid-template-columns: 1fr; gap: 30px; }
  .media .cones { gap: 16px; }
  .media .cones i { width: 28px; height: 44px; }
  .cta-band { padding: 28px; }
}

.block h3 { margin: 40px 0 14px; font-size: 17px; letter-spacing: -.01em; }
.block > .muted + h3 { margin-top: 8px; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 18px; }

.p-gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, clamp(150px, 17vw, 210px)); gap: 12px; }
.p-gallery img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 12px; border: 1px solid var(--line);
  filter: brightness(.82) saturate(.9); transition: filter .3s;
}
.p-gallery img:hover { filter: none; }
.p-gallery img:first-child { grid-row: span 2; }
.p-gallery img:last-child { grid-column: span 2; }
@media (max-width: 760px) {
  .p-gallery { grid-template-columns: 1fr 1fr; grid-template-rows: none; }
  .p-gallery img:first-child, .p-gallery img:last-child { grid-row: auto; grid-column: auto; aspect-ratio: 16 / 9; }
}

/* generated product pages */
.p-tagline { font-size: 19px; font-weight: 600; letter-spacing: -.02em; margin: -4px 0 12px; color: var(--text); }
.p-hero .lead + .lead { margin-top: -14px; }
.media--zoom { padding: 0; cursor: zoom-in; display: block; width: 100%; }
.media--zoom img { filter: none; transition: transform .4s; }
.media--zoom:hover img { transform: scale(1.02); }

.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.thumb { padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: var(--panel-2); cursor: zoom-in; aspect-ratio: 16 / 10; }
.thumb img { width: 100%; height: 100%; object-fit: cover; filter: brightness(.85); transition: filter .25s, transform .4s; }
.thumb:hover img { filter: none; transform: scale(1.04); }
.thumb:focus-visible, .media--zoom:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.specs { columns: 2 380px; column-gap: 14px; }
.spec {
  break-inside: avoid; margin: 0 0 14px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 20px 22px;
}
.spec h3 { margin: 0 0 10px; font-size: 15px; display: flex; gap: 10px; align-items: center; }
.spec h3::before { content: ""; width: 6px; height: 6px; border-radius: 2px; background: var(--accent); flex: none; }
.spec ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 14px; }
.spec li { margin-bottom: 6px; }
.spec li::marker { color: #45454c; }
.spec b { color: var(--text); font-weight: 500; }
.byline { font: 12px var(--mono); color: var(--muted); margin-top: 18px; }

.card--link { color: inherit; }
.card--link .card__body { padding-bottom: 20px; }

.lightbox {
  max-width: min(1400px, 94vw); max-height: 92vh; padding: 0; border: 1px solid var(--line);
  border-radius: 14px; background: #000; overflow: hidden;
}
.lightbox::backdrop { background: rgba(0, 0, 0, .85); backdrop-filter: blur(4px); }
.lightbox img { display: block; max-width: 100%; max-height: 92vh; object-fit: contain; }
.lightbox__close {
  position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2); background: rgba(10,10,11,.7); color: #fff; font-size: 22px; cursor: pointer;
}
.specs:has(> .spec:only-child) { columns: 1; }
.spec:only-child ul { columns: 2 320px; column-gap: 32px; }
.spec:only-child li { break-inside: avoid; }
