/* ============================================================
   configurator.css - 1:1 klon auto-china.com/pl/[slug]/config
   ============================================================ */

/* ── Reset strony dla trybu full-screen ────────────────────── */
.configurator-page-v2 ~ footer,
body:has(.configurator-page-v2) {
  overflow: hidden;
}

@media (max-width: 1024px) {
  body:has(.configurator-page-v2) {
    overflow: auto;
  }
}

.configurator-page-v2 {
  display: contents;
}

/* ── Wrapper ─────────────────────────────────────────────── */
.configurator-wrap {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  height: calc(100dvh - var(--nav-h, 80px));
  margin-top: var(--nav-h, 80px);
  overflow: hidden;
  background: #07070a;
}

/* ════════════════════════════════════════════════════════════
   LEFT - Viewer
   ════════════════════════════════════════════════════════════ */
.cfg-left {
  position: relative;
  flex: 1 1 0%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  background: #08080c;
  overflow: hidden;
  cursor: grab;
}

/* ── Car slides ──────────────────────────────────────────── */
.cfg-viewer {
  position: absolute;
  inset: 0;
  bottom: 120px; /* místo pro thumbnail bar */
}

/* ── Canvas area ─────────────────────────────────────────── */
.cfg-canvas-area {
  position: absolute;
  inset: 0;
  bottom: 110px;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;   /* krytyczne dla Pointer Events na touch */
}

/* When using 3D iframe (laya/iframe), no angle bar needed → full height */
.cfg-canvas-area.is-laya {
  bottom: 0;
  cursor: default;
}

.cfg-laya-frame {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  border: none;
  background: #111;
  z-index: 2;
  image-rendering: auto;
  transition: opacity 0.3s ease;
}

/* krpano 360° interior panorama */
.cfg-krpano-frame {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0; left: 0;
  border: none;
  background: #111;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* When interior view is active */
.cfg-canvas-area.is-interior .cfg-laya-frame {
  opacity: 0;
  pointer-events: none;
  z-index: 1;
}
/* iframe-mode vehicles (e.g. Maextro S800): the 3D iframe handles interior too */
.cfg-canvas-area.is-laya.is-interior .cfg-laya-frame {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}
.cfg-canvas-area.is-interior .cfg-krpano-frame {
  opacity: 1;
  pointer-events: auto;
  z-index: 2;
}

/* Exterior / Interior toggle buttons */
.cfg-view-toggle {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  display: flex;
  gap: 2px;
  background: rgba(0,0,0,0.5);
  border-radius: 8px;
  padding: 3px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.cfg-vt-btn {
  padding: 8px 24px;
  border: none;
  background: transparent;
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.5px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-transform: uppercase;
}
.cfg-vt-btn:hover {
  color: rgba(255,255,255,0.9);
}
.cfg-vt-btn.is-active {
  background: rgba(255,255,255,0.15);
  color: #fff;
}

.cfg-canvas-area.is-dragging {
  cursor: grabbing;
}

/* Transparentna warstwa drag - siedzi wyżej niż canvas slides */
.cfg-drag-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  cursor: grab;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  background: transparent;
}

.cfg-drag-overlay.is-dragging {
  cursor: grabbing;
}

.cfg-canvas-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(.4, 0, .2, 1);
  pointer-events: none;
  display: block;
  /* scale canvas to fill container while keeping aspect ratio */
  object-fit: contain;
}

.cfg-canvas-slide.active {
  opacity: 1;
  /* pointer-events pozostaje none - cfgCanvasArea obsługuje cały drag */
}

/* ── Canvas loader ───────────────────────────────────────── */
.cfg-canvas-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 20;
}

.cfg-canvas-loader.visible {
  opacity: 1;
}

.cfg-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: var(--red, #cf032b);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Slider arrows (flat mode) ──────────────────────────── */
.cfg-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 15;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  padding: 0;
}

.cfg-slider-arrow svg {
  width: 20px;
  height: 20px;
}

.cfg-slider-arrow:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.cfg-slider-prev { left: 16px; }
.cfg-slider-next { right: 16px; }

/* ── Slider dots (flat mode) ────────────────────────────── */
.cfg-slider-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 15;
  display: flex;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 100px;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.cfg-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.cfg-slider-dot:hover {
  background: rgba(255, 255, 255, 0.5);
}

