:root {
  color: #242625;
  font-family: Arial, "Microsoft YaHei", sans-serif;
  font-synthesis: none;
  --bg: #f3f3f1;
  --border: #ddddda;
  --ink-muted: #737773;
  --red: #dd3a33;
  --panel: #ffffff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
}

button,
a {
  font: inherit;
}

button {
  cursor: pointer;
}

.site-header {
  display: flex;
  align-items: center;
  gap: 40px;
  height: 68px;
  padding: 0 5vw;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
}

.brand {
  color: #1d201f;
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
}

.site-header nav {
  display: flex;
  gap: 24px;
}

.site-header nav a {
  color: #555957;
  font-size: 14px;
  text-decoration: none;
}

.header-note {
  margin-left: auto;
  color: var(--ink-muted);
  font-size: 13px;
}

main {
  max-width: 1500px;
  margin: 0 auto;
  padding: 40px 28px 54px;
}

.eyebrow {
  margin: 0;
  color: #909491;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 10px;
}

h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 500;
}

.title-row p {
  margin: 8px 0 0;
  color: var(--ink-muted);
}

.heading-meta {
  display: flex;
  gap: 10px;
}

.heading-meta span {
  padding: 6px 9px;
  border: 1px solid #d6d8d5;
  color: #727672;
  font-size: 12px;
}

.configurator-shell {
  margin-top: 30px;
}

.tabs {
  display: flex;
  gap: 26px;
  height: 46px;
  padding-left: 4px;
}

.tab {
  border: 0;
  background: transparent;
  color: #737673;
  font-size: 15px;
}

.tab.active {
  color: var(--red);
}

.configurator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 410px;
  min-height: 740px;
  overflow: hidden;
  background: var(--panel);
}

.viewer-panel {
  display: grid;
  grid-template-rows: 66px minmax(0, 1fr) 58px;
  min-width: 0;
  border-right: 1px solid var(--border);
}

.viewer-topline,
.viewer-toolbar {
  display: flex;
  align-items: center;
  padding: 0 22px;
}

.viewer-topline {
  justify-content: space-between;
}

.viewer-topline strong {
  display: block;
  font-size: 20px;
  font-weight: 500;
}

.viewer-topline small {
  color: var(--ink-muted);
}

.icon-button {
  width: 38px;
  height: 38px;
  border: 0;
  background: transparent;
}

.icon-button svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: #4f5351;
  stroke-linecap: square;
  stroke-width: 1.4;
}

.viewer-stage {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 45%, #fff 0, #fbfbfa 48%, #f1f1ef 100%);
}

#viewer-canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.loading-panel,
.viewer-error {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(340px, calc(100% - 40px));
  padding: 20px;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
  text-align: center;
}

.loading-panel p {
  margin: 0 0 15px;
  font-size: 14px;
}

.loading-track {
  height: 3px;
  overflow: hidden;
  background: #e0e1df;
}

.loading-track span {
  display: block;
  width: 0;
  height: 100%;
  background: #272a29;
  transition: width 180ms ease;
}

.loading-panel small {
  display: block;
  margin-top: 9px;
  color: var(--ink-muted);
}

.viewer-hint {
  position: absolute;
  bottom: 16px;
  left: 50%;
  display: flex;
  gap: 8px;
  transform: translateX(-50%);
}

.viewer-hint span {
  padding: 6px 8px;
  background: rgba(255, 255, 255, 0.84);
  color: #6a6d6b;
  font-size: 11px;
}

.viewer-toolbar {
  gap: 10px;
}

.viewer-toolbar button {
  border: 0;
  background: transparent;
  color: #525654;
  font-size: 13px;
}

.viewer-toolbar button:disabled {
  color: #b6b8b5;
}

.toolbar-spacer {
  flex: 1;
}

.summary-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.summary-scroll {
  overflow-y: auto;
  padding: 27px 24px 18px;
}

.summary-header h2 {
  margin: 6px 0 8px;
  font-size: 23px;
  font-weight: 500;
}

.summary-header p:last-child {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  line-height: 1.6;
}

.preset-section,
.option-block {
  margin-top: 25px;
  padding-top: 19px;
  border-top: 1px solid #e8e9e6;
}

