/*
 * Konfigurator der Tischkufe (Produktseite /tischkufe/).
 * Unveraendert aus dem Entwurf uebernommen (entwurf/neubau/konfigurator.html, Stand 20.11.2026).
 * Ergaenzungen fuer WordPress (Preis wird geladen, Leiste von WordPress) stehen in wp.css.
 */
/* Aufbau nach dem Tylko-Muster: grosse Vorschau, daneben EIN kompaktes Panel.
   Jede Option ist eine Zeile: Beschriftung links, Bedienelement rechts. */
body { background: #ebe6dc; padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px)); font-size: 15px; }
.site-header { background: #fff; top: 0; } /* ohne Vorteilsleiste sitzt der Kopf ganz oben */
@media (max-width: 900px) { .top-trust { display: none; } }
/* Die Auswahl-Box wird bei jedem Klick neu aufgebaut. Ohne diese Zeile schiebt Firefox die Seite dabei
   jedes Mal ein Stueck weiter (automatische Scroll-Verankerung). */
html, body { overflow-anchor: none; }
.kf { max-width: 1320px; margin: 0 auto; }

.kf-preview { position: sticky; top: 0; z-index: 20; background: #ebe6dc; }
.kf-preview #pv { display: block; width: 100%; height: clamp(170px, 23vh, 230px); }
/* 3D-Ansicht und Galeriefotos: die Tischplatten-Zeile entfaellt, ihr Platz geht an die Vorschau. */
.kf-preview.ohne-platte .pv-platte { display: none; }
.pv-platte { opacity: calc(1 - var(--frei, 0)); }
.kf-preview.ohne-platte #pv { height: calc(clamp(170px, 23vh, 230px) + 54px); }
.pv-stage { position: relative; overflow: hidden; }
#pvFoto[hidden], #pvFotoBg[hidden] { display: none; }
.pv-ansicht { position: absolute; right: 12px; bottom: 10px; display: flex; background: #fff; border-radius: 100px; padding: 3px; box-shadow: 0 1px 5px rgba(0,0,0,0.14); z-index: 3; }
.pv-ansicht button { border: none; background: none; border-radius: 100px; padding: 0 13px; height: 32px; font-size: 13px; font-weight: 700; color: var(--muted); transition: background-color 0.25s ease, color 0.25s ease; }
.pv-ansicht button.on { background: var(--ink); color: #fff; }
#pvFotoBg { object-fit: cover; filter: blur(26px) brightness(0.95); transform: scale(1.2); }
.pv-stage img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.pv-thumbs { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px 10px; scrollbar-width: none; }
.pv-thumbs::-webkit-scrollbar { display: none; }
.pv-thumbs button { flex: 0 0 auto; width: 50px; height: 50px; border-radius: 8px; border: 2px solid transparent; padding: 0; overflow: hidden; background: #fff; }
.pv-thumbs button.on { border-color: var(--ink); }
.pv-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pv-thumbs svg { width: 100%; height: 100%; padding: 6px; display: block; }
.kf-info { max-width: 1320px; margin: 0 auto; padding: 36px max(16px, var(--safe-l)) 56px max(16px, var(--safe-r)); }
.kf-info h2 { font-size: 24px; margin-bottom: 14px; }
.kf-info details { background: #fff; border-radius: 12px; margin-bottom: 8px; }
.kf-info summary { cursor: pointer; list-style: none; padding: 16px 20px; font-weight: 700; font-size: 16px; display: flex; justify-content: space-between; align-items: center; }
.kf-info summary::-webkit-details-marker { display: none; }
/* Plus und Minus sind echte Schriftzeichen, keine Grafik: Der Browser zeichnet sie in jeder Zeile und jeder Zoomstufe gleich.
   Im Ruhezustand steht nur das "+" bzw. das "−".
   Masse aus der Schrift Source Sans 3: Zeichenbreite 0.497em, Mitte des Zeichens bei 48 % der Zeilenhoehe. */
.kf-info summary { position: relative; padding-right: 54px; line-height: 24px; }
/* Seit 20.11. ohne Drehung: Das Minus erscheint sofort unter dem Plus, das Plus blendet aus. Der waagerechte Strich bleibt stehen,
   der senkrechte verschwindet weich. Gedrehte Schriftzeichen setzt der Browser bis zu einem Pixel anders als stehende, das sah
   aus, als laege der Drehpunkt neben der Mitte. */
.kf-info summary::after, .kf-info .pm::before { position: absolute; right: 21px; top: calc(50% - 0.48em); width: 0.497em; height: 1em;
  font: 400 26px/1 'Source Sans 3', sans-serif; color: var(--muted); text-align: center; }
.kf-info summary::after { content: "+"; transition: opacity 0.28s ease; }
.kf-info .pm::before { content: "\2212"; opacity: 0; transition: opacity 0s linear 0.28s; }
.kf-info details.auf summary::after { opacity: 0; }
.kf-info details.auf .pm::before { opacity: 1; transition-delay: 0s; }
@media (prefers-reduced-motion: reduce) { .kf-info summary::after, .kf-info .pm::before { transition: none; } }
.kf-info .inh { padding: 0 20px 18px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; max-width: 80ch; }
.kf-info .inh.breit, .kf-info .inh.mit { max-width: none; }
/* Punkte 2 bis 4: Text links, Bild rechts (Aufbau 2 der Sandbox) */
.kf-info .inh.mit { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px; align-items: start; }
.kf-info .gw-text { max-width: 74ch; } .kf-info .gw-text p:last-child { margin-bottom: 0; }
.kf-info .gw-bild { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: #e9e9e9; }
@media (max-width: 860px) { .kf-info .inh.mit { grid-template-columns: minmax(0, 1fr); gap: 16px; } .kf-info .gw-bild { max-width: 420px; } }
.ofl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.ofl figure { margin: 0; }
.ofl img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; background: #e9e9e9; }
.ofl figcaption { font-size: 14px; line-height: 1.5; margin-top: 10px; }
.ofl figcaption b { display: block; font-size: 16px; margin-bottom: 3px; }
.ofl figcaption small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }
@media (max-width: 640px) { .ofl { grid-template-columns: 1fr; } }
.kf-info .inh p { margin-bottom: 10px; } .kf-info .inh b { color: var(--ink); }
.pv-tools { position: absolute; right: 10px; top: 10px; }
.pv-tools button { background: #fff; border: none; border-radius: 100px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: var(--ink-soft); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }

.pv-platte span { text-align: right; }
.pv-platte { display: flex; flex-direction: row-reverse; align-items: center; gap: 10px; padding: 8px 12px 10px; font-size: 12px; color: var(--ink-soft); line-height: 1.3; }
.pv-platte button { flex-shrink: 0; background: #fff; border: none; border-radius: 100px; padding: 7px 13px; font-size: 12.5px; font-weight: 600; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.12); }
.r:has(.chips), .r:has(.swatches) { align-items: start; }
.r:has(.chips) > .l, .r:has(.swatches) > .l { min-height: 36px; }
.r:has(.swatches) > .l { min-height: 42px; }
.qinfo { background: #f4f1eb; border-radius: 10px; padding: 11px 12px; font-size: 13.5px; color: var(--ink); margin-bottom: 12px; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.qinfo button { flex-shrink: 0; background: #fff; border: 1.5px solid var(--ink); border-radius: 100px; padding: 6px 12px; font-size: 13px; font-weight: 600; color: var(--ink); }
.panel { background: #fff; border-radius: 14px 14px 0 0; padding: 18px max(16px, var(--safe-l)) 26px max(16px, var(--safe-r)); position: relative; z-index: 21; }
.p-price { padding-bottom: 14px; border-bottom: 1px solid var(--line-on-card); margin-bottom: 8px; }
.p-price h1 { font-size: 15px; font-weight: 600; font-family: inherit; color: var(--ink-soft); letter-spacing: 0; }
.p-price b { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums; display: block; margin-top: 2px; }
.p-price small { font-size: 13px; color: var(--muted); }
.p-price .frei { display: block; margin-top: 7px; font-size: 14px; font-weight: 700; color: var(--ok); }

.notice { background: #fbf4dd; border-radius: 8px; padding: 9px 12px; font-size: 13.5px; margin: 8px 0; }

.r { display: grid; grid-template-columns: 92px minmax(0, 1fr); align-items: center; column-gap: 10px; padding: 8px 0; }
.r > .l { font-size: 15px; color: var(--ink); display: flex; align-items: center; gap: 6px; }
.r > .c { min-width: 0; display: flex; align-items: center; gap: 8px; }
.r > .h { grid-column: 2; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
/* Kreis und Fragezeichen sind EINE Vektorgrafik. Als Schriftzeichen in einem CSS-Kreis sass das Fragezeichen bei 110 % Zoom
   sichtbar neben der Mitte, weil Rand und Schrift getrennt aufs Pixelraster gesetzt werden. */
.q { width: 20px; height: 20px; border: none; border-radius: 50%; background: none; color: #55504a; padding: 0; flex-shrink: 0; }
.q svg { display: block; width: 20px; height: 20px; pointer-events: none; }
.r { position: relative; }
.info { position: absolute; left: 0; right: 0; top: calc(100% - 4px); z-index: 45; display: flex; gap: 12px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 38px 12px 12px; font-size: 13.5px; color: var(--ink-soft); box-shadow: 0 10px 30px rgba(38,36,31,0.18); }
.info .zu { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border: none; background: none; font-size: 18px; color: var(--muted); line-height: 1; }
.info img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; flex-shrink: 0; }

.seg { display: flex; flex-wrap: wrap; background: #f0ede7; border-radius: 22px; padding: 3px; gap: 2px; }
.seg button { border: 1.5px solid transparent; background: none; border-radius: 100px; padding: 0 14px; height: 38px; font-size: 14px; font-weight: 600; color: var(--ink); white-space: nowrap; }
.seg button.on { background: #fff; border-color: var(--ink); }
.seg.zwei { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
.seg.zwei button { padding: 0 8px; }
.seg.drei { display: grid; grid-template-columns: 1.5fr 1fr 1fr; width: 100%; }
.seg.drei button { padding: 0 6px; }
@media (max-width: 480px) { .seg.drei button { font-size: 13px; padding: 0 4px; } }
/* Schmale Handys (360 px): kleinere Schrift, damit „Rohstahl“ ganz hineinpasst. Ganz schmale (320 px): Beschriftung darüber, Auswahl über die ganze Breite. */
@media (max-width: 374px) { .seg.drei { grid-template-columns: auto auto auto; gap: 0; } .seg.drei button { font-size: 12px; padding: 0 2px; letter-spacing: -0.01em; } }
@media (max-width: 345px) { .r:has(.seg.drei), .r:has(.seg.tight) { grid-template-columns: minmax(0, 1fr); row-gap: 6px; } .r:has(.seg.drei) > .h, .r:has(.seg.tight) > .h { grid-column: 1; } .seg.drei button { font-size: 13px; } }
.fincard { display: flex; gap: 14px; align-items: center; background: #f4f1eb; border-radius: 12px; padding: 10px; margin: 4px 0 8px; min-height: 124px; }
.fincard img { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #e9e9e9; }
.fincard b { font-size: 15.5px; }
.fincard p { font-size: 13.5px; color: var(--ink-soft); margin: 3px 0 6px; line-height: 1.4; }
.fincard small { display: block; font-size: 11.5px; color: var(--muted); margin-top: 4px; }
.seg.tight { flex-wrap: nowrap; }
.seg.tight button { flex: 1 1 auto; padding: 0 6px; font-size: 13px; }
@media (max-width: 959px) { .r { grid-template-columns: 96px minmax(0, 1fr); } .kf-preview { border-bottom: 14px solid #ebe6dc; } }

.tiles { display: flex; gap: 8px; }
.tile { position: relative; width: 78px; background: #f0ede7; border: 1.5px solid transparent; border-radius: 10px; padding: 7px 4px 6px; font-size: 12.5px; font-weight: 600; color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.tile svg { width: 34px; height: 34px; }
.tile.on { background: #fff; border-color: var(--ink); }

.pgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; width: 100%; }
.ptile { position: relative; background: #f0ede7; border: 1.5px solid transparent; border-radius: 10px; padding: 7px 3px 6px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 12.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.ptile svg { width: 100%; height: 30px; display: block; }
.ptile.on { background: #fff; border-color: var(--ink); }
.tile.pop::after, .ptile.pop::after { content: ""; position: absolute; top: 5px; right: 6px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.tile.pop:hover::before, .tile.pop:focus-visible::before, .ptile.pop:hover::before, .ptile.pop:focus-visible::before { content: "Am häufigsten gewählt"; position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 7px 11px; border-radius: 10px 10px 10px 2px; white-space: nowrap; z-index: 40; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.r:has(.pgrid) { align-items: start; } .r:has(.pgrid) > .l { min-height: 56px; }
.info-profil { flex-direction: column; align-items: stretch; }
.ip-bilder { display: flex; gap: 12px; align-items: center; }
.ip-bilder svg { flex: 1; min-width: 0; height: 132px; }
.ip-bilder img { width: 132px; height: 132px; object-fit: cover; border-radius: 8px; flex-shrink: 0; }
@media (max-width: 480px) { .ip-bilder svg { height: 104px; } .ip-bilder img { width: 96px; height: 96px; } }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { position: relative; background: #f0ede7; border: 1.5px solid transparent; border-radius: 100px; height: 36px; padding: 0 12px; font-size: 13.5px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.chip.on { background: #fff; border-color: var(--ink); }
.chip.pop::after { content: ""; position: absolute; top: 3px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.chip.pop:hover::before, .chip.pop:focus-visible::before { content: "Am häufigsten gewählt"; position: absolute; bottom: calc(100% + 9px); left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; font-size: 12.5px; font-weight: 600; padding: 7px 11px; border-radius: 10px 10px 10px 2px; white-space: nowrap; z-index: 40; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,0.2); }
.legende { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 6px; vertical-align: 1px; }

.sl { position: relative; height: 38px; flex: 1; min-width: 0; --p: 0.5; }
.sl input { position: absolute; inset: 0; width: 100%; height: 38px; margin: 0; -webkit-appearance: none; appearance: none; background: transparent; cursor: pointer; }
.sl input::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(to right, var(--ink) calc(var(--p) * 100%), #cfc8bb 0); }
.sl input::-moz-range-track { height: 2px; background: #cfc8bb; }
.sl input::-webkit-slider-thumb { -webkit-appearance: none; width: 26px; height: 26px; margin-top: -12px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,0.18); }
.sl input::-moz-range-thumb { width: 23px; height: 23px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); }
.num { display: flex; align-items: center; flex-shrink: 0; width: 84px; height: 38px; border-radius: 19px; background: #fff; border: 1.5px solid var(--ink); padding: 0 12px 0 8px; cursor: text; }
.num:focus-within { outline: 2px solid var(--gold-deep); outline-offset: 2px; }
.num input { width: 100%; min-width: 0; border: none; outline: none; background: transparent; text-align: right; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); padding: 0 4px 0 0; }
.num span { font-size: 13px; font-weight: 600; color: var(--muted); }
/* Höhe und Breite am Handy (Martin, 25.11.2026: Variante 4 aus entwurf/neubau/regler-mockup.html): Beschriftung und Wert mit − und + in einer
   Zeile, darunter der Balken über die ganze Breite und etwas dicker. So lassen sich auch halbe Zentimeter gut treffen. Am Computer wie bisher. */
/* Immer mit „.fein“ davor: „.pm“ heisst auch das Plus-Minus bei „Gut zu wissen“. */
.fein { display: contents; } .fein .pm { display: none; }
@media (max-width: 959px) {
  .r:has(.sl) { grid-template-columns: minmax(0, 1fr) auto; row-gap: 4px; }
  .r:has(.sl) > .l { grid-row: 1; }
  .r:has(.sl) > .c { display: contents; }
  .r:has(.sl) > .h { grid-column: 1 / -1; margin-top: 0; }
  .r:has(.sl) .sl { grid-column: 1 / -1; grid-row: 2; }
  .fein { display: flex; align-items: center; gap: 8px; grid-row: 1; }
  .fein .pm { display: block; flex: none; width: 40px; height: 40px; border-radius: 50%; border: 1.5px solid var(--ink); background: #fff; color: var(--ink); font: 400 22px/1 'Source Sans 3', sans-serif; padding: 0; touch-action: manipulation; }
  .fein .pm:active { background: #f0ede7; }
  .num { height: 40px; border-radius: 20px; }
  .sl input::-webkit-slider-runnable-track { height: 5px; border-radius: 5px; }
  .sl input::-moz-range-track { height: 5px; border-radius: 5px; }
  .sl input::-webkit-slider-thumb { width: 30px; height: 30px; margin-top: -13px; }
  .sl input::-moz-range-thumb { width: 27px; height: 27px; }
}
@media (max-width: 959px) { .p-price b, .p-price small { display: none; } .p-price { padding-bottom: 10px; } .p-price h1 { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 19px; color: var(--ink); } }

/* Acht Farben in zwei gleichen Reihen. Punkt so gross wie die Pillen darueber (38 px, Martin 25.11.). Punkt und Ring sind EINE Vektorgrafik:
   Als Rand und Umrandung setzte der Browser beide bei 110 % Zoom getrennt aufs Pixelraster, der Punkt sass dann neben der Mitte des Rings. */
.swatches { display: grid; grid-template-columns: repeat(4, 38px); gap: 14px; padding: 2px 0; }
.sw { position: relative; width: 38px; height: 38px; border: none; border-radius: 50%; padding: 0; background: none; }
.sw svg { position: absolute; left: -5px; top: -5px; width: 48px; height: 48px; overflow: visible; pointer-events: none; }
.sw .punkt { fill: var(--f); stroke: rgba(0,0,0,0.2); stroke-width: 1; }
.sw .ring { fill: none; stroke: none; }
.sw.on .ring { stroke: var(--ink); stroke-width: 2; }
.r:has(.swatches) > .h { margin-top: 9px; }
@media (max-width: 345px) { .swatches { gap: 12px 9px; } }

.buybox { border-top: 1px solid var(--line-on-card); margin-top: 12px; padding-top: 16px; }
.summe { margin-bottom: 14px; font-size: 14.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.summe > div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 3px 0; }
.summe .ges { color: var(--ink); font-weight: 700; font-size: 16px; }
.summe .ges b { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 22px; }
.summe small { display: block; font-size: 12.5px; color: var(--muted); text-align: right; }
.buyrow { display: flex; gap: 10px; }
.buy.zum { display: flex; align-items: center; justify-content: center; background: var(--ok); }
.buy.zum:hover { background: #2f5a40; }
.gelegt { margin-top: 12px; background: var(--ok-wash); color: #24492f; border-radius: 10px; padding: 11px 13px; font-size: 13.5px; }
.qty { display: flex; align-items: center; background: #f0ede7; border-radius: 100px; padding: 0 4px; flex-shrink: 0; }
.qty button { width: 36px; height: 50px; border: none; background: none; font-size: 19px; color: var(--ink); }
.qty input { width: 40px; height: 34px; border: none; border-radius: 8px; background: none; text-align: center; font-size: 16px; font-weight: 700; color: var(--ink); padding: 0; }
.qty input:focus { outline: none; background: #fff; box-shadow: 0 0 0 2px var(--ink); } /* Stueckzahl laesst sich auch eintippen */
.buy { flex: 1; background: var(--ink); color: #fff; border: none; border-radius: 100px; height: 50px; font-size: 16px; font-weight: 700; }
.buy:hover { background: #000; }
.buy:disabled, .buy:disabled:hover { background: #dedad1; color: #8d867b; cursor: not-allowed; }
/* Ab 10 Stueck (MAX_KORB + 1): Hinweis auf die Anfrage, der Warenkorb-Knopf ist dann grau */
.mehr { margin-top: 12px; background: #f4f1eb; border-radius: 12px; padding: 14px 14px 14px; font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
.mehr strong, .qs-hinweis strong { display: block; font-size: 15.5px; color: var(--ink); margin-bottom: 3px; }
.mehr .buy { display: block; width: 100%; flex: none; margin-top: 12px; }
.qs .buy[hidden] { display: none; }
.qs .buy + .buy { margin-top: 10px; }
.greens { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-direction: column; gap: 4px; font-size: 13.5px; color: var(--ink-soft); }
.greens li::before { content: ""; display: inline-block; width: 0.92em; height: 0.92em; vertical-align: -0.1em; -webkit-mask: var(--haken) center / contain no-repeat; mask: var(--haken) center / contain no-repeat; background-color: var(--ok); margin-right: 8px; }
/* Adresse der Maske direkt statt ueber var(--haken), sonst flackern die Haken, wenn ein Skript Angaben an einem Elternelement aendert (siehe basis.css). */
.greens li::before {
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E");
}
.payrow { margin-top: 12px; display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.payrow { flex-wrap: wrap; }
.payrow img { height: 24px; width: auto; }

/* Mengenabfrage vor dem Hineinlegen in den Warenkorb: auf dem Handy als Blatt von unten */
.qs-dim { position: fixed; inset: 0; z-index: 190; background: rgba(20,18,14,0.55); opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s; }
.qs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 200; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -10px 30px rgba(0,0,0,0.25);
  padding: 24px max(20px, var(--safe-l)) calc(22px + env(safe-area-inset-bottom, 0px)) max(20px, var(--safe-r)); transform: translateY(105%); visibility: hidden; transition: transform 0.28s ease, visibility 0.28s; }
body.qs-auf { overflow: hidden; }
body.qs-auf .qs-dim { opacity: 1; visibility: visible; }
body.qs-auf .qs { transform: none; visibility: visible; }
/* Am Desktop steht die Mengenabfrage als Fenster in der Bildschirmmitte statt als Blatt von unten. */
@media (min-width: 960px) {
  .qs { left: 50%; right: auto; bottom: auto; top: 50%; width: 440px; border-radius: 18px; padding: 28px 28px 26px; box-shadow: 0 24px 60px rgba(0,0,0,0.3);
    transform: translate(-50%, -46%); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s; }
  body.qs-auf .qs { transform: translate(-50%, -50%); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) { .qs, .qs-dim { transition: none; } }
.qs h2 { font-size: 21px; padding-right: 40px; }
.qs-hinweis { background: #f4f1eb; border-radius: 10px; padding: 11px 12px; font-size: 14.5px; margin: 12px 0 18px; }
.qs-zeile { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.qs-preis { text-align: right; }
.qs-preis b { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 25px; font-variant-numeric: tabular-nums; display: block; line-height: 1.15; }
.qs-preis small { font-size: 12.5px; color: var(--muted); }
.qs .buy { display: block; width: 100%; flex: none; }
.qs-zu { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border: none; background: none; font-size: 26px; line-height: 1; color: var(--muted); }
.kf-bar { transition: transform 0.25s ease; }
.kf-bar.weg { transform: translateY(110%); }
.kf-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: #fff; border-top: 1px solid var(--line);
  padding: 10px max(16px, var(--safe-l)) calc(10px + env(safe-area-inset-bottom, 0px)) max(16px, var(--safe-r)); display: flex; align-items: center; gap: 12px; }
.kf-bar .price { flex: 1; min-width: 0; }
.kf-bar .price b { font-family: 'Archivo', sans-serif; font-weight: 800; font-size: 20px; font-variant-numeric: tabular-nums; display: block; line-height: 1.15; }
.kf-bar .price small { font-size: 12px; color: var(--muted); }
.kf-bar .buy { flex: 0 0 auto; padding: 0 22px; height: 48px; font-size: 15px; }

@media (min-width: 960px) {
  body { padding-bottom: 0; }
  .kf { display: grid; grid-template-columns: minmax(0, 1fr) 452px; gap: 28px; padding: 24px 24px 48px; align-items: start; }
  /* 132 px = Kopf (108 px) + 24 px Abstand, also genau die Lage ohne Scrollen: Zeichnung und Panel ruecken beim Scrollen nicht mehr
     nach oben, bevor sie stehen bleiben (Martin, 23.11.). Die 108 px am Preis-Block unten gehoeren dazu. */
  .kf-preview { top: 99px; border-radius: 14px; overflow: hidden; }
  .pv-stage { border-radius: 14px; } /* ein Foto hat damit auch unten runde Ecken, nicht nur oben */
  .kf-preview #pv { height: min(560px, calc(100vh - 330px)); }
  /* --frei laeuft beim Umschalten stufenlos von 0 (2D) nach 1 (3D, Fotos): Die Tischplatten-Zeile (50px) gibt ihre Hoehe
     an die Zeichnung ab, die Vorschau bleibt insgesamt gleich hoch. Der 2D/3D-Schalter rueckt um genau diese Hoehe
     nach oben und bleibt damit an derselben Stelle. */
  .kf-preview.ohne-platte #pv, .kf-preview #pv { height: calc(min(560px, calc(100vh - 330px)) + 50px * var(--frei, 0)); }
  .pv-platte { height: calc(50px * (1 - var(--frei, 0))); overflow: hidden; box-sizing: border-box; padding-top: 0; padding-bottom: calc(2px * (1 - var(--frei, 0))); }
  .pv-ansicht { bottom: calc(10px + 50px * var(--frei, 0)); }
  .pv-thumbs button { width: 68px; height: 68px; }
  /* Mittig über margin statt justify-content: Passen nicht alle Bilder hinein, wäre sonst das erste abgeschnitten und nicht erreichbar. */
  .pv-thumbs { padding: 4px 14px 14px; } .pv-thumbs > :first-child { margin-left: auto; } .pv-thumbs > :last-child { margin-right: auto; }
  .panel { border-radius: 14px; padding: 22px 24px 24px; }
  .r { grid-template-columns: 122px minmax(0, 1fr); }
  .kf-bar { display: none; }
  /* Titel und Preis bleiben beim Scrollen oben im Panel stehen, auf Hoehe der Vorschau (Martin, 20.11.: "aehnlich wie auf mobil").
     Sobald unten die Summe mit dem Kaufknopf ganz zu sehen ist, scrollt der Block wieder mit weg (--weg, gesetzt vom Skript):
     Es ist immer genau ein Preis im Blick. Im Ruhezustand sieht alles aus wie vorher: Der aeussere Kasten ragt 24 px ueber die
     weisse Box hinaus (der Abstand zwischen Kopf und Box) und links und rechts 1 px, damit an den Kanten auch bei 110 % Zoom
     kein weisser Strich der Box stehen bleibt. */
  .p-price { position: sticky; top: calc(75px - var(--weg, 0px)); /* --weg setzt das Skript direkt an diesem Element */ z-index: 40; margin: -46px -25px 8px; padding: 24px 1px 0; border-bottom: none;
    /* Der Abstand ueber dem Block (24 px) und die Flaeche hinter seinen runden Ecken (14 px) sind immer in der Farbe des Hintergrunds
       gefuellt, nicht erst beim Stehenbleiben: So blitzt beim Scrollen nichts durch (Martin, 20.11.). Im Ruhezustand liegt diese Flaeche
       genau ueber dem Hintergrund der Seite und ist nicht zu sehen. */
    background: linear-gradient(#ebe6dc, #ebe6dc) top / 100% 38px no-repeat; }
  .p-price-in { position: relative; background: #fff; border-radius: 14px 14px 0 0; padding: 22px 24px 15px; }
  .p-price-in::after { content: ""; position: absolute; left: 24px; right: 24px; bottom: 0; height: 1px; background: var(--line-on-card); }
  .p-price.klebt .p-price-in { box-shadow: 0 8px 12px -10px rgba(38, 36, 31, 0.28); }
  .p-price.klebt .p-price-in::after { left: 0; right: 0; }
}

/* Handy: Header, Zeichnung und Titel bleiben stehen. Tischplatten-Zeile und Bildergalerie bleiben ebenfalls
   an ihrem Platz, die weisse Box schiebt sich beim Scrollen darueber. Die Optionen laufen unter dem Titel durch. */
@media (max-width: 959px) {
  .kf-preview { display: contents; }
  /* Zeichnung in 2D und 3D gleich hoch. Darunter ein Streifen fuer die beiden Knoepfe, damit sie nichts verdecken. */
  .kf-preview #pv, .kf-preview.ohne-platte #pv { height: clamp(150px, 21vh, 200px); }
  .pv-stage { position: sticky; top: var(--kopfH, 75px); z-index: 30; background: #ebe6dc; padding-bottom: 46px; }
  .pv-ansicht { bottom: 7px; }
  /* Der Tischplatten-Knopf liegt links im Streifen der Zeichnung und braucht keine eigene Zeile mehr. */
  .pv-platte { position: sticky; top: calc(var(--kopfH, 75px) + var(--stageH, 214px) - 46px); margin-top: -46px; height: 46px; padding: 7px 12px; z-index: 31; flex-direction: row; pointer-events: none; }
  .pv-platte button { pointer-events: auto; }
  .pv-platte span { display: none; }
  .pv-thumbs { position: sticky; top: calc(var(--kopfH, 75px) + var(--stageH, 214px)); z-index: 10; padding-top: 10px; padding-bottom: 22px; }
  .p-price { position: sticky; top: calc(var(--kopfH, 75px) + var(--stageH, 184px) - 1px); z-index: 50; background: transparent; padding: 0; border-bottom: none;
    margin: -18px calc(-1 * max(16px, var(--safe-l))) 8px calc(-1 * max(16px, var(--safe-r))); }
  .p-price.klebt { background: #ebe6dc; }
  .p-price-in { background: #fff; border-radius: 14px 14px 0 0; padding: 16px max(16px, var(--safe-l)) 11px max(16px, var(--safe-r)); border-bottom: 1px solid var(--line-on-card); }
  .num input { scroll-margin-top: calc(var(--kopfH, 75px) + var(--stageH, 184px) + 100px); }
}