.cfg-slider-dot.active {
  background: #fff;
  transform: scale(1.2);
}
/* ── Hidden utility ──────────────────────────────────────── */
.hidden {
  display: none !important;
}

/* ── Back button ─────────────────────────────────────────── */
.cfg-back-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px 8px 10px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}

.cfg-back-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
}

.cfg-back-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* ── View angle label ────────────────────────────────────── */
.cfg-view-label {
  position: absolute;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  pointer-events: none;
  z-index: 5;
  transition: opacity 0.2s;
}

/* ── Angle thumbnails bar ────────────────────────────────── */
.cfg-angle-bar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.65) 0%, transparent 100%);
  z-index: 10;
}

.cfg-angle-thumb {
  flex-shrink: 0;
  width: 72px;
  height: 48px;
  border-radius: 6px;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, 0.07);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  position: relative;
}

.cfg-angle-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Interior angle thumb - text label fallback ─────────────── */
.cfg-int-thumb-label {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px;
  text-align: center;
}

.cfg-angle-thumb:hover {
  border-color: rgba(255, 255, 255, 0.3);
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.cfg-angle-thumb.active {
  border-color: var(--red, #cf032b);
  background: rgba(255, 255, 255, 0.1);
}

/* ── Brochure button ─────────────────────────────────────── */
.cfg-brochure-btn {
  position: absolute;
  bottom: 120px;
  right: 20px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 100px;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.6);
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-sans, 'Inter', sans-serif);
  letter-spacing: 0.01em;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  z-index: 10;
}

.cfg-brochure-btn:hover {
  background: rgba(255, 255, 255, 0.13);
  color: #fff;
}

.cfg-brochure-btn svg {
  width: 16px;
  height: 16px;
}

/* ════════════════════════════════════════════════════════════
   RIGHT - Options panel
   ════════════════════════════════════════════════════════════ */
.cfg-right {
  flex-shrink: 0;
  width: 500px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #111115;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
}

/* ── Car title & price ───────────────────────────────────── */
.cfg-car-title-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
}

.cfg-car-name {
  font-size: 17px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.cfg-live-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
}

