/* Product configurator (.cfg-) and preview stage */

.pdp-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 56px; align-items: start; padding: 28px var(--pad-x) 72px; }
.pdp-gallery { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
.cfg-stage { position: relative; aspect-ratio: 1; border-radius: var(--r-lg); background: var(--mist); overflow: hidden; }
.cfg-stage > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cfg-stage .badge { position: absolute; top: 16px; left: 16px; z-index: 3; }
.cfg-preview { position: absolute; inset: 0; display: none; align-items: center; justify-content: center; padding: 6% 8% 9%; background: radial-gradient(120% 90% at 50% 20%, #fff 0, var(--mist) 70%); }
.cfg-preview svg { width: 100%; height: 100%; filter: drop-shadow(0 18px 24px rgba(15, 15, 20, 0.14)); }
.cfg-stage[data-mode="design"] .cfg-preview { display: flex; }
.cfg-stage[data-mode="design"] > img { visibility: hidden; }
.cfg-stage__note { position: absolute; left: 16px; bottom: 14px; z-index: 3; font-size: 11px; font-weight: 700; color: var(--ink-500); background: rgba(255,255,255,0.85); padding: 5px 9px; border-radius: var(--r-pill); }
.cfg-viewtabs { position: absolute; right: 14px; top: 14px; z-index: 3; display: none; gap: 6px; }
.cfg-stage[data-mode="design"] .cfg-viewtabs { display: flex; }
.cfg-viewtabs button { border: 1px solid var(--line); background: #fff; border-radius: var(--r-pill); font: 800 12px var(--font-body); padding: 7px 12px; cursor: pointer; color: var(--ink); }
.cfg-viewtabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.pdp-thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.pdp-thumb { aspect-ratio: 1; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; cursor: pointer; background: var(--mist); position: relative; }
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdp-thumb.active { border-color: var(--cobalt); }
.pdp-thumb--design { display: flex; align-items: center; justify-content: center; font: 800 11px/1.2 var(--font-body); color: var(--cobalt-600); background: var(--cobalt-050); text-align: center; padding: 6px; }
.pdp-gallery__note { font-size: 12px; color: var(--ink-300); }

#cfg { display: flex; flex-direction: column; gap: 22px; }
.cfg-static { font-size: 14px; color: var(--ink-500); line-height: 1.65; }
.cfg-static h2 { font-size: 15px; font-weight: 800; color: var(--ink); margin: 14px 0 6px; }
.cfg-static ul { margin: 0; padding-left: 18px; }

.cfg-price__row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cfg-price__unit { font-family: var(--font-display); font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1; }
.cfg-price__per { font-size: 14px; color: var(--ink-500); }
.cfg-price__note { font-size: 13px; color: var(--ink-500); margin-top: 6px; line-height: 1.5; }

.cfg-group { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.cfg-label { font-size: 13px; font-weight: 800; padding: 0; display: flex; justify-content: space-between; width: 100%; }
.cfg-label__val { color: var(--ink-500); font-weight: 600; }
.cfg-hint { font-size: 12px; color: var(--ink-300); line-height: 1.5; margin: 0; }
.cfg-input { font: 600 14px var(--font-body); color: var(--ink); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; background: #fff; min-width: 0; width: 100%; }
.cfg-input:focus-visible, .cfg-seg__opt input:focus-visible + span, .cfg-swatch input:focus-visible + span { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.cfg-link { background: none; border: 0; padding: 0; font: 700 13px var(--font-body); color: var(--cobalt-600); cursor: pointer; text-align: left; }
.cfg-link:hover { text-decoration: underline; }

.cfg-seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.cfg-seg__opt { cursor: pointer; }
.cfg-seg__opt input { position: absolute; opacity: 0; pointer-events: none; }
.cfg-seg__opt span { display: flex; flex-direction: column; gap: 2px; border: 2px solid var(--line); border-radius: var(--r-md); padding: 12px 14px; }
.cfg-seg__opt b { font-size: 14px; }
.cfg-seg__opt small { font-size: 12px; color: var(--ink-500); font-weight: 600; }
.cfg-seg__opt input:checked + span { border-color: var(--cobalt); background: var(--cobalt-050); }

.cfg-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.cfg-swatch { cursor: pointer; }
.cfg-swatch input { position: absolute; opacity: 0; pointer-events: none; }
.cfg-swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 1px var(--line); }
.cfg-swatch input:checked + span { box-shadow: 0 0 0 2px var(--ink); }

.cfg-places { display: flex; flex-direction: column; gap: 10px; }
.cfg-place { display: grid; grid-template-columns: 1fr 1.25fr auto; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--mist-050); }
.cfg-place__field { display: flex; flex-direction: column; gap: 5px; font-size: 11px; font-weight: 800; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.06em; min-width: 0; }
.cfg-place__rm { border: 0; background: none; font-size: 15px; font-weight: 800; color: var(--ink-300); cursor: pointer; padding: 10px 6px; }
.cfg-place__rm:hover { color: var(--ink); }

.cfg-art { display: grid; grid-template-columns: auto 1fr; gap: 10px; }
.cfg-upload { position: relative; display: inline-flex; align-items: center; border: 1px dashed var(--ink-300); border-radius: var(--r-sm); padding: 10px 14px; font-size: 13px; font-weight: 800; cursor: pointer; white-space: nowrap; }
.cfg-upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cfg-upload:focus-within { outline: 2px solid var(--cobalt); outline-offset: 2px; }
.cfg-art__current { display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 700; color: var(--ink-500); }
.cfg-art__current img { width: 40px; height: 40px; object-fit: contain; background: var(--mist); border-radius: 6px; }

.cfg-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r-pill); padding: 3px; gap: 3px; width: fit-content; }
.cfg-tabs button { border: 0; background: none; border-radius: var(--r-pill); padding: 8px 14px; font: 800 12px var(--font-body); cursor: pointer; color: var(--ink-500); }
.cfg-tabs button[aria-selected="true"] { background: var(--ink); color: #fff; }
.cfg-sizes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.cfg-size { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 800; }
.cfg-size .cfg-input { text-align: center; padding: 9px 6px; }
.cfg-sizes__mix { grid-column: 1 / -1; }
.cfg-qty { display: flex; align-items: center; gap: 12px; font-size: 13px; font-weight: 800; }
.cfg-qty .cfg-input { width: 120px; }
.cfg-tier { display: flex; flex-direction: column; gap: 6px; }
.cfg-tier__bar { height: 6px; border-radius: 3px; background: var(--line); overflow: hidden; }
.cfg-tier__bar span { display: block; height: 100%; background: var(--cobalt); transition: width .2s ease; }
.cfg-tier__ticks { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-300); font-weight: 700; }
.cfg-tier__msg { font-size: 12px; color: var(--mint-600); font-weight: 800; }

.cfg-summary { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--mist-050); padding: 20px 22px; display: flex; flex-direction: column; gap: 10px; }
.cfg-summary__rows > div { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; padding: 4px 0; }
.cfg-summary__rows > div span:first-child { color: var(--ink-500); }
.cfg-summary__rows > div span:last-child { font-weight: 700; text-align: right; }
.cfg-summary__total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px dashed var(--line); padding-top: 12px; font-size: 14px; color: var(--ink-500); }
.cfg-summary__total span:last-child { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--ink); }
.cfg-notice { font-size: 13px; color: var(--ink); background: var(--volt-100); border-radius: var(--r-sm); padding: 10px 12px; line-height: 1.5; }
.cfg-when { display: grid; grid-template-columns: auto 160px; gap: 6px 12px; align-items: center; font-size: 13px; font-weight: 800; border-top: 1px dashed var(--line); padding-top: 12px; }
.cfg-when p { grid-column: 1 / -1; margin: 0; font-size: 13px; font-weight: 500; color: var(--ink-500); line-height: 1.55; }