.section-heading,
.option-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.section-heading h3,
.option-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
}

.section-heading span,
.option-title span {
  color: var(--ink-muted);
  font-size: 12px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 13px;
}

.preset-button {
  padding: 12px 7px;
  border: 1px solid #e0e1de;
  background: white;
  color: #505452;
  font-size: 12px;
}

.preset-button.active {
  border-color: #252827;
  box-shadow: inset 0 0 0 1px #252827;
}

.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 13px;
  padding: 6px 0;
}

.swatch {
  position: relative;
  display: grid;
  flex: 0 0 36px;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  padding: 0;
  place-items: center;
  border: 1px solid #d7d9d6;
  border-radius: 50%;
  appearance: none;
  background-position: center;
  background-size: cover;
  cursor: pointer;
}

.swatch.active::after {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 43px;
  height: 43px;
  border: 1px solid #333634;
  border-radius: 50%;
  content: "";
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.headrest-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.headrest-toggle button {
  padding: 11px;
  border: 1px solid #e0e1de;
  background: white;
  color: #515553;
  font-size: 13px;
}

.headrest-toggle button.active {
  border-color: #252827;
  background: #252827;
  color: white;
}

.summary-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-top: 1px solid var(--border);
}

.summary-footer small,
.summary-footer strong {
  display: block;
}

.summary-footer small {
  color: var(--ink-muted);
  font-size: 11px;
}

.summary-footer strong {
  margin-top: 3px;
  font-size: 13px;
}

