/* PDP Forge — shared base. Each template overrides the tokens below in its own style.css. */
:root {
  --bg: #ffffff;
  --surface: #f5f5f4;
  --text: #1c1917;
  --muted: #78716c;
  --line: #e7e5e4;
  --accent: #1c1917;
  --accent-text: #ffffff;
  --sale: #dc2626;
  --radius: 12px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: var(--font);
  --max: 1200px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* header */
.site-header { border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { font-family: var(--font-display); font-weight: 700; letter-spacing: .02em; text-decoration: none; font-size: 1.15rem; }
.nav { display: flex; gap: 22px; font-size: .92rem; }
.nav a { text-decoration: none; color: var(--muted); }
.nav a:hover { color: var(--text); }
.cart-link { font-size: .92rem; text-decoration: none; }
.crumbs { font-size: .82rem; color: var(--muted); padding: 16px 0 0; }
.crumbs a { color: var(--muted); text-decoration: none; }

/* layout */
.pdp { display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; padding: 24px 0 56px; align-items: start; }
.pdp-info { position: sticky; top: 24px; }
@media (max-width: 880px) {
  .pdp { grid-template-columns: 1fr; gap: 24px; }
  .pdp-info { position: static; }
  .nav { display: none; }
}

/* gallery */
.gallery { outline: none; }
.gallery-main { position: relative; aspect-ratio: 1 / 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.gallery-nav { position: absolute; inset: auto 12px 12px auto; display: flex; gap: 8px; }
.gallery-nav button { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); background: var(--bg); }
.gallery-count { position: absolute; left: 12px; bottom: 12px; font-size: .78rem; background: var(--bg); padding: 4px 10px; border-radius: 99px; }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 10px; }
.thumbs button { aspect-ratio: 1 / 1; border-radius: calc(var(--radius) * .6); border: 2px solid transparent; padding: 0; overflow: hidden; background: var(--surface); }
.thumbs button[aria-current="true"] { border-color: var(--accent); }

/* placeholder art (swap for real <img> in production) */
.ph-1 { background: radial-gradient(circle at 35% 35%, #fafaf9 0 18%, transparent 19%), linear-gradient(135deg, #d6d3d1, #a8a29e); }
.ph-2 { background: radial-gradient(circle at 60% 55%, #fef3c7 0 22%, transparent 23%), linear-gradient(160deg, #fde68a, #f59e0b); }
.ph-3 { background: linear-gradient(90deg, transparent 45%, rgba(255,255,255,.55) 45% 55%, transparent 55%), linear-gradient(135deg, #bfdbfe, #3b82f6); }
.ph-4 { background: radial-gradient(ellipse at 50% 80%, #fecdd3 0 30%, transparent 31%), linear-gradient(200deg, #fda4af, #e11d48); }
.ph-5 { background: repeating-linear-gradient(45deg, #e7e5e4 0 12px, #d6d3d1 12px 24px); }

/* info */
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); margin: 0 0 8px; }
.title { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.15; margin: 0 0 10px; }
.rating { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--muted); }
.stars { color: #f59e0b; letter-spacing: 2px; }
.price-row { display: flex; align-items: baseline; gap: 12px; margin: 18px 0; }
.price { font-size: 1.6rem; font-weight: 700; }
.price-old { color: var(--muted); text-decoration: line-through; }
.badge { font-size: .75rem; font-weight: 700; color: #fff; background: var(--sale); padding: 3px 8px; border-radius: 6px; }
.lede { color: var(--muted); margin: 0 0 22px; }

.opt { margin: 0 0 20px; }
.opt-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: 8px; }
.opt-head b { font-weight: 600; }
.opt-list { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-width: 48px; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); }
.chip[aria-pressed="true"] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.chip:disabled { opacity: .4; text-decoration: line-through; cursor: not-allowed; }
.swatch { width: 40px; height: 40px; min-width: 0; padding: 0; border-radius: 50%; border: 2px solid var(--bg); box-shadow: 0 0 0 1px var(--line); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--accent); }

.buy { display: flex; gap: 10px; margin: 8px 0 14px; }
.qty { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; }
.qty button { width: 40px; height: 52px; border: 0; background: none; font-size: 1.2rem; }
.qty input { width: 40px; border: 0; text-align: center; font: inherit; background: none; color: inherit; -moz-appearance: textfield; }
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.btn { flex: 1; height: 52px; border-radius: 10px; border: 0; background: var(--accent); color: var(--accent-text); font-weight: 600; font-size: 1rem; }
.btn:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }

.perks { list-style: none; padding: 0; margin: 18px 0; display: grid; gap: 8px; font-size: .9rem; color: var(--muted); }
.perks li::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 8px; }

details { border-top: 1px solid var(--line); padding: 16px 0; }
details:last-of-type { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; }
details[open] summary::after { content: "–"; }
details p, details ul { color: var(--muted); font-size: .95rem; }

/* tabs */
.tabs [role=tablist] { display: flex; gap: 6px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs [role=tab] { border: 0; background: none; padding: 12px 16px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs [role=tab][aria-selected="true"] { color: var(--text); border-color: var(--accent); }
.tabs [role=tabpanel] { padding: 22px 0; }

/* sections */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section h2 { font-family: var(--font-display); font-size: 1.6rem; margin: 0 0 24px; }
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border-radius: var(--radius); padding: 24px; }
.feature h3 { margin: 0 0 6px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }
.reviews { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.review { border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.review p { margin: 8px 0; }
.review small { color: var(--muted); }
.related { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.card { text-decoration: none; }
.card .ph { aspect-ratio: 4 / 5; border-radius: var(--radius); margin-bottom: 10px; }
.card b { display: block; font-weight: 600; }
.card span { color: var(--muted); font-size: .9rem; }
@media (max-width: 880px) {
  .features, .reviews { grid-template-columns: 1fr; }
  .related { grid-template-columns: repeat(2, 1fr); }
}

/* sticky bar + toast */
.sticky-bar { position: fixed; left: 0; right: 0; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding: 10px 16px; display: flex; align-items: center; gap: 12px; transform: translateY(110%); transition: transform .25s ease; z-index: 20; }
.sticky-bar.is-on { transform: none; }
.sticky-bar .name { flex: 1; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sticky-bar .btn { flex: 0 0 auto; padding: 0 22px; height: 44px; }
.toast { position: fixed; top: 20px; left: 50%; transform: translate(-50%, -150%); background: var(--text); color: var(--bg); padding: 12px 20px; border-radius: 10px; transition: transform .25s ease; z-index: 30; font-size: .92rem; }
.toast.is-on { transform: translate(-50%, 0); }

.site-footer { border-top: 1px solid var(--line); padding: 32px 0; color: var(--muted); font-size: .85rem; }
