* {
  box-sizing: border-box;
}

:root {
  /* Per-Produkt-Branding: wird zur Laufzeit aus config.json überschrieben.
     Ein Farbwert steuert alle dunklen Flächen (Fortschrittsbalken, Warenkorb-Button,
     aktive Viewer-Pill, Retry-Button). Standard = Unternehmensfarbe (Petrol). */
  --brand-accent: #294d53ff;
  --brand-accent-hover: #234147ff;
  --brand-page-bg: #f9f9fb;
  --brand-viewer-bg-start: #ffffff;
  --brand-viewer-bg-end: #eef0f5;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--brand-page-bg);
}

/* Haupt-Container Layout */
.configurator-wrapper {
  display: flex;
  flex-wrap: nowrap;
  width: 100%;
  height: 100vh;
  margin: 0 auto;
  background: #ffffff;
  overflow: hidden;
}

/* Links: 3D Viewer nimmt dynamisch den restlichen Platz ein */
.viewer-container {
  flex: 1;
  min-width: 320px;
  height: 100%;
  background: radial-gradient(circle, var(--brand-viewer-bg-start) 0%, var(--brand-viewer-bg-end) 100%);
  position: relative;
  overflow: hidden; /* Sicherung gegen Rausragen */
}

#three-container {
  width: 100%;
  height: 100%;
  position: relative;
}

#three-container canvas {
  display: block;
  width: 100%;
  height: 100%;
}

#boot-loader {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--brand-page-bg);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#boot-loader[hidden] {
  display: none;
}

.boot-logo {
  display: block;
  max-height: 72px;
  max-width: 220px;
  object-fit: contain;
}

.boot-logo[hidden] {
  display: none;
}

