/* ─── Product page — Dedar split, IKEA working parts ─────────── */

/* Split: pinned info left, imagery right, edge to edge */
.split { display: flex; flex-direction: column-reverse; }
@media (min-width: 1024px) { .split { display: grid; grid-template-columns: 1fr 1fr; align-items: start; } }

/* Info column */
.info { padding: var(--s4) var(--gutter) var(--s6); display: flex; flex-direction: column; gap: var(--s6); }
@media (min-width: 1024px) {
  .info { position: sticky; top: var(--header-h); min-height: calc(100svh - var(--header-h)); padding: var(--s5) var(--s7) var(--s5) var(--gutter); justify-content: space-between; }
}
.info__top { display: grid; gap: var(--s5); }
.info__stack { font-size: var(--fs-m); line-height: 1.3; }
.info__stack h1 { font: inherit; margin: 0; }
.info__stack .info__name { font-family: var(--display); font-weight: 400; font-size: clamp(34px, 3.2vw, 46px); line-height: 1.04; letter-spacing: -0.01em; margin: 6px 0 4px; }
.info__stack .muted { display: block; }
@media (max-width: 749px) { .info__stack { font-size: 17px; } }
.info__code { display: grid; gap: 2px; }
.info__price { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.info__price strong { font-weight: 400; font-size: var(--fs-m); }
.info__lede { max-width: 56ch; }
.info__links { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.info__links a, .info__links button { min-height: 32px; display: inline-flex; align-items: center; color: var(--ink-2); transition: color var(--t-ui) var(--ease); }
.info__links :first-child { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.info__links a:hover, .info__links button:hover { color: var(--ink); }
.info__bottom { display: grid; gap: var(--s3); }

/* Swatches — numbered squares, underline marks the current one (Dedar) */
.opt { border: 0; padding: 0; margin: 0; min-width: 0; }
.opt__label { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0 0 10px; padding: 0; }
.opt__label output { color: var(--ink); }
.swatches { display: grid; grid-template-columns: repeat(var(--n, 7), minmax(0, 64px)); gap: 8px; }
@media (max-width: 520px) { .swatches { grid-template-columns: repeat(var(--n-m, 5), minmax(0, 1fr)); } }
.swatch { display: block; }
.swatch__img { display: block; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.swatch__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 600ms var(--ease); }
.swatch:hover .swatch__img img { transform: scale(1.06); }
.swatch__n { display: block; font-size: var(--fs-xs); padding-top: 4px; border-bottom: 1px solid transparent; transition: border-color var(--t-ui) var(--ease); color: var(--ink-2); }
.swatch[aria-current="page"] .swatch__n { border-color: var(--ink); color: var(--ink); }

/* Size chips — square */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span { display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 16px; border: 1px solid var(--line); transition: border-color var(--t-ui) var(--ease), background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease); cursor: pointer; }
.chip span small { color: var(--ink-2); font-size: var(--fs-xs); }
.chip:hover span { border-color: var(--ink); }
.chip input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.chip input:checked + span small { color: #BDBDBD; }
.chip input:disabled + span { color: var(--ink-3); border-style: dashed; cursor: not-allowed; }
.chip:hover input:disabled + span { border-color: var(--line); }
.chip input:focus-visible + span { outline: 1.5px solid var(--ink); outline-offset: 2px; }

.note { color: var(--ink-2); font-size: var(--fs-xs); }

/* Complete with (IKEA) */
.complete { border-top: 1px solid var(--line); }
.complete__head { display: flex; justify-content: space-between; gap: var(--s3); padding: 12px 0 4px; font-size: var(--fs-s); }
.addon { display: grid; grid-template-columns: 44px 1fr auto 24px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); cursor: pointer; min-height: 56px; line-height: 1.3; }
.addon:last-child { border-bottom: 0; }
.addon img { width: 44px; height: 44px; object-fit: cover; background: var(--paper-2); }
.addon__kind { color: var(--ink-2); font-size: var(--fs-xs); }
.tick { position: relative; width: 22px; height: 22px; }
.tick input { appearance: none; -webkit-appearance: none; margin: 0; width: 22px; height: 22px; border: 1px solid var(--ink); background: var(--paper); cursor: pointer; transition: background-color var(--t-ui) var(--ease); }
.tick input:checked { background: var(--ink); }
.tick svg { position: absolute; inset: 0; width: 22px; height: 22px; color: var(--paper); opacity: 0; transition: opacity var(--t-ui) var(--ease); pointer-events: none; }
.tick input:checked + svg { opacity: 1; }

.cta-row { display: grid; grid-template-columns: auto 1fr auto; gap: 8px; }
.qty { display: inline-flex; align-items: center; height: 48px; border: 1px solid var(--line); }
.qty button { width: 40px; height: 100%; font-size: 17px; }
.qty button:hover { background: var(--paper-2); }
.qty output { min-width: 16px; text-align: center; font-variant-numeric: tabular-nums; }
.wish[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* Media column */
.media { position: relative; min-width: 0; }
.gal { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gal::-webkit-scrollbar { display: none; }
.gal__item { position: relative; flex: 0 0 100%; scroll-snap-align: start; aspect-ratio: 1; background: var(--paper-2); overflow: hidden; cursor: zoom-in; display: block; width: 100%; }
.gal__item img { width: 100%; height: 100%; object-fit: cover; }
.gal__tag { position: absolute; left: 12px; top: 12px; padding: 4px 8px; background: var(--paper); font-size: var(--fs-xs); }
@media (min-width: 1024px) {
  .gal { display: block; overflow: visible; }
  .gal__item { cursor: crosshair; }
}
/* Loupe over gallery images (hover devices) */
.lens { position: absolute; width: 240px; height: 240px; border-radius: 50%; pointer-events: none; z-index: 2; background-repeat: no-repeat; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.9), var(--lift); opacity: 0; transform: translate(-50%, -50%) scale(0.9); transition: opacity var(--t-ui) var(--ease), transform var(--t-ui) var(--ease); }
.gal__item.is-lens .lens { opacity: 1; transform: translate(-50%, -50%) scale(1); }

/* Thumbnails — phones only (web-craft §7) */
.thumbs { --n: 5; --gap: 6px; display: flex; gap: var(--gap); overflow-x: auto; scrollbar-width: none; padding: 8px var(--gutter) 2px; }
.thumbs::-webkit-scrollbar { display: none; }
.thumbs button { flex: 0 0 calc((100% - (var(--n) - 1) * var(--gap)) / var(--n)); aspect-ratio: 1; overflow: hidden; background: var(--paper-2); opacity: 0.55; transition: opacity var(--t-ui) var(--ease); }
.thumbs button[aria-current="true"] { opacity: 1; }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
@media (min-width: 1024px) { .thumbs { display: none; } }

/* PiP video: phones overlay the first slide; desktop rides down the image column, sticky,
   inside a track bounded by the column's own height (web-craft §7). */
.pip-track { position: absolute; z-index: 3; pointer-events: none; top: 0; left: 0; width: 100%; aspect-ratio: 1; }
.pip { --pip-w: 96px; --pip-h: calc(var(--pip-w) * 16 / 9); pointer-events: auto; position: absolute; left: 12px; bottom: 12px; width: var(--pip-w); height: var(--pip-h); overflow: hidden; background: #000; cursor: pointer; box-shadow: var(--lift); }
.pip video { width: 100%; height: 100%; object-fit: cover; transition: transform 900ms var(--ease); }
.pip:hover video { transform: scale(1.04); }
.pip__label { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 8px 7px; background: linear-gradient(transparent, rgb(0 0 0 / 0.6)); color: #fff; font-size: 11px; text-align: left; }
@media (min-width: 1024px) {
  .pip-track { inset: 0; width: auto; aspect-ratio: auto; }
  .pip { --pip-w: 140px; position: sticky; left: auto; bottom: auto; top: calc(100svh - var(--pip-h) - 20px); margin: 0 0 20px 20px; }
}

/* ─── Details: accordions left, drawing right (Dedar "Specifications") ─── */
.details { display: grid; gap: var(--s6); padding-top: var(--s8); }
@media (min-width: 1024px) { .details { grid-template-columns: 1fr 1fr; gap: 0; } .details > * { padding-right: var(--s7); } }
.acc { border-top: 1px solid var(--line); }
.acc:last-child { border-bottom: 1px solid var(--line); }
.acc__btn { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 52px; text-align: left; font-size: var(--fs-m); }
.acc__sign { position: relative; width: 12px; height: 12px; flex: none; }
.acc__sign::before, .acc__sign::after { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: currentColor; transition: transform var(--t-ui) var(--ease); }
.acc__sign::after { transform: rotate(90deg); }
.acc[data-open="true"] .acc__sign::after { transform: rotate(0deg); }
.acc__body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--t-panel) var(--ease); }
.acc[data-open="true"] .acc__body { grid-template-rows: 1fr; }
.acc__inner { overflow: hidden; }
.acc__pad { padding: 4px 0 var(--s5) 26px; display: grid; gap: var(--s3); }
.acc__pad p { max-width: 62ch; }
.spec { margin: 0; display: grid; gap: 2px; }
.spec > div { display: grid; grid-template-columns: minmax(110px, 30%) 1fr; gap: var(--s4); }
.spec dt { color: var(--ink-2); }
.spec dd { margin: 0; }
.units { display: flex; gap: 16px; margin-bottom: 6px; }
.units label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; min-height: 32px; }
.units input { appearance: none; -webkit-appearance: none; width: 9px; height: 9px; border: 1px solid var(--ink); border-radius: 50%; margin: 0; }
.units input:checked { background: var(--ink); }
.footnote { color: var(--ink-2); font-size: var(--fs-xs); max-width: 62ch; }
.inc { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.inc li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; }
.inc li span { color: var(--ink-2); }
.drawing { position: relative; }
@media (min-width: 1024px) { .drawing { position: sticky; top: calc(var(--header-h) + 24px); } }
.drawing svg { width: 100%; height: auto; max-width: 560px; }
.drawing text { font-family: var(--sans); font-size: 12px; fill: var(--ink-2); }
.drawing .big { font-size: 15px; fill: var(--ink); }
.drawing__cap { margin-top: var(--s3); color: var(--ink-2); font-size: var(--fs-xs); }

/* ─── Get the look ──────────────────────────────────────────── */
.look { display: grid; gap: var(--s5); }
@media (min-width: 1024px) { .look { grid-template-columns: 1fr 1fr; gap: 0; align-items: center; } }
.look__img { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--paper-2); }
.look__img img { width: 100%; height: 100%; object-fit: cover; }
.look__body { padding: 0 var(--gutter); }
@media (min-width: 1024px) { .look__body { padding: 0 var(--s7); max-width: 640px; } }
.spot { position: absolute; width: 44px; height: 44px; transform: translate(-50%, -50%); display: grid; place-items: center; }
.spot::before { content: ""; width: 20px; height: 20px; border-radius: 50%; background: rgb(255 255 255 / 0.95); box-shadow: 0 1px 6px rgb(0 0 0 / 0.25); transition: transform var(--t-ui) var(--ease); }
.spot::after { content: ""; position: absolute; width: 6px; height: 6px; border-radius: 50%; background: var(--ink); }
.spot:hover::before, .spot[aria-expanded="true"]::before { transform: scale(1.25); }
.look__list { margin-top: var(--s5); border-top: 1px solid var(--line); }
.look__row { display: grid; grid-template-columns: 56px 1fr auto; gap: var(--s4); align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); transition: background-color var(--t-ui) var(--ease); }
.look__row.is-hot { background: var(--paper-2); }
.look__row img { width: 56px; height: 56px; object-fit: cover; }
.look__row span { color: var(--ink-2); display: block; }
.mini-add { height: 40px; padding: 0 14px; border: 1px solid var(--ink); font-size: var(--fs-s); transition: background-color var(--t-ui) var(--ease), color var(--t-ui) var(--ease); }
.mini-add:hover { background: var(--ink); color: var(--paper); }