.clp-label {
  font-size: 9.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.clp-value {
  font-size: 16px;
  font-weight: 900;
  color: var(--red, #cf032b);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  transition: color 0.3s;
}

/* ── Tabs ────────────────────────────────────────────────── */
.cfg-tabs {
  display: flex;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  flex-shrink: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.cfg-tabs::-webkit-scrollbar {
  display: none;
}

.cfg-tab {
  flex-shrink: 0;
  padding: 12px 16px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: var(--font-sans, 'Inter', sans-serif);
  color: rgba(255, 255, 255, 0.38);
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: color 0.18s, border-color 0.18s;
  user-select: none;
}

.cfg-tab:hover {
  color: rgba(255, 255, 255, 0.7);
}

.cfg-tab.active {
  color: #fff;
  border-bottom-color: var(--red, #cf032b);
}

/* ── Sections scroll area ────────────────────────────────── */
.cfg-sections {
  flex: 1 1 0%;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.1) transparent;
}

.cfg-sections::-webkit-scrollbar {
  width: 4px;
}

.cfg-sections::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
}

.cfg-section {
  display: none;
  padding: 22px 24px 32px;
}

.cfg-section.active {
  display: block;
  animation: sectionFadeIn 0.25s ease;
}

@keyframes sectionFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.cfg-section-lead {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}

.cfg-included-note {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  margin-bottom: 14px;
  margin-top: -8px;
  font-weight: 500;
}

.cfg-empty-msg {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.3);
  text-align: center;
  padding: 24px 0;
}

/* ── Model edition cards ──────────────────────────────────── */
.cfg-model-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cfg-model-card {
  border: 2px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  padding: 16px 18px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  background: rgba(255, 255, 255, 0.015);
  user-select: none;
}

.cfg-model-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.cfg-model-card.is-current {
  border-color: var(--red, #cf032b);
  background: rgba(207, 3, 43, 0.05);
}

.cmc-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.cmc-name {
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
}

.cmc-price {
  font-size: 14px;
  font-weight: 800;
  color: var(--red, #cf032b);
  white-space: nowrap;
  flex-shrink: 0;
}

.cmc-specs {
  display: flex;
  gap: 20px;
  padding-bottom: 14px;
  flex-wrap: wrap;
}

.cmc-spec {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cmc-spec-val {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

.cmc-spec-lab {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.38);
  letter-spacing: 0.02em;
}

.cmc-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.07);
  margin: 0 0 12px;
}

.cmc-bullets {
  display: flex;
  flex-direction: column;
  gap: 5px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.cmc-bullets li {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.45);
  line-height: 1.5;
  padding-left: 12px;
  position: relative;
}

.cmc-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}

/* ── Color grid ──────────────────────────────────────────── */
.cfg-color-grid {
  display: grid;
  gap: 12px 10px;
  grid-template-columns: repeat(4, 1fr);
}

.cfg-color-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cfg-color-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cfg-color-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cfg-option-v2 {
  position: relative;
  border-radius: 8px;
  overflow: visible;
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

.cfg-option-v2:focus-visible {
  box-shadow: 0 0 0 2px var(--red, #cf032b);
}

.cfg-option-v2:hover:not(.disabled) {
  transform: translateY(-3px);
}

.cfg-option-v2.disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.cfg-opt-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  border-radius: 6px;
}

.cfg-opt-img {
  display: block;
  width: 100%;
  object-fit: cover;
  position: relative;
  z-index: 1;
  border-radius: 6px;
}

.cfg-opt-swatch {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  position: relative;
  z-index: 1;
  border: 2px solid rgba(255,255,255,.15);
}

/* Circular swatches only in cols-3 and cols-4 grids (small color dots) */
.cfg-color-grid.cols-3 .cfg-opt-img,
.cfg-color-grid.cols-4 .cfg-opt-img {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
}

.cfg-color-grid.cols-3 .cfg-opt-bg,
.cfg-color-grid.cols-4 .cfg-opt-bg {
  border-radius: 50%;
}

/* Selection border — box-shadow (renders outside, follows border-radius) */
.cfg-option-v2.is-current {
  box-shadow: 0 0 0 2px var(--red, #cf032b);
  border-radius: 8px;
}

.cfg-color-grid.cols-3 .cfg-option-v2.is-current,
.cfg-color-grid.cols-4 .cfg-option-v2.is-current {
  box-shadow: none;
}

.cfg-color-grid.cols-3 .cfg-option-v2.is-current .cfg-opt-img,
.cfg-color-grid.cols-4 .cfg-option-v2.is-current .cfg-opt-img,
.cfg-color-grid.cols-3 .cfg-option-v2.is-current .cfg-opt-swatch,
.cfg-color-grid.cols-4 .cfg-option-v2.is-current .cfg-opt-swatch {
  box-shadow: 0 0 0 2px var(--red, #cf032b);
}

.cfg-opt-label {
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
  margin-top: 6px;
  font-weight: 500;
  padding: 0 4px;
  line-height: 1.3;
}

.cfg-option-v2.is-current .cfg-opt-label {
  color: rgba(255, 255, 255, 1);
}

.cfg-opt-unavail {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  background: rgba(0,0,0,0.7);
  color: rgba(255,255,255,0.8);
  border-radius: 6px;
}


.cfg-opt-unavail {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 6px;
  z-index: 2;
}

/* ── Wheel grid ──────────────────────────────────────────── */
.cfg-wheel-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(3, 1fr);
}

.cfg-wheel-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cfg-wheel-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

.cfg-wheel-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid transparent;
  border-radius: 10px;
  padding: 10px 8px 8px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  font-family: var(--font-sans, 'Inter', sans-serif);
}

.cfg-wheel-btn:hover:not(.disabled) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.cfg-wheel-btn.is-current {
  border-color: var(--red, #cf032b);
  background: rgba(207, 3, 43, 0.05);
}

.cfg-wheel-btn.disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.cfg-wheel-btn img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
}

.cfg-wheel-label {
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.45);
  text-align: center;
  line-height: 1.35;
  font-weight: 500;
}

/* ── Package cards ───────────────────────────────────────── */
.cfg-pkg-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cfg-pkg-card {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
  cursor: pointer;
}

.cfg-pkg-card.is-active {
  border-color: var(--red, #cf032b);
  background: rgba(207, 3, 43, 0.03);
}

.cfg-pkg-images {
  display: flex;
  flex-direction: row;
  gap: 2px;
  background: #09090f;
  min-height: 100px;
  overflow: hidden;
}

.cfg-pkg-images img {
  flex: 1 1 0;
  min-width: 0;
  height: 100px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.cfg-pkg-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.015);
}

.cfg-pkg-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.cfg-pkg-price {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.4);
}