.boot-bar {
  width: 260px;
  max-width: 70vw;
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.boot-bar-fill {
  width: 0%;
  height: 100%;
  border-radius: 999px;
  background: var(--brand-accent);
  transition: width 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .boot-bar-fill {
    transition: none;
  }
}

.boot-text {
  font-size: 14px;
  font-weight: 600;
  color: #666;
}

.boot-retry {
  padding: 10px 22px;
  background: var(--brand-accent);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.boot-retry[hidden] {
  display: none;
}

.boot-retry:hover {
  background: var(--brand-accent-hover);
}

/* =========================================================
   LIQUID GLASS & PILLEN STYLING (Buttons & Controls)
   ========================================================= */

/* Viewer Controls Container (Oben Rechts im Viewer) */
.viewer-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  gap: 10px;
  z-index: 10;
}

.view-presets {
  display: flex;
  gap: 4px;
  padding: 4px;
  
  /* Liquid Glass Pille */
  background: rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 40px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.ctrl-btn {
  /* Standalone Buttons als Liquid Glass Pillen */
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.7);
  padding: 8px 16px;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.view-presets .ctrl-btn {
  border: none;
  border-radius: 20px;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ctrl-btn:hover {
  background: rgba(255, 255, 255, 0.85);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.ctrl-btn.active {
  background: var(--brand-accent) !important;
  color: #ffffff !important;
  border-color: var(--brand-accent);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 2px 6px rgba(0, 0, 0, 0.2),
    0 8px 18px rgba(0, 0, 0, 0.16);
}

/* =========================================================
   VOLLBILD-MODUS (Mobile): Viewer füllt den ganzen Bildschirm
   ========================================================= */

/* Vollbild-Button standardmäßig nur im Mobile-Layout zeigen */
#fullscreen-btn {
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
}

.viewer-container.fullscreen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  border-radius: 0;
  z-index: 9999;
}

body.no-scroll {
  overflow: hidden;
}

.fullscreen-close {
  position: absolute;
  top: 20px;
  right: 20px;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
}

.viewer-container.fullscreen .fullscreen-close {
  display: flex;
}

/* =========================================================
   RECHTE SEITE (Steuerungs-Panel & Dropdowns)
   ========================================================= */

.controls-container {
  width: 380px;
  max-width: 380px;
  flex-shrink: 0;
  padding: 40px 30px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  background: #ffffff;
  border-left: 1px solid #eaeaea;
  overflow-y: auto;
}

.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toolbar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 14px 0;
}

.toolbar .reset-btn {
  width: 100%;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

.reset-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  padding: 8px 14px;
  background: linear-gradient(180deg, #ffffff, #f3f4f8);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 30px;
  font-size: 12.5px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  transition: all 0.2s ease;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 4px 10px rgba(0, 0, 0, 0.06);
}

.reset-btn:hover {
  color: #111;
  border-color: rgba(0, 0, 0, 0.2);
  background: linear-gradient(180deg, #ffffff, #eceef4);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 1),
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 6px 14px rgba(0, 0, 0, 0.09);
}

.header-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.brand-logo {
  display: block;
  max-height: 44px;
  max-width: 180px;
  margin-bottom: 12px;
  object-fit: contain;
}

.brand-logo[hidden] {
  display: none;
}

.config-header h2 {
  margin: 0 0 6px 0;
  font-size: 22px;
  font-weight: 700;
  color: #111;
}

.config-header p {
  margin: 0 0 24px 0;
  color: #777;
  font-size: 13px;
}

.price-value {
  font-size: 20px;
  font-weight: 700;
  color: #111;
  white-space: nowrap;
}

/* Warenkorb-Button: eigenständig, volle Breite, dominant */
.cart-btn {
  display: block;
  width: 100%;
  margin-top: 24px;
  background: var(--brand-accent);
  color: #ffffff;
  border: none;
  padding: 17px 26px;
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.cart-btn:hover:not(:disabled) {
  background: var(--brand-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.22);
}

.cart-btn:disabled {
  background: #cccccc;
  cursor: not-allowed;
  box-shadow: none;
}

.cart-btn.unavailable {
  background: #e74c3c;
}

/* Dropdown Accordions im Liquid Glass Look */
.dropdown-category {
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 20px;
  overflow: hidden;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(246, 247, 251, 0.97));
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 5px 12px rgba(0, 0, 0, 0.06),
    0 14px 28px rgba(0, 0, 0, 0.07);
}

.dropdown-category:hover {
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(248, 249, 252, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 16px rgba(0, 0, 0, 0.07),
    0 18px 34px rgba(0, 0, 0, 0.09);
}

.dropdown-category:focus,
.dropdown-header:focus {
  outline: none; /* Entfernt die schwarze Browser-Fokus-Outline */
}

/* Ausgeklappter Zustand */
.dropdown-category[open] {
  border-color: rgba(0, 0, 0, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(250, 250, 253, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 10px 20px rgba(0, 0, 0, 0.07),
    0 22px 42px rgba(0, 0, 0, 0.09);
}

.dropdown-header {
  padding: 18px 22px;
  font-weight: 700;
  font-size: 15px;
  color: #111;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  list-style: none;
  user-select: none;
  background: transparent;
}

.dropdown-header::-webkit-details-marker {
  display: none;
}

.dropdown-category[open] .arrow {
  transform: rotate(180deg);
  color: #111;
}

.arrow {
  transition: transform 0.25s ease;
  font-size: 11px;
  color: #888;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: 12px;
}

.dropdown-selection {
  font-weight: 600;
  color: #555;
  font-size: 12.5px;
  max-width: 150px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-content {
  padding: 12px 20px 22px 20px;
  background: transparent;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

/* Select-Dropdowns im Glass-Pill-Design */
select.glass-select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  padding: 10px 18px;
  border-radius: 25px;
  border: 1px solid #e5e5e5;
  background-color: #f5f5f7;
  font-size: 13px;
  font-weight: 500;
  color: #1d1d1f;
  cursor: pointer;
  outline: none;
  transition: all 0.2s ease;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23555' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 16px center;
}

select.glass-select:hover {
  background-color: #ebebef;
  border-color: #ccc;
}

/* Farb-Swatches */
.color-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px 12px;
  justify-items: center;
  align-items: start;
}

.swatch-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 8px 4px 6px 4px;
  border-radius: 14px;
  transition: background 0.2s ease;
}

.swatch-item:has(.swatch-btn.active) {
  background: rgba(0, 0, 0, 0.045);
}

.swatch-label {
  font-size: 11px;
  color: #555;
  text-align: center;
  max-width: 66px;
  line-height: 1.25;
  white-space: normal;
  word-break: break-word;
  hyphens: auto;
}

.swatch-item:has(.swatch-btn.active) .swatch-label {
  color: #111;
  font-weight: 600;
}

.swatch-price {
  font-size: 10px;
  color: #b8860b;
  font-weight: 600;
}

.swatch-btn {
  position: relative;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 2px solid #e5e5e5;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

.swatch-btn:hover {
  transform: scale(1.1);
  border-color: #bbb;
}

.swatch-btn.active {
  transform: scale(1.25);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  z-index: 1;
}

.swatch-btn.active::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-size: 15px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

/* Ausverkaufte Option: ausgegraut + kleines X-Badge oben rechts */
.swatch-item {
  position: relative;
}

.swatch-btn.soldout {
  border-color: #e0e0e0;
  filter: grayscale(0.85);
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

.swatch-btn.soldout:hover {
  transform: none;
  border-color: #e0e0e0;
}

.swatch-soldout {
  position: absolute;
  top: 0;
  right: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e74c3c;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  pointer-events: none;
  z-index: 2;
}

/* Warenkorb-Feedback: Link nach erfolgreichem Hinzufügen */
.cart-feedback {
  margin-top: 10px;
  text-align: center;
}

.cart-feedback a {
  color: var(--brand-accent);
  font-size: 13px;
  font-weight: 600;
  text-decoration: underline;
}

/* =========================================================
   MOBILE RESPONSIVENESS (Horizontale Accordion-Tab-Leiste)
   ========================================================= */
@media (max-width: 900px) {
  .configurator-wrapper {
    flex-wrap: wrap;
    height: auto;
    overflow: initial;
  }

  .viewer-container {
    height: 50vh;
    min-height: 340px;
    width: 100%;
    position: relative;
    overflow: hidden;
  }

  .controls-container {
    width: 100%;
    max-width: 100%;
    padding: 20px 16px 30px 16px;
    border-left: none;
    border-top: 1px solid #eaeaea;
    position: relative;
    overflow-y: visible;
  }

  .viewer-controls {
    top: auto;
    bottom: 20px;
    right: 50%;
    transform: translateX(50%);
  }

  #fullscreen-btn {
    display: flex;
  }

  .toolbar {
    flex-direction: row;
  }

  .toolbar .reset-btn {
    flex: 1 1 0;
    min-width: 0;
    font-size: 11px;
    padding: 7px 6px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Horizontal scrollende Tab-Leiste – Inhalt liegt jetzt im separaten
     .mobile-panel-slot darunter, daher kein Konflikt mehr zwischen
     "viele Tabs scrollen" und "Inhalt darf nicht abgeschnitten werden" */
  .accordion-group {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    gap: 10px;
    width: 100%;
    padding: 4px 2px 14px 2px;
    scrollbar-width: none;
  }

  .accordion-group::-webkit-scrollbar {
    display: none;
  }

  .dropdown-category {
    flex: 0 0 auto !important;
    border-radius: 30px;
  }

  .dropdown-category,
  .dropdown-category:hover,
  .dropdown-category[open] {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 1px 3px rgba(0, 0, 0, 0.04),
      0 5px 12px rgba(0, 0, 0, 0.05);
  }

  .dropdown-header {
    padding: 10px 18px;
    font-size: 13px;
    white-space: nowrap;
    gap: 8px;
  }

  /* Der Inhalt selbst wird per JS in .mobile-panel-slot verschoben,
     daher bleibt die Kategorie-Pille schlank – kein eigener Inhalt mehr
     innerhalb der Scroll-Zeile */
  .dropdown-category .dropdown-content {
    display: none;
  }

  .mobile-panel-slot {
    display: block;
    width: 100%;
  }

  .mobile-panel-slot .dropdown-content {
    display: block;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 18px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
    border-top: none;
    padding: 16px 20px 20px 20px;
    margin-top: 4px;
  }

  /* Farb-Swatches auf Mobile im Einzeiler */
  .category-navigation, 
  .color-options {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 14px;
    padding: 6px 4px 10px 4px;
    scrollbar-width: none;
  }

  .category-navigation::-webkit-scrollbar,
  .color-options::-webkit-scrollbar {
    display: none;
  }

  .swatch-item {
    flex: 0 0 auto !important;
    scroll-snap-align: start;
    width: 64px;
  }

  .swatch-label {
    font-size: 10px;
    max-width: 64px;
    line-height: 1.2;
    white-space: normal;
    word-break: break-word;
    hyphens: auto;
  }

  .swatch-price {
    font-size: 9px;
  }

  .swatch-btn {
    width: 44px;
    height: 44px;
  }
}

/* --- AR --- */
.ar-btn {
  position: absolute;
  top: 20px;
  left: 20px;
  padding: 8px 18px;
  background: var(--brand-accent);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  transition: all 0.25s ease;
}

.ar-btn:hover {
  background: var(--brand-accent-hover);
  transform: translateY(-1px);
}

#ar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: auto;
  font-family: system-ui, sans-serif;
}

body.ar-active #ar-overlay {
  display: block;
}

.ar-panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  padding: 14px 14px calc(16px + env(safe-area-inset-bottom)) 14px;
  pointer-events: none;
}

.ar-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 100%;
  pointer-events: none;
}

.ar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  pointer-events: none;
}

.ar-hint {
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  padding: 8px 14px;
  border-radius: 20px;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
  max-width: 92%;
  pointer-events: none;
}

.ar-scan {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  pointer-events: none;
}

.ar-scan[hidden] {
  display: none;
}

.ar-scan-ring {
  width: 120px;
  height: 120px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  position: relative;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.25), inset 0 0 0 1px rgba(0, 0, 0, 0.25);
  animation: ar-scan-pulse 1.6s ease-in-out infinite;
}

.ar-scan-ring::before,
.ar-scan-ring::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 1.5px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  opacity: 0;
  animation: ar-scan-wave 2.4s ease-out infinite;
}

