/*
 * Product page v2 ("pdp2") — the shared product block of the hidden v2 pages:
 * product-poster-v2.php, product-canvas.php (plus css/pdp2-canvas.css) and
 * product-frame-v2.php.
 * Every rule is scoped under .pdp2 so nothing reaches the shared header,
 * footer or sliders, except the slider cards' look under .pdp2-recs. Tokens: docs/superpowers/specs/2026-10-21-poster-pdp-v2-handoff.md §2.
 * Served unminified via assetUrl() — not in the Gruntfile.
 */

.pdp2 {
  --c-ink: #1A1A1A;
  --c-ink-2: #3D3935;
  --c-muted: #57524C;
  --c-muted-2: #6B6560;
  --c-btn: #141414;
  --bg-page: #FFFFFF;
  --bg-wall: #F4F1EC;
  --bg-panel: #FCFBF9;
  --bg-pill: #F1EDE6;
  --bg-pill-2: #EAE5DD;
  --line: #E8E3DA;
  --line-strong: #D9D3C9;
  --line-hover: #BDB5A9;
  --c-sale: #B42318;
  --c-total: #13805A;
  --c-badge: #3F5348;
  --c-star: #B7791F;

  --s-1: 4px;
  --s-2: 8px;
  --s-3: 12px;
  --s-4: 16px;
  --s-5: 22px;
  --s-6: 32px;
  --s-8: 48px;
  --s-9: 72px;
  --r-sm: 2px;
  --r-md: 6px;
  --r-lg: 10px;
  --hit: 44px;

  --sh-frame: 0 18px 40px rgba(60, 45, 30, .18);
  --sh-poster: 0 14px 36px rgba(60, 45, 30, .16);
  --sh-card: 0 6px 16px rgba(60, 45, 30, .14);
  --sh-bar: 0 -8px 20px rgba(40, 30, 20, .08);
  --sh-float: 0 2px 8px rgba(0, 0, 0, .12);

  font-family: var(--text-font-family, "Nunito Sans", sans-serif);
  color: var(--c-ink);
  -webkit-font-smoothing: antialiased;
}

.pdp2 *,
.pdp2 *::before,
.pdp2 *::after {
  box-sizing: border-box;
}

.pdp2 :focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 2px;
}

.pdp2 a:hover {
  color: var(--c-muted-2);
}

.pdp2 .pdp2-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ── Section layout (§6.1) ──────────────────────────────────────────── */

.pdp2 .pdp2-product {
  display: flex;
  flex-wrap: wrap;
  background: var(--bg-wall);
}

/* Gallery + panel bases add up to 1120px, where the panel turns sticky. */
.pdp2 .pdp2-gallery {
  flex: 999 1 600px;
  min-width: 0;
  padding: 28px 32px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.pdp2 .pdp2-panel {
  flex: 1 1 520px;
  min-width: 0;
  background: var(--bg-panel);
  border-left: 1px solid var(--line);
  padding: 32px 36px 48px;
}

@media (min-width: 1120px) {
  .pdp2 .pdp2-panel__inner {
    position: sticky;
    top: 16px;
  }
}

@media (max-width: 1119.98px) {
  .pdp2 .pdp2-panel {
    flex-basis: 100%;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 767.98px) {
  .pdp2 .pdp2-gallery {
    padding: 12px 0 16px;
    align-items: stretch;
  }

  .pdp2 .pdp2-panel {
    padding: 24px 16px 40px;
  }
}

/* ── Breadcrumb (§6.2) ──────────────────────────────────────────────── */

.pdp2 .pdp2-crumbs {
  width: 100%;
  margin-bottom: 24px;
}

.pdp2 .pdp2-crumbs .breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0 16px;
  list-style: none;
  font-size: 11px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-muted-2);
}

.pdp2 .pdp2-crumbs .breadcrumbs li + li::before {
  content: "/";
  padding: 0 .6em;
}

.pdp2 .pdp2-crumbs a {
  color: inherit;
  text-decoration: none;
}

