/* ============================================================
   THE GAZEBO STUDIO — configurator-specific styles
   ============================================================ */
:root {
  --soft: rgba(44, 44, 44, 0.60);
  --line: rgba(44, 44, 44, 0.14);
}

.shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 392px;
  min-height: 100vh;
}

.stage {
  position: relative;
  background: var(--stone);
  overflow: hidden;
}
#canvas-wrap { position: absolute; inset: 0; }
canvas { display: block; width: 100%; height: 100%; touch-action: none; }

.stage-head {
  position: absolute; top: 0; left: 0; right: 0;
  padding: 98px 30px 26px;
  pointer-events: none; z-index: 2;
}
.configurator-eyebrow {
  font-size: 11px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--terracotta); font-weight: 500; margin: 0 0 6px;
}
.stage-head h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(30px, 3.2vw, 44px); margin: 0; line-height: 1.02; letter-spacing: -.01em;
}
.stage-head p { margin: 8px 0 0; font-size: 14px; color: var(--soft); max-width: 38ch; }

.stage-foot {
  position: absolute; left: 30px; bottom: 24px; z-index: 2;
  display: flex; gap: 8px; flex-wrap: wrap;
}
.ghost {
  pointer-events: auto; font: 500 12px/1 "DM Sans", sans-serif;
  letter-spacing: .06em; text-transform: uppercase; color: var(--charcoal);
  background: rgba(245, 240, 232, .86); border: 1px solid var(--line);
  padding: 9px 14px; border-radius: 999px; cursor: pointer;
  backdrop-filter: blur(6px); transition: background .15s, border-color .15s;
}
.ghost:hover { background: var(--cream); border-color: var(--gold); }
.ghost[aria-pressed="true"] { border-color: var(--terracotta); color: var(--terracotta); }
.ghost:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

.readout {
  position: absolute; right: 26px; bottom: 24px; z-index: 2;
  text-align: right; font-size: 12px; color: var(--soft); letter-spacing: .04em;
}
.readout b {
  display: block; font-family: var(--font-display); font-size: 34px;
  font-weight: 600; color: var(--charcoal); letter-spacing: 0; line-height: 1; margin-bottom: 2px;
}

.loading {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: var(--stone); z-index: 3; font-size: 12px; letter-spacing: .18em;
  text-transform: uppercase; color: var(--soft); transition: opacity .4s;
}
.loading[hidden] { display: none; }

.panel {
  background: var(--cream); border-left: 1px solid var(--line);
  padding: 26px 26px 40px; overflow-y: auto; max-height: 100vh;
}
.grp { padding: 18px 0; border-bottom: 1px solid var(--line); }
.grp:first-of-type { padding-top: 0; }
.grp:last-of-type { border-bottom: 0; }
.grp > label, .grp-title {
  display: block; font-size: 11px; letter-spacing: .16em;
  text-transform: uppercase; color: var(--soft); font-weight: 500; margin-bottom: 12px;
}
.val { float: right; color: var(--charcoal); letter-spacing: .04em; }

input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 22px;
  background: transparent; cursor: pointer; margin: 0 0 14px;
}
input[type=range]::-webkit-slider-runnable-track { height: 2px; background: var(--line); }
input[type=range]::-moz-range-track { height: 2px; background: var(--line); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 15px; height: 15px;
  border-radius: 50%; background: var(--terracotta); margin-top: -6.5px; border: 0;
}
input[type=range]::-moz-range-thumb {
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--terracotta); border: 0;
}
input[type=range]:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 4px; }

.seg { display: flex; gap: 6px; flex-wrap: wrap; }
.seg button {
  flex: 1 1 auto; min-width: 60px; font: 500 13px/1 "DM Sans", sans-serif;
  color: var(--charcoal); background: transparent; border: 1px solid var(--line);
  padding: 10px 8px; border-radius: 3px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.seg button:hover { border-color: var(--gold); }
.seg button[aria-pressed="true"] { background: var(--charcoal); border-color: var(--charcoal); color: var(--cream); }
.seg button:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }

.swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.swatches button {
  display: flex; align-items: center; gap: 9px; text-align: left;
  background: transparent; border: 1px solid var(--line); border-radius: 3px;
  padding: 6px; cursor: pointer; transition: border-color .15s, background .15s;
}
.swatches button:hover { border-color: var(--gold); }
.swatches button[aria-pressed="true"] { border-color: var(--terracotta); background: var(--stone); }
.swatches button:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 2px; }
.thumb {
  width: 36px; height: 36px; border-radius: 2px; flex: 0 0 auto;
  background-size: cover; background-position: center;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}
.swatches span { min-width: 0; font-size: 10.5px; color: var(--soft); line-height: 1.32; }
.swatches span b { display: block; font-size: 12.5px; font-weight: 500; color: var(--charcoal); }

.section-strip { display: flex; height: 74px; border: 1px solid var(--line); border-radius: 3px; overflow: hidden; }
.section-strip div { flex: 1; position: relative; }
.section-strip span {
  position: absolute; bottom: 5px; left: 0; right: 0; text-align: center;
  font-size: 9px; color: rgba(44, 44, 44, .55); font-weight: 500;
}
.section-legend {
  margin: 10px 0 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 2px 14px;
}
.section-legend li {
  list-style: none; font-size: 11.5px; color: var(--soft);
  display: flex; gap: 6px; align-items: baseline;
}
.section-legend b { color: var(--charcoal); font-weight: 500; font-variant-numeric: tabular-nums; }
.axis {
  display: flex; justify-content: space-between; font-size: 9.5px;
  letter-spacing: .16em; text-transform: uppercase; color: var(--soft); margin-bottom: 6px;
}

.configurator-note {
  font-size: 12px; line-height: 1.5; color: var(--soft);
  border-left: 2px solid var(--gold); padding-left: 10px; margin-top: 12px;
}

.spec {
  background: var(--stone); border-radius: 3px; padding: 16px;
  font-size: 13px; line-height: 1.65; white-space: pre-wrap; color: var(--charcoal);
}
.configurator-cta {
  display: block; width: 100%; margin-top: 10px;
  background: var(--terracotta); color: var(--cream);
  border: 0; border-radius: 3px; padding: 13px;
  font: 500 13px/1 "DM Sans", sans-serif;
  letter-spacing: .08em; text-transform: uppercase; cursor: pointer;
  transition: opacity .15s;
}
.configurator-cta:hover { opacity: .9; }
.configurator-cta:focus-visible { outline: 2px solid var(--charcoal); outline-offset: 2px; }

.brandbar {
  margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; justify-content: space-between;
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--soft);
}
.brandbar b { font-weight: 500; color: var(--charcoal); }
.brandbar b i { color: var(--terracotta); font-style: normal; }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .stage { height: 56vh; position: relative; }
  .panel { max-height: none; border-left: 0; border-top: 1px solid var(--line); }
  .stage-head { padding: 90px 20px 18px; }
  .stage-foot { left: 20px; bottom: 18px; }
  .readout { right: 20px; bottom: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