.cfg-ctas { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.cfg-cta-main { flex: 1; min-width: 200px; padding: 18px 26px; font-size: 15px; border: 0; }
.cfg-ctas .btn--outline { padding: 16px 22px; font-size: 15px; }

.cfg-saveform { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.cfg-saveform__lede { font-size: 14px; color: var(--ink-500); margin: 0; line-height: 1.55; }
.cfg-saveform__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cfg-saveform label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 800; }
.cfg-saveform .btn { border: 0; padding: 15px 24px; font-size: 15px; width: fit-content; }
.cfg-saveform__msg { font-size: 13px; color: var(--ink-500); margin: 0; }
.cfg-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.cfg-trust { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 12px; font-weight: 700; color: var(--ink-500); }

.method-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.method-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; display: flex; flex-direction: column; gap: 8px; background: #fff; }
.method-card__top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.method-card__name { font-weight: 800; font-size: 16px; }
.method-card__fee { font-size: 13px; font-weight: 800; color: var(--cobalt-600); white-space: nowrap; }
.method-card p { font-size: 13px; color: var(--ink-500); line-height: 1.6; margin: 0; }

@media (max-width: 1023px) {
  .pdp-hero { grid-template-columns: 1fr; gap: 32px; }
  .pdp-gallery { position: static; }
}
@media (max-width: 640px) {
  .cfg-place { grid-template-columns: 1fr 1fr; }
  .cfg-place__rm { grid-column: 2; justify-self: end; padding: 0; }
  .cfg-saveform__grid { grid-template-columns: 1fr; }
  .cfg-when { grid-template-columns: 1fr; }
  .cfg-art { grid-template-columns: 1fr; }
  .pdp-thumbs { grid-template-columns: repeat(5, 1fr); gap: 6px; }
  .cfg-price__unit { font-size: 34px; }
}

.cfg-dl { display: grid; grid-template-columns: 1fr; gap: 0; margin: 12px 0; border-top: 1px solid var(--line); }
.cfg-dl > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.cfg-dl dt { color: var(--ink-500); }
.cfg-dl dd { margin: 0; font-weight: 700; text-align: right; }

.cfg-preview.is-photo { padding: 0; background: #F4F4F7; }
.cfg-photo { position: absolute; inset: 0; }
.cfg-photo img, .cfg-photo svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.cfg-stage { background: #F4F4F7 !important; }
.cfg-stage > img { object-fit: contain; }