.cfg-pkg-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.15);
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
  font-family: inherit;
}

.cfg-pkg-toggle:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.cfg-pkg-toggle svg {
  width: 18px;
  height: 18px;
}

.cfg-pkg-card.is-active .cfg-pkg-toggle {
  background: var(--red, #cf032b);
  border-color: var(--red, #cf032b);
  color: #fff;
}

/* ── Standard equipment (legacy) ──────────────────────────── */
.cfg-std-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cfg-std-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  overflow: hidden;
}

.cfg-std-imgs {
  display: grid;
  gap: 2px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.cfg-std-imgs.cols-1 { grid-template-columns: 1fr; }
.cfg-std-imgs.cols-2 { grid-template-columns: 1fr 1fr; }
.cfg-std-imgs.cols-3 { grid-template-columns: repeat(3, 1fr); }

.cfg-std-imgs img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 5px;
}

.cfg-std-info {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 12px;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
}

.cfg-std-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.cfg-std-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.05);
  border-radius: 100px;
  padding: 4px 10px;
}

.cfg-std-badge svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ── Service cards (toggle switches - 1:1 auto-china.com) ──── */
.cfg-svc-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.cfg-svc-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.cfg-svc-card.is-on {
  border-color: rgba(207, 3, 43, 0.25);
  background: rgba(207, 3, 43, 0.04);
}

.cfg-svc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cfg-svc-text { min-width: 0; }

.cfg-svc-title {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  line-height: 1.4;
}

.cfg-svc-price {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 2px;
}

/* iOS-style toggle switch */
.cfg-svc-switch {
  position: relative;
  width: 48px;
  height: 28px;
  border-radius: 100px;
  border: none;
  background: rgba(255, 255, 255, 0.12);
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.25s ease;
  padding: 0;
}

.cfg-svc-switch.is-on {
  background: var(--red, #cf032b);
}

.cfg-svc-switch.is-locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.cfg-svc-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.3);
  transition: transform 0.25s ease;
}

.cfg-svc-switch.is-on .cfg-svc-knob {
  transform: translateX(20px);
}

.cfg-svc-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.5;
  margin-top: 8px;
}

.cfg-svc-desc a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: underline;
  transition: color 0.15s ease;
}

.cfg-svc-desc a:hover {
  color: #fff;
}

/* ── Order form ──────────────────────────────────────────── */
.cfg-order-note {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.4);
  line-height: 1.65;
  margin-bottom: 22px;
}

.cfg-order-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cfg-order-form-grid .field {
  position: relative;
}

.cfg-order-form-grid .field.full {
  grid-column: 1 / -1;
}

.cfg-order-form-grid .field input,
.cfg-order-form-grid .field textarea {
  width: 100%;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  padding: 18px 12px 6px;
  color: #fff;
  font-size: 14px;
  font-family: var(--font-sans, 'Inter', sans-serif);
  transition: border-color 0.2s;
  resize: none;
  box-sizing: border-box;
}

.cfg-order-form-grid .field input:focus,
.cfg-order-form-grid .field textarea:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.3);
}

.cfg-order-form-grid .field label {
  position: absolute;
  left: 12px;
  top: 15px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  pointer-events: none;
  transition: top 0.15s ease, font-size 0.15s ease, color 0.15s ease;
}

.cfg-order-form-grid .field input:focus ~ label,
.cfg-order-form-grid .field input:not(:placeholder-shown) ~ label,
.cfg-order-form-grid .field textarea:focus ~ label,
.cfg-order-form-grid .field textarea:not(:placeholder-shown) ~ label {
  top: 6px;
  font-size: 9.5px;
  color: rgba(255, 255, 255, 0.5);
  letter-spacing: 0.04em;
  font-weight: 600;
  background: #111115;
  padding: 0 4px;
  margin-left: -4px;
}