/* Phones: one left-aligned line on the 16px edge, cut off with an ellipsis. */
@media (max-width: 767.98px) {
  .pdp2 .pdp2-crumbs {
    margin-bottom: 0;
  }

  .pdp2 .pdp2-crumbs .breadcrumbs {
    display: block;
    padding: 0 16px 12px;
    font-size: 10px;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .pdp2 .pdp2-crumbs .breadcrumbs li {
    display: inline;
  }
}

/* ── Gallery (§6.3, §6.4) ───────────────────────────────────────────── */

.pdp2 .pdp2-viewer {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 28px;
  width: 100%;
}

.pdp2 .pdp2-thumbs {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  flex: 0 0 116px;
  width: 116px;
}

/* Thumbnail: image box over a short indicator bar. Selection fades the
   others back and darkens the bar; no box or outline. */
.pdp2 .pdp2-thumb {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.pdp2 .pdp2-thumb:focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 3px;
}

.pdp2 .pdp2-thumb__box {
  display: block;
  width: 100%;
  opacity: .55;
  transition: opacity 150ms ease;
}

.pdp2 .pdp2-thumb[aria-current="true"] .pdp2-thumb__box {
  opacity: 1;
}

@media (hover: hover) {
  .pdp2 .pdp2-thumb[aria-current="false"]:hover .pdp2-thumb__box {
    opacity: .85;
  }
}

.pdp2 .pdp2-thumb__bar {
  display: block;
  width: 24px;
  height: 2px;
  border-radius: 1px;
  background: transparent;
}

.pdp2 .pdp2-thumb[aria-current="true"] .pdp2-thumb__bar {
  background: var(--c-ink);
}

.pdp2 .pdp2-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 30;
  object-fit: cover;
  background: var(--bg-wall);
}

/* The render keeps its real ratio (landscape motifs); photos are cropped to 21:30. */
.pdp2 .pdp2-thumb--poster img {
  aspect-ratio: auto;
  object-fit: contain;
  box-shadow: var(--sh-card);
}

/* Lead view (canvas 3D): a 21:30 canvas the page module draws into. */
.pdp2 .pdp2-thumb--lead canvas {
  display: block;
  width: 100%;
  aspect-ratio: 21 / 30;
}

/* Frames: product shots are shown whole, never cropped. */
.pdp2 .pdp2-viewer--contain .pdp2-thumb img {
  object-fit: contain;
}

/* Sized from the viewport height so the poster fills the screen below the
   header (the spec line may fall just under the fold); 400px at least, so
   laptops still get a big poster, and 600px at most. */
.pdp2 .pdp2-stage-wrap {
  flex: 0 1 auto;
  width: 600px;
  width: clamp(400px, calc((100vh - 160px) * .75), 600px);
  max-width: 100%;
  min-width: 0;
}

/* A fixed 3:4 box, so switching between the poster (5:7, landscape) and the
   3:4 photos never changes the stage height. */
.pdp2 .pdp2-stage {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 3 / 4;
  touch-action: pan-y;
}

.pdp2 .pdp2-stage__zoom {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: zoom-in;
}

.pdp2 .pdp2-stage__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  background: var(--bg-wall);
}

.pdp2 .pdp2-stage--poster .pdp2-stage__img {
  box-shadow: var(--sh-poster);
}

.pdp2 .pdp2-stage--photo .pdp2-stage__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Framed preview: the frame's front image (5:7 window) at its own ratio in
   the bare poster's box, the poster shrunk into its window; frameFit in
   js/pdp2.js sizes both. object-fit only crops the odd pixel; the shadow moves
   to the frame. The box is the frame on screen; ::before draws the portrait
   front image in it, turned a quarter for a landscape poster. */
.pdp2 .pdp2-stage__frame {
  position: absolute;
  pointer-events: none;
}

.pdp2 .pdp2-stage__frame::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: var(--pdp2-front-w, 100%);
  height: var(--pdp2-front-h, 100%);
  background: var(--pdp2-front, none) center / 100% 100% no-repeat;
  transform: translate(-50%, -50%) rotate(var(--pdp2-front-turn, 0deg));
}

.pdp2 .pdp2-stage--framed .pdp2-stage__img {
  object-fit: cover;
  box-shadow: none;
}

.pdp2 .pdp2-stage--framed .pdp2-stage__frame {
  box-shadow: var(--sh-poster);
}

.pdp2 .pdp2-stage__frame[hidden] {
  display: none;
}

/* Lead view (canvas 3D, js/pdp2-canvas.js): fills the stage in place of the
   image, and isn't displayed while another view shows (its module re-lays
   out when the stage gives it a size again). */
.pdp2 .pdp2-stage__lead {
  display: none;
  position: absolute;
  inset: 0;
}

.pdp2 .pdp2-stage--lead .pdp2-stage__lead {
  display: block;
}

.pdp2 .pdp2-stage--lead .pdp2-stage__zoom {
  display: none;
}

/* Frames: the whole product shot, no crop. */
.pdp2 .pdp2-viewer--contain .pdp2-stage--photo .pdp2-stage__img {
  width: auto;
  height: auto;
  object-fit: contain;
}

.pdp2 .pdp2-spec {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  margin: 24px 0 0;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--c-muted);
}

.pdp2 .pdp2-viewer--single .pdp2-thumbs {
  display: none !important;
}