.summary-footer button {
  padding: 12px 14px;
  border: 0;
  background: #222524;
  color: white;
  font-size: 13px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  padding: 13px 16px;
  background: #252827;
  color: white;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

@media (max-width: 920px) {
  .site-header nav {
    display: none;
  }

  main {
    padding: 28px 16px;
  }

  .heading-meta {
    display: none;
  }

  .configurator-grid {
    display: block;
  }

  .viewer-panel {
    min-height: 610px;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .viewer-stage {
    min-height: 480px;
  }

  .summary-panel {
    min-height: auto;
  }

  .summary-scroll {
    overflow: visible;
  }
}

/* Vitra-like two-panel layout refresh */
body {
  background: #eeeeed;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 18px;
  height: 42px;
  padding: 0 20px;
  background: #e8e8e7;
  border-bottom: 0;
}

.brand {
  justify-self: start;
  color: #1d201f;
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 0;
}

.site-header nav {
  display: none;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: center;
}

.mini-pill {
  min-width: 38px;
  height: 22px;
  padding: 0 12px;
  border: 1px solid #d9d9d7;
  border-radius: 999px;
  background: #ffffff;
  color: #222524;
  font-size: 11px;
  line-height: 1;
}

.mini-pill.active {
  border-color: var(--red);
  color: var(--red);
}

.header-note {
  justify-self: end;
  margin-left: 0;
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

main {
  max-width: none;
  min-height: calc(100vh - 42px);
  padding: 14px 18px 20px;
}

.product-heading,
.tabs {
  display: none;
}

.configurator-shell {
  margin-top: 0;
}

.configurator-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(440px, 40vw);
  gap: 14px;
  height: calc(100vh - 76px);
  min-height: calc(100vh - 76px);
  overflow: visible;
  background: transparent;
}

.viewer-panel,
.summary-panel {
  overflow: hidden;
  border: 1px solid #e0e0df;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.viewer-panel {
  grid-template-rows: 62px minmax(0, 1fr) 52px;
  border-right: 1px solid #e0e0df;
}

.viewer-topline,
.viewer-toolbar {
  padding: 0 24px;
}

.viewer-topline strong {
  font-size: 18px;
  font-weight: 700;
}

.viewer-topline small {
  display: block;
  margin-top: 4px;
  color: #7a7e7b;
  font-size: 12px;
}

.icon-button svg {
  stroke: #a5a8a6;
}

.viewer-stage {
  min-height: 620px;
  background: #ffffff;
}

.viewer-hint {
  display: none;
}

.viewer-hint span {
  border-radius: 2px;
  background: rgba(245, 245, 243, 0.9);
}

.viewer-toolbar {
  border-top: 0;
}

.viewer-toolbar button:first-child {
  width: 32px;
  height: 32px;
  border: 1px solid #d9d9d8;
  border-radius: 50%;
  color: transparent;
  font-size: 0;
}

.viewer-toolbar button:first-child::before {
  color: #9da09e;
  content: "↺";
  font-size: 16px;
}

.viewer-toolbar button:disabled {
  font-size: 12px;
}

.summary-panel {
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
}

.summary-scroll {
  padding: 40px 42px 28px;
}

.summary-header h2 {
  margin: 0 0 26px;
  font-size: 21px;
  font-weight: 700;
}

.summary-header p:last-child {
  display: none;
}

.preset-section,
.option-block {
  margin-top: 30px;
  padding-top: 0;
  border-top: 0;
}

.section-heading,
.option-title {
  min-height: 26px;
}

.section-heading h3,
.option-title h3 {
  color: #8a8d8a;
  font-size: 15px;
  font-weight: 600;
}

.section-heading h3::before,
.option-title h3::before {
  margin-right: 10px;
  color: #c4c7c4;
  content: "○";
  font-size: 12px;
}

.section-heading span,
.option-title span {
  display: none;
}

.preset-grid,
.headrest-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 13px;
}

.preset-button,
.headrest-toggle button {
  width: auto;
  min-width: 88px;
  height: 38px;
  padding: 0 18px;
  border: 1px solid #dedfdd;
  border-radius: 999px;
  background: #ffffff;
  color: #333735;
  font-size: 14px;
}

.preset-button.active,
.headrest-toggle button.active {
  border-color: var(--red);
  background: #ffffff;
  box-shadow: none;
  color: var(--red);
  font-weight: 700;
}

.swatches {
  display: flex;
  align-items: flex-start;
  gap: 18px 22px;
  margin-top: 14px;
  padding: 0;
}

.swatch-choice {
  display: grid;
  grid-template-rows: 46px 30px;
  justify-items: center;
  align-items: start;
  gap: 8px;
  width: 72px;
  min-width: 72px;
  text-align: center;
}

.swatch-label {
  display: grid;
  grid-template-rows: 14px 14px;
  align-content: start;
  justify-items: center;
  min-height: 30px;
  gap: 2px;
}

.swatch-label span,
.swatch-label small {
  color: #8b8e8b;
  font-size: 12px;
  font-weight: 400;
  line-height: 14px;
  white-space: nowrap;
}

.swatch-label small {
  color: #a0a39f;
  font-size: 11px;
}

.swatch {
  flex-basis: 46px;
  width: 46px;
  height: 46px;
  justify-self: center;
  border: 1px solid #cfd2cf;
  border-radius: 6px;
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
}

.swatch.active {
  border-color: var(--red);
  box-shadow:
    0 0 0 1px var(--red),
    inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.swatch.active::after {
  display: none;
}

.summary-footer {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px 28px 26px;
  border-top: 1px solid #e0e0df;
}

.plm-block {
  display: block;
}

.summary-footer small {
  color: #8b8e8b;
  font-size: 11px;
}

.summary-footer strong {
  color: #1d201f;
  font-size: 13px;
}

.footer-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.footer-actions button {
  height: 42px;
  padding: 0 18px;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 700;
}

.footer-actions .secondary-action {
  border: 1px solid #dedfdd;
  background: #ffffff;
  color: #333735;
}

.footer-actions .primary-action {
  border: 1px solid #e8352d;
  background: #e8352d;
  color: #ffffff;
}

@media (max-width: 1100px) {
  .configurator-grid {
    grid-template-columns: minmax(0, 1fr) 390px;
  }
}

@media (max-width: 920px) {
  .site-header {
    grid-template-columns: 1fr auto;
  }

  .header-controls {
    display: none;
  }

  main {
    padding: 12px;
  }

  .configurator-grid {
    display: block;
    height: auto;
    min-height: 0;
  }

  .viewer-panel {
    min-height: 590px;
    margin-bottom: 12px;
  }

  .summary-panel {
    min-height: 0;
  }

  .summary-scroll {
    overflow: visible;
    padding: 24px 20px 18px;
  }

}
