/* product page specifics (themes restyle via tokens) */
.product-layout { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 3rem; align-items: start; }
@media (max-width: 900px) { .product-layout { grid-template-columns: 1fr; gap: 1.8rem; } }

.viewer { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface-2); border: 1px solid var(--line); }
.viewer canvas { display: block; width: 100% !important; height: 100% !important; cursor: grab; }
.viewer canvas:active { cursor: grabbing; }
.viewer-hint { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); pointer-events: none; z-index: 2; }
.viewer-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 3; background: var(--surface-2); }
.viewer-empty { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 4rem; color: var(--faint); }
.viewer-loading { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; color: var(--faint); font-size: 0.8rem; }

.thumbs { display: flex; gap: 0.6rem; margin-top: 0.8rem; flex-wrap: wrap; }
.thumbs .thumb { width: 72px; height: 72px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--line); cursor: pointer; background: var(--surface-2); padding: 0; display: grid; place-items: center; }
.thumbs .thumb.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.thumbs .thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumbs .thumb-3d span { font-weight: 800; font-size: 0.95rem; letter-spacing: 1px; color: var(--accent-strong); font-family: var(--font-mono); }

.product-info .cat { display: inline-block; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--eyebrow-color); margin-bottom: 0.6rem; }
.product-info h1 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); margin-bottom: 0.35rem; }
.product-info .price { margin: 0.6rem 0 1rem; display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.product-info .price .now { font-size: 1.9rem; font-weight: 700; color: var(--price); font-family: var(--font-display); }
.product-info .price .was { color: var(--faint); text-decoration: line-through; }
.product-info .price .save { font-size: 0.8rem; font-weight: 700; color: var(--accent-2); }
.rating-line { display: flex; gap: 0.6rem; align-items: center; margin: 0.1rem 0 0.6rem; font-size: 0.86rem; }
.meta-line { font-size: 0.8rem; color: var(--faint); margin-top: 0.4rem; }

.variant-group { margin: 1.2rem 0; }
.variant-group .lbl { font-size: 0.74rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-bottom: 0.55rem; }
.variant-group .lbl b { color: var(--text); text-transform: none; letter-spacing: 0; font-weight: 600; }
.variant-chips { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.variant-chip { padding: 0.5em 1.05em; border: 1px solid var(--line); border-radius: var(--radius-btn); cursor: pointer; font-size: 0.86rem; color: var(--muted); background: var(--surface); transition: all 0.2s; }
.variant-chip:hover { border-color: var(--accent); }
.variant-chip.active { border-color: var(--accent); color: var(--accent-strong); background: var(--accent-soft); font-weight: 600; }
.variant-chip.unavailable { opacity: 0.55; text-decoration: line-through; }
/* separate-product variants (linked pages) */
.variant-links { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.variant-link { display: flex; align-items: center; gap: 0.5rem; padding: 0.3rem 0.8rem 0.3rem 0.3rem; border: 1px solid var(--line); border-radius: var(--radius-btn); font-size: 0.85rem; background: var(--surface); }
.variant-link img { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.variant-link.current { border-color: var(--accent); color: var(--accent-strong); font-weight: 600; }
.variant-link:hover { border-color: var(--accent); }

.buy-row { display: flex; gap: 0.8rem; margin-top: 1.4rem; align-items: stretch; flex-wrap: wrap; }
.qty-box { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: var(--radius-btn); overflow: hidden; background: var(--surface); }
.qty-box button { width: 42px; height: 100%; min-height: 44px; background: transparent; border: 0; color: var(--text); font-size: 1.1rem; cursor: pointer; }
.qty-box button:hover { color: var(--accent-strong); }
.qty-box input { width: 46px; text-align: center; background: transparent; border: 0; color: var(--text); padding: 0.7em 0; }
.buy-row .btn-primary { flex: 1; min-width: 180px; }

.stock-status { display: inline-block; margin: 1.2rem 0 0.2rem; padding: 0.45em 1em; border-radius: var(--radius-btn); font-size: 0.84rem; font-weight: 600; }
.stock-status.out { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 45%, transparent); }
.stock-status.soon { background: var(--accent-soft); color: var(--accent-strong); border: 1px solid var(--accent); }
.stock-status.in { background: color-mix(in srgb, var(--success) 10%, transparent); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 40%, transparent); }
.notify-box { gap: 0.6rem; margin-top: 0.7rem; }
.notify-box:not(.hidden) { display: flex; }
.notify-box .input { flex: 1; }

.trust { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-top: 1.5rem; padding-top: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.85rem; }
.trust span::before { content: '✓'; color: var(--success); margin-right: 0.35rem; font-weight: 700; }

/* tabs */
.tabs { display: flex; gap: 0.3rem; border-bottom: 1px solid var(--line); margin: 3.2rem 0 0; flex-wrap: wrap; }
.tab { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); padding: 0.85em 1.1em; cursor: pointer; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.tab.active { color: var(--accent-strong); border-bottom-color: var(--accent); }
.tab-panel { display: none; padding: 1.8rem 0; }
.tab-panel.active { display: block; animation: fade 0.35s; }
@keyframes fade { from { opacity: 0; } }
.tab-panel .rich { max-width: 68ch; font-size: 1rem; color: var(--muted); }

.specs { width: 100%; border-collapse: collapse; max-width: 620px; }
.specs td { padding: 0.8em 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.specs td:first-child { color: var(--muted); width: 42%; padding-right: 1rem; }

.faq-item { border-bottom: 1px solid var(--line); }
.faq-q { width: 100%; text-align: left; background: none; border: 0; color: var(--text); padding: 1.1em 0; cursor: pointer; font-family: var(--font-display); font-size: 1.1rem; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq-q .ico { color: var(--accent); transition: transform 0.3s; }
.faq-q.open .ico { transform: rotate(45deg); }
.faq-a { max-height: 0; overflow: hidden; transition: max-height 0.35s ease; color: var(--muted); }
.faq-a .inner { padding: 0 0 1.1em; max-width: 65ch; }

.reviews-head { margin-bottom: 0.5rem; }
.review { border-bottom: 1px solid var(--line); padding: 1.3rem 0; }
.review .top { display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.review .author { color: var(--text); font-size: 0.9rem; font-weight: 600; }
.review .date { color: var(--faint); font-size: 0.78rem; }
.review h4 { font-size: 1.1rem; margin: 0.45rem 0 0.25rem; }

.related { margin-top: 3rem; }

/* server-rendered snapshot (visible before the script takes over / without JS) */
.ssr-media img { width: 100%; border-radius: var(--radius); background: var(--surface-2); aspect-ratio: 1; object-fit: cover; }
.ssr-thumbs { display: flex; gap: 0.5rem; margin-top: 0.6rem; }
.ssr-thumbs img { width: 70px; height: 70px; aspect-ratio: auto; border-radius: var(--radius-sm); }
.ssr-stock { font-size: 0.86rem; color: var(--muted); }
.ssr-details { margin-top: 2.5rem; max-width: 68ch; }
.ssr-details h2 { font-size: 1.3rem; margin-top: 1.6rem; }
.ssr-variants a { color: var(--accent-strong); text-decoration: underline; }