/* Phones: image, then a sideways thumbnail strip, both on the gallery
   background and the same 16px edge. The poster is as wide as the screen
   allows (360px at most) and the image area 520px tall at most, less on
   short phones so the top of the thumbnail strip stays in view. */
@media (max-width: 767.98px) {
  .pdp2 .pdp2-viewer {
    --pdp2-stage-h: clamp(360px, calc(100vh - 200px), 520px);
    --pdp2-poster-w: 360px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }

  @supports (height: 100svh) {
    .pdp2 .pdp2-viewer {
      --pdp2-stage-h: clamp(360px, calc(100svh - 200px), 520px);
    }
  }

  /* Lets the stage and strip be ordered as siblings. */
  .pdp2 .pdp2-stage-wrap {
    display: contents;
  }

  .pdp2 .pdp2-stage {
    order: 1;
    height: var(--pdp2-stage-h);
    padding: 0 16px;
    aspect-ratio: auto;
    overflow: hidden;
  }

  .pdp2 .pdp2-stage--poster .pdp2-stage__img {
    max-width: min(var(--pdp2-poster-w), 100%);
  }

  /* Same box as the poster above: as wide as it (360px, or less when the
     stage is too short for that) and at its aspect ratio, cropped to fill.
     Without a poster, a 5:7 box. */
  .pdp2 .pdp2-stage--photo .pdp2-stage__img {
    width: min(var(--pdp2-poster-w), 100%, calc(var(--pdp2-stage-h) * var(--pdp2-poster-ratio, .7143)));
    height: auto;
    aspect-ratio: var(--pdp2-poster-ratio, .7143);
  }

  /* Frames: the whole shot at its own ratio, within the stage. */
  .pdp2 .pdp2-viewer--contain .pdp2-stage--photo .pdp2-stage__img {
    width: auto;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: auto;
  }

  /* Centred when they fit; otherwise overflows on the right so a cut-off
     thumbnail shows there's more. */
  .pdp2 .pdp2-thumbs {
    order: 2;
    flex: none;
    flex-direction: row;
    align-items: flex-start;
    gap: 10px;
    width: auto;
    padding: 14px 16px 4px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
  }

  .pdp2 .pdp2-thumbs::-webkit-scrollbar {
    display: none;
  }

  /* Centred while they fit. Auto margins rather than justify-content: center,
     which would push the first thumbs out of reach once the strip scrolls. */
  .pdp2 .pdp2-thumb:first-child {
    margin-left: auto;
  }

  .pdp2 .pdp2-thumb:last-child {
    margin-right: auto;
  }

  /* Four fill the strip (most motifs have exactly four), capped at the
     desktop size on wide screens. From five on they shrink a little so the
     fifth peeks in at the right edge and the strip reads as scrollable. */
  .pdp2 .pdp2-thumb {
    gap: 6px;
    width: min(100px, calc((100% - 3 * 10px) / 4));
  }

  .pdp2 .pdp2-thumbs:has(.pdp2-thumb:nth-child(5)) .pdp2-thumb {
    width: min(100px, calc((100% - 4 * 10px) / 4.4));
  }

  .pdp2 .pdp2-thumb__bar {
    width: 20px;
  }

  /* Size and paper weight: desktop only. */
  .pdp2 .pdp2-spec {
    display: none;
  }
}

/* ── Buy panel (§6.5) ───────────────────────────────────────────────── */

.pdp2 .pdp2-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-5);
  margin: 0;
}

.pdp2 .pdp2-head {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}

.pdp2 .pdp2-head__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
}

.pdp2 .pdp2-badges {
  order: -1;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-1);
}

.pdp2 .pdp2-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: var(--r-sm);
  background: var(--c-badge);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.pdp2 .pdp2-title {
  margin: 0;
  font-family: inherit;
  font-size: 24px;
  font-weight: 400;
  letter-spacing: .06em;
  line-height: 1.3;
  color: var(--c-ink);
  overflow-wrap: anywhere;
}

.pdp2 .pdp2-tags {
  font-size: 13px;
  color: var(--c-muted-2);
}

.pdp2 .pdp2-tags a {
  color: inherit;
}

.pdp2 .pdp2-artist {
  margin: 0;
  font-size: 13px;
  color: var(--c-ink-2);
}

.pdp2 .pdp2-stars {
  display: inline-flex;
  gap: 2px;
  color: var(--c-star);
}

.pdp2 .pdp2-star {
  width: 14px;
  height: 14px;
  fill: currentColor;
}

.pdp2 .pdp2-group {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--s-3);
}

.pdp2 .pdp2-group[hidden] {
  display: none;
}

.pdp2 .pdp2-label {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--c-ink);
}

