/* =====================================================================
   Produktseite mit 3D-Konfigurator
   ===================================================================== */
.pfad { font-size: 13.5px; color: var(--stein); padding: 22px 0 18px; }
.pfad a { text-decoration: none; }
.pfad a:hover { color: var(--tinte); }
.pfad span { margin: 0 8px; opacity: .5; }

.pdp { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(380px, .9fr); gap: clamp(24px, 3vw, 48px); align-items: start; padding-bottom: 80px; }
@media (max-width: 1020px) { .pdp { grid-template-columns: minmax(0, 1fr); } }

/* Bühne (3D + Fotos) */
.buehne { position: sticky; top: 92px; }
@media (max-width: 1020px) { .buehne { position: relative; top: 0; } }
.buehne-rahmen { position: relative; aspect-ratio: 4 / 3; background: linear-gradient(180deg, #b9cdd4 0%, #dfe6e3 55%, #e4e8e2 100%); border-radius: var(--radius); overflow: hidden; box-shadow: var(--schatten); }
@media (max-width: 1020px) { .buehne-rahmen { aspect-ratio: 4 / 3.2; } }
.buehne-rahmen canvas { width: 100% !important; height: 100% !important; display: block; cursor: grab; touch-action: none; }
.buehne-rahmen canvas:active { cursor: grabbing; }
.buehne-fotos { position: absolute; inset: 0; background: var(--tinte); display: none; }
.buehne-fotos img { width: 100%; height: 100%; object-fit: cover; }
.buehne.zeigt-fotos .buehne-fotos { display: block; }
.buehne-reiter { position: absolute; top: 14px; left: 14px; display: flex; background: rgba(255, 255, 255, .92); border-radius: 3px; padding: 3px; z-index: 3; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.buehne-reiter button { border: 0; background: transparent; padding: 8px 14px; font: 700 13px/1 var(--kopf); border-radius: 2px; color: var(--stein); }
.buehne-reiter button.an { background: var(--gruen); color: #fff; }
.buehne-masse { position: absolute; top: 14px; right: 14px; z-index: 3; background: var(--tinte); color: #fff; padding: 9px 13px; border-radius: 3px; font: 700 13px/1 var(--kopf); letter-spacing: .02em; display: flex; gap: 10px; }
.buehne-masse span { opacity: .55; font-weight: 600; }
.buehne-ansichten { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 3; display: flex; gap: 4px; background: rgba(255, 255, 255, .92); padding: 4px; border-radius: 3px; box-shadow: 0 2px 10px rgba(0,0,0,.08); }
.buehne-ansichten button { border: 0; background: transparent; padding: 8px 12px; font: 600 12.5px/1 var(--kopf); border-radius: 2px; }
.buehne-ansichten button:hover { background: var(--sand); }
.foto-nav { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; gap: 6px; justify-content: center; z-index: 2; }
.foto-nav button { width: 54px; height: 40px; border: 2px solid transparent; padding: 0; border-radius: 2px; overflow: hidden; opacity: .75; }
.foto-nav button.an { border-color: #fff; opacity: 1; }
.foto-nav img { width: 100%; height: 100%; object-fit: cover; }
.buehne-laden { position: absolute; inset: 0; display: grid; place-items: center; font: 600 14px var(--kopf); color: var(--stein); }

.vorteile { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--linie); border: 1px solid var(--linie); border-radius: var(--radius); margin-top: 18px; overflow: hidden; }
.vorteile div { background: var(--papier); padding: 16px; font-size: 13px; color: var(--stein); line-height: 1.4; }
.vorteile strong { display: block; color: var(--tinte); font: 700 14px/1.3 var(--kopf); margin-bottom: 4px; }
@media (max-width: 640px) { .vorteile { grid-template-columns: 1fr 1fr; } }

/* Konfigurator-Spalte */
.kopf-produkt h1 { font-size: clamp(32px, 3.6vw, 46px); margin: 14px 0 14px; }
.kopf-produkt > p { color: var(--stein); margin-bottom: 18px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 22px; }
.chips span { font: 600 12.5px/1 var(--kopf); padding: 9px 12px; background: var(--papier); border: 1px solid var(--linie); border-radius: 3px; }
.preis-kopf { display: flex; align-items: baseline; gap: 12px; padding: 20px 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); margin-bottom: 18px; }
.preis-kopf .preis { font: 800 38px/1 var(--kopf); letter-spacing: -.02em; }
.preis-kopf small { color: var(--stein); font-size: 13.5px; }

.schritt { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); margin-bottom: 10px; overflow: hidden; }
.schritt > summary { list-style: none; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 14px; padding: 18px 20px; cursor: pointer; }
.schritt > summary::-webkit-details-marker { display: none; }
.schritt-nr { width: 44px; height: 44px; display: grid; place-items: center; background: var(--sand); font: 800 14px/1 var(--kopf); border-radius: 3px; color: var(--gruen); }
.schritt[open] .schritt-nr { background: var(--gruen); color: #fff; }
.schritt-titel { font: 800 18px/1.15 var(--kopf); }
.schritt-zus { display: block; font: 500 13px/1.35 var(--text); color: var(--stein); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 34ch; }
.schritt-pfeil { width: 20px; height: 20px; transition: transform .2s; }
.schritt[open] .schritt-pfeil { transform: rotate(180deg); }
.schritt-inhalt { padding: 4px 20px 22px; border-top: 1px solid var(--sand); }
.schritt-weiter { margin-top: 18px; width: 100%; }

.feld { padding-top: 18px; }
.feld[hidden] { display: none; }
.feld-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 10px; }
.feld-titel { font: 700 14px/1.2 var(--kopf); }
.feld-wert { font: 600 13px/1.2 var(--text); color: var(--stein); text-align: right; }
.hilfe-btn { border: 0; background: none; padding: 0; color: var(--holz); font: 600 12.5px var(--kopf); text-decoration: underline; text-underline-offset: 3px; }
.gruppe-titel { margin: 22px 0 -4px; padding-top: 18px; border-top: 1px dashed var(--linie); font: 800 12px/1 var(--kopf); letter-spacing: .14em; text-transform: uppercase; color: var(--gruen); }
.gruppe-titel:first-child { border-top: 0; margin-top: 6px; padding-top: 8px; }

.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.kacheln.klein { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.kachel { position: relative; text-align: left; border: 1.5px solid var(--linie); background: var(--papier); border-radius: 3px; padding: 13px 14px; min-height: 52px; transition: border-color .15s, background .15s; }
.kachel:hover { border-color: #b9b1a2; }
.kachel b { display: block; font: 700 14px/1.25 var(--kopf); }
.kachel small { display: block; font-size: 12px; line-height: 1.35; color: var(--stein); margin-top: 4px; }
.kachel[aria-pressed='true'] { border-color: var(--gruen); background: #f1f5f3; box-shadow: inset 0 0 0 1px var(--gruen); }
.kachel[aria-pressed='true']::after { content: ''; position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--holz); }
.kachel .aufpreis { display: block; margin-top: 6px; font: 700 12px/1 var(--kopf); color: var(--gruen); }
.kacheln.klein .kachel { text-align: center; padding: 12px 8px; }

.farben { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.farbe { aspect-ratio: 1; border: 2px solid transparent; border-radius: 3px; padding: 0; overflow: hidden; box-shadow: 0 0 0 1px var(--linie); background: #eee; }
.farbe img { width: 100%; height: 100%; object-fit: cover; }
.farbe[aria-pressed='true'] { border-color: var(--papier); box-shadow: 0 0 0 2.5px var(--gruen); }

.mass { display: grid; gap: 10px; }
.mass-stufen { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mass-stufen .kachel { text-align: center; padding: 11px 4px; min-height: 0; }
.mass-sonder { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--stein); }
.mass-sonder input { width: 110px; height: 44px; border: 1.5px solid var(--linie); border-radius: 3px; padding: 0 12px; font: 700 15px var(--kopf); }
.mass-sonder input:focus { outline: none; border-color: var(--gruen); }
.mass-hinweis { font-size: 12.5px; color: var(--stein); }
.info-wert { font: 700 15px var(--kopf); padding: 12px 14px; background: var(--creme); border-radius: 3px; display: flex; justify-content: space-between; }
.info-wert small { color: var(--stein); font: 500 12.5px var(--text); }

/* Preisleiste */
.preisleiste { position: sticky; bottom: 0; z-index: 20; margin-top: 18px; background: var(--gruen); color: var(--creme); border-radius: var(--radius); padding: 16px 18px; display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; box-shadow: 0 -10px 30px -12px rgba(0,0,0,.35); }
.preisleiste .preis { font: 800 28px/1 var(--kopf); letter-spacing: -.02em; }
.preisleiste small { display: block; font-size: 12px; opacity: .7; margin-top: 5px; }
.preisleiste .knoepfe { display: flex; gap: 8px; }
.preisleiste .btn { min-height: 48px; }
.btn-klein { min-height: 48px; padding: 0 14px; background: rgba(255,255,255,.1); color: var(--creme); }
.btn-klein:hover { background: rgba(255,255,255,.18); }
@media (max-width: 640px) {
  .preisleiste { position: fixed; left: 0; right: 0; bottom: 0; border-radius: 0; margin: 0; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); grid-template-columns: 1fr auto; }
  .preisleiste .preis { font-size: 22px; }
  .preisleiste small { font-size: 11px; }
  .preisleiste .btn-klein { display: none; }
  .preisleiste .btn { min-height: 46px; padding: 0 16px; }
  body { padding-bottom: 76px; }
  .buehne-masse { top: auto; bottom: 62px; right: 10px; font-size: 12px; padding: 7px 10px; }
  .buehne-reiter { top: 10px; left: 10px; }
  .buehne-ansichten { bottom: 10px; }
  .schritt > summary { padding: 14px; grid-template-columns: 38px 1fr auto; gap: 12px; }
  .schritt-nr { width: 38px; height: 38px; }
  .schritt-inhalt { padding: 2px 14px 18px; }
  .schritt-zus { max-width: 26ch; }
  .kacheln { grid-template-columns: 1fr 1fr; }
}
/* Handy/Tablet: 3D bleibt beim Konfigurieren oben sichtbar */
@media (max-width: 1020px) {
  .buehne { position: sticky; top: 0; z-index: 60; margin: 0 calc(-1 * clamp(16px, 4vw, 40px)); }
  .buehne-rahmen { aspect-ratio: 16 / 10; border-radius: 0; box-shadow: 0 8px 20px -10px rgba(0,0,0,.35); }
  .vorteile { display: none; }
}
.preis-flash { animation: flash .5s; }
@keyframes flash { 0% { color: var(--holz-hell); } 100% { color: inherit; } }

/* Zusammenfassung / Dialog */
dialog { border: 0; border-radius: 6px; padding: 0; width: min(640px, calc(100% - 32px)); max-height: calc(100% - 48px); box-shadow: 0 30px 80px -20px rgba(0,0,0,.5); }
dialog::backdrop { background: rgba(20, 32, 29, .6); backdrop-filter: blur(3px); }
.dlg-kopf { display: flex; justify-content: space-between; align-items: center; padding: 22px 26px; border-bottom: 1px solid var(--linie); position: sticky; top: 0; background: #fff; }
.dlg-kopf h3 { font-size: 22px; }
.dlg-inhalt { padding: 20px 26px 26px; }
.dlg-inhalt img { border-radius: 3px; margin-bottom: 16px; }
.zf { width: 100%; border-collapse: collapse; font-size: 14px; }
.zf td { padding: 9px 0; border-bottom: 1px solid var(--sand); vertical-align: top; }
.zf td:first-child { color: var(--stein); width: 44%; padding-right: 12px; }
.zf td:last-child { font-weight: 600; text-align: right; }
.zf-summe { display: flex; justify-content: space-between; align-items: baseline; padding: 18px 0 4px; font: 800 26px var(--kopf); }
.zf-summe small { font: 500 13px var(--text); color: var(--stein); }
.link-zeile { display: flex; gap: 8px; margin-top: 14px; }
.link-zeile input { flex: 1; min-width: 0; height: 46px; border: 1.5px solid var(--linie); border-radius: 3px; padding: 0 12px; font-size: 13px; }
.hilfe-text p { margin-bottom: .8em; font-size: 15px; }
.x-btn { width: 40px; height: 40px; border: 0; background: var(--sand); border-radius: 3px; font-size: 20px; line-height: 1; }

/* Produktbeschreibung */
.reiter { display: flex; gap: 4px; border-bottom: 1px solid var(--linie); margin-bottom: 36px; overflow-x: auto; }
.reiter button { border: 0; background: none; padding: 16px 20px; font: 700 15px var(--kopf); color: var(--stein); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.reiter button.an { color: var(--tinte); border-color: var(--holz); }
.reiter-panel { display: none; }
.reiter-panel.an { display: block; }
.text-spalten { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }
@media (max-width: 860px) { .text-spalten { grid-template-columns: 1fr; gap: 24px; } }
.text-spalten h3 { font-size: 24px; margin: 0 0 14px; }
.text-spalten p, .text-spalten li { color: #3b4642; }
.haken { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 10px; }
.haken li { position: relative; padding-left: 30px; }
.haken li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; background: var(--gruen) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/11px no-repeat; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 14.5px; background: var(--papier); border-radius: var(--radius); overflow: hidden; }
.tabelle th, .tabelle td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--sand); vertical-align: top; }
.tabelle th { background: var(--gruen); color: var(--creme); font: 700 13px var(--kopf); letter-spacing: .04em; }
.tabelle td:first-child { font-weight: 700; width: 32%; }
.vergleich td:not(:first-child) { color: var(--holz); letter-spacing: 2px; }
.kasten { background: var(--papier); border-left: 4px solid var(--holz); padding: 20px 22px; border-radius: 0 var(--radius) var(--radius) 0; margin: 20px 0; }
.kasten strong { font-family: var(--kopf); }

/* Freie Maße (Schieberegler + Zahl) */
.zahl { display: grid; grid-template-columns: 1fr auto; gap: 14px; align-items: center; }
.zahl input[type=range] { width: 100%; accent-color: var(--gruen); height: 28px; }
.zahl-feld { display: flex; align-items: center; gap: 8px; font-size: 13.5px; color: var(--stein); }
.zahl-feld input { width: 96px; height: 46px; border: 1.5px solid var(--linie); border-radius: 3px; padding: 0 10px; font: 700 16px var(--kopf); text-align: right; }
.zahl-feld input:focus { outline: none; border-color: var(--gruen); }

/* Produktseite: Planungs-Karte statt eingebettetem Konfigurator */
.preis-kopf small:first-child { font: 600 14px var(--kopf); color: var(--stein); }
.plan-karte { background: var(--papier); border: 1px solid var(--linie); border-radius: var(--radius); padding: 24px; }
.plan-karte .haken { margin-bottom: 22px; }
.plan-cta { width: 100%; min-height: 58px; font-size: 16px; }
.plan-cta2 { width: 100%; margin-top: 10px; color: var(--tinte); }
.plan-klein { font-size: 13px; color: var(--stein); margin: 12px 0 0; }
.cp-wahl { display: grid; gap: 10px; }
.cp-karte { display: grid; gap: 6px; padding: 18px; border: 1.5px solid var(--linie); border-radius: var(--radius); text-decoration: none; transition: border-color .15s; }
.cp-karte:hover { border-color: var(--holz); }
.cp-karte b { font: 800 18px var(--kopf); }
.cp-karte small { color: var(--stein); font-size: 13.5px; }
.cp-karte span { font: 700 14px var(--kopf); color: var(--holz); }
