﻿:root {
  --bg: #f6f4ef;
  --panel: #ffffff;
  --text: #111111;
  --muted: #4a4a4a;
  --line: #d7d5d1;
  --soft: #efeeec;
  --placeholder: #dedddb;
  --shadow: 0 18px 40px rgba(12, 12, 12, 0.06);
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Manrope", sans-serif;
}

button {
  font: inherit;
}

.site-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  max-width: 1440px;
  margin: 0 auto;
  padding: 36px 28px 44px;
}

.info-column {
  display: grid;
  gap: 0;
  align-content: start;
}

.intro-block h1,
.text-block h2 {
  margin: 0 0 10px;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 0.95;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.text-block h2 {
  font-size: 0.95rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  text-transform: lowercase;
}

.intro-block p,
.text-block p,
.picker-copy,
.modules-intro p,
.hero-note,
.layout-card-copy p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.5;
}

.vehicle-picker {
  display: grid;
  gap: 18px;
  justify-items: start;
  margin-top: 0;
}

.picker-copy {
  text-align: center;
  width: 100%;
  color: var(--text);
}

.pill-selects {
  display: grid;
  gap: 18px;
  width: 100%;
}

.picker-field {
  position: relative;
  width: 100%;
}

.pill-button {
  width: 100%;
  min-height: 52px;
  border-radius: 999px;
  border: 2px solid #181818;
  background: #fff;
  color: #202020;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.pill-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.pill-button.is-filled {
  background: #111111;
  color: #f8f5ef;
}

.picker-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 20;
  padding: 10px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.picker-menu.is-open {
  display: grid;
  gap: 8px;
}

.picker-option {
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  background: #f4f1eb;
  color: #171717;
  text-align: left;
  padding: 10px 14px;
  cursor: pointer;
}

.picker-option:hover {
  background: #ece8df;
}

.picker-status {
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.reset-button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.reset-button:hover {
  background: rgba(17, 17, 17, 0.05);
}

.content-column {
  display: grid;
  gap: 0;
  align-content: start;
}

.top-brand {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  min-height: 140px;
}

.top-brand-logo {
  display: block;
  width: 140px;
  height: auto;
  object-fit: contain;
}

.config-shell {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  margin-top: 0;
}

.config-sidebar,
.config-main {
  display: grid;
  align-content: start;
}

.config-main {
  gap: 28px;
}

.layout-card-copy h3 {
  margin: 0 0 12px;
  font-size: clamp(1.7rem, 2vw, 2.3rem);
  line-height: 1;
  letter-spacing: -0.04em;
}

.layout-label {
  margin-bottom: 12px;
  color: #6a6a6a;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.76rem;
  font-weight: 700;
}

.layout-preview {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 0;
}

.mobile-layout-preview {
  display: none;
}

.mobile-modules-title {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  text-align: left;
}

.layout-card {
  position: relative;
  min-height: 450px;
  border: 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(215, 214, 218, 0.96), rgba(226, 225, 228, 0.92));
  box-shadow: var(--shadow);
}

.layout-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.25), transparent 38%),
    linear-gradient(315deg, rgba(255, 255, 255, 0.16), transparent 36%);
}

.layout-card-copy {
  position: absolute;
  inset: auto 28px 28px 28px;
  padding: 18px 20px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.74);
  backdrop-filter: blur(8px);
}

.layout-card.is-active {
  outline: 2px solid #181818;
  outline-offset: -10px;
}

.vehicle-empty {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #565656;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  font-weight: 700;
}

.vehicle-scene-image {
  position: absolute;
  inset: 22px;
  width: calc(100% - 44px);
  height: calc(100% - 44px);
  object-fit: cover;
  border-radius: 24px;
  background: #efede8;
}

.placeholder-scene {
  position: absolute;
  inset: 22px;
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 16px;
}

.placeholder-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  color: #5a5a5a;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
}

.placeholder-frame {
  width: 100%;
  height: 100%;
  min-height: 270px;
  border-radius: 26px;
  border: 1px dashed rgba(17, 17, 17, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.24), rgba(255, 255, 255, 0.08)),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.16) 0 14px, rgba(0, 0, 0, 0.02) 14px 28px);
}