/* Utförande tiles */

.pdp2 .pdp2-versions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}

.pdp2 .pdp2-version {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: var(--hit);
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-ink);
  cursor: pointer;
}

.pdp2 .pdp2-version__preview {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
}

.pdp2 .pdp2-version:hover .pdp2-version__preview {
  border-color: var(--c-ink);
}

.pdp2 .pdp2-version[aria-pressed="true"] .pdp2-version__preview {
  border: 2px solid var(--c-ink);
  padding: 3px;
}

/* Mini poster: grey sheet; posterdesign/textposter get a white margin, bleed is full. */
.pdp2 .pdp2-version__preview > span {
  position: relative;
  display: block;
  height: 100%;
  aspect-ratio: 21 / 30;
  background: #C9C2B7;
}

.pdp2 .pdp2-version__preview--posterdesign > span,
.pdp2 .pdp2-version__preview--textposter > span {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line-strong), inset 0 0 0 4px #fff, inset 0 0 0 40px #C9C2B7;
}

.pdp2 .pdp2-version__preview--textposter > span::after {
  content: "";
  position: absolute;
  left: 25%;
  right: 25%;
  bottom: 18%;
  height: 2px;
  background: var(--c-muted);
}

.pdp2 .pdp2-version__name {
  font-size: 11px;
  line-height: 1.2;
}

/* Färg swatches */

.pdp2 .pdp2-colors {
  display: flex;
  flex-wrap: wrap;
  gap: 2px;
  margin-left: -9px;
}

.pdp2 .pdp2-swatch {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hit);
  height: var(--hit);
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.pdp2 .pdp2-swatch__chip {
  display: block;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  border: 1px solid #C9C2B7;
}

.pdp2 .pdp2-swatch:hover .pdp2-swatch__chip {
  border-color: var(--c-ink);
}

.pdp2 .pdp2-swatch[aria-pressed="true"] .pdp2-swatch__chip {
  box-shadow: 0 0 0 2px var(--bg-panel), 0 0 0 4px var(--c-ink);
}

/* Storlek: the shared ga-select (js/utils.js), restyled */

.pdp2 .pdp2-select {
  width: 100%;
  font-size: 14px;
  color: var(--c-ink);
}

.pdp2 .pdp2-select .ga-select__holder {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 0 40px 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  font-weight: 500;
}

.pdp2 .pdp2-select .ga-select__holder:focus-visible {
  outline: 2px solid var(--c-ink);
  outline-offset: 2px;
}

.pdp2 .pdp2-select .ga-select__text {
  width: 100%;
  gap: var(--s-2);
}

.pdp2 .pdp2-select .ga-select__title {
  font-weight: 500;
}

.pdp2 .pdp2-select .ga-select__price {
  font-weight: 400;
  color: var(--c-ink);
}

.pdp2 .pdp2-select .price--old {
  color: var(--c-muted-2);
  text-decoration: line-through;
}

.pdp2 .pdp2-select .price--sale {
  color: var(--c-sale);
  font-weight: 500;
}

.pdp2 .pdp2-select .ga-select__marker {
  right: 14px;
}

.pdp2 .pdp2-select .ga-select-dropdown {
  border-color: var(--line-strong);
  border-radius: 0 0 var(--r-md) var(--r-md);
}

.pdp2 .pdp2-select.ga-select--open .ga-select__holder {
  border-radius: var(--r-md) var(--r-md) 0 0;
}

.pdp2 .pdp2-select .ga-select-dropdown__label {
  position: relative;
  min-height: var(--hit);
  padding: 12px 11px;
  cursor: pointer;
}

/* Keep the size radios focusable (the shared style uses display:none). */
.pdp2 .pdp2-select .ga-select-dropdown__input {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.pdp2 .pdp2-select .ga-select-dropdown__label:focus-within {
  outline: 2px solid var(--c-ink);
  outline-offset: -2px;
}

/* A size the chosen option lacks (canvas float frames). */
.pdp2 .pdp2-select .ga-select-dropdown__item.is-disabled {
  opacity: .45;
}

.pdp2 .pdp2-select .ga-select-dropdown__item.is-disabled .ga-select-dropdown__label,
.pdp2 .pdp2-select .ga-select-dropdown__item.is-disabled .ga-select-dropdown__input {
  cursor: not-allowed;
  pointer-events: none;
}

.pdp2 .pdp2-size-extra {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s-3);
}

.pdp2 .pdp2-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  font-size: 13px;
  color: var(--c-ink);
  text-decoration: none;
}

.pdp2 .pdp2-btn-secondary:hover {
  border-color: var(--c-ink);
  color: var(--c-ink);
}