.ar-scan-ring::before { width: 80%; height: 80%; }
.ar-scan-ring::after { width: 60%; height: 60%; animation-delay: 0.6s; }

.ar-scan-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.ar-scan-text {
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 10px 18px;
  border-radius: 20px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
  max-width: 86%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

@keyframes ar-scan-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.75; }
}

@keyframes ar-scan-wave {
  0% { opacity: 0.8; transform: translate(-50%, -50%) scale(0.8); }
  70% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.4); }
}

.ar-occlusion {
  background: rgba(21, 122, 71, 0.75);
  color: #fff;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  pointer-events: none;
}

.ar-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
}

.ar-finish {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.ar-finish-row {
  display: flex;
  align-items: center;
  gap: 8px;
  pointer-events: auto;
}

.ar-finish-toggle {
  gap: 6px;
  white-space: nowrap;
}

.ar-finish-chevron {
  font-size: 11px;
  line-height: 1;
  opacity: 0.6;
}

.ar-finish-swatches {
  display: none;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  pointer-events: auto;
  max-width: 92%;
  padding: 10px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 18px;
}

.ar-finish-swatches.ar-open {
  display: flex;
}

.ar-finish-swatches .swatch-btn {
  width: 44px;
  height: 44px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.ar-finish-label {
  pointer-events: none;
  background: linear-gradient(180deg, #ffffff, #f3f4f8);
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: #333;
  padding: 7px 14px;
  border-radius: 30px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.05),
    0 4px 10px rgba(0, 0, 0, 0.06);
}

.ar-size {
  pointer-events: none;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 5px 12px;
  border-radius: 16px;
  font-size: 12px;
  white-space: nowrap;
}

.ar-inbtn {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: linear-gradient(180deg, #ffffff, #f3f4f8);
  border: 1px solid rgba(0, 0, 0, 0.14);
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  color: #333;
  cursor: pointer;
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 4px 10px rgba(0, 0, 0, 0.12);
}

.ar-inbtn:active {
  transform: scale(0.97);
  background: linear-gradient(180deg, #ffffff, #eceef4);
}

.ar-inbtn-exit {
  background: linear-gradient(180deg, #fff5f5, #fdecec);
  border-color: rgba(200, 60, 60, 0.35);
  color: #b03030;
}

.ar-inbtn-icon {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
}

/* Bedienungs-Popup im AR: liegt als Modal über dem Kamerabild */
.ar-info-popup {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 12, 18, 0.55);
  z-index: 40;
  padding: 24px;
}

.ar-info-popup[hidden] {
  display: none;
}

.ar-info-card {
  max-width: 340px;
  width: 100%;
  background: linear-gradient(180deg, #ffffff, #f2f4f9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 18px;
  padding: 22px 22px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.ar-info-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: #1c2430;
}

.ar-info-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: #3a4453;
  font-size: 14px;
  line-height: 1.4;
}

.ar-info-list li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}

.ar-info-gest {
  flex: 0 0 auto;
  font-weight: 700;
  color: #1c2430;
  background: #e8eef5;
  border-radius: 6px;
  padding: 1px 7px;
  font-size: 12.5px;
}

.ar-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(30, 30, 30, 0.92);
  color: #fff;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.4;
  max-width: 90vw;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}
.ar-toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.ar-toast--center {
  top: 42%;
  bottom: auto;
  transform: translate(-50%, -50%) scale(0.96);
  padding: 20px 30px;
  font-size: 17px;
  line-height: 1.5;
  max-width: 84vw;
  background: rgba(15, 20, 30, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.ar-toast--center.visible {
  transform: translate(-50%, -50%) scale(1);
}