.placeholder-scene.secondary .placeholder-frame {
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.22), transparent 30%),
    repeating-linear-gradient(135deg, rgba(255, 255, 255, 0.14) 0 14px, rgba(0, 0, 0, 0.02) 14px 28px);
}

.modules-gallery {
  display: block;
}

#modules-gallery {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
}

.module-tile {
  position: relative;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  text-align: center;
}

.module-tile:disabled {
  cursor: not-allowed;
}

.module-image-wrap {
  display: block;
  overflow: hidden;
  border-radius: 18px;
  background: #eceae5;
  box-shadow: var(--shadow);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.module-image-wrap img {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.module-image-fallback {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: linear-gradient(180deg, #efece7, #e5e0d8);
  color: #3d342d;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.module-name {
  display: block;
  margin-top: 12px;
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.module-meta {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
}

.module-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.88);
  color: #f8f5ef;
  font-size: 0.95rem;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
  z-index: 3;
}

.module-tile.is-selected .module-image-wrap,
.module-tile:hover .module-image-wrap {
  transform: translateY(-4px);
  box-shadow: 0 24px 42px rgba(12, 12, 12, 0.12);
}

.module-tile.is-selected .module-name {
  font-weight: 800;
}

.module-tile.is-disabled {
  opacity: 0.38;
}

.module-tile.is-disabled .module-image-wrap {
  box-shadow: none;
}

.module-tile.is-disabled:hover .module-image-wrap {
  transform: none;
}

@media (max-width: 1200px) {
  .site-shell {
    grid-template-columns: 1fr;
    padding: 28px 22px 36px;
    gap: 16px;
  }

  .config-shell {
    grid-template-columns: 1fr;
    margin-top: 10px;
  }

  .info-column {
    gap: 0;
  }

  .top-brand {
    justify-content: flex-start;
    min-height: auto;
  }

  .content-column {
    justify-items: start;
  }
}

@media (max-width: 860px) {
  .site-shell {
    padding: 20px 14px 28px;
    gap: 14px;
    text-align: center;
  }

  .info-column {
    grid-template-columns: 1fr;
    justify-items: center;
    order: 2;
  }

  .content-column,
  .vehicle-picker,
  .config-main {
    justify-items: center;
  }

  .content-column {
    order: 1;
  }

  .config-shell {
    order: 3;
  }

  .intro-block h1 {
    font-size: clamp(2.2rem, 12vw, 3.4rem);
    margin-bottom: 8px;
  }

  .intro-block p {
    max-width: none;
    font-size: 0.98rem;
    text-align: center;
  }

  .top-brand {
    justify-content: center;
  }

  .top-brand-logo {
    width: 112px;
  }

  .vehicle-picker {
    gap: 14px;
  }

  .picker-copy {
    text-align: center;
    font-size: 0.95rem;
  }

  .pill-selects {
    gap: 12px;
  }

  .pill-button {
    min-height: 50px;
    font-size: 0.92rem;
  }

  .picker-menu {
    position: static;
    margin-top: 8px;
    box-shadow: none;
    border-radius: 16px;
    padding: 8px;
    text-align: center;
  }

  .picker-option {
    text-align: center;
  }

  .reset-button {
    width: 100%;
    min-height: 46px;
  }

  .picker-status {
    font-size: 0.88rem;
    line-height: 1.45;
  }

  .layout-preview {
    display: none;
  }

  .mobile-layout-preview {
    display: flex;
    gap: 14px;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
  }

  .mobile-layout-card {
    position: relative;
    flex: 0 0 100%;
    display: grid;
    padding: 14px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(180deg, rgba(215, 214, 218, 0.96), rgba(226, 225, 228, 0.92));
    box-shadow: var(--shadow);
    scroll-snap-align: center;
  }

  .mobile-modules-title {
    display: block;
    margin: -8px 0 -10px;
    color: var(--text);
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
  }

  #modules-gallery {
    grid-template-columns: repeat(auto-fit, 100px);
    justify-content: center;
    gap: 16px;
  }

  .layout-card {
    min-height: 250px;
    border-radius: 22px;
  }

  .layout-card-copy {
    inset: auto 14px 14px 14px;
    padding: 14px 15px;
    border-radius: 16px;
  }

  .layout-card-copy h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
  }

  .layout-card-copy p {
    font-size: 0.9rem;
    line-height: 1.35;
  }

  .vehicle-scene-image {
    inset: 14px;
    width: calc(100% - 28px);
    height: calc(100% - 28px);
    border-radius: 18px;
  }

  .mobile-layout-card .vehicle-scene-image {
    position: static;
    inset: auto;
    display: block;
    width: 100%;
    height: auto;
    object-fit: contain;
  }

  .mobile-layout-card .vehicle-empty {
    position: static;
    min-height: 250px;
  }

  .vehicle-empty {
    font-size: 0.82rem;
    letter-spacing: 0.12em;
  }

  .module-tile {
    width: 100px;
  }

  .module-image-wrap {
    width: 100px;
    height: 100px;
    border-radius: 16px;
  }

  .module-image-wrap img,
  .module-image-fallback {
    width: 100px;
    height: 100px;
    aspect-ratio: auto;
  }

  .module-name {
    margin-top: 10px;
    font-size: 0.84rem;
  }

  .module-meta {
    font-size: 0.74rem;
  }

  .module-badge {
    top: 10px;
    right: 10px;
    min-width: 30px;
    height: 30px;
    font-size: 0.82rem;
  }
}

