:root {
  color-scheme: light;
  --ink: #10232d;
  --ink-soft: #4f626b;
  --paper: #f7f4ef;
  --paper-strong: #fffdf8;
  --line: rgba(16, 35, 45, 0.16);
  --navy: #10232d;
  --harbor: #2b6b73;
  --brass: #b7834b;
  --clay: #bd7157;
  --foam: #dce8e5;
  --shadow: 0 20px 70px rgba(9, 23, 31, 0.18);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #e7e1d8;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button {
  font: inherit;
}

.showroom-shell {
  position: relative;
  width: 100vw;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(14, 45, 54, 0.12)),
    #e7e1d8;
}

body.is-embedded .showroom-shell {
  min-height: 620px;
}

body.is-embedded .brand-lockup {
  padding: 8px 10px;
}

body.is-embedded .product-panel {
  max-height: calc(100vh - 168px);
}

.stage {
  position: absolute;
  inset: 0;
}

#showroom-canvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.ambient-image {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(56vw, 980px);
  height: min(42vw, 640px);
  background:
    linear-gradient(90deg, rgba(231, 225, 216, 0.95), rgba(231, 225, 216, 0.42) 38%, rgba(231, 225, 216, 0)),
    url("./assets/showroom-mood.png") center / cover;
  opacity: 0.42;
  mix-blend-mode: multiply;
  z-index: 0;
  pointer-events: none;
}

.topbar {
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  display: grid;
  grid-template-columns: minmax(210px, 1fr) auto minmax(210px, 1fr);
  align-items: center;
  gap: 16px;
  z-index: 5;
  pointer-events: none;
}

.brand-lockup,
.view-switch,
.tool-buttons,
.product-panel,
.zone-dock,
.toast,
.hotspot {
  pointer-events: auto;
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  background: rgba(255, 253, 248, 0.78);
  box-shadow: 0 12px 36px rgba(16, 35, 45, 0.12);
  backdrop-filter: blur(18px);
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--navy);
  color: #f8f1e8;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.brand-lockup p {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
}

.brand-lockup span:not(.brand-mark) {
  display: block;
  margin-top: 1px;
  color: var(--ink-soft);
  font-size: 0.76rem;
}

.view-switch {
  justify-self: center;
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(88px, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 16px 42px rgba(16, 35, 45, 0.13);
  backdrop-filter: blur(18px);
}

.segmented,
.icon-button,
.primary-action,
.secondary-action,
.zone-card,
.swatch {
  border: 0;
  cursor: pointer;
}

.segmented {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  color: var(--ink-soft);
  background: transparent;
}

.segmented.active {
  background: var(--navy);
  color: #fffaf2;
}

.segmented svg,
.icon-button svg,
.primary-action svg,
.secondary-action svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.tool-buttons {
  justify-self: end;
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 16px 42px rgba(16, 35, 45, 0.13);
  backdrop-filter: blur(18px);
}

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: var(--ink);
  background: transparent;
}

.icon-button:hover,
.icon-button.active {
  background: rgba(43, 107, 115, 0.13);
  color: #174d55;
}

.icon-button.compact {
  width: 34px;
  height: 34px;
}

.product-panel {
  position: absolute;
  top: 96px;
  right: 24px;
  z-index: 6;
  width: min(390px, calc(100vw - 48px));
  max-height: calc(100vh - 188px);
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px);
  transform: translateX(0);
  transition:
    transform 220ms ease,
    opacity 220ms ease;
}

.product-panel.is-hidden {
  opacity: 0;
  transform: translateX(calc(100% + 32px));
}

.panel-image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}

.panel-image-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 20px 0;
}

.eyebrow {
  margin: 0 0 5px;
  color: var(--harbor);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

h1 {
  margin: 0;
  font-size: clamp(1.55rem, 2.4vw, 2.05rem);
  line-height: 1.04;
  letter-spacing: 0;
}

#product-copy {
  margin: 14px 20px 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 20px 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.spec-grid div {
  min-width: 0;
  padding: 13px 14px;
  background: rgba(255, 253, 248, 0.84);
}

.spec-grid span {
  display: block;
  color: var(--ink-soft);
  font-size: 0.69rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.spec-grid strong {
  display: block;
  margin-top: 5px;
  font-size: 0.95rem;
  line-height: 1.2;
}

.swatches {
  display: flex;
  gap: 10px;
  margin: 18px 20px 0;
}

.swatch {
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.86);
  background: #d6cabb;
  box-shadow: 0 0 0 1px rgba(16, 35, 45, 0.16);
}

.swatch.active {
  box-shadow:
    0 0 0 2px var(--harbor),
    0 0 0 5px rgba(43, 107, 115, 0.13);
}

.swatch.teak {
  background: #9b6b3f;
}

.swatch.graphite {
  background: #465057;
}

.swatch.coral {
  background: var(--clay);
}

.panel-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  padding: 20px;
}