.pdp2 .pdp2-btn-secondary__icon {
  width: 18px;
  height: 18px;
}

.pdp2 .pdp2-sale-note {
  margin: 0;
  font-size: 12px;
  font-style: italic;
  color: var(--c-sale);
}

.pdp2 .pdp2-link {
  font-size: 13px;
  color: var(--c-ink);
}

.pdp2 .pdp2-attr {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #fff;
  font: inherit;
  font-size: 14px;
}

.pdp2 .pdp2-addons:empty {
  display: none;
}

/* Ram: a sideways-scrolling row of round swatches, "Ingen ram" first */

.pdp2 .pdp2-frames {
  display: flex;
  gap: var(--s-2);
  max-width: 100%;
  overflow-x: auto;
  padding: 4px;
  margin: -4px;
  scrollbar-width: none;
}

.pdp2 .pdp2-frames::-webkit-scrollbar {
  display: none;
}

.pdp2 .pdp2-frame {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 64px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-ink);
  cursor: pointer;
}

.pdp2 .pdp2-frame:disabled {
  opacity: .4;
  cursor: not-allowed;
}

.pdp2 .pdp2-frame__sw {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--hit);
  height: var(--hit);
  margin-bottom: 2px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fff;
}

.pdp2 .pdp2-frame:hover:not(:disabled) .pdp2-frame__sw {
  border-color: var(--c-ink);
}

/* Selected: the Färg swatch's ring, with a panel-coloured gap. */
.pdp2 .pdp2-frame[aria-pressed="true"] .pdp2-frame__sw {
  box-shadow: 0 0 0 2px var(--bg-panel), 0 0 0 4px var(--c-ink);
}

.pdp2 .pdp2-frame__sw img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Ingen ram: an empty circle struck through. */
.pdp2 .pdp2-frame__sw--none {
  background: linear-gradient(to top right, transparent calc(50% - .75px), var(--c-muted) calc(50% - .75px), var(--c-muted) calc(50% + .75px), transparent calc(50% + .75px)) #fff;
}

.pdp2 .pdp2-frame__name {
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.pdp2 .pdp2-frame__price {
  font-size: 11px;
  line-height: 1.2;
  color: var(--c-muted);
  white-space: nowrap;
}

/* Poster Ram picker (product-poster-v2.php): the row above as radios in a
   fieldset. When the row overflows (data-overflow/-prev/-next, js/pdp2.js
   initFrameRow): a mouse or trackpad gets whole swatches, prev/next arrows
   at the row's ends, snapping and a count; touch gets a swatch
   peeking out at the edge and edge fades. Spec: frame-picker-B-handoff.md.
   The canvas page keeps the buttons above. */

.pdp2 .pdp2-framepick {
  position: relative;
  min-width: 0; /* fieldsets default to min-content, which would stop the row scrolling */
  margin: 0;
  padding: 0;
  border: 0;
}

/* The count sits in the legend: a fieldset's legend isn't in its padding box,
   so an absolutely placed count would land on the swatches. */
.pdp2 .pdp2-framepick__legend {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  float: none;
  width: 100%;
  margin: 0 0 var(--s-3);
  padding: 0;
  font-size: 13px;
  line-height: 20px;
}

.pdp2 .pdp2-framepick__count {
  display: none;
  flex: none;
  font-size: 12px;
  font-weight: 400;
  line-height: 16px;
  color: var(--c-muted);
}

.pdp2 .pdp2-framepick__viewport {
  position: relative;
}

/* Edge fades where swatches are hidden: --fade-size is FRAME_FADE in
   js/pdp2.js (touch here; none with a mouse, below). */
.pdp2 .pdp2-framepick .pdp2-frames {
  --fade-size: 32px;
  position: relative; /* swatch offsetLeft is measured from the row */
  gap: var(--s-3);
  margin: 0;
  padding: 4px; /* room for the selected ring */
  scroll-padding-inline: 4px;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 var(--fade-l, 0px), #000 calc(100% - var(--fade-r, 0px)), transparent 100%);
}

.pdp2 .pdp2-framepick[data-prev="true"] .pdp2-frames {
  --fade-l: var(--fade-size);
}

.pdp2 .pdp2-framepick[data-next="true"] .pdp2-frames {
  --fade-r: var(--fade-size);
}

.pdp2 .pdp2-framepick .pdp2-frame {
  position: relative;
  flex: 0 0 auto;
  min-width: 72px;
  max-width: 96px;
  width: auto;
  gap: 6px;
  padding: 4px 0;
  margin: 0;
  font-weight: 400;
}

/* The radio covers the swatch, invisible: clicks and focus land on it. */
.pdp2 .pdp2-framepick .pdp2-frame__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
  appearance: none;
}

