/* Server configurator (DESIGN.md): option groups as hairline cards on the left, a sticky build summary on the right. */
.cfg-head { padding-top: calc(var(--header-h) + clamp(2.5rem, 2rem + 3vw, 4.5rem)); }
.cfg-head h1 { font-size: var(--text-display); line-height: 1.1; letter-spacing: -.03em; margin: .7rem 0 .35rem; }
.cfg-platform { color: var(--muted); font-size: .9375rem; margin: 0 0 1.2rem; }
.cfg-head .lead { color: var(--ink-muted); font-size: var(--text-lead); max-width: 34rem; margin: 0 0 1.4rem; }
.cfg-head .price { font-size: 1.25rem; margin: 0 0 1.6rem; }
.cfg-head .price .meta { font: 400 .8125rem/1.4 var(--font-sans); color: var(--muted); margin-left: .35rem; }
.cfg-highlights li { font-size: .9375rem; }

/* Gallery: transparent cut-outs on a surface panel, thumbnails underneath. */
.cfg-head .split > * { min-width: 0; }
.cfg-gallery { display: grid; grid-template-columns: minmax(0, 1fr); gap: .6rem; }
.cfg-photo { aspect-ratio: 1; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); place-items: center; padding: clamp(1.5rem, 4vw, 3rem); border-radius: 16px; border: 1px solid var(--line); background: var(--surface-1); box-shadow: var(--edge); }
.cfg-photo img { width: 100%; height: 100%; object-fit: contain; }
.cfg-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .5rem; }
.cfg-thumb { aspect-ratio: 1; padding: .45rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-1); cursor: pointer; transition: background-color .2s, border-color .2s; }
.cfg-thumb:hover { background: var(--surface-2); border-color: var(--line-strong); }
.cfg-thumb[aria-pressed="true"] { background: var(--surface-2); border-color: rgba(255, 255, 255, .32); }
.cfg-thumb img { width: 100%; height: 100%; object-fit: contain; }

.cfg-presets-wrap { margin-top: clamp(2.5rem, 2rem + 2vw, 4rem); }
.cfg-presets { display: grid; gap: .6rem; margin: .9rem 0 .8rem; }
@media (min-width: 960px) { .cfg-presets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.cfg-preset { display: grid; grid-template-columns: 1fr auto; gap: .2rem 1rem; text-align: left; padding: 1rem 1.15rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-1); box-shadow: var(--edge); color: var(--text); font: inherit; cursor: pointer; transition: background-color .2s, border-color .2s; }
.cfg-preset:hover { background: var(--surface-2); border-color: var(--line-strong); }
.cfg-preset[aria-pressed="true"] { background: var(--surface-2); border-color: rgba(255, 255, 255, .32); }
.cfg-preset-name { font-weight: 500; font-size: 1rem; }
.cfg-preset-blurb { grid-column: 1; color: var(--muted); font-size: .875rem; line-height: 1.45; }
.cfg-preset-price { grid-column: 2; grid-row: 1 / span 2; align-self: center; font: 500 .9375rem/1 var(--font-mono); }

.cfg-layout { display: grid; gap: 2rem; }
.cfg-layout > * { min-width: 0; }
@media (min-width: 960px) {
  .cfg-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 3rem; align-items: start; }
  .cfg-summary { position: sticky; top: calc(var(--header-h) + 1.5rem); max-height: calc(100vh - var(--header-h) - 3rem); overflow: auto; }
}

.cfg-form { display: grid; gap: 2.75rem; }
.cfg-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.cfg-group[hidden], .cfg-option[hidden] { display: none; }
.cfg-group legend { display: flex; align-items: baseline; gap: .7rem; padding: 0; font-size: 1.25rem; font-weight: 500; letter-spacing: -.015em; }
/* Step numbers count only visible groups, so hidden ones leave no gaps. */
.cfg-form { counter-reset: cfg-step; }
.cfg-group:not([hidden]) { counter-increment: cfg-step; }
.cfg-step::before { content: counter(cfg-step, decimal-leading-zero); font: 500 .75rem/1 var(--font-mono); color: var(--faint); }
.cfg-note { color: var(--muted); font-size: .875rem; line-height: 1.5; margin: .45rem 0 0; max-width: 40rem; }
.cfg-options { display: grid; gap: .5rem; margin-top: 1rem; }
@media (min-width: 640px) and (max-width: 959px), (min-width: 1200px) { .cfg-group:is([data-type="single"], [data-type="multi"], [data-type="qty-one"]) .cfg-options { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cfg-option { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: start; gap: .25rem .8rem; padding: .85rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-1); cursor: pointer; transition: background-color .2s, border-color .2s; }
.cfg-option:hover { border-color: var(--line-strong); background: var(--surface-2); }
.cfg-option:has(input:checked) { border-color: rgba(255, 255, 255, .32); background: var(--surface-2); }
.cfg-option:has(input:focus-visible) { outline: 2px solid rgb(var(--accent-rgb)); outline-offset: 2px; }
.cfg-option input[type="radio"], .cfg-option input[type="checkbox"] { appearance: none; width: 16px; height: 16px; margin: .2rem 0 0; border: 1px solid rgba(255, 255, 255, .28); background: var(--bg); display: grid; place-items: center; }
.cfg-option input[type="radio"] { border-radius: 50%; }
.cfg-option input[type="checkbox"] { border-radius: 4px; }
.cfg-option input:checked { border-color: var(--text); background: var(--text); }
.cfg-option input[type="radio"]:checked::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--bg); }
.cfg-option input[type="checkbox"]:checked::after { content: ""; width: 8px; height: 4px; border: solid var(--bg); border-width: 0 0 2px 2px; transform: translateY(-1px) rotate(-45deg); }
.cfg-option input:focus-visible { outline: none; }
.cfg-text { display: grid; gap: .15rem; min-width: 0; }
.cfg-label { font-size: .9375rem; font-weight: 500; line-height: 1.35; }
.cfg-detail { color: var(--muted); font-size: .8125rem; line-height: 1.45; }
.cfg-price { font: 400 .8125rem/1.35 var(--font-mono); color: var(--ink-muted); white-space: nowrap; padding-top: .1rem; }
.cfg-option:has(input:checked) .cfg-price { color: var(--muted); }

