/* ═══ Card detail — fancy, family chrome, eBay-style zoom gallery ═══ */
.carddetail { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding-bottom: 64px; color: var(--ink); }
.cd-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(330px, .95fr); gap: 34px; align-items: start; }
.cd-media { position: sticky; top: 14px; }

/* Gallery: thumbnails on the right (desktop), main image left. The photo is never
   transformed on hover — the shared .cp-trigger overlay surfaces the actions. */
.cd-gallery { display: grid; grid-template-columns: minmax(0, 1fr) 68px; gap: 12px; align-items: start; }
.cd-stage { grid-column: 1; grid-row: 1; }
.cd-thumbs { grid-column: 2; grid-row: 1; list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cd-thumb { width: 66px; height: 88px; padding: 4px; overflow: hidden; border: 1px solid var(--rule); border-radius: 10px; background: var(--photo-well); cursor: pointer; }
.cd-thumb img { width: 100%; height: 100%; object-fit: contain; }
.cd-thumb.is-active { border-color: var(--rule-dark); box-shadow: 0 0 0 1px var(--rule-dark); }

/* The main photo trigger inherits .cp-trigger from card-photos.css. */
.cd-stage .cp-trigger {
    width: 100%; padding: 14px;
    border: 1px solid var(--rule); border-radius: 16px;
    background: var(--photo-well);
}
.cd-stage .cp-trigger img { width: 100%; height: auto; border-radius: 8px; image-orientation: from-image; }
.cd-stage .cp-trigger-overlay { border-radius: 16px; }
.cd-caption { margin: 12px 0 0; color: var(--muted); font-size: .82rem; text-align: center; }
.cd-noimg { display: grid; place-items: center; gap: 12px; aspect-ratio: 3/4; border: 1px dashed var(--rule); border-radius: 16px; background: var(--photo-well); color: var(--muted); }
.cd-noimg i { font-size: 2.4rem; }

/* Copy side */
.cd-copy { padding: 4px 0; }
.cd-kicker { margin: 0 0 8px; color: var(--muted); font-size: .72rem; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.cd-title { margin: 0; font-size: clamp(1.9rem, 4vw, 3rem); font-weight: 1000; line-height: 1.02; letter-spacing: -.02em; text-transform: uppercase; }
.cd-subtitle { margin: 10px 0 22px; color: var(--muted); font-size: 1rem; font-weight: 700; line-height: 1.4; }

.cd-grades { display: flex; align-items: stretch; gap: 14px; margin-bottom: 22px; }
.cd-grade-badge { display: grid; place-items: center; align-content: center; gap: 2px; min-width: 96px; padding: 14px; border-radius: 14px; }
/* Metal tiers (mirror GradeTier.For). */
.grade-badge.gold { background: linear-gradient(135deg,#e9d9ac,#c9a961 55%,#e3cf9a); color: #3a2c07; }
.grade-badge.silver { background: linear-gradient(135deg,#f2f5f8,#aab6c1 60%,#e8edf1); color: #22303f; }
.grade-badge.bronze { background: linear-gradient(135deg,#c98d58,#8a5a2e 60%,#b87c48); color: #ffe9d2; }
.cd-grade-badge b { font-size: 2.1rem; font-weight: 1000; line-height: 1; }
.cd-grade-badge small { font-size: .58rem; font-weight: 950; letter-spacing: .05em; }
.cd-subs { flex: 1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.cd-subs > div { display: flex; align-items: center; justify-content: space-between; padding: 11px 14px; background: var(--surface); }
.cd-subs span { color: var(--muted); font-size: .78rem; }
.cd-subs strong { color: var(--ink); font-size: 1rem; font-weight: 900; }
/* Overall-only slab: one plain statement instead of four empty rows. */
.cd-subs-none { display: block; background: var(--photo-well); }
.cd-subs-none p { margin: 0; padding: 13px 16px; color: var(--muted); font-size: .82rem; line-height: 1.45; }
.cd-subs-none i { margin-right: 7px; color: var(--rule-dark); }

/* Two facts per row so the values fill the panel instead of trailing into space. */
.cd-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 24px; border: 1px solid var(--rule); border-radius: 14px; overflow: hidden; }
.cd-facts > div { display: grid; grid-template-columns: 92px minmax(0, 1fr); border-top: 1px solid var(--rule); }
.cd-facts > div:nth-child(-n+2) { border-top: 0; }
.cd-facts > div:nth-child(odd) { border-right: 1px solid var(--rule); }
.cd-facts dt { padding: 11px 14px; color: var(--muted); font-size: .82rem; background: var(--photo-well); }
.cd-facts dd { margin: 0; padding: 11px 14px; color: var(--ink); font-size: .9rem; font-weight: 700; }
.cd-facts .tabular { font-variant-numeric: tabular-nums; }

.cd-buy { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border: 1px solid var(--rule); border-radius: 16px; background: var(--surface); box-shadow: var(--isl-shadow-card-sm, 0 12px 30px rgba(0,0,0,.18)); }
.cd-price { flex: 1; display: flex; flex-direction: column; }
.cd-price strong { font-size: 1.9rem; font-weight: 1000; color: var(--ink); }
.cd-price small { color: var(--muted); font-size: .74rem; }
.cd-add { width: 64px; height: 64px; flex: 0 0 64px; display: grid; place-items: center; border: 0; border-radius: 18px; color: #07152c; background: linear-gradient(135deg, #f5f7f8, #aeb8c1 58%, #eef2f5); font-size: 1.5rem; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,.22); transition: transform .15s, filter .15s; }
.cd-add:hover { transform: translateY(-2px); filter: brightness(1.05); }

/* ── Responsive ── */
@media (max-width: 900px) {
    .cd-grid { grid-template-columns: 1fr; gap: 22px; }
    .cd-media { position: static; }
    /* Thumbnails move below the main image, horizontal. */
    .cd-gallery { grid-template-columns: 1fr; }
    .cd-stage { grid-row: 1; }
    .cd-thumbs { grid-column: 1; grid-row: 2; flex-direction: row; flex-wrap: wrap; justify-content: center; }
}
@media (max-width: 560px) {
    .cd-grades { flex-direction: column; }
    .cd-subs { grid-template-columns: repeat(2, 1fr); }
    /* Stack the facts one per row on phones. */
    .cd-facts { grid-template-columns: 1fr; }
    .cd-facts > div { grid-template-columns: 96px minmax(0, 1fr); border-right: 0; }
    .cd-facts > div:nth-child(2) { border-top: 1px solid var(--rule); }
}