.pdp2 .pdp2-framepick .pdp2-frame__input:disabled {
  cursor: not-allowed;
}

.pdp2 .pdp2-framepick .pdp2-frame__input:disabled ~ * {
  opacity: .4;
}

.pdp2 .pdp2-framepick .pdp2-frame__sw {
  width: 52px;
  height: 52px;
  margin: 0;
  background: var(--bg-wall); /* holds the place while the swatch image loads */
  transition: box-shadow 120ms ease-out;
}

.pdp2 .pdp2-framepick .pdp2-frame__sw--none {
  background: linear-gradient(to top right, transparent calc(50% - 1px), var(--c-ink) calc(50% - 1px), var(--c-ink) calc(50% + 1px), transparent calc(50% + 1px)) var(--bg-wall);
}

/* Undo the button rules above; the ring below shows hover instead. */
.pdp2 .pdp2-framepick .pdp2-frame:hover .pdp2-frame__sw {
  border-color: var(--line-strong);
}

.pdp2 .pdp2-framepick .pdp2-frame:hover .pdp2-frame__input:not(:checked):not(:disabled) + .pdp2-frame__sw {
  box-shadow: 0 0 0 2px var(--bg-panel), 0 0 0 3px var(--line-hover);
}

.pdp2 .pdp2-framepick .pdp2-frame__input:checked + .pdp2-frame__sw {
  box-shadow: 0 0 0 2px var(--bg-panel), 0 0 0 4px var(--c-ink);
}

.pdp2 .pdp2-framepick .pdp2-frame__input:focus-visible {
  outline: 0;
}

.pdp2 .pdp2-framepick .pdp2-frame__input:focus-visible + .pdp2-frame__sw {
  outline: 2px solid var(--c-ink);
  outline-offset: 6px;
}

.pdp2 .pdp2-framepick .pdp2-frame__name,
.pdp2 .pdp2-framepick .pdp2-frame__price {
  max-width: 96px;
  font-size: 12px;
  line-height: 16px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Ingen ram's empty price line keeps the names in line. */
.pdp2 .pdp2-framepick .pdp2-frame__price {
  min-height: 16px;
}

/* Columns sized by js/pdp2.js: on touch so the swatch at the edge peeks out
   (peekWidth), with a mouse so whole swatches fill the row (fitWidth). Names
   may then wrap to two lines, the price straight under. */
.pdp2 .pdp2-framepick .pdp2-frames[data-sized] .pdp2-frame {
  flex: 0 0 var(--frame-col);
  min-width: 0;
  max-width: none;
}

.pdp2 .pdp2-framepick .pdp2-frames[data-sized] .pdp2-frame__name {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: break-word;
  text-align: center;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pdp2 .pdp2-framepick .pdp2-frames[data-sized] .pdp2-frame__price {
  max-width: 100%;
}

.pdp2 .pdp2-framepick__arrow {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .pdp2 .pdp2-framepick[data-overflow="true"] .pdp2-framepick__count {
    display: block;
  }

  /* No fades: the arrows say there's more, and the row shows whole swatches. */
  .pdp2 .pdp2-framepick .pdp2-frames {
    --fade-size: 0px;
    gap: var(--s-2);
    scroll-snap-type: x mandatory;
  }

  .pdp2 .pdp2-framepick .pdp2-frame {
    scroll-snap-align: start;
  }

  /* When the row overflows it gives up 36px at each end, inside the panel,
     for the arrows (32px), so they never cover a swatch. Both ends, so the
     row doesn't shift when the prev arrow appears. */
  .pdp2 .pdp2-framepick[data-overflow="true"] .pdp2-framepick__viewport {
    padding-inline: 36px;
  }

  /* Centred on the 52px circle (4px row + 4px swatch padding + 26px − 16px).
     ::before makes the hit area 44px. */
  .pdp2 .pdp2-framepick__arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 18px;
    z-index: 1;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
    background: #fff;
    color: var(--c-ink);
    box-shadow: var(--sh-float);
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: opacity 150ms ease-out, visibility 0s linear 150ms, background-color 100ms ease-out, border-color 100ms ease-out;
  }

  .pdp2 .pdp2-framepick__arrow::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 50%;
  }

  .pdp2 .pdp2-framepick__arrow svg {
    width: 16px;
    height: 16px;
  }

  .pdp2 .pdp2-framepick__arrow--prev {
    left: 0;
  }

  .pdp2 .pdp2-framepick__arrow--next {
    right: 0;
  }

  .pdp2 .pdp2-framepick__arrow:hover {
    background: var(--bg-pill);
    border-color: var(--line-hover);
  }

  .pdp2 .pdp2-framepick__arrow:active {
    background: var(--bg-pill-2);
  }

  .pdp2 .pdp2-framepick[data-prev="true"] .pdp2-framepick__arrow--prev,
  .pdp2 .pdp2-framepick[data-next="true"] .pdp2-framepick__arrow--next {
    opacity: 1;
    visibility: visible;
    transition-delay: 0s;
  }
}
@media (prefers-reduced-motion: reduce) {
  .pdp2 .pdp2-framepick .pdp2-frame__sw,
  .pdp2 .pdp2-framepick__arrow {
    transition: none;
  }
}