.primary-action,
.secondary-action {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 16px;
  font-weight: 800;
}

.primary-action {
  background: var(--navy);
  color: #fffaf2;
}

.secondary-action {
  border: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.78);
  color: var(--ink);
}

.zone-dock {
  position: absolute;
  left: 24px;
  bottom: 24px;
  z-index: 5;
  display: flex;
  width: min(760px, calc(100vw - 48px));
  gap: 10px;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: rgba(255, 253, 248, 0.83);
  box-shadow: 0 18px 54px rgba(16, 35, 45, 0.14);
  backdrop-filter: blur(20px);
  scrollbar-width: none;
}

.zone-dock::-webkit-scrollbar {
  display: none;
}

.zone-card {
  display: grid;
  flex: 0 0 146px;
  min-height: 88px;
  align-content: start;
  gap: 5px;
  padding: 12px;
  text-align: left;
  color: var(--ink);
  background: transparent;
}

.zone-card span {
  color: var(--harbor);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

.zone-card strong {
  font-size: 0.93rem;
  line-height: 1.14;
}

.zone-card small {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.zone-card.active {
  background: var(--navy);
  color: #fffaf2;
}

.zone-card.active span,
.zone-card.active small {
  color: rgba(255, 250, 242, 0.76);
}

.hotspots {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.hotspot {
  position: absolute;
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.9);
  background: rgba(255, 253, 248, 0.88);
  box-shadow: 0 12px 34px rgba(16, 35, 45, 0.18);
  color: var(--navy);
  transform: translate(-50%, -50%);
  transition:
    opacity 140ms ease,
    transform 140ms ease;
  backdrop-filter: blur(14px);
}

.hotspot::after {
  position: absolute;
  inset: -7px;
  border: 1px solid rgba(43, 107, 115, 0.28);
  content: "";
}

.hotspot:hover,
.hotspot.active {
  background: var(--harbor);
  color: #fff;
  transform: translate(-50%, -50%) scale(1.08);
}

.hotspot svg {
  width: 19px;
  height: 19px;
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 132px;
  z-index: 8;
  max-width: min(420px, calc(100vw - 48px));
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background: rgba(16, 35, 45, 0.86);
  box-shadow: 0 16px 38px rgba(16, 35, 45, 0.18);
  color: #fffaf2;
  font-size: 0.86rem;
  font-weight: 700;
  opacity: 0;
  transform: translate(-50%, 12px);
  transition:
    opacity 160ms ease,
    transform 160ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 920px) {
  .showroom-shell {
    min-height: 720px;
  }

  .topbar {
    grid-template-columns: 1fr auto;
    align-items: start;
  }

  .view-switch {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
  }

  .tool-buttons {
    grid-column: 2;
    grid-row: 1;
  }

  .product-panel {
    top: auto;
    right: 14px;
    bottom: 132px;
    width: min(420px, calc(100vw - 28px));
    max-height: 48vh;
  }

  .zone-dock {
    left: 14px;
    right: 14px;
    bottom: 14px;
    width: auto;
  }
}

@media (max-width: 620px) {
  .topbar {
    top: 12px;
    left: 12px;
    right: 12px;
    gap: 10px;
  }

  .brand-lockup {
    max-width: calc(100vw - 152px);
    padding: 8px;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
  }

  .brand-lockup p {
    font-size: 0.88rem;
  }

  .brand-lockup span:not(.brand-mark) {
    font-size: 0.68rem;
  }

  .tool-buttons {
    gap: 4px;
  }

  .icon-button {
    width: 38px;
    height: 38px;
  }

  .view-switch {
    width: 100%;
  }

  .segmented {
    min-height: 36px;
  }

  .product-panel {
    right: 10px;
    bottom: 120px;
    width: calc(100vw - 20px);
  }

  .panel-image-wrap {
    display: none;
  }

  .panel-header {
    padding-top: 16px;
  }

  .spec-grid {
    grid-template-columns: 1fr 1fr;
  }

  .zone-dock {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }

  .zone-card {
    flex-basis: 132px;
    min-height: 80px;
  }
}
