:root {
  --bg: #ffffff;
  --ink: #1d1d1f;
  --muted: #8a8a8e;
  --line: #e7e7ea;
  --accent: #1500d4;
  --radius: 14px;
  --shadow: 0 10px 40px rgba(20, 20, 30, .08);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .85);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  gap: 32px;
  height: 64px;
}
.logo {
  font-weight: 800;
  letter-spacing: .14em;
  font-size: 18px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}
.logo span { color: var(--accent); }
.model-nav {
  display: flex;
  gap: 22px;
  overflow-x: auto;
}
.model-nav__link {
  text-decoration: none;
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.model-nav__link:hover { color: var(--ink); }
.model-nav__link.is-active {
  color: var(--ink);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* Product layout */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 56px;
  padding-top: 40px;
  padding-bottom: 80px;
}

/* Gallery */
.gallery { display: flex; gap: 18px; align-items: flex-start; }
.gallery__main { flex: 1 1 auto; }
.gallery__thumbs {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 168px;
  flex: 0 0 auto;
}
.door-view {
  margin: 0;
  border-radius: var(--radius);
  background: #f5f5f3;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.door-view--main { padding: 8px; }
.door-canvas {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}
.door-view--detail figcaption {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 8px 6px 12px;
}

/* Info */
.info__title {
  font-size: 38px;
  margin: 0 0 6px;
  letter-spacing: .02em;
}
.info__subtitle {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 15px;
}
.info__current {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  margin-bottom: 24px;
}
.info__current-label { color: var(--muted); font-size: 13px; }
.swatch-preview {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid rgba(0, 0, 0, .15);
  background: #9a9794;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .35);
}
.info__current-name { font-size: 15px; }
.info__current-hex { color: var(--muted); font-size: 13px; font-variant: tabular-nums; }

.specs {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  border-top: 1px solid var(--line);
}
.specs li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}
.specs span { color: var(--muted); }

/* Palette */
.palette__group { margin-bottom: 22px; }
.palette__title {
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--muted);
  margin: 0 0 12px;
  text-transform: uppercase;
}
.palette__row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 10px;
}
.swatch {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .12);
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: transform .12s ease, box-shadow .12s ease;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, .25);
}
.swatch:hover { transform: translateY(-2px); }
.swatch:focus-visible { box-shadow: 0 0 0 3px rgba(21, 0, 212, .35); }
.swatch.is-active {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--accent);
}
.swatch.is-active::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center/contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .55));
}
.swatch__tip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: #1d1d1f;
  color: #fff;
  font-size: 11px;
  white-space: nowrap;
  padding: 5px 8px;
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 5;
}
.swatch:hover .swatch__tip { opacity: 1; }

.hint {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 8px;
}

.info__cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 13px 22px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform .12s, box-shadow .2s, background .2s, color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 8px 22px rgba(21, 0, 212, .28); }
.btn--ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink); }

.is-busy { cursor: progress; }

@media (max-width: 900px) {
  .product { grid-template-columns: 1fr; gap: 36px; }
  .gallery { flex-direction: column-reverse; }
  .gallery__thumbs { flex-direction: row; width: 100%; }
  .gallery__thumbs .door-view { flex: 1; }
}