.pdp2 .pdp2-divider {
  width: 100%;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.pdp2 .pdp2-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
}

.pdp2 .pdp2-total__label {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.pdp2 .pdp2-total__prices {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: baseline;
  column-gap: 10px;
  min-width: 0;
}

.pdp2 .pdp2-total__amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--c-total);
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* List price: quiet grey, a step smaller, so the eye still lands on the total. */
.pdp2 .pdp2-total__was {
  font-size: 16px;
  font-weight: 400;
  color: var(--c-muted-2);
  text-transform: uppercase;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.pdp2 .pdp2-total__was[hidden] {
  display: none;
}

.pdp2 .pdp2-total__was s {
  text-decoration-line: line-through;
  text-decoration-thickness: 1px;
  text-decoration-color: color-mix(in srgb, currentColor 70%, transparent);
}

/* Actions (§6.5 item 8, §12) */

.pdp2 .pdp2-actions {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}

.pdp2 .pdp2-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--c-btn);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 100ms ease, transform 100ms ease;
}

.pdp2 .pdp2-cta:hover {
  background: #000;
}

.pdp2 .pdp2-cta:active {
  transform: scale(.99);
}

.pdp2 .pdp2-cta:disabled {
  cursor: default;
  transform: none;
}

.pdp2 .pdp2-cta:disabled:not(.pdp2-cta--loading) {
  background: #BDB8B0;
}

.pdp2 .pdp2-cta__icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.pdp2 .pdp2-cta__spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, .35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: pdp2-spin .7s linear infinite;
}

.pdp2 .pdp2-cta--loading .pdp2-cta__icon,
.pdp2 .pdp2-cta--loading .pdp2-cta__label {
  visibility: hidden;
}

.pdp2 .pdp2-cta--loading .pdp2-cta__spinner {
  display: block;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -10px 0 0 -10px;
}

@keyframes pdp2-spin {
  to {
    transform: rotate(360deg);
  }
}

.pdp2 .pdp2-cta__error {
  margin: 0;
  font-size: 13px;
  color: var(--c-sale);
}

/* Shop reviews (about Gallerix, not this poster) under the add-to-cart button. */
.pdp2 .pdp2-reviews {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: var(--hit);
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: #fff;
  font-size: 13px;
  color: var(--c-ink);
  text-decoration: none;
  white-space: nowrap;
}

.pdp2 .pdp2-reviews:hover {
  border-color: var(--c-ink);
  color: var(--c-ink);
}

.pdp2 .pdp2-reviews__count {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.pdp2 .pdp2-stock {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 24px;
  white-space: nowrap;
  min-height: var(--hit);
  padding: 10px 16px;
  border-radius: var(--r-lg);
  background: var(--bg-pill);
  font-size: 13px;
  color: var(--c-ink-2);
}

.pdp2 .pdp2-stock__item {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  min-width: 0;
}

/* Last resort on very narrow screens: cut the text rather than wrap the row. */
.pdp2 .pdp2-stock__text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdp2 .pdp2-stock__icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.pdp2 .pdp2-stock__icon--ok {
  color: var(--c-total);
  fill: currentColor;
}

.pdp2 .pdp2-save {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  width: 100%;
  min-height: var(--hit);
  padding: 0 16px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--bg-pill-2);
  color: var(--c-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}

.pdp2 .pdp2-save__icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.pdp2 .pdp2-save__icon--on,
.pdp2 .pdp2-save[aria-pressed="true"] .pdp2-save__icon--off {
  display: none;
}

.pdp2 .pdp2-save[aria-pressed="true"] .pdp2-save__icon--on {
  display: block;
}

.pdp2 .pdp2-painter {
  margin: 0;
  font-size: 13px;
  color: var(--c-ink-2);
}

@media (max-width: 767.98px) {
  .pdp2 .pdp2-cta {
    min-height: 54px;
  }

  /* Still one row: tighter spacing and text that scales down to 320px wide. */
  .pdp2 .pdp2-stock {
    gap: 12px;
    padding: 10px 12px;
    font-size: clamp(11px, 3.4vw, 13px);
  }

  .pdp2 .pdp2-stock__item {
    gap: 6px;
  }

  .pdp2 .pdp2-stock__icon {
    width: 16px;
    height: 16px;
  }
}

@media (max-width: 767.98px) {
  .pdp2 .pdp2-head__row {
    flex-direction: row;
    justify-content: space-between;
  }

  .pdp2 .pdp2-badges {
    order: 1;
    flex-shrink: 0;
  }

  .pdp2 .pdp2-title {
    font-size: 20px;
    letter-spacing: .05em;
  }

  .pdp2 .pdp2-versions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .pdp2 .pdp2-version {
    flex-direction: row;
    justify-content: flex-start;
    gap: var(--s-3);
    min-height: 56px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--line-strong);
    border-radius: var(--r-md);
    background: #fff;
  }

  .pdp2 .pdp2-version[aria-pressed="true"] {
    border: 2px solid var(--c-ink);
    padding: 5px 11px 5px 5px;
  }

  .pdp2 .pdp2-version__preview,
  .pdp2 .pdp2-version[aria-pressed="true"] .pdp2-version__preview {
    width: 42px;
    height: 42px;
    padding: 2px;
    border: 0;
  }

  .pdp2 .pdp2-version__name {
    font-size: 13px;
    text-align: left;
  }

  .pdp2 .pdp2-select .ga-select__holder {
    min-height: 50px;
    border-radius: 8px;
  }

  .pdp2 .pdp2-btn-secondary {
    min-height: var(--hit);
  }
}

