/* ============================================================
   Made to measure — configurator (product page hero + page-builder block)
   SPEC-parametric-configurator-2026-10-18. Own .pm-* classes, site theme tokens only.
   Layout: live preview (left, sticky) · step panel (right) with price + Add always in view.
   Phones: preview on top (sticky, shorter), steps below, price bar fixed to the bottom.
   ============================================================ */
.pm { color: var(--c3dp-body-ink, #111); margin: 0 0 28px; }
.pm [hidden] { display: none !important; }
.pm-preview { background: #fffbeb; color: #92400e; border: 1.5px solid #fde68a; font-size: 12px; font-weight: 700; padding: 8px 16px; letter-spacing: .04em; margin-bottom: 12px; }

/* ── hero grid ── */
.pm-hero { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, 1fr); gap: 28px; align-items: start; }
.pm-stage { position: sticky; top: calc(var(--pm-top, 90px) + 8px); background: var(--c3dp-surface, #fff); border: 1.5px solid var(--c3dp-line, #e2e8f0); display: flex; flex-direction: column; min-width: 0; }
.pm-vtabs { display: flex; gap: 4px; padding: 10px 10px 0; }
.pm-vtabs button { background: transparent; border: 1.5px solid transparent; padding: 8px 16px; font: 700 11px/1 inherit; font-family: inherit; letter-spacing: .14em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); cursor: pointer; border-radius: var(--c3dp-radius-btn, 0); }
.pm-vtabs button.on { color: var(--c3dp-brand, #2487ce); border-color: var(--c3dp-brand, #2487ce); background: var(--c3dp-brand-tint, #eff6ff); }
.pm-canvas { position: relative; height: 520px; display: flex; align-items: center; justify-content: center; background: #f4f6f9; margin: 10px; overflow: hidden; }
.pm-3d { position: absolute; inset: 0; cursor: grab; touch-action: none; }
.pm-3d:active { cursor: grabbing; }
.pm-plan { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; padding: 18px; }
.pm-plan svg { width: 100%; height: 100%; max-width: 480px; }
.pm-photos { position: absolute; inset: 0; display: flex; flex-direction: column; background: #fff; }
.pm-photos > img { flex: 1; min-height: 0; width: 100%; object-fit: contain; }
.pm-thumbs { display: flex; gap: 6px; padding: 8px; overflow-x: auto; }
.pm-thumbs button { flex: 0 0 56px; height: 56px; padding: 0; border: 1.5px solid var(--c3dp-line, #e2e8f0); background: #fff; cursor: pointer; }
.pm-thumbs button.on { border-color: var(--c3dp-brand, #2487ce); }
.pm-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pm-3dmsg { font-size: 12px; color: var(--c3dp-muted, #64748b); text-align: center; position: absolute; bottom: 12px; left: 12px; right: 12px; margin: 0; }
.pm-chip { position: absolute; left: 12px; top: 12px; max-width: calc(100% - 24px); background: rgba(255,255,255,.94); border: 1px solid var(--c3dp-line, #e2e8f0); color: var(--c3dp-ink, #0f172a); font-size: 12px; font-weight: 600; padding: 7px 10px; box-shadow: 0 2px 8px rgba(15,23,42,.06); pointer-events: none; }
.pm-chip--off { display: none; }
.pm-cams { position: absolute; right: 12px; top: 12px; display: inline-flex; background: rgba(255,255,255,.92); border: 1px solid var(--c3dp-line, #e2e8f0); box-shadow: 0 2px 8px rgba(15,23,42,.08); }
.pm-cams button { background: none; border: none; padding: 7px 11px; font: 700 10px/1 inherit; font-family: inherit; letter-spacing: .12em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); cursor: pointer; }
.pm-cams button + button { border-left: 1px solid var(--c3dp-line, #e2e8f0); }
.pm-cams button.on { color: var(--c3dp-brand, #2487ce); }
.pm-cams--off { display: none; }
.pm-legend { font-size: 11px; color: var(--c3dp-muted, #64748b); padding: 0 14px 12px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.pm-legend i { display: inline-block; width: 12px; height: 12px; vertical-align: -2px; margin-right: 5px; border: 1px solid rgba(0,0,0,.2); }
.pm-sw-base { background: #e2e8f0; }
.pm-sw-bin { background: #334155; }
.pm-sw-spare { background: repeating-linear-gradient(45deg, #fde68a 0 3px, #fff 3px 6px); }
.pm-hint { margin-left: auto; }

/* ── panel ── */
.pm-panel { min-width: 0; position: sticky; top: calc(var(--pm-top, 90px) + 8px); height: calc(100vh - var(--pm-top, 90px) - 24px); min-height: 520px; max-height: 860px; display: flex; flex-direction: column; border: 1.5px solid var(--c3dp-line, #e2e8f0); background: var(--c3dp-surface, #fff); }
.pm-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 18px 18px 8px; }
.pm-buyslot { flex: 0 0 auto; }
.pm-intro { margin-bottom: 14px; }
.pm-title { font-size: 24px; line-height: 1.15; font-weight: 900; color: var(--c3dp-ink, #0f172a); margin: 0 0 6px; text-transform: uppercase; letter-spacing: -.01em; }
.pm--block .pm-title { font-size: 24px; }
.pm-rating { margin-bottom: 6px; }
.pm-sub { font-size: 14px; color: var(--c3dp-muted, #64748b); margin: 0; }
.pm-steps { border: 1.5px solid var(--c3dp-line, #e2e8f0); background: var(--c3dp-surface, #fff); }
.pm-stage .pm-canvas { height: calc(100vh - 210px); min-height: 440px; max-height: 740px; }

/* accordion */
.pm-step { border-bottom: 1px solid var(--c3dp-line, #e2e8f0); }
.pm-step__head { width: 100%; display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: none; border: none; cursor: pointer; text-align: left; font-family: inherit; color: inherit; }
.pm-step__n { flex: 0 0 28px; height: 28px; border-radius: 50%; border: 2px solid var(--c3dp-line, #e2e8f0); color: var(--c3dp-muted, #64748b); font-weight: 800; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.pm-step.open .pm-step__n { border-color: var(--c3dp-brand, #2487ce); color: var(--c3dp-brand, #2487ce); }
.pm-step.ok .pm-step__n { background: var(--c3dp-accent, #a3e635); border-color: var(--c3dp-accent, #a3e635); color: var(--c3dp-body-ink, #111); font-size: 0; }
.pm-step.ok .pm-step__n::before { content: '✓'; font-size: 14px; }
.pm-step.bad .pm-step__n { background: var(--c3dp-danger-tint, #fef2f2); border-color: var(--c3dp-danger, #dc2626); color: var(--c3dp-danger, #dc2626); }
.pm-step__t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pm-step__t b { font-size: 15px; font-weight: 800; color: var(--c3dp-ink, #0f172a); }
.pm-step__t small { font-size: 12px; color: var(--c3dp-muted, #64748b); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pm-step.open .pm-step__t small { display: none; }
.pm-step__ch { width: 8px; height: 8px; border-right: 2px solid var(--c3dp-muted-2, #94a3b8); border-bottom: 2px solid var(--c3dp-muted-2, #94a3b8); transform: rotate(45deg); margin: 0 4px 4px; transition: transform .15s; }
.pm-step.open .pm-step__ch { transform: rotate(-135deg); margin-bottom: -2px; }
.pm-step__body { padding: 2px 16px 16px 56px; }

/* fields */
.pm-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pm-f label { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); margin-bottom: 5px; }
.pm-f input { width: 100%; border: 1.5px solid var(--c3dp-line, #e2e8f0); background: var(--c3dp-bg, #f8f9fa); padding: 12px 10px; font-size: 17px; font-weight: 700; font-family: inherit; outline: none; border-radius: var(--c3dp-radius-input, 0); color: inherit; }
.pm-f input:focus { border-color: var(--c3dp-brand, #2487ce); background: var(--c3dp-surface, #fff); }
.pm-unit { position: relative; }
.pm-unit::after { content: attr(data-unit); position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 11px; color: var(--c3dp-muted-2, #94a3b8); pointer-events: none; }
.pm-unit input { padding-right: 34px; -moz-appearance: textfield; }
.pm-unit input::-webkit-outer-spin-button, .pm-unit input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pm-link { background: none; border: none; padding: 0; color: var(--c3dp-brand, #2487ce); font: inherit; font-size: 12px; text-decoration: underline; cursor: pointer; }
.pm-guide { margin-top: 10px; display: inline-flex; align-items: center; gap: 6px; }
.pm-guide::before { content: '?'; width: 16px; height: 16px; border-radius: 50%; background: var(--c3dp-brand, #2487ce); color: #fff; font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.pm-result { margin-top: 12px; background: var(--c3dp-brand-tint, #eff6ff); color: #1e3a8a; padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.pm-help { font-size: 13px; color: var(--c3dp-text, #475569); margin: 0 0 12px; }
.pm-btn--next { margin-top: 14px; background: var(--c3dp-ink, #0f172a); color: #fff; padding: 10px 20px; }
.pm-btn--next:hover { background: var(--c3dp-brand, #2487ce); }

/* bins: options + tiles */
.pm-opts { display: grid; gap: 10px; margin-bottom: 14px; }
.pm-optrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pm-optl { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); min-width: 54px; }
.pm-seg { display: inline-flex; border: 1.5px solid var(--c3dp-line, #e2e8f0); }
.pm-seg button { background: var(--c3dp-surface, #fff); border: none; padding: 8px 12px; font: 600 12px/1 inherit; font-family: inherit; cursor: pointer; color: var(--c3dp-text, #475569); }
.pm-seg button + button { border-left: 1.5px solid var(--c3dp-line, #e2e8f0); }
.pm-seg button.on { background: var(--c3dp-brand, #2487ce); color: #fff; }
.pm-seg button[disabled] { opacity: .35; cursor: not-allowed; text-decoration: line-through; }
.pm-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.pm-pills button { background: var(--c3dp-surface, #fff); border: 1.5px solid var(--c3dp-line, #e2e8f0); border-radius: 999px; padding: 6px 12px; font: 600 12px/1 inherit; font-family: inherit; cursor: pointer; color: var(--c3dp-text, #475569); }
.pm-pills button::before { content: '+ '; }
.pm-pills button.on { border-color: var(--c3dp-brand, #2487ce); background: var(--c3dp-brand-tint, #eff6ff); color: var(--c3dp-brand, #2487ce); }
.pm-pills button.on::before { content: '✓ '; }
.pm-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.pm-tile { border: 1.5px solid var(--c3dp-line, #e2e8f0); background: var(--c3dp-surface, #fff); display: flex; flex-direction: column; transition: border-color .12s; }
.pm-tile.has { border-color: var(--c3dp-brand, #2487ce); box-shadow: inset 0 0 0 1px var(--c3dp-brand, #2487ce); }
.pm-tile__add { background: none; border: none; cursor: pointer; padding: 12px 6px 6px; display: flex; flex-direction: column; align-items: center; gap: 6px; font-family: inherit; color: var(--c3dp-ink, #0f172a); min-height: 76px; justify-content: flex-end; }
.pm-tile__add svg { fill: #cbd5e1; }
.pm-tile.has .pm-tile__add svg { fill: var(--c3dp-brand, #2487ce); }
.pm-tile__add:hover svg { fill: var(--c3dp-brand, #2487ce); }
.pm-tile__add b { font-size: 14px; font-weight: 800; }
.pm-tile__cnt { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--c3dp-line, #e2e8f0); }
.pm-tile__cnt button { width: 32px; height: 30px; background: none; border: none; font-size: 17px; cursor: pointer; color: var(--c3dp-brand, #2487ce); font-family: inherit; }
.pm-tile__cnt span { font-weight: 800; font-size: 13px; }
.pm-tile:not(.has) .pm-tile__cnt span, .pm-tile:not(.has) [data-dec] { color: var(--c3dp-muted-2, #94a3b8); }
.pm-meter { margin-top: 14px; font-size: 12px; color: var(--c3dp-muted, #64748b); }
.pm-meter__bar { height: 6px; background: var(--c3dp-surface-2, #f1f5f9); margin-top: 5px; }
.pm-meter__bar i { display: block; height: 100%; background: var(--c3dp-brand, #2487ce); width: 0; transition: width .2s; }
.pm-binbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.pm-lines { margin-top: 14px; }
.pm-lines__h { font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); margin-bottom: 6px; }
.pm-lines ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pm-lines li { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 13px; background: var(--c3dp-surface-3, #f8fafc); padding: 6px 4px 6px 10px; }
.pm-x { background: none; border: none; color: var(--c3dp-muted-2, #94a3b8); font-size: 18px; line-height: 1; cursor: pointer; padding: 2px 6px; }
.pm-x:hover { color: var(--c3dp-danger, #dc2626); }

/* colour */
.pm-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.pm-sw { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; border: none; background: none; padding: 0; cursor: pointer; font: inherit; font-size: 12px; color: var(--c3dp-text, #475569); }
.pm-sw i { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); display: block; box-shadow: 0 0 0 3px #fff, 0 0 0 4px transparent; transition: box-shadow .12s; }
.pm-sw.on i { box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--c3dp-brand, #2487ce); }
.pm-sw.on span { color: var(--c3dp-ink, #0f172a); font-weight: 700; }

/* buy */
.pm-buy { padding: 14px 18px 16px; background: var(--c3dp-surface-3, #f8fafc); box-shadow: 0 -10px 18px -14px rgba(15,23,42,.35); border-top: 1px solid var(--c3dp-line, #e2e8f0); }
.pm-buyrow { display: flex; align-items: center; gap: 14px; }
.pm-price { display: flex; flex-direction: column; flex: 0 0 auto; }
.pm-price__l { font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); }
.pm-price__v { font-size: 30px; line-height: 1.05; font-weight: 900; color: var(--c3dp-ink, #0f172a); transition: opacity .15s; }
.pm-busy .pm-price__v, .pm-busy .pm-bar__p { opacity: .4; }
.pm-lead { font-size: 12px; color: var(--c3dp-accent-dark, #65a30d); font-weight: 700; margin: 10px 0 0; }
.pm-buymore { display: flex; gap: 16px; align-items: baseline; flex-wrap: wrap; margin-top: 6px; }
.pm-err { background: var(--c3dp-danger-tint, #fef2f2); color: var(--c3dp-danger-deep, #991b1b); padding: 10px 12px; font-size: 13px; margin: 0 0 12px; }
.pm-box { margin: 0; font-size: 12px; }
.pm-box summary { cursor: pointer; color: var(--c3dp-brand, #2487ce); font-weight: 600; }
.pm-parts { color: var(--c3dp-text, #475569); margin: 6px 0 0; line-height: 1.7; }
.pm-tick { display: flex; gap: 8px; font-size: 12.5px; line-height: 1.4; color: var(--c3dp-ink, #0f172a); margin-bottom: 8px; align-items: flex-start; cursor: pointer; padding: 8px; margin-left: -8px; margin-right: -8px; transition: background .2s; }
.pm-tick input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 17px; }
.pm-tick.pm-flash { background: #fef9c3; outline: 2px solid #facc15; }
.pm-tickmsg { font-size: 12px; color: #a16207; font-weight: 700; margin: -6px 0 10px; }
.pm-actions { display: flex; gap: 10px; }
.pm-btn { display: inline-block; padding: 12px 22px; font-weight: 900; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; border: none; cursor: pointer; font-family: inherit; border-radius: var(--c3dp-radius-btn, 0); text-decoration: none; }
.pm-btn--wide { flex: 1; padding: 15px 22px; font-size: 13px; }
.pm-btn--lime { background: var(--c3dp-accent, #a3e635); color: var(--c3dp-body-ink, #111); }
.pm-btn--lime:hover:not([disabled]) { background: var(--c3dp-accent-hover, #bef264); }
.pm-btn--ghost { background: transparent; color: var(--c3dp-brand, #2487ce); border: 1.5px solid var(--c3dp-brand, #2487ce); padding: 9px 14px; font-size: 11px; }
.pm-btn--ghost:hover:not([disabled]) { background: var(--c3dp-brand, #2487ce); color: #fff; }
.pm-btn[disabled] { opacity: .45; cursor: not-allowed; }
.pm-added { font-size: 13px; color: var(--c3dp-accent-dark, #65a30d); font-weight: 700; margin: 10px 0 0; }
.pm-added a { color: var(--c3dp-brand, #2487ce); }
.pm-sharebtn { margin: 0; }
.pm-sharebtn[disabled] { opacity: .45; cursor: not-allowed; }
.pm-share { font-size: 11px; color: var(--c3dp-muted, #64748b); margin: 6px 0 0; word-break: break-all; }
.pm-trust { margin-top: 16px; }
.pm-attr { font-size: 11px; color: var(--c3dp-muted-2, #94a3b8); margin: 14px 0 0; }

@media (min-width: 901px) { .pm-scroll .pm-steps { border-width: 1.5px 0 0; margin: 0 -18px; } }

/* phone price bar */
.pm-bar { display: none; }

/* measuring guide */
.pm-modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); z-index: 10050; display: flex; align-items: center; justify-content: center; padding: 16px; }
.pm-modal__box { background: var(--c3dp-surface, #fff); max-width: 520px; width: 100%; padding: 22px; max-height: 90vh; overflow: auto; }
.pm-modal__box h3 { font-size: 16px; font-weight: 900; margin: 0 0 10px; }
.pm-modal__art { width: 100%; max-width: 320px; display: block; margin: 0 auto 12px; }
.pm-modal__box ol { padding-left: 18px; font-size: 13px; color: var(--c3dp-text, #475569); line-height: 1.7; margin: 0 0 14px; }

/* product page: the hero takes the gallery's place */
#pm-configurator { background: var(--c3dp-surface, #fff); border-bottom: 1.5px solid var(--c3dp-line, #e2e8f0); padding: 28px 48px 20px; }
#pm-configurator .pm { margin: 0; }

@media (max-width: 1100px) {
  #pm-configurator { padding: 24px 24px 16px; }
  .pm-hero { grid-template-columns: minmax(0, 1fr) minmax(320px, 1fr); gap: 20px; }
}
@media (max-width: 900px) {
  .pm-hero { display: flex; flex-direction: column; align-items: stretch; gap: 16px; }
  #pm-configurator { padding: 16px 16px 8px; }
  .pm-buy { box-shadow: none; border: 1.5px solid var(--c3dp-line, #e2e8f0); }
  .pm-panel, .pm-scroll { display: contents; }
  .pm-intro { order: -1; margin-bottom: 0; }
  .pm-steps { order: 1; }
  .pm-buyslot { order: 2; }
  .pm-trust { order: 3; margin-top: 0; }
  .pm-stage .pm-canvas { height: 30vh; min-height: 200px; max-height: 300px; }
  .pm-stage { position: sticky; top: var(--pm-top, 0px); z-index: 20; box-shadow: 0 6px 14px -10px rgba(15,23,42,.35); }
  .pm-vtabs { padding: 6px 6px 0; }
  .pm-vtabs button { padding: 6px 12px; }
  .pm-canvas { margin: 6px; }
  .pm-legend { display: none; }
  .pm-chip { font-size: 11px; padding: 5px 8px; left: 8px; top: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pm-cams { right: 8px; top: auto; bottom: 8px; }
  .pm-cams button { padding: 6px 8px; }
  .pm-title { font-size: 22px; }
  .pm-step__body { padding-left: 16px; }
  .pm-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pm-bar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 9990; background: var(--c3dp-surface, #fff); border-top: 1.5px solid var(--c3dp-line, #e2e8f0); padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-between; gap: 12px; box-shadow: 0 -6px 18px rgba(15,23,42,.08); transition: transform .2s; }
  .pm-bar--away { transform: translateY(110%); }
  .pm-bar__p { font-size: 22px; font-weight: 900; color: var(--c3dp-ink, #0f172a); }
  .pm-bar .pm-btn { padding: 13px 18px; }
  .pm { padding-bottom: 70px; }
}
@media (max-width: 420px) {
  .pm-row3 { gap: 6px; }
  .pm-f input { font-size: 16px; padding: 11px 8px; }
  .pm-unit input { padding-right: 28px; }
  .pm-unit::after { right: 6px; }
}

/* ── Gridfinity v2 bin builder (gridfinity-drawer-v2.js, SPEC-gridfinity-v2 §6) ── */
.pmx-pad { display: flex; gap: 8px; align-items: flex-start; margin-top: 12px; cursor: pointer; font-size: 13px; color: var(--c3dp-ink, #0f172a); }
.pmx-pad input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 17px; }
.pmx-pad small { display: block; font-size: 12px; color: var(--c3dp-muted, #64748b); margin-top: 2px; }
.pmx-build { display: grid; gap: 12px; }
.pmx-size { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.pmx-x { font-weight: 700; color: var(--c3dp-muted, #64748b); padding-bottom: 22px; }
.pmx-step { display: flex; flex-direction: column; gap: 4px; }
.pmx-step small { font-size: 11px; color: var(--c3dp-muted, #64748b); }
.pmx-stepper { display: inline-flex; align-items: center; border: 1.5px solid var(--c3dp-line, #e2e8f0); }
.pmx-stepper button { width: 34px; height: 34px; border: none; background: var(--c3dp-surface, #fff); font: 700 17px/1 inherit; font-family: inherit; cursor: pointer; color: var(--c3dp-ink, #0f172a); }
.pmx-stepper button[disabled] { opacity: .3; cursor: not-allowed; }
.pmx-stepper b { min-width: 30px; text-align: center; font-size: 15px; }
.pmx-row { row-gap: 8px; }
.pmx-hseg { flex-wrap: wrap; }
.pmx-comp { display: grid; gap: 8px; }
.pmx-comp__body { display: flex; gap: 12px; flex-wrap: wrap; }
.pmx-add { justify-self: start; }
.pmx-msg { margin: 10px 0 0; background: #fef2f2; color: #991b1b; padding: 8px 10px; font-size: 13px; line-height: 1.4; }
.pmx-fab { position: absolute; right: 10px; bottom: 10px; z-index: 3; background: var(--c3dp-ink, #0f172a); color: #fff; border: none; padding: 9px 14px; font: 800 11px/1 inherit; font-family: inherit; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; box-shadow: 0 4px 14px rgba(15,23,42,.18); }
.pmx-fab:hover { background: var(--c3dp-brand, #2487ce); }
.pmx-bar { position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 4; background: rgba(255,255,255,.97); border: 1.5px solid var(--c3dp-line, #e2e8f0); box-shadow: 0 8px 26px rgba(15,23,42,.16); padding: 10px 12px; max-height: 62%; overflow: auto; font-size: 13px; }
.pmx-bar__h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--c3dp-ink, #0f172a); }
.pmx-bar__hr { display: inline-flex; gap: 6px; }
.pmx-done { background: var(--c3dp-accent, #a3e635); color: var(--c3dp-body-ink, #111); border: none; padding: 8px 14px; font: 900 11px/1 inherit; font-family: inherit; letter-spacing: .1em; text-transform: uppercase; cursor: pointer; }
.pmx-tools { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; }
.pmx-ib { background: var(--c3dp-surface, #fff); border: 1.5px solid var(--c3dp-line, #e2e8f0); padding: 7px 10px; min-width: 36px; font: 700 12px/1 inherit; font-family: inherit; cursor: pointer; color: var(--c3dp-ink, #0f172a); touch-action: manipulation; user-select: none; }
.pmx-ib:hover:not([disabled]) { border-color: var(--c3dp-brand, #2487ce); }
.pmx-ib[disabled] { opacity: .35; cursor: not-allowed; }
.pmx-del { color: var(--c3dp-danger, #dc2626); }
.pmx-move, .pmx-h { display: inline-flex; align-items: center; gap: 4px; }
.pmx-h b { min-width: 74px; text-align: center; font-size: 12px; }
.pmx-tg { border: 1.5px solid var(--c3dp-line, #e2e8f0); border-radius: 999px; background: var(--c3dp-surface, #fff); padding: 6px 12px; font: 600 12px/1 inherit; font-family: inherit; cursor: pointer; color: var(--c3dp-text, #475569); }
.pmx-tg::before { content: '+ '; }
.pmx-tg.on { border-color: var(--c3dp-brand, #2487ce); background: var(--c3dp-brand-tint, #eff6ff); color: var(--c3dp-brand, #2487ce); }
.pmx-tg.on::before { content: '✓ '; }
.pmx-compbox { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c3dp-line, #e2e8f0); }
.pmx-sizes { display: flex; flex-wrap: wrap; gap: 6px; }
.pmx-sizes button { border: 1.5px solid var(--c3dp-line, #e2e8f0); background: var(--c3dp-surface, #fff); padding: 8px 12px; font: 800 13px/1 inherit; font-family: inherit; cursor: pointer; }
.pmx-sizes button:hover { border-color: var(--c3dp-brand, #2487ce); color: var(--c3dp-brand, #2487ce); }
.pmx-pbin { cursor: pointer; }
.pmx-editing .pm-3d { cursor: pointer; }
.pmx-editing .pm-cams { display: none; }
@media (max-width: 900px) {
  .pmx-editing .pm-stage .pm-canvas { height: calc(100vh - var(--pm-top, 90px) - 170px); min-height: 360px; max-height: 620px; }
  .pmx-bar { max-height: 70%; padding: 8px 10px; }
  .pmx-ib { padding: 9px 11px; }
}

/* ============================================================
   UX v3 U1 (2026-10-29) — the full-screen BUILDER (/products/{slug}/build) + the product page BUY CARD.
   Builder: fixed over the whole window; top bar · live view left · one step at a time right · Back/Next.
   Phones: view on top (42% height), the step below, Back / price / Next pinned at the bottom.
   Site theme tokens only, sharp corners, uppercase labels (c3dp brand).
   ============================================================ */
html.pm-builder-open, html.pm-builder-open body { overflow: hidden; }
.pm--builder { position: fixed; inset: 0; z-index: 9000; margin: 0; padding: 0 !important; display: flex; flex-direction: column; background: var(--c3dp-bg, #f8f9fa); color: var(--c3dp-body-ink, #111); }
.pm--builder .pm-preview { margin: 0; }
.pmb-top { flex: 0 0 auto; display: flex; align-items: center; gap: 16px; padding: 0 16px; min-height: 60px; background: var(--c3dp-surface, #fff); border-bottom: 1.5px solid var(--c3dp-line, #e2e8f0); }
.pmb-exit { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 1.5px solid var(--c3dp-line, #e2e8f0); font-weight: 900; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--c3dp-ink, #0f172a); text-decoration: none; }
.pmb-exit:hover { border-color: var(--c3dp-brand, #2487ce); color: var(--c3dp-brand, #2487ce); }
.pmb-name { font-weight: 900; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--c3dp-ink, #0f172a); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 260px; }
.pmb-steps { flex: 1; min-width: 0; display: flex; align-items: center; justify-content: center; gap: 2px; }
.pmb-steps button { background: none; border: none; display: inline-flex; align-items: center; gap: 7px; padding: 6px 6px; font: inherit; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); cursor: pointer; white-space: nowrap; }
.pmb-steps button i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--c3dp-line, #e2e8f0); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 900; }
.pmb-steps button.on { color: var(--c3dp-brand, #2487ce); }
.pmb-steps button.on i { border-color: var(--c3dp-brand, #2487ce); }
.pmb-steps button.ok i { background: var(--c3dp-accent, #a3e635); border-color: var(--c3dp-accent, #a3e635); color: var(--c3dp-body-ink, #111); }
.pmb-steps button[disabled] { opacity: .5; cursor: default; }
.pmb-sep { width: 16px; height: 2px; background: var(--c3dp-line, #e2e8f0); flex: 0 0 auto; }
.pmb-price { flex: 0 0 auto; text-align: right; }
.pmb-price small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .15em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); }
.pmb-price b { font-size: 20px; font-weight: 900; color: var(--c3dp-ink, #0f172a); }
.pm-busy .pmb-price b, .pm-busy .pmb-foot__price { opacity: .45; }
.pmb-main { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 420px; }
.pm--builder .pm-stage { position: relative; top: auto; border: 0; display: flex; flex-direction: column; min-height: 0; background: transparent; }
.pm--builder .pm-stage .pm-canvas, .pm--builder.pmx-editing .pm-stage .pm-canvas { flex: 1; height: auto; min-height: 0; max-height: none; margin: 0 10px; }
.pm--builder .pm-vtabs { padding: 8px 10px 6px; }
.pm--builder .pm-legend { padding: 8px 14px; }
.pm--builder .pm-panel { position: relative; top: auto; height: auto; min-height: 0; max-height: none; border-width: 0 0 0 1.5px; display: flex; flex-direction: column; }
.pm--builder .pm-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 20px 12px; display: block; }
.pm--builder .pm-steps { border: 0; margin: 0; }
.pmb-stepno { font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--c3dp-muted, #64748b); margin-bottom: 4px; }
.pm--builder .pm-step--page { border: 0; }
.pm--builder .pm-step--page > .pm-step__body { padding: 0; }
.pm--builder .pm-step--page::before { content: none; }
.pmb-steptitle { font-size: 22px; font-weight: 900; text-transform: uppercase; color: var(--c3dp-ink, #0f172a); line-height: 1.1; margin: 0 0 14px; }
.pmb-foot { flex: 0 0 auto; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1.5px solid var(--c3dp-line, #e2e8f0); background: var(--c3dp-surface, #fff); }
.pmb-foot__price { text-align: center; font-size: 18px; font-weight: 900; color: var(--c3dp-ink, #0f172a); }
.pm-btn--blue { background: var(--c3dp-brand, #2487ce); color: #fff; padding: 13px 22px; }
.pm-btn--blue:hover:not([disabled]) { background: var(--c3dp-brand-dark, #1a6aad); }
.pm-btn--blue.pmb-why { background: var(--c3dp-surface-3, #f1f5f9); color: #b45309; border: 1.5px solid #fcd34d; letter-spacing: .02em; text-transform: none; font-weight: 700; font-size: 12.5px; white-space: normal; line-height: 1.3; text-align: center; opacity: 1; }
.pmb-intro { color: var(--c3dp-muted, #64748b); font-size: 14px; margin: 0 0 14px; line-height: 1.45; }
.pmb-review { border: 1.5px solid var(--c3dp-line, #e2e8f0); padding: 12px 14px; margin-bottom: 14px; background: var(--c3dp-surface, #fff); }
.pmb-sum { font-weight: 800; margin: 0 0 8px; color: var(--c3dp-ink, #0f172a); }
.pmb-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: #334155; }
.pm--builder .pm-buy { box-shadow: none; border: 1.5px solid var(--c3dp-line, #e2e8f0); }
.pmb-save { margin-top: 10px; width: 100%; padding: 12px 14px; }
.pm--builder .pm-attr { display: none; }
@media (max-width: 1100px) {
  .pmb-main { grid-template-columns: minmax(0, 1fr) 360px; }
  .pmb-steps button span { display: none; }
  .pmb-sep { width: 10px; }
}
@media (max-width: 900px) {
  .pmb-top { flex-wrap: wrap; gap: 8px; padding: 8px 12px; min-height: 0; }
  .pmb-name { order: 1; flex: 1; max-width: none; font-size: 12px; }
  .pmb-exit { order: 2; padding: 6px 10px; }
  .pmb-price { display: none; }
  .pmb-steps { order: 3; flex: 0 0 100%; justify-content: space-between; }
  .pmb-steps button { padding: 2px; }
  .pmb-main { grid-template-columns: 1fr; grid-template-rows: 42% minmax(0, 1fr); }
  .pm--builder .pm-panel, .pm--builder .pm-scroll { display: flex; }
  .pm--builder .pm-scroll { display: block; padding: 14px 14px 10px; }
  .pm--builder .pm-panel { border-width: 1.5px 0 0; }
  .pm--builder .pm-stage .pm-canvas, .pm--builder.pmx-editing .pm-stage .pm-canvas { margin: 0 6px; }
  .pm--builder .pm-legend { display: none; }
  .pm--builder .pm-vtabs { padding: 6px; }
  .pmb-foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); }
  .pm--builder .pm-buy { border-width: 1.5px; }
}

/* ── buy card (product page buy box + page-builder block) ── */
.pmc { margin: 14px 0 18px; }
.pmc-from { font-size: 13px; color: var(--c3dp-muted, #64748b); margin-bottom: 10px; }
.pmc-from b { font-size: 30px; font-weight: 900; color: var(--c3dp-ink, #0f172a); margin-left: 4px; }
.pmc-intro { font-size: 14px; line-height: 1.5; margin: 0 0 16px; color: var(--c3dp-body-ink, #111); }
.pmc-build { display: block; text-align: center; padding: 17px 22px; font-size: 14px; }
.pmc-gone { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; padding: 10px 12px; font-size: 13px; margin: 0 0 12px; }
.pmc-design { border: 2px solid var(--c3dp-brand, #2487ce); background: var(--c3dp-brand-tint, #eff6ff); padding: 14px; }
.pmc-h { font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; color: var(--c3dp-brand, #2487ce); margin-bottom: 6px; }
.pmc-sum { font-weight: 800; margin: 0 0 8px; color: var(--c3dp-ink, #0f172a); font-size: 14px; }
.pmc-lines { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 3px; font-size: 13px; color: #334155; }
.pmc-price { font-size: 28px; font-weight: 900; color: var(--c3dp-ink, #0f172a); margin: 4px 0 12px; }
.pmc-design .pm-btn--wide { display: block; width: 100%; }
.pmc-added { font-size: 13px; font-weight: 700; color: #166534; margin: 10px 0 0; }
.pmc-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.pmc-row .pm-btn { text-align: center; padding: 11px 10px; }
.pmc .pm-preview { margin: 10px 0 0; }
.pmc-block { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(280px, 1fr); gap: 28px; align-items: center; background: var(--c3dp-surface, #fff); border: 1.5px solid var(--c3dp-line, #e2e8f0); padding: 18px; }
.pmc-block__pic { display: block; aspect-ratio: 1 / 1; background: #f4f6f9; overflow: hidden; }
.pmc-block__pic img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pmc-block__h { font-size: 26px; font-weight: 900; text-transform: uppercase; line-height: 1.1; margin: 0 0 8px; color: var(--c3dp-ink, #0f172a); }
.pmc-block__intro { color: var(--c3dp-muted, #64748b); margin: 0 0 6px; }
@media (max-width: 900px) { .pmc-block { grid-template-columns: 1fr; gap: 16px; padding: 14px; } }
/* builder: room for the staging/local banner (never on production); the theme's ambient tint is switched off
   inside the builder so the 3D shows true colours (it stays on every other page) */
body:has(> .c3dp-env-banner) .pm--builder { top: 30px; }
html.pm-builder-open #c3dp-theme-fx, html.pm-builder-open .c3dp-amb-bg, html.pm-builder-open .c3dp-amb { display: none !important; }

/* ── UX v3 U2: Start point tiles, size tiles, Undo/Redo, Bin details, admin layout box ── */
.pmx-ltiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pmx-ltile { display: flex; flex-direction: column; background: var(--c3dp-surface, #fff); border: 1.5px solid var(--c3dp-line, #e2e8f0); padding: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.pmx-ltile:hover:not([disabled]) { border-color: var(--c3dp-brand, #2487ce); }
.pmx-ltile.on { border-color: var(--c3dp-brand, #2487ce); box-shadow: inset 0 0 0 1.5px var(--c3dp-brand, #2487ce); }
.pmx-ltile[disabled] { opacity: .45; cursor: not-allowed; }
.pmx-ltile svg { display: block; width: 100%; height: 110px; background: #f4f6f9; padding: 8px; }
.pmx-ltile span { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: baseline; padding: 8px 10px; }   /* name | price, wraps without overlap */
.pmx-ltile b { display: block; grid-column: 1; min-width: 0; overflow-wrap: anywhere; font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .03em; color: var(--c3dp-ink, #0f172a); }
.pmx-ltile em { grid-column: 2; grid-row: 1; font-style: normal; white-space: nowrap; font-weight: 900; font-size: 13px; color: var(--c3dp-ink, #0f172a); }
.pmx-ltile small { display: block; grid-column: 1 / -1; font-size: 12px; color: var(--c3dp-muted, #64748b); margin-top: 2px; }
.pmx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); gap: 6px; margin-bottom: 12px; }
.pmx-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 8px 4px 6px; background: var(--c3dp-surface, #fff); border: 1.5px solid var(--c3dp-line, #e2e8f0); cursor: pointer; font: inherit; color: var(--c3dp-ink, #0f172a); }
.pmx-tile svg { width: 36px; height: 36px; }
.pmx-tile b { font-size: 12px; font-weight: 900; }
.pmx-tile:hover:not([disabled]) { border-color: var(--c3dp-brand, #2487ce); color: var(--c3dp-brand, #2487ce); }
.pmx-tile[disabled] { opacity: .35; cursor: not-allowed; }
.pmx-hist { display: inline-flex; gap: 6px; margin-left: auto; }
.pm--builder .pm-binbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pmd-sel { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 12px; background: var(--c3dp-brand-tint, #eff6ff); border: 1px solid #bfdbfe; }
.pmd-applies { font-weight: 800; color: var(--c3dp-brand, #2487ce); font-size: 13px; }
.pmd-applies.none { color: var(--c3dp-muted, #64748b); font-weight: 600; }
.pmd-sel .pm-btn { padding: 7px 10px; font-size: 10.5px; }
.pmd-ctrls .pm-optrow { margin-bottom: 14px; }
.pmd-off { opacity: .45; pointer-events: none; }
.pm-seg button.mix, .pm-pills button.mix { background: repeating-linear-gradient(45deg, var(--c3dp-brand-tint, #eff6ff) 0 4px, #fff 4px 8px); }
.pmd-mixed { font-size: 12px; color: var(--c3dp-muted, #64748b); margin: 6px 0 0; }
.pmb-admin { margin-top: 16px; border: 1.5px dashed #b45309; background: #fffbeb; color: #92400e; padding: 10px 12px; font-size: 12.5px; }
.pmb-admin__row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pmb-admin input { flex: 1; min-width: 160px; padding: 8px 10px; border: 1px solid #fcd34d; font: inherit; }
.pmb-admin p { margin: 8px 0 0; font-weight: 700; }
@media (max-width: 420px) { .pmx-ltile svg { height: 80px; } }
.pmx-msg.pmx-msg--info { background: var(--c3dp-brand-tint, #eff6ff); color: var(--c3dp-brand-dark, #1a6aad); }

/* ── UX v3 U4 ─────────────────────────────────────────────────────────────── */
/* "In your drawer" as a card */
.pmx-lines { margin-top: 16px; border: 1.5px solid var(--c3dp-line, #e2e8f0); background: var(--c3dp-surface, #fff); }
.pmx-lines .pm-lines__h { display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 10px 12px; font-size: 11px; color: var(--c3dp-ink, #0f172a); border-bottom: 1.5px solid var(--c3dp-line, #e2e8f0); }
.pmx-lines__n { min-width: 24px; height: 24px; padding: 0 7px; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--c3dp-brand, #2487ce); color: #fff; font-size: 12px; letter-spacing: 0; }
.pmx-lines ul { gap: 0; }
.pmx-lines li.pmx-line { display: grid; grid-template-columns: 40px 1fr auto auto; align-items: center; gap: 10px; padding: 8px 6px 8px 10px; background: none; border-bottom: 1px solid var(--c3dp-line, #e2e8f0); cursor: pointer; }
.pmx-lines li.pmx-line:last-child { border-bottom: 0; }
.pmx-lines li.pmx-line:hover { background: var(--c3dp-surface-3, #f8fafc); }
.pmx-line__ic svg { width: 40px; height: 40px; display: block; }
.pmx-line__t { display: flex; flex-direction: column; min-width: 0; }
.pmx-line__t b { font-size: 14px; font-weight: 900; }
.pmx-line__t small { font-size: 12px; color: var(--c3dp-muted, #64748b); line-height: 1.3; }
.pmx-line__q { font-size: 15px; font-weight: 900; color: var(--c3dp-ink, #0f172a); }
/* Bin details: copy to other bins */
.pmd-copy { margin-top: 16px; padding-top: 14px; border-top: 1.5px solid var(--c3dp-line, #e2e8f0); }
.pmd-copy .pm-optl { display: block; margin-bottom: 8px; }
.pmd-pickhint { margin: 0 0 10px; font-size: 13px; color: var(--c3dp-ink, #0f172a); background: #f0fdf4; border-left: 3px solid #16a34a; padding: 8px 10px; }
.pmd-pickrow { display: flex; gap: 8px; flex-wrap: wrap; }
/* product page card: measurements tick (the "Add 1 more?" state keeps the normal Add colours — only the words change,
   so it stays readable under any theme's ambient tint) */
.pmc-tick { margin: 10px 0 8px; }
/* ── UX v3 U5: room buttons over the 3D view ─────────────────────────────── */
.pm-rooms { position: absolute; left: 12px; top: 52px; z-index: 3; display: flex; flex-direction: column; gap: 4px; }
.pm-rooms button { display: flex; align-items: center; gap: 7px; padding: 6px 10px 6px 7px; background: rgba(255,255,255,.94); border: 1px solid var(--c3dp-line, #e2e8f0); box-shadow: 0 2px 8px rgba(15,23,42,.06); color: var(--c3dp-ink, #0f172a); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; text-align: left; }
.pm-rooms button svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pm-rooms button:hover { border-color: var(--c3dp-brand, #2487ce); color: var(--c3dp-brand, #2487ce); }
.pm-rooms button.on { background: var(--c3dp-brand, #2487ce); border-color: var(--c3dp-brand, #2487ce); color: #fff; }
.pm-rooms[hidden] { display: none; }
.pmx-editing .pm-rooms { display: none; }   /* arranging (top-down) — the room doesn't matter, keep the drawer clear */
@media (max-width: 900px) {
  .pm-rooms { top: 40px; left: 8px; flex-direction: row; }   /* under the chip; Angle / Top / Front use the bottom */
  .pm-rooms button { padding: 6px; }
  .pm-rooms button svg { width: 16px; height: 16px; }
  .pm-rooms button span { display: none; }
}