/* ─── Mobile buy bar ────────────────────────────────────────── */
.mbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 8px var(--gutter) calc(8px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 1px solid var(--line); transform: translateY(105%); transition: transform var(--t-panel) var(--ease); }
.mbar.is-on { transform: none; }
.mbar span { display: block; color: var(--ink-2); }
@media (min-width: 1024px) { .mbar { display: none; } }

/* ─── Viewer + video ────────────────────────────────────────── */
.viewer { position: absolute; inset: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.viewer::-webkit-scrollbar { display: none; }
.viewer.is-zoomed { overflow: hidden; }
.viewer__slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; grid-template-rows: minmax(0, 1fr); padding: 64px 0; overflow: hidden; }
@media (min-width: 750px) { .viewer__slide { padding: 64px 96px; } }
.viewer__slide img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; transition: transform 380ms var(--ease); user-select: none; -webkit-user-drag: none; }
.viewer__slide.is-zoomed img { transform: scale(2.2); cursor: zoom-out; }
.viewer__nav { position: absolute; top: 50%; transform: translateY(-50%); height: 44px; padding: 0 16px; display: none; align-items: center; z-index: 4; font-size: 15px; }
.viewer__nav:hover { text-decoration: underline; text-underline-offset: 4px; }
.viewer__nav--prev { left: 8px; } .viewer__nav--next { right: 8px; }
@media (min-width: 750px) { .viewer__nav { display: flex; } }
.viewer__count { position: absolute; left: var(--gutter); top: 20px; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.vid-wrap { position: absolute; inset: 0; display: grid; place-items: center; padding: 60px 16px 40px; }
.vid-wrap video { max-height: 100%; max-width: 100%; aspect-ratio: 9 / 16; background: #000; }
.vid-cap { position: absolute; left: 0; right: 0; bottom: 12px; text-align: center; font-size: var(--fs-xs); color: #BDBDBD; }

.viewer:focus, .vid-wrap:focus, .lb:focus { outline: none; }
