/* ============================================================
   PLUSH product page — redesign (interim). Scoped to #plush-product
   + the two portalled elements (#plushStickyBar, #plushLightbox).
   ============================================================ */

#plush-product,
#plushStickyBar,
#plushLightbox {
  --plum:        #3E0A52;
  --magenta:     #8E17A0;
  --magenta-dk:  #711583;
  --ink:         #15121A;
  --paper:       #FFFFFF;
  --sand:        #F6F2EE;
  --charcoal:    #262229;
  --stone:       #6E6873;
  --stone-line:  #E4DFDA;
  --gold:        #B08A52;
  --ok:          #3E7A55;
  --radius:      2px;
}

#plush-product *,
#plush-product *::before,
#plush-product *::after { box-sizing: border-box; }

#plush-product {
  /* Match the rest of the storefront: so_xtore loads Plus Jakarta Sans
     site-wide and applies it to body + h1-h4. Inherit it, don't re-load. */
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--charcoal);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
#plush-product h1,
#plush-product h2,
#plush-product h3 {
  font-family: inherit;
  font-weight: 600;
  margin: 0;
  color: var(--ink);
  line-height: 1.18;
  letter-spacing: -0.01em;
}
#plush-product img { max-width: 100%; display: block; }
#plush-product a { color: inherit; text-decoration: none; }
#plush-product button { font-family: inherit; cursor: pointer; }
#plush-product :focus-visible,
#plushLightbox :focus-visible { outline: 2px solid var(--magenta); outline-offset: 2px; }

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

.plush-wrap { max-width: 1240px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 700px) { .plush-wrap { padding: 0 18px; } }

/* ---------- Breadcrumbs ---------- */
.plush-crumbs { font-size: 12.5px; color: var(--stone); }
.plush-crumbs .plush-wrap { padding-top: 16px; padding-bottom: 14px; }
.plush-crumbs a:hover { color: var(--ink); }
.plush-crumbs span { margin: 0 6px; opacity: .5; }
.plush-crumbs .current { color: var(--charcoal); }

/* ---------- Hero ---------- */
.plush-hero {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  padding: 8px 0 64px;
  align-items: start;
}
@media (max-width: 960px) { .plush-hero { grid-template-columns: 1fr; gap: 32px; } }

/* Gallery */
/* min-width:0 so the non-shrinkable thumb strip can't drive this flex item's
   min-content and blow out the hero grid track on narrow viewports. */
