@font-face {
  font-family: "PP Object Sans";
  src: url(/konfigurator/fonts/PPObjectSans-Regular.woff2) format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "PP Object Sans";
  src: url(/konfigurator/fonts/PPObjectSans-Bold.woff2) format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #0e1116;
  --text: #454c57;
  --line: #e2e6ec;
  --accent: #3bacf6;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; background: transparent; }

body {
  font-family: "PP Object Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  font-feature-settings: "lnum";
  -webkit-font-smoothing: antialiased;
}

ul { list-style: none; margin: 0; padding: 0; }
p { margin: 0 0 8px; }
b { font-weight: 700; color: var(--ink); }

.config-wrapper { width: 100%; }

.config-grid {
  display: flex;
  align-items: flex-start;
  gap: 50px;
}

/* 3D-Fläche */
.viewer-container {
  flex: 0 1 calc(68% - 25px);
  aspect-ratio: 1.28 / 1;
  background: #fff;
  border-radius: 20px;
  box-shadow: 0 0 0 1px var(--line);
  overflow: hidden;
  position: relative;
}
.viewer-container .content-left { width: 100%; height: 100%; }

.model-viewer {
  display: none;
  width: 100%;
  height: 100%;
  --poster-color: transparent;
}

.right-blog { flex: 1 0 420px; min-width: 0; }
.right-blog .fa-eye { display: none; }

/* Auswahlfelder */
.select-container { position: relative; margin-bottom: 24px; }
.select { position: relative; }
.select input {
  display: block;
  width: 100%;
  height: 40px;
  padding: 0 40px 0 12px;
  border: 1px solid #000;
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  outline-offset: 2px;
}
.select::after {
  content: "";
  position: absolute;
  right: 16px;
  top: 14px;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid #000;
  border-bottom: 1.5px solid #000;
  transform: rotate(45deg);
  transition: transform 0.3s ease, top 0.3s ease;
  pointer-events: none;
}
.select-container.active .select::after { transform: rotate(-135deg); top: 18px; }

.option-container {
  height: 0;
  overflow: hidden;
  background: rgb(0 0 0 / 30%);
  transition: height 0.3s ease;
}
.option {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 12px;
  color: #fff;
  cursor: pointer;
}
.option label { cursor: pointer; }
.option:hover { background: rgb(0 0 0 / 20%); }
.option.selected { background: rgb(0 0 0 / 35%); }

/* Zubehör */
.addon-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.addon-item:first-child { border-top: 1px solid var(--line); }
.js-addon-btn {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  gap: 10px;
  min-width: 0;
  cursor: pointer;
  color: var(--ink);
}
.js-addon-btn i { width: 22px; text-align: center; font-size: 16px; }
.js-addon-btn .basket-list__label { flex: 1 1 auto; }
.js-addon-btn .price-wrap { color: var(--text); white-space: nowrap; }

.item-count-wrap { display: flex; align-items: center; flex: none; }
.item-count-wrap button {
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  font: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.item-count-wrap button:hover { background: var(--accent); color: #fff; }
.item-count { min-width: 36px; text-align: center; color: var(--ink); font-variant-numeric: tabular-nums; }

/* Warenkorb und Zahlung */
.pay-wrap {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 24px;
  margin-top: 32px;
}
#paypal-button-container { flex: 0 0 40%; min-width: 0; }
#price-container { flex: 1 1 0; min-width: 0; }

#basket-list li { display: flex; gap: 6px; padding: 2px 0; }
#basket-list .basket-list__label { flex: 1 1 auto; }
#basket-list .price-wrap { margin-left: auto; text-align: right; white-space: nowrap; }
#basket-list .stck { white-space: nowrap; }

#total-price-wrap {
  margin-top: 12px;
  text-align: right;
  font-weight: 700;
  font-size: 20px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.shipment { margin-top: 8px; text-align: right; font-size: 13px; line-height: 1.45; }

#order-confirmation {
  margin-top: 24px;
  padding: 16px 20px;
  background: #f3f5f8;
  border-left: 3px solid var(--accent);
  color: var(--ink);
}
#order-confirmation[hidden] { display: none; }

/* Beschreibung unter dem Konfigurator */
.wb-description { margin-top: 56px; max-width: 920px; }
#wb-plus, #wb-mini { display: none; }
.wb-description h3 { margin: 0 0 16px; font-size: 22px; line-height: 1.25; color: var(--ink); }
.wb-description p { margin-bottom: 16px; }
.wb-description ul { padding-left: 20px; list-style: disc; }

/* AR und Ladebalken von model-viewer */
#ar-button {
  position: absolute;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  height: 36px;
  padding: 0 16px 0 40px;
  border: 1px solid #dadce0;
  border-radius: 18px;
  background-color: #fff;
  background-image: url(/konfigurator/ar_icon.png);
  background-repeat: no-repeat;
  background-size: 20px 20px;
  background-position: 12px 50%;
  color: #4285f4;
  font-family: inherit;
  font-size: 14px;
  line-height: 36px;
  white-space: nowrap;
  cursor: pointer;
}
#ar-button:active { background-color: #e8eaed; }
#ar-button:focus { outline: none; }
#ar-button:focus-visible { outline: 1px solid #4285f4; }

#ar-prompt {
  position: absolute;
  left: 50%;
  bottom: 60px;
  display: none;
  animation: ar-elongate 2s infinite ease-in-out alternate;
}
model-viewer[ar-status="session-started"] > #ar-prompt { display: block; }
#ar-prompt img { animation: ar-circle 4s linear infinite; }

@keyframes ar-circle {
  from { transform: translateX(-50%) rotate(0deg) translateX(50px) rotate(0deg); }
  to { transform: translateX(-50%) rotate(360deg) translateX(50px) rotate(-360deg); }
}
@keyframes ar-elongate {
  from { transform: translateX(100px); }
  to { transform: translateX(-100px); }
}

.progress-bar {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 33%;
  height: 4px;
  transform: translate3d(-50%, -50%, 0);
  border-radius: 25px;
  background-color: rgb(0 0 0 / 15%);
}
.progress-bar.hide { visibility: hidden; transition: visibility 0.3s; }
.update-bar {
  float: left;
  width: 0;
  height: 100%;
  border-radius: 25px;
  background-color: var(--ink);
  transition: width 0.3s;
}

/* Preisblock über dem PayPal-Button */
@media (max-width: 1439px) {
  .pay-wrap { flex-direction: column-reverse; align-items: stretch; gap: 20px; }
  #paypal-button-container { flex: none; }
}

@media (max-width: 1024px) {
  .config-grid { flex-direction: column; align-items: stretch; gap: 32px; }
  .viewer-container { flex: none; width: 100%; aspect-ratio: auto; height: min(80vw, 640px); }
  .right-blog { flex: none; width: 100%; max-width: 500px; margin: 0 auto; }
  .wb-description { max-width: 500px; margin-left: auto; margin-right: auto; }
}

@media (max-width: 480px) {
  .addon-item { gap: 10px; }
  .js-addon-btn { gap: 8px; flex: 1 1 0; font-size: 15px; }
  .js-addon-btn i { width: 20px; }
  .js-addon-btn .basket-list__label { min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
  .item-count-wrap button { width: 28px; height: 28px; }
  .item-count { min-width: 28px; }
}

@media (prefers-reduced-motion: reduce) {
  .option-container, .select::after, .item-count-wrap button { transition: none; }
}