/* ── Accordions (§6.5 item 9) ───────────────────────────────────────── */

.pdp2 .pdp2-accs {
  border-top: 1px solid var(--line);
}

.pdp2 .pdp2-acc {
  border-bottom: 1px solid var(--line);
}

.pdp2 .pdp2-acc__heading {
  margin: 0;
  font: inherit;
}

.pdp2 .pdp2-acc__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-3);
  width: 100%;
  min-height: 52px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-ink);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-align: left;
  cursor: pointer;
}

.pdp2 .pdp2-acc__chevron {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  fill: currentColor;
  transform: rotate(180deg);
  transition: transform 200ms ease;
}

.pdp2 .pdp2-acc__btn[aria-expanded="true"] .pdp2-acc__chevron {
  transform: rotate(0deg);
}

.pdp2 .pdp2-acc__panel {
  padding: 0 0 20px;
  font-size: 13px;
  line-height: 1.65;
  color: var(--c-ink-2);
}

.pdp2 .pdp2-acc__panel p {
  margin: 0 0 12px;
}

.pdp2 .pdp2-acc__panel p:last-child {
  margin-bottom: 0;
}

/* ── Mobile sticky add-to-cart bar (§11) ────────────────────────────── */

.pdp2 .pdp2-sticky {
  display: none;
}

@media (max-width: 767.98px) {
  .pdp2 .pdp2-sticky {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    /* Below the menu, search and cart overlays (699+), above page content (<100). */
    z-index: 650;
    display: flex;
    align-items: center;
    gap: var(--s-3);
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--sh-bar);
    transform: translateY(100%);
    visibility: hidden;
    transition: transform 200ms ease-out, visibility 0s linear 200ms;
  }

  .pdp2 .pdp2-sticky--shown {
    transform: translateY(0);
    visibility: visible;
    transition: transform 200ms ease-out, visibility 0s;
  }
}

.pdp2 .pdp2-sticky__info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.pdp2 .pdp2-sticky__meta {
  font-size: 12px;
  color: var(--c-muted-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pdp2 .pdp2-sticky__price {
  font-size: 17px;
  font-weight: 700;
  color: var(--c-total);
  white-space: nowrap;
}

.pdp2 .pdp2-sticky__btn {
  flex: 1;
  min-height: 50px;
  padding: 0 12px;
  border: 0;
  border-radius: var(--r-lg);
  background: var(--c-btn);
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  cursor: pointer;
}

.pdp2 .pdp2-sticky__btn:disabled {
  background: #BDB8B0;
  cursor: default;
}

/* ── Sliders: "Andra köpte även" and "Nyheter" ──────────────────────── */
/* Outside .pdp2, so scoped under .pdp2-recs (the sliders' container on this
   page only). Each card's poster gets a soft shadow, like the stage, instead
   of the 1px grey border. */

.pdp2-recs .product-item__img img {
  border: 0;
  box-shadow: 0 6px 16px rgba(60, 45, 30, .16);
}

/* ── Motion ─────────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  .pdp2 *,
  .pdp2 *::before,
  .pdp2 *::after {
    transition: none !important;
    animation: none !important;
  }
}