.plush-gallery { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
@media (max-width: 600px) {
  /* Column layout. Switch cross-axis alignment to stretch so the stage
     column fills the width — with the row layout's align-items:flex-start
     it shrank to the width of its absolutely-positioned <img> (zero flow
     content) and the aspect-ratio box collapsed to 0: the disappearing
     image. min-width:0 lets the thumb strip's overflow-x:auto actually
     bound it instead of stretching the gallery to the full thumb row. */
  .plush-gallery { flex-direction: column-reverse; align-items: stretch; }
  .plush-thumbs { min-width: 0; }
}
.plush-thumbs {
  display: flex; flex-direction: column; gap: 10px; width: 76px; flex-shrink: 0;
  position: sticky; top: 20px;
  max-height: calc(100vh - 40px); overflow-y: auto; overscroll-behavior: contain;
  scrollbar-width: thin;
}
.plush-thumbs::-webkit-scrollbar { width: 4px; }
.plush-thumbs::-webkit-scrollbar-thumb { background: var(--stone-line); }
@media (max-width: 600px) {
  .plush-thumbs { flex-direction: row; width: auto; max-height: none; overflow-x: auto; overflow-y: visible; position: static; padding-bottom: 4px; }
}
.plush-thumb {
  width: 76px; height: 76px; flex-shrink: 0;
  border: 0; padding: 0; background: var(--sand);
  overflow: hidden; opacity: .5;
  transition: opacity .15s ease, box-shadow .15s ease;
}
.plush-thumb img { width: 100%; height: 100%; object-fit: cover; }
.plush-thumb:hover { opacity: .85; }
.plush-thumb.active { opacity: 1; box-shadow: 0 2px 10px rgba(21,18,26,.18); }
.plush-stack { flex: 1; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
/* 1:1 stage via CSS aspect-ratio — no JS width measurement, so nothing to
   get stale across the <=600px column-reverse reflow or a Safari viewport
   resize. height stays auto so the ratio always drives it. */
.plush-stack-item { background: var(--sand); position: relative; overflow: hidden; aspect-ratio: 1 / 1; height: auto; }
.plush-stack-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Source smaller than the rendered box: show it at native size, centred on
   --sand, rather than upscaling it (set by JS per breakpoint). */
.plush-stack-item.is-letterboxed img {
  inset: auto; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain;
}
.plush-stage-zoom {
  position: absolute; bottom: 14px; right: 14px; width: 38px; height: 38px;
  background: rgba(255,255,255,.92); border: none; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; color: var(--ink);
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

/* Panel */
.plush-eyebrow { font-size: 12.5px; color: var(--magenta-dk); font-weight: 600; margin-bottom: 10px; letter-spacing: .02em; }
.plush-title { font-size: 38px; }
@media (max-width: 600px) { .plush-title { font-size: 30px; } }
.plush-sub { color: var(--stone); font-size: 15px; line-height: 1.6; margin: 12px 0 0; max-width: 46ch; }

.plush-price-row { display: flex; align-items: baseline; gap: 12px; margin: 22px 0 4px; flex-wrap: wrap; }
.plush-price-row .price-new { font-weight: 700; font-size: 28px; color: var(--ink); letter-spacing: -0.01em; }
.plush-price-row .price-old { text-decoration: line-through; color: var(--stone); font-size: 18px; }
.plush-price-vat { font-size: 12.5px; color: var(--stone); }

.plush-lead {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--sand); border: 1px solid var(--stone-line);
  font-size: 12.5px; color: var(--charcoal); padding: 7px 12px; margin-top: 12px;
}
.plush-lead svg { color: var(--magenta); flex-shrink: 0; }
.plush-lead b { color: var(--ink); }

.plush-divider { height: 1px; background: var(--stone-line); margin: 26px 0; }

.plush-config-head { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 2px; }
.plush-config-sub { font-size: 13px; color: var(--stone); margin-bottom: 22px; }

.plush-step { margin-bottom: 24px; }
.plush-step-label {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 13.5px; font-weight: 700; color: var(--ink); margin-bottom: 12px;
}
.plush-step-num {
  width: 20px; height: 20px; border-radius: 50%; background: var(--ink); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.plush-step-value { font-weight: 500; color: var(--magenta-dk); }

.plush-pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.plush-pill {
  border: 1.5px solid var(--stone-line); background: #fff; padding: 9px 16px;
  font-size: 13.5px; color: var(--charcoal); border-radius: 2px;
}
.plush-pill:hover { border-color: var(--ink); }
.plush-pill.selected { border-color: var(--ink); background: var(--ink); color: #fff; }
.plush-pill-delta { opacity: .7; font-size: 12px; }

/* Image pill (options that carry a per-value image but aren't the full swatch set) */
.plush-pill--image {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 7px;
}
.plush-pill--image img {
  width: 30px; height: 30px; object-fit: cover; flex-shrink: 0;
  background: var(--sand); box-shadow: 0 0 0 1px var(--stone-line);
}
/* Outline treatment to match the fabric tiles / size pills — no solid fill. */
.plush-pill--image.selected {
  background: #fff; color: var(--charcoal);
  border-color: var(--magenta);
  box-shadow: 0 0 0 3px rgba(142,23,160,.15);
}
.plush-pill--image.selected img { box-shadow: 0 0 0 1px var(--stone-line); }

.plush-fabric-current {
  display: flex; align-items: center; gap: 14px;
  background: var(--sand); border: 1px solid var(--stone-line);
  padding: 12px 14px; transition: background .3s ease;
}
.plush-fabric-current.pulse { background: #F1E4F3; }
.plush-fabric-swatch {
  width: 56px; height: 56px; flex-shrink: 0; box-shadow: 0 0 0 1px var(--stone-line);
  background-size: cover; background-position: center; display: block;
}
.plush-fabric-name { font-size: 14px; font-weight: 700; color: var(--ink); display: block; }
.plush-fabric-change {
  margin-top: 3px; font-size: 12.5px; color: var(--magenta-dk);
  text-decoration: underline; text-underline-offset: 3px; background: none; border: none; padding: 0;
}

.plush-field {
  width: 100%; border: 1.5px solid var(--stone-line); padding: 10px 12px;
  font-size: 14px; border-radius: 2px; background: #fff; color: var(--charcoal);
}

.plush-selection { background: var(--sand); border: 1px solid var(--stone-line); padding: 14px 16px; margin: 22px 0; }
.plush-selection-title { font-size: 12px; color: var(--stone); margin-bottom: 8px; }
.plush-selection-chips { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.plush-selection-chips span { background: #fff; border: 1px solid var(--stone-line); padding: 5px 10px; }
.plush-selection-chips b { color: var(--ink); font-weight: 700; }

.plush-buy-row { display: flex; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.plush-qty { display: flex; align-items: center; border: 1.5px solid var(--stone-line); height: 52px; }
.plush-qty button { background: none; border: none; width: 38px; height: 100%; font-size: 17px; color: var(--ink); }
.plush-qty input { width: 34px; text-align: center; font-size: 14px; font-weight: 600; border: none; background: none; padding: 0; }
.plush-btn {
  height: 52px; padding: 0 26px; border: none; font-size: 14px; font-weight: 700;
  letter-spacing: .02em; flex: 1; min-width: 170px; border-radius: 2px;
}
.plush-btn-primary { background: var(--magenta); color: #fff; }
.plush-btn-primary:hover { background: var(--magenta-dk); }
.plush-btn-outline { background: none; border: 1.5px solid var(--ink); color: var(--ink); }
.plush-btn-outline:hover { background: var(--ink); color: #fff; }
.plush-btn:disabled { opacity: .55; cursor: default; }

.plush-upload-status { display: block; margin-top: 8px; font-size: 12.5px; color: var(--stone); word-break: break-all; }
.plush-upload-status.is-ok { color: var(--ok); }
.plush-upload-status.is-error { color: #b3261e; }

.plush-trust { display: flex; gap: 22px; margin-top: 26px; flex-wrap: wrap; }
.plush-trust-item { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--stone); max-width: 170px; }
.plush-trust-item svg { color: var(--magenta); flex-shrink: 0; }

/* ---------- Sections ---------- */
.plush-section { border-top: 1px solid var(--stone-line); }
.plush-section .plush-wrap { padding: 52px 32px; }
@media (max-width: 700px) { .plush-section .plush-wrap { padding: 36px 18px; } }
.plush-h2 { font-size: 26px; margin-bottom: 14px; }
.plush-section-lead { font-size: 14px; line-height: 1.7; color: var(--stone); max-width: 60ch; margin: 0 0 24px; }
.plush-section-lead b { color: var(--ink); }
.plush-info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 800px) { .plush-info-grid { grid-template-columns: 1fr; gap: 20px; } }
.plush-rte { font-size: 15px; line-height: 1.75; color: var(--charcoal); max-width: 52ch; }
.plush-rte img { margin: 12px 0; }
.plush-rte--wide { max-width: 68ch; }
.plush-rte--wide p, .plush-rte p { margin: 0 0 14px; }

.plush-highlights { list-style: none; margin: 0; padding: 0; }
.plush-highlights li {
  display: flex; flex-direction: column; gap: 2px; padding: 13px 0;
  border-top: 1px solid var(--stone-line); font-size: 13.5px; color: var(--charcoal);
}
.plush-highlights li:last-child { border-bottom: 1px solid var(--stone-line); }
.plush-highlights b { color: var(--ink); font-size: 14px; }

.plush-spec-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.plush-spec-table tr { border-top: 1px solid var(--stone-line); }
.plush-spec-table tr:last-child { border-bottom: 1px solid var(--stone-line); }
.plush-spec-table td { padding: 13px 0; vertical-align: top; }
.plush-spec-table td:first-child { color: var(--stone); width: 44%; }
.plush-spec-table td:last-child { color: var(--ink); font-weight: 600; }

/* Full swatch grid */
.plush-tile-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 20px; }
.plush-tile { display: block; width: 100%; min-width: 0; text-align: left; cursor: pointer; }
.plush-tile-swatch { position: relative; overflow: hidden; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--stone-line); margin-bottom: 10px; }
.plush-tile-swatch::before { content: ""; display: block; padding-top: 100%; }
.plush-tile-swatch img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plush-tile.selected .plush-tile-swatch { border-color: #fff; box-shadow: 0 0 0 2px var(--ink); }
.plush-tile-name { font-size: 13.5px; color: var(--charcoal); line-height: 1.35; }
.plush-tile.selected .plush-tile-name { color: var(--ink); font-weight: 700; }
.plush-tile-zoom {
  position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.9); border: none; color: var(--ink);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  opacity: 0; transition: opacity .15s ease;
}
.plush-tile-swatch:hover .plush-tile-zoom, .plush-tile-zoom:focus-visible { opacity: 1; }
@media (hover: none) { .plush-tile-zoom { opacity: 1; } }

/* Accordion */
.plush-acc-item { border-bottom: 1px solid var(--stone-line); }
.plush-acc-section .plush-wrap { padding-top: 8px; padding-bottom: 8px; }
.plush-acc-btn {
  width: 100%; background: none; border: none; text-align: left;
  padding: 22px 0; display: flex; justify-content: space-between; align-items: center;
  font-family: inherit; font-weight: 600; font-size: 17px; color: var(--ink);
}
.plush-plus { font-family: inherit; font-size: 22px; font-weight: 300; color: var(--stone); transition: transform .2s ease; }
.plush-acc-panel { max-height: 0; overflow: hidden; transition: max-height .25s ease; }
.plush-acc-panel-inner { padding: 0 0 24px; font-size: 14.5px; line-height: 1.75; color: var(--charcoal); max-width: 65ch; }
.plush-acc-item.open .plush-acc-panel { max-height: 600px; }
.plush-acc-item.open .plush-plus { transform: rotate(45deg); }

/* Related */
.plush-related .plush-wrap { padding-bottom: 64px; }
.plush-related-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
@media (max-width: 900px) { .plush-related-row { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .plush-related-row { grid-template-columns: 1fr; } }
.plush-r-card { background: #fff; border: 1px solid var(--stone-line); }
.plush-r-card-img { position: relative; overflow: hidden; }
.plush-r-card-img::before { content: ""; display: block; padding-top: 100%; }
.plush-r-card-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.plush-r-card-body { padding: 14px 16px 18px; }
.plush-r-card-name { font-family: inherit; font-weight: 600; font-size: 15px; margin-bottom: 4px; color: var(--ink); }
.plush-r-card-price { font-size: 13.5px; color: var(--stone); }

/* ---------- Sticky mobile bar ---------- */
.plush-sticky-bar {
  position: fixed; left: 0; right: 0; bottom: -160px;
  background: #fff; border-top: 1px solid var(--stone-line);
  box-shadow: 0 -6px 18px rgba(0,0,0,.08);
  padding: 12px 18px; display: flex; align-items: center; justify-content: space-between;
  gap: 14px; z-index: 1000; transition: bottom .25s ease;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  /* keep the CTA clear of the iOS home-indicator gesture area (needs
     viewport-fit=cover on the <meta viewport>; a no-op elsewhere) */
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}
.plush-sticky-bar.show { bottom: 0; }
.plush-sticky-name { font-size: 11px; color: var(--stone); }
.plush-sticky-bar .price-new { font-size: 18px; font-weight: 700; color: var(--ink); }
.plush-sticky-bar .plush-btn { height: 44px; min-width: 0; padding: 0 20px; flex: none; }
@media (min-width: 961px) { .plush-sticky-bar { display: none; } }

/* ---------- Lightbox ---------- */
.plush-lightbox {
  position: fixed; inset: 0; background: rgba(15,12,18,.94);
  display: none; align-items: center; justify-content: center; z-index: 2000; padding: 60px 70px;
}
.plush-lightbox.open { display: flex; }
.plush-lb-stage { max-width: min(90vw, 900px); max-height: 82vh; text-align: center; }
/* width/height auto => the browser never renders past naturalWidth/Height;
   max-* only ever shrink. background paints the letterbox for sparse sources. */
.plush-lb-stage img { max-width: 100%; max-height: 78vh; width: auto; height: auto; object-fit: contain; margin: 0 auto; background: var(--sand); }
.plush-lb-caption { color: #EDE7EF; font-size: 13.5px; margin-top: 16px; }
.plush-lb-close { position: absolute; top: 22px; right: 26px; background: none; border: none; color: #fff; font-size: 30px; width: 44px; height: 44px; line-height: 1; }
.plush-lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.35); color: #fff; font-size: 22px;
  display: flex; align-items: center; justify-content: center;
}
.plush-lb-nav:hover { background: rgba(255,255,255,.2); }
.plush-lb-prev { left: 20px; } .plush-lb-next { right: 20px; }
@media (max-width: 700px) {
  .plush-lightbox { padding: 70px 14px; }
  .plush-lb-nav { width: 38px; height: 38px; font-size: 18px; }
  .plush-lb-prev { left: 6px; } .plush-lb-next { right: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  #plush-product *, .plush-sticky-bar, .plush-acc-panel { transition: none !important; }
}

/* ---------- Promotion tag next to the price ("-35%") ---------- */
.plush-promo-tag {
  display: inline-block; background: var(--magenta); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .02em;
  padding: 3px 8px; border-radius: 2px; align-self: center;
}
.plush-r-card-special { color: var(--ink); font-weight: 700; }
.plush-r-card-price s { color: var(--stone); font-size: .92em; }
