/**
 * GTRS Staging — Visual Phase 2B: Configurator Visual Polish R1
 * Scope: Strictly scoped under section.gtrs-cfg[data-endpoint]
 * Policy: Zero commercial-logic changes, zero forced-priority overrides, <200ms transitions, full reduced-motion support.
 */

section.gtrs-cfg[data-endpoint] {
  --gtrs-dark: #181e20;
  --gtrs-graphite-deep: #121719;
  --gtrs-graphite-soft: #252e31;
  --gtrs-muted: #5b6764;
  --gtrs-sage: #63706c;
  --gtrs-line: #dce2de;
  --gtrs-line-strong: #c2cbc6;
  --gtrs-bg: #f6f6f3;
  --gtrs-sage-bg: #eff2ef;
  --gtrs-warm-accent: #8c867c;
  color: #181e20;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(22px, 3vw, 42px);
  background: #ffffff;
  border: 1px solid #dce2de;
  border-top: 3px solid #181e20;
  border-radius: 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
}

/* Header & Technical Identity */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__eyebrow {
  display: inline-block;
  color: #63706c;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin: 0 0 6px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin: 4px 0 28px;
  padding-bottom: 22px;
  border-bottom: 1px solid #dce2de;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__head h2 {
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1.06;
  color: #181e20;
  margin: 4px 0 8px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__head p {
  font-size: 13.5px;
  line-height: 1.65;
  color: #5b6764;
  margin: 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__flag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #181e20;
  background: #eff2ef;
  border: 1px solid #dce2de;
  border-radius: 0;
  padding: 8px 13px;
  white-space: nowrap;
}

/* Main Layout Grid */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(320px, 0.96fr);
  gap: clamp(22px, 2.6vw, 34px);
  align-items: start;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__inputs {
  display: grid;
  gap: 18px;
  min-width: 0;
}

/* Technical Stage Blocks */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__block {
  padding: clamp(20px, 2.4vw, 28px);
  border: 1px solid #dce2de;
  border-top: 2px solid #181e20;
  border-radius: 0;
  background: #ffffff;
  min-width: 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__blockhead {
  margin: 0 0 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eff2ef;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__blockhead strong {
  display: block;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__hint {
  font-size: 12px;
  line-height: 1.68;
  color: #5b6764;
  margin: 14px 0 0;
}

/* Form Grids, Field Labels, Native Selects & Inputs */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__formgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__formgrid label:not([hidden]),
section.gtrs-cfg[data-endpoint] .gtrs-cfg__wide:not([hidden]),
section.gtrs-cfg[data-endpoint] [data-role="barrel-options"] > label:not([hidden]),
section.gtrs-cfg[data-endpoint] [data-role="surface-options"] > label:not([hidden]),
section.gtrs-cfg[data-endpoint] [data-role="surface-colors"] > label:not([hidden]) {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #4f5b58;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  min-width: 0;
}

section.gtrs-cfg[data-endpoint] select,
section.gtrs-cfg[data-endpoint] input[type="number"] {
  background-color: #ffffff;
  color: #181e20;
  border: 1px solid #c2cbc6;
  border-radius: 0;
  padding: 11px 13px;
  width: 100%;
  max-width: 100%;
  min-height: 46px;
  font: 600 13px/1.35 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

section.gtrs-cfg[data-endpoint] select:hover:not(:disabled),
section.gtrs-cfg[data-endpoint] input[type="number"]:hover:not(:disabled):not([readonly]) {
  border-color: #181e20;
}

section.gtrs-cfg[data-endpoint] select:focus,
section.gtrs-cfg[data-endpoint] select:focus-visible,
section.gtrs-cfg[data-endpoint] input[type="number"]:focus,
section.gtrs-cfg[data-endpoint] input[type="number"]:focus-visible,
section.gtrs-cfg[data-endpoint] button:focus-visible,
section.gtrs-cfg[data-endpoint] textarea:focus-visible,
section.gtrs-cfg[data-endpoint] input[type="checkbox"]:focus-visible {
  outline: 2px solid #181e20;
  outline-offset: 2px;
  border-color: #181e20;
}

section.gtrs-cfg[data-endpoint] select:disabled,
section.gtrs-cfg[data-endpoint] input[type="number"]:disabled {
  background-color: #f6f6f3;
  border: 1px dashed #c2cbc6;
  color: #788480;
  cursor: not-allowed;
  opacity: 0.85;
}

section.gtrs-cfg[data-endpoint] input[type="number"][readonly] {
  background-color: #f6f6f3;
  border: 1px solid #dce2de;
  color: #54605d;
  cursor: default;
}

/* 01 / Wheel Model & 04 / Fitment Preset Chips */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips[data-role="preset"] {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  padding: 11px 15px;
  border: 1px solid #c2cbc6;
  border-radius: 0;
  background: #f6f6f3;
  color: #181e20;
  font-size: 12.5px;
  font-weight: 650;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips[data-role="preset"] label {
  justify-content: flex-start;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips label small {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #5b6764;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips label:hover:not(:has(input:disabled)) {
  border-color: #181e20;
  background: #ffffff;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips label:has(input:checked) {
  background: #181e20;
  color: #ffffff;
  border-color: #181e20;
  font-weight: 700;
  box-shadow: inset 0 -3px 0 #8c867c;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips label:has(input:checked) small {
  color: #d4dcd9;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips input {
  accent-color: #181e20;
  width: 15px;
  height: 15px;
  margin: 0;
  flex-shrink: 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips label:has(input:checked) input {
  accent-color: #ffffff;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips label:has(input:focus-visible) {
  outline: 2px solid #181e20;
  outline-offset: 2px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips label:has(input:disabled) {
  background: #f6f6f3;
  border: 1px dashed #c2cbc6;
  color: #788480;
  opacity: 0.72;
  cursor: not-allowed;
}

/* 03 / Dimensions Status & Factory Reference Bar */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__sizeinfo {
  margin-top: 16px;
  padding: 16px 18px;
  background: #f6f6f3;
  border: 1px solid #dce2de;
  border-left: 3px solid #181e20;
  border-radius: 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__sizehead {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__sizehead strong {
  display: inline-block;
  padding: 5px 10px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: #181e20;
  color: #ffffff;
  border: 1px solid #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__sizehead strong[data-classification="candidate"] {
  background: #eff2ef;
  color: #181e20;
  border: 1px solid #63706c;
  border-left: 3px solid #8c867c;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__sizehead strong[data-classification="custom"] {
  background: #ffffff;
  color: #181e20;
  border: 1px dashed #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__sizeinfo p {
  font-size: 12px;
  line-height: 1.65;
  color: #485451;
  margin: 10px 0 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__restore {
  font: 700 10px/1.2 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #181e20;
  background: #ffffff;
  border: 1px solid #181e20;
  border-radius: 0;
  padding: 9px 13px;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__restore:hover:not(:disabled) {
  background: #181e20;
  color: #ffffff;
}

/* 04 / Fitment Note, Reference Status & ET Readouts */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__fitnote {
  margin: 14px 0 10px;
  padding: 14px 16px;
  background: #eff2ef;
  border: 1px solid #dce2de;
  border-left: 3px solid #63706c;
  border-radius: 0;
  color: #252e31;
  font-size: 12.5px;
  line-height: 1.68;
}

section.gtrs-cfg[data-endpoint] [data-role="reference-status"] {
  margin: 0 0 16px;
  padding: 12px 14px;
  background: #f6f6f3;
  border: 1px solid #e2e3de;
  color: #4f5b58;
  font-size: 11.5px;
  line-height: 1.64;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__etrow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 16px 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__etrow > span {
  background: #eff2ef;
  border: 1px solid #dce2de;
  border-top: 2px solid #181e20;
  padding: 14px 16px;
  color: #5b6764;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__etrow strong {
  display: block;
  color: #181e20;
  font-size: 22px;
  font-weight: 760;
  letter-spacing: -0.035em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  text-transform: none;
}

/* 05 / Material & Mounting 3-Column Alignment on Desktop */
@media (min-width: 900px) {
  section.gtrs-cfg[data-endpoint] .gtrs-cfg__block:has([data-field="hub"]) .gtrs-cfg__formgrid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Conditional Stage: M2 Barrel Options */
section.gtrs-cfg[data-endpoint] [data-role="barrel-options"] > h3,
section.gtrs-cfg[data-endpoint] [data-role="surface-options"] > h3 {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eff2ef;
  font-size: 12.5px;
  font-weight: 750;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] [data-role="barrel-options"] > h3::before {
  content: "05B / M2 DUO-BLOCK — ";
  color: #63706c;
}

section.gtrs-cfg[data-endpoint] [data-role="barrel-options"] > p:first-of-type {
  margin: 0 0 16px;
  font-size: 12.5px;
  line-height: 1.65;
  color: #5b6764;
}

section.gtrs-cfg[data-endpoint] [data-role="barrel-options"] > label {
  margin-bottom: 14px;
}

section.gtrs-cfg[data-endpoint] [data-role="barrel-price"] {
  margin: 12px 0 0;
  padding: 12px 16px;
  background: #eff2ef;
  border: 1px solid #dce2de;
  border-left: 3px solid #181e20;
  color: #181e20;
  font-size: 12.5px;
  font-weight: 600;
}

/* Conditional Stage: M3 Single / Dual Paint & Surface A/B */
section.gtrs-cfg[data-endpoint] [data-role="surface-options"] > h3::before {
  content: "05B / M3 SURFACE PROGRAM — ";
  color: #63706c;
}

section.gtrs-cfg[data-endpoint] [data-role="surface-options"] > label {
  margin-bottom: 6px;
}

section.gtrs-cfg[data-endpoint][data-polish-m3-mode="blank"] select[data-field="face_finish_mode"] {
  background-color: #f6f6f3;
  border-color: #181e20;
  box-shadow: inset 3px 0 0 #181e20;
}

section.gtrs-cfg[data-endpoint] [data-role="surface-colors"]:not([hidden]) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #dce2de;
}

section.gtrs-cfg[data-endpoint] [data-role="surface-colors"] > img {
  grid-column: 1 / -1;
  border: 1px solid #dce2de;
  background: #f6f6f3;
  padding: 14px;
  max-height: 360px;
  width: 100%;
  object-fit: contain;
}

section.gtrs-cfg[data-endpoint] .gtrs-surface-legend {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

section.gtrs-cfg[data-endpoint] .gtrs-surface-legend p {
  margin: 0;
  padding: 12px 14px;
  background: #f6f6f3;
  border: 1px solid #dce2de;
  border-top: 2px solid #181e20;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.5;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] [data-role="surface-colors"] > p {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 16px;
  background: #eff2ef;
  border: 1px solid #dce2de;
  border-left: 3px solid #181e20;
  font-size: 12px;
  font-weight: 600;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] [data-role="surface-map-open"],
section.gtrs-cfg[data-endpoint] [data-role="surface-map-close"] {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 40px;
  padding: 10px 16px;
  background: #ffffff;
  color: #181e20;
  border: 1px solid #181e20;
  border-radius: 0;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

section.gtrs-cfg[data-endpoint] [data-role="surface-map-open"]:hover,
section.gtrs-cfg[data-endpoint] [data-role="surface-map-close"]:hover {
  background: #181e20;
  color: #ffffff;
}

section.gtrs-cfg[data-endpoint] dialog[data-role="surface-map-dialog"] {
  border-radius: 0;
  border: 2px solid #181e20;
  background: #ffffff;
  color: #181e20;
}

/* 06 / Finish Selector (.gfs) */
section.gtrs-cfg[data-endpoint] .gfs {
  --gfs-ink: #181e20;
  --gfs-line: #dce2de;
  color: #181e20;
  font: 13.5px/1.55 Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 14px;
  border-bottom: 1px solid #dce2de;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-filters button,
section.gtrs-cfg[data-endpoint] .gfs-fallback {
  border: 1px solid #c2cbc6;
  border-radius: 0;
  background: #ffffff;
  color: #4f5b58;
  padding: 10px 16px;
  min-height: 38px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  transition: border-color 0.15s ease, background-color 0.15s ease, color 0.15s ease;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-filters button:hover,
section.gtrs-cfg[data-endpoint] .gfs-fallback:hover {
  border-color: #181e20;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-filters button[aria-pressed="true"] {
  background: #181e20;
  color: #ffffff;
  border-color: #181e20;
  box-shadow: inset 0 -3px 0 #8c867c;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-hint,
section.gtrs-cfg[data-endpoint] .gfs .gfs-note {
  font-size: 11.5px;
  line-height: 1.6;
  color: #5b6764;
  margin: 0 0 14px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-card {
  position: relative;
  border: 1px solid #dce2de;
  border-radius: 0;
  background: #ffffff;
  padding: 0;
  text-align: left;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-card:hover {
  border-color: #63706c;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-card picture {
  background: #f6f6f3;
  border-bottom: 1px solid #eff2ef;
  padding: 6px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 13px 14px;
  flex: 1;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-copy strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: #181e20;
  min-height: 34px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-category {
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #63706c;
  margin: 4px 0 2px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-price {
  font-size: 12px;
  font-weight: 700;
  color: #181e20;
  font-variant-numeric: tabular-nums;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-check:not([hidden]) {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 24px;
  height: 24px;
  border-radius: 0;
  background: #181e20;
  color: #ffffff;
  border: 1px solid #ffffff;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-card[aria-pressed="true"] {
  border-color: #181e20;
  box-shadow: inset 0 0 0 2px #181e20;
  background: #eff2ef;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-card.gfs-viewing:not([aria-pressed="true"]) {
  border-color: #181e20;
  box-shadow: inset 0 -3px 0 #8c867c;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-card.gfs-special {
  margin-top: 14px;
  background: #f6f6f3;
  border: 1px solid #181e20;
  border-left: 4px solid #181e20;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-card.gfs-special .gfs-copy {
  padding: 16px 18px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-card.gfs-special .gfs-copy strong {
  min-height: 0;
  font-size: 16px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-preview {
  border: 1px solid #dce2de;
  border-top: 2px solid #181e20;
  border-radius: 0;
  background: #ffffff;
}

@media (min-width: 651px) {
  @container (max-width: 740px) {
    section.gtrs-cfg[data-endpoint] .gfs .gfs-preview:has(> picture) {
      display: grid;
      grid-template-columns: minmax(210px, 0.92fr) minmax(0, 1.28fr);
      align-items: stretch;
    }

    section.gtrs-cfg[data-endpoint] .gfs .gfs-preview:has(> picture) > picture {
      border-bottom: 0;
      border-right: 1px solid #dce2de;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 16px;
    }
  }
}

/* Strict [hidden] attribute preservation */
section.gtrs-cfg[data-endpoint] [hidden],
section.gtrs-cfg[data-endpoint] label[hidden],
section.gtrs-cfg[data-endpoint] div[hidden],
section.gtrs-cfg[data-endpoint] button[hidden],
section.gtrs-cfg[data-endpoint] p[hidden],
section.gtrs-cfg[data-endpoint] span[hidden] {
  display: none;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-preview > picture {
  background: #f6f6f3;
  border-bottom: 1px solid #dce2de;
  padding: 10px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-details {
  padding: 20px;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-details h3 {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 6px 0 8px;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-macro {
  margin: 18px 0;
  padding-top: 16px;
  border-top: 1px solid #dce2de;
  color: #5b6764;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-confirm {
  min-height: 46px;
  padding: 13px 18px;
  background: #181e20;
  color: #ffffff;
  border: 1px solid #181e20;
  border-radius: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 10px;
  transition: background-color 0.15s ease;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-confirm:hover:not(:disabled) {
  background: #2b3538;
}

section.gtrs-cfg[data-endpoint] .gfs .gfs-selected {
  margin: 16px 0 0;
  padding: 14px 18px;
  background: #181e20;
  color: #ffffff;
  border-left: 4px solid #8c867c;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Configuration Summary & 6 Quote Visual States */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary {
  background: #f6f6f3;
  border: 1px solid #dce2de;
  border-top: 3px solid #181e20;
  border-radius: 0;
  padding: clamp(22px, 2.5vw, 30px);
  position: sticky;
  top: 96px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__sumhead {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #63706c;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__sumname {
  font-size: clamp(22px, 2.2vw, 28px);
  font-weight: 760;
  letter-spacing: -0.04em;
  line-height: 1.12;
  color: #181e20;
  margin: 10px 0 6px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary > p:first-of-type {
  font-size: 12.5px;
  font-weight: 600;
  color: #54605d;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #dce2de;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__pair {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e2e3de;
  padding: 12px 0;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__pair span {
  color: #5b6764;
  font-weight: 500;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__pair strong {
  color: #181e20;
  font-weight: 700;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  padding: 18px 0;
  margin: 4px 0 16px;
  border-top: 2px solid #181e20;
  border-bottom: 1px solid #dce2de;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__total span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__total strong {
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 760;
  letter-spacing: -0.04em;
  color: #181e20;
  font-variant-numeric: tabular-nums;
}

/* Status Banner & 6 Explicit States */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__message {
  font-size: 12px;
  line-height: 1.65;
  color: #36413f;
  padding: 13px 15px;
  margin: 0 0 14px;
  background: #ffffff;
  border: 1px solid #dce2de;
  border-left: 3px solid #63706c;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__message::before {
  content: "STATUS · AWAITING CALCULATION";
  display: block;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #63706c;
  margin-bottom: 5px;
}

/* State 2: Calculating */
section.gtrs-cfg[data-endpoint][data-polish-state="calculating"] .gtrs-cfg__message,
section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary:has(.gtrs-cfg__calculate:disabled) .gtrs-cfg__message {
  background: #eff2ef;
  border-color: #181e20;
  border-left: 4px solid #181e20;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint][data-polish-state="calculating"] .gtrs-cfg__message::before,
section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary:has(.gtrs-cfg__calculate:disabled) .gtrs-cfg__message::before {
  content: "STATUS · CALCULATING PRICE";
  color: #181e20;
}

/* State 3: Calculated and Current */
section.gtrs-cfg[data-endpoint][data-polish-state="current"] .gtrs-cfg__message,
section.gtrs-cfg[data-endpoint] .gtrs-cfg__message[data-kind="review"] {
  background: #eff2ef;
  border-color: #181e20;
  border-left: 4px solid #181e20;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint][data-polish-state="current"] .gtrs-cfg__message::before,
section.gtrs-cfg[data-endpoint] .gtrs-cfg__message[data-kind="review"]::before {
  content: "STATUS · CALCULATION UP TO DATE";
  color: #181e20;
}

/* State 4: Quote Stale */
section.gtrs-cfg[data-endpoint][data-polish-state="stale"] .gtrs-cfg__message {
  background: #faf6ee;
  border-color: #cab388;
  border-left: 4px solid #8a6830;
  color: #3d2e14;
}

section.gtrs-cfg[data-endpoint][data-polish-state="stale"] .gtrs-cfg__message::before {
  content: "STATUS · QUOTE STALE — RECALCULATE REQUIRED";
  color: #785926;
}

section.gtrs-cfg[data-endpoint][data-polish-state="stale"] .gtrs-cfg__calculate {
  box-shadow: 0 0 0 2px #f6f6f3, 0 0 0 4px #181e20;
}

/* State 5: Special Order / Individual Quotation */
section.gtrs-cfg[data-endpoint][data-polish-state="special-order"] .gtrs-cfg__message {
  background: #ffffff;
  border-color: #8c867c;
  border-left: 4px solid #181e20;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint][data-polish-state="special-order"] .gtrs-cfg__message::before {
  content: "STATUS · SPECIAL ORDER — INDIVIDUAL QUOTATION";
  color: #54605d;
}

/* State 6: Validation Error */
section.gtrs-cfg[data-endpoint][data-polish-state="error"] .gtrs-cfg__message,
section.gtrs-cfg[data-endpoint] .gtrs-cfg__message[data-kind="error"] {
  background: #fcf4f3;
  border-color: #cfa099;
  border-left: 4px solid #8e3b31;
  color: #69261e;
}

section.gtrs-cfg[data-endpoint][data-polish-state="error"] .gtrs-cfg__message::before,
section.gtrs-cfg[data-endpoint] .gtrs-cfg__message[data-kind="error"]::before {
  content: "STATUS · CONFIGURATION ACTION REQUIRED";
  color: #8e3b31;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__issues {
  font-size: 11.5px;
  color: #69261e;
  margin: 0 0 16px;
  padding: 10px 14px 10px 28px;
  background: #fcf4f3;
  border: 1px solid #cfa099;
  line-height: 1.6;
}

/* Primary & Secondary Summary Actions */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__calculate,
section.gtrs-cfg[data-endpoint] .gtrs-cfg__download {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-radius: 0;
  width: 100%;
  min-height: 48px;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__calculate {
  background: #181e20;
  color: #ffffff;
  border: 1px solid #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__calculate:hover:not(:disabled) {
  background: #2b3538;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__download {
  margin-top: 10px;
  background: #ffffff;
  border: 1px solid #c2cbc6;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__download:hover:not(:disabled) {
  border-color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary .g39-cart-entry {
  border-top: 1px solid #dce2de;
  margin-top: 18px;
  padding-top: 18px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary .g39-cart-entry .g39-button {
  width: 100%;
  min-height: 50px;
  padding: 14px 18px;
  border-radius: 0;
  background: #181e20;
  color: #ffffff;
  border: 1px solid #181e20;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  box-shadow: inset 0 -3px 0 #8c867c;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary .g39-cart-entry .g39-button:hover:not(:disabled) {
  background: #2b3538;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary .g39-cart-entry .g39-button:disabled {
  background: #e9ece9;
  color: #65716e;
  border: 1px dashed #b5bfbb;
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary .g39-cart-entry .g39-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.62;
  color: #54605d;
}

/* Order Review / Delivery Modal (.gtrs-cfg__review) */
section.gtrs-cfg[data-endpoint] .gtrs-cfg__review {
  background: rgba(18, 23, 25, 0.72);
  padding: 20px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewcard {
  background: #ffffff;
  color: #181e20;
  width: min(760px, 100%);
  max-height: 92vh;
  border-radius: 0;
  border: 1px solid #181e20;
  border-top: 4px solid #181e20;
  padding: clamp(22px, 3vw, 36px);
  box-shadow: 0 24px 64px rgba(18, 23, 25, 0.24);
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewtop {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #63706c;
  padding-bottom: 12px;
  border-bottom: 1px solid #dce2de;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewtop button {
  border-radius: 0;
  border: 1px solid #c2cbc6;
  background: #ffffff;
  color: #181e20;
  width: 38px;
  height: 38px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewcard h3 {
  margin: 16px 0 10px;
  font-size: clamp(24px, 2.8vw, 32px);
  font-weight: 760;
  letter-spacing: -0.04em;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewdetails {
  border: 1px solid #dce2de;
  background: #dce2de;
  margin: 20px 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewdetails > div {
  background: #ffffff;
  padding: 13px 15px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewdetails span {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #63706c;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewdetails strong {
  font-size: 12.5px;
  font-weight: 700;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__shippingbox {
  padding: 18px 20px;
  margin: 16px 0;
  background: #f6f6f3;
  border: 1px solid #dce2de;
  border-left: 3px solid #181e20;
  border-radius: 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__shippingbox > strong {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #181e20;
  margin: 0 0 14px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewprices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewprices > div {
  background: #eff2ef;
  border: 1px solid #dce2de;
  border-top: 2px solid #181e20;
  padding: 14px 16px;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewprices span {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #5b6764;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewprices strong {
  font-size: 20px;
  font-weight: 760;
  letter-spacing: -0.03em;
  color: #181e20;
  font-variant-numeric: tabular-nums;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewlabel textarea {
  border-radius: 0;
  border: 1px solid #c2cbc6;
  padding: 12px 14px;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewbuttons button {
  border-radius: 0;
  min-height: 48px;
  padding: 14px 18px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  border: 1px solid #c2cbc6;
  background: #ffffff;
  color: #181e20;
}

section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewbuttons button:last-child {
  background: #181e20;
  color: #ffffff;
  border-color: #181e20;
}

/* Responsive Breakpoints (1024px / 768px / 600px / 390px) */
@media (max-width: 1024px) {
  section.gtrs-cfg[data-endpoint] .gtrs-cfg__layout {
    grid-template-columns: 1fr;
    gap: 22px;
  }

  section.gtrs-cfg[data-endpoint] .gtrs-cfg__summary {
    position: static;
  }
}

@media (max-width: 780px) {
  section.gtrs-cfg[data-endpoint] .gtrs-cfg__head {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  section.gtrs-cfg[data-endpoint] .gtrs-surface-legend {
    grid-template-columns: 1fr;
  }

  section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewprices {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  section.gtrs-cfg[data-endpoint] {
    padding: 18px 14px;
  }

  section.gtrs-cfg[data-endpoint] .gtrs-cfg__block {
    padding: 18px 15px;
  }

  section.gtrs-cfg[data-endpoint] .gtrs-cfg__formgrid,
  section.gtrs-cfg[data-endpoint] .gtrs-cfg__etrow,
  section.gtrs-cfg[data-endpoint] [data-role="surface-colors"]:not([hidden]),
  section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewdetails {
    grid-template-columns: 1fr;
  }

  section.gtrs-cfg[data-endpoint] .gtrs-cfg__chips[data-role="preset"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  section.gtrs-cfg[data-endpoint] .gfs .gfs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  section.gtrs-cfg[data-endpoint] .gtrs-cfg__reviewbuttons {
    flex-direction: column;
  }
}

/* Reduced Motion Compliance */
@media (prefers-reduced-motion: reduce) {
  section.gtrs-cfg[data-endpoint] *,
  section.gtrs-cfg[data-endpoint] *::before,
  section.gtrs-cfg[data-endpoint] *::after {
    transition-duration: 0.01ms;
    animation-duration: 0.01ms;
  }
}