.cfg-payment-title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.35);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.cfg-pay-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.cfg-pay-opt {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}

.cfg-pay-opt:hover {
  border-color: rgba(255, 255, 255, 0.2);
}

.cfg-pay-opt input[type="radio"] {
  accent-color: var(--red, #cf032b);
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.cfg-pay-opt span {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.65);
  font-weight: 500;
}

.cfg-form-submit {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cfg-form-msg {
  font-size: 12.5px;
  color: var(--red, #cf032b);
  min-height: 16px;
  font-weight: 500;
}

/* ── Bottom navigation bar ───────────────────────────────── */
.cfg-bottom-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  background: #0d0d10;
  flex-shrink: 0;
}

.ghost-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 9px 16px;
  border-radius: 100px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.5);
  font-size: 12.5px;
  font-weight: 700;
  font-family: var(--font-sans, 'Inter', sans-serif);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  white-space: nowrap;
}

.ghost-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
}

.ghost-btn:disabled {
  opacity: 0.28;
  cursor: not-allowed;
}

.ghost-btn svg {
  width: 15px;
  height: 15px;
}

.cfg-nav-next {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  font-size: 12.5px;
  padding: 9px 18px;
}

.cfg-nav-next svg {
  width: 15px;
  height: 15px;
}

.cfg-progress {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.07);
  border-radius: 1px;
  overflow: hidden;
  min-width: 0;
}

.cfg-progress-bar {
  height: 100%;
  background: var(--red, #cf032b);
  border-radius: 1px;
  transition: width 0.4s cubic-bezier(.4, 0, .2, 1);
  width: 0%;
}

/* ── Success overlay ─────────────────────────────────────── */
.cfg-success-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cfg-success-overlay[hidden] {
  display: none;
}

.cfg-success-box {
  background: #1a1a1e;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 52px 40px;
  max-width: 420px;
  width: calc(100% - 48px);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  animation: successPop 0.4s cubic-bezier(.34, 1.56, .64, 1);
}

@keyframes successPop {
  from { opacity: 0; transform: scale(0.88); }
  to   { opacity: 1; transform: scale(1); }
}

.cfg-success-icon svg {
  width: 68px;
  height: 68px;
}

.cfg-success-box h2 {
  font-size: 26px;
  font-weight: 900;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
}

.cfg-success-box p {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.65;
  margin: 0;
}

/* ════════════════════════════════════════════════════════════
   Responsive
   ════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .configurator-wrap {
    flex-direction: column;
    height: auto;
    overflow: visible;
  }

  .cfg-left {
    height: 56vw;
    min-height: 260px;
    max-height: 440px;
    flex: none;
  }

  .cfg-right {
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .cfg-sections {
    overflow: visible;
    max-height: none;
  }

  .cfg-viewer {
    bottom: 80px;
  }

  .cfg-angle-bar {
    height: 80px;
  }

  .cfg-angle-thumb {
    width: 56px;
    height: 38px;
  }

  .cfg-brochure-btn {
    bottom: 88px;
  }
}

@media (max-width: 640px) {
  .cfg-car-title-bar { padding: 14px 16px 12px; }
  .cfg-tabs .cfg-tab { padding: 11px 12px; font-size: 10.5px; }
  .cfg-section { padding: 18px 16px 28px; }
  .cfg-color-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
  .cfg-wheel-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .cfg-std-card, .cfg-pkg-card { grid-template-columns: 120px 1fr; }
  .cfg-order-form-grid { grid-template-columns: 1fr; }
  .cfg-order-form-grid .field.full { grid-column: 1; }
  .cfg-angle-bar { gap: 6px; padding: 10px 12px; }
  .cfg-angle-thumb { width: 48px; height: 34px; }
}

.cfg-option img { width: 40px !important; height: 40px !important; border-radius: 50%; object-fit: cover; margin-bottom: 20px; }

.cfg-option .cfg-color-swatch { width: 40px !important; height: 40px !important; margin-bottom: 20px; }

.cfg-bottom-total {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-right: auto;
  margin-left: 20px;
}

.cbt-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.55);
  text-align: right;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 2px;
}

.cbt-val {
  font-size: 16px;
  font-weight: 600;
  text-align: right;
  color: #fff;
}

.cfg-section-price {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 15px;
  font-weight: 500;
}