/* Quantity rows: no selector dot; the stepper sits under the text on phones and beside it on wider screens. */
.cfg-qty { grid-template-columns: minmax(0, 1fr) auto; cursor: default; }
.cfg-qty .cfg-stepper { grid-column: 1 / -1; justify-self: start; margin-top: .45rem; }
@media (min-width: 640px) {
  .cfg-qty { grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; }
  .cfg-qty .cfg-stepper { grid-column: auto; margin: 0; }
}
.cfg-count { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .6rem; padding: .7rem 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-1); font-size: .9375rem; }

.cfg-stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--bg); overflow: hidden; }
.cfg-stepper button { width: 36px; height: 36px; border: 0; background: transparent; color: var(--text); font: 500 1rem/1 var(--font-sans); cursor: pointer; transition: background-color .2s, color .2s; }
.cfg-stepper button:hover:not(:disabled) { background: var(--surface-3); }
.cfg-stepper button:disabled { color: var(--faint); opacity: .5; cursor: not-allowed; }
.cfg-stepper input { width: 2.6rem; height: 36px; border: 0; border-inline: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--text); text-align: center; font: 500 .875rem/1 var(--font-mono); -moz-appearance: textfield; appearance: textfield; }
.cfg-stepper input::-webkit-inner-spin-button, .cfg-stepper input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

.cfg-summary { padding: 1.5rem; border-radius: 12px; scroll-margin-top: calc(var(--header-h) + 1rem); }
.cfg-preset-tag { display: inline-block; margin: .7rem 0 .4rem; padding: .25rem .6rem; border-radius: 999px; background: var(--surface-3); color: var(--ink-muted); font-size: .75rem; }
.cfg-lines { list-style: none; padding: 0; margin: .4rem 0 0; }
.cfg-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: .6rem 0; border-bottom: 1px solid var(--line); }
.cfg-lines li > span:first-child { display: grid; gap: .1rem; min-width: 0; }
.cfg-line-title { color: var(--faint); font-size: .75rem; }
.cfg-line-text { font-size: .8125rem; line-height: 1.4; color: var(--ink-muted); overflow-wrap: anywhere; }
.cfg-line-price { font: 400 .8125rem/1.4 var(--font-mono); color: var(--ink-muted); white-space: nowrap; padding-top: 1rem; }
.cfg-total { display: flex; justify-content: space-between; align-items: baseline; padding: 1rem 0 .3rem; font-weight: 500; }
.cfg-total .price { font-size: 1.5rem; }
.cfg-fine { color: var(--muted); font-size: .8125rem; line-height: 1.5; margin: .3rem 0 0; }
.cfg-issues { list-style: none; padding: 0; margin: .8rem 0 0; display: grid; gap: .4rem; }
.cfg-issues:empty { display: none; }
.cfg-issues li { padding: .6rem .75rem; border-radius: 8px; border: 1px solid rgb(var(--accent-rgb) / .35); background: var(--surface-2); color: var(--ink-muted); font-size: .8125rem; line-height: 1.45; }
.cfg-request { width: 100%; margin: 1rem 0 .5rem; }
.cfg-request:disabled { background: var(--surface-3); color: var(--muted); cursor: not-allowed; }
.cfg-legal { color: var(--faint); font-size: .75rem; line-height: 1.55; margin: 3rem 0 0; max-width: 52rem; }

/* Phone total bar: visible until the summary scrolls into view. */
.cfg-bar { position: fixed; inset: auto 0 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem var(--gutter) calc(.7rem + env(safe-area-inset-bottom)); background: var(--surface-1); border-top: 1px solid var(--line-strong); font-size: .875rem; color: var(--muted); transition: transform .25s ease, opacity .25s ease; }
.cfg-bar strong { color: var(--text); font: 500 1rem/1 var(--font-mono); margin-left: .4rem; }
.cfg-bar.is-hidden { transform: translateY(100%); opacity: 0; pointer-events: none; }
@media (min-width: 960px) { .cfg-bar { display: none; } }
@media (max-width: 959px) { .cfg-section { padding-bottom: 6rem; } }
@media (prefers-reduced-motion: reduce) { .cfg-bar { transition: none; } }

/* Fixed-price product pages: specification table as a hairline list. */
.specs table { width: 100%; border-collapse: collapse; font-size: .875rem; margin: .4rem 0 0; }
.specs tr { border-bottom: 1px solid var(--line); }
.specs th { width: 40%; padding: .6rem 1rem .6rem 0; text-align: left; vertical-align: top; font-weight: 500; color: var(--muted); }
.specs td { padding: .6rem 0; color: var(--ink-muted); }