@media (max-width: 560px) {
  .site-shell {
    padding: 18px 12px 24px;
  }

  #modules-gallery {
    grid-template-columns: repeat(2, 100px);
    gap: 14px;
  }

  .mobile-layout-card .vehicle-empty {
    min-height: 220px;
  }

  .layout-card-copy {
    inset: auto 12px 12px 12px;
  }

  .layout-label {
    font-size: 0.68rem;
    margin-bottom: 8px;
  }

  .picker-copy {
    font-size: 0.9rem;
  }

  .pill-button,
  .reset-button {
    min-height: 48px;
  }

  .module-name {
    font-size: 0.8rem;
  }

  .module-meta {
    font-size: 0.72rem;
  }
}

#modules-gallery {
  grid-template-columns: minmax(220px, 420px);
  justify-content: start;
  gap: 10px;
}

.module-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease, opacity 160ms ease;
}

.module-option-dot {
  flex: 0 0 auto;
  width: 12px;
  height: 12px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
}

.module-option-label {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.module-option.is-selected {
  border-color: #111;
  background: #111;
  color: #f8f5ef;
}

.module-option.is-selected .module-option-dot {
  background: currentColor;
}

.module-option.is-disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

@media (max-width: 860px) {
  .mobile-modules-title {
    margin: -8px 0 -10px;
    text-align: center;
  }

  #modules-gallery {
    grid-template-columns: minmax(220px, 320px);
    justify-content: center;
    gap: 10px;
  }

  .module-option {
    justify-content: center;
    text-align: center;
  }
}
/* Kit dropdown + purchase link */
#modules-gallery {
  grid-template-columns: minmax(260px, 560px);
  justify-content: start;
  gap: 0;
}

.module-purchase-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.module-select {
  width: 100%;
  min-height: 52px;
  padding: 0 18px;
  border: 2px solid #181818;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  cursor: pointer;
}

.module-select:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.purchase-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  background: #111;
  color: #f8f5ef;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: lowercase;
  white-space: nowrap;
}

.purchase-button[aria-disabled="true"] {
  pointer-events: none;
  opacity: 0.38;
}

@media (max-width: 860px) {
  #modules-gallery {
    grid-template-columns: minmax(0, 320px);
    justify-content: center;
  }

  .module-purchase-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .module-select,
  .purchase-button {
    width: 100%;
    text-align: center;
  }
}

/* Basic image protection: prevents ordinary drag, selection, and long-press save UI. */
.layout-card,
.mobile-layout-card,
.vehicle-scene-image {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}

.vehicle-scene-image {
  -webkit-user-drag: none;
  pointer-events: none;
}
