/*! Parkett Dietrich – Grundriss-Explorer v1.0 */
.pdp {
  --pd-accent: #a49076;
  --pd-accent-soft: rgba(164, 144, 118, .35);
  --pd-ink: #292827;
  --pd-text: #5c5c5c;
  --pd-line: #e4dfd8;
  --pd-tint: #f4f1ec;
  --pd-paper: #fff;
  --pd-head: DINCond, "Open Sans", Arial, sans-serif;
  --pd-gap: 24px;
  color: var(--pd-text);
  min-width: 0; max-width: 100%;
}
.pdp *, .pdp *::before, .pdp *::after { box-sizing: border-box; }
.pdp button { font-family: inherit; line-height: inherit; }

/* Filter + Etagen */
.pdp-top { min-width: 0; display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.pdp-filter { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; max-width: 100%; }
.pdp-filter::-webkit-scrollbar { display: none; }
.pdp-chip {
  flex: none; display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 1px solid var(--pd-line); background: var(--pd-paper);
  color: var(--pd-ink); font-size: 13px; letter-spacing: .06em; text-transform: uppercase;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.pdp-chip:hover { border-color: var(--pd-accent); }
.pdp-chip[aria-pressed="true"] { background: var(--pd-ink); border-color: var(--pd-ink); color: #fff; }
.pdp-count { font-size: 11px; opacity: .55; }
.pdp-tabs { display: flex; border-bottom: 1px solid var(--pd-line); max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.pdp-tabs::-webkit-scrollbar { display: none; }
.pdp-tab { flex: none; white-space: nowrap; }
.pdp-tab { padding: 8px 14px; border: 0; border-bottom: 2px solid transparent; background: none; color: var(--pd-text); text-transform: uppercase; font-size: 13px; letter-spacing: .06em; cursor: pointer; }
.pdp-tab[aria-selected="true"] { color: var(--pd-ink); border-color: var(--pd-accent); }
.pdp-tab:not([data-count=""])::after { content: attr(data-count); margin-left: 6px; font-size: 11px; opacity: .6; }
.pdp-tab.is-empty { opacity: .4; }

/* Layout */
.pdp-layout { display: grid; gap: var(--pd-gap); grid-template-columns: 1fr; }
@media (min-width: 960px) {
  .pdp-layout { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
  /* Plan nie höher als das Browserfenster – so bleibt alles auf einen Blick sichtbar */
  .pdp-plan { width: min(100%, calc((100vh - var(--pd-fit, 160px)) * var(--pd-ratio, 1))); justify-self: center; }
  /* Produktkarte scrollt mit (Abstand oben z. B. für eine feste Kopfzeile anpassbar) */
  .pdp .pdp-card { position: sticky; top: var(--pd-sticky-top, 24px); }
}

/* Grundriss */
.pdp-plan { position: relative; background: var(--pd-paper); border: 1px solid var(--pd-line); }
.pdp-plan svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.pdp-room {
  fill: transparent; stroke: transparent; stroke-width: 2; vector-effect: non-scaling-stroke;
  cursor: pointer; transition: fill .2s, stroke .2s, opacity .2s;
}
.pdp-room.is-match { fill: rgba(164, 144, 118, .18); }
.pdp-room.is-active, .pdp-room.is-sel { fill: var(--pd-accent-soft); stroke: var(--pd-accent); }
.pdp-room.is-dim { pointer-events: none; }
/* Ohne Grundriss-Bild: Räume als Schema zeichnen */
.pdp-schematic .pdp-room { fill: var(--pd-tint); stroke: #d6cec2; }
.pdp-schematic .pdp-room.is-match { fill: #e9e2d8; }
.pdp-schematic .pdp-room.is-active, .pdp-schematic .pdp-room.is-sel { fill: var(--pd-accent-soft); stroke: var(--pd-accent); }
.pdp-schematic .pdp-room.is-dim { opacity: .45; }

.pdp-pins { position: absolute; inset: 0; pointer-events: none; }
.pdp-pin {
  --pin: clamp(16px, 2.4vw, 26px);
  position: absolute; width: var(--pin); height: var(--pin); padding: 0;
  transform: translate(-50%, -50%); pointer-events: auto;
  display: grid; place-items: center; border: 0; border-radius: 50%;
  background: var(--pd-ink); color: #fff; box-shadow: 0 0 0 2px #fff, 0 1px 4px rgba(0,0,0,.25);
  font-size: calc(var(--pin) * .46); font-weight: 600; line-height: 1;
  cursor: pointer; transition: transform .15s, background .15s, opacity .2s;
}
.pdp-pin.is-active, .pdp-pin.is-sel { background: var(--pd-accent); transform: translate(-50%, -50%) scale(1.2); z-index: 1; }
.pdp-pin.is-dim { opacity: .15; pointer-events: none; }
.pdp-pin:focus-visible { outline: 3px solid var(--pd-accent); outline-offset: 2px; }
/* Schmaler Grundriss (Handy): Punkte statt Nummern – Räume selbst bleiben antippbar */
.pdp-plan { container-type: inline-size; }
@container (max-width: 600px) {
  .pdp-pin { --pin: 10px; font-size: 0; box-shadow: 0 0 0 1.5px #fff; }
  .pdp-pin.is-active, .pdp-pin.is-sel { transform: translate(-50%, -50%) scale(1.5); }
}

/* Produktkarte */
.pdp-card { position: relative; display: flex; flex-direction: column; background: var(--pd-paper); border: 1px solid var(--pd-line); }
.pdp-media { position: relative; aspect-ratio: 4 / 3; background: var(--pd-tint); overflow: hidden; }
.pdp-media > img, .pdp-media > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; animation: pdp-in .35s ease; }
.pdp-body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.pdp-kicker { margin: 0 0 6px; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--pd-accent); }
.pdp-name { margin: 0 0 16px; font-family: var(--pd-head); font-weight: 700; font-size: 26px; line-height: 1.1; text-transform: uppercase; color: var(--pd-ink); }
.pdp-hint { margin: -6px 0 0; font-size: 14px; }
.pdp-hint:empty { display: none; }
.pdp-cta {
  margin-top: auto; display: inline-flex; gap: 10px; align-items: center;
  padding: 10px 18px; background: var(--pd-ink); color: #fff; text-decoration: none;
  font-size: 14px; letter-spacing: .08em; text-transform: uppercase; transition: background .15s;
}
.pdp-cta:hover, .pdp-cta:focus-visible { background: var(--pd-accent); color: #fff; }
.pdp-cta[hidden] { display: none; }
.pdp-card.is-empty .pdp-media {
  background: repeating-linear-gradient(90deg, var(--pd-tint) 0 46px, #ece6de 46px 48px),
              var(--pd-tint);
}

/* Liste */
.pdp-list {
  list-style: none; margin: var(--pd-gap) 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); column-gap: var(--pd-gap);
}
.pdp-li { display: flex; align-items: center; border-bottom: 1px solid var(--pd-line); transition: background .15s; }
.pdp-li[hidden] { display: none; }
.pdp-li.is-active, .pdp-li.is-sel { background: var(--pd-tint); }
.pdp-item {
  flex: 1; min-width: 0; display: flex; gap: 12px; align-items: center;
  padding: 10px 6px; border: 0; background: none; text-align: left;
  color: var(--pd-ink); font-size: 14px; cursor: pointer;
}
.pdp-num {
  flex: none; width: 22px; height: 22px; display: grid; place-items: center; border-radius: 50%;
  background: var(--pd-ink); color: #fff; font-size: 11px; font-weight: 600; transition: background .15s;
}
.pdp-li.is-active .pdp-num, .pdp-li.is-sel .pdp-num { background: var(--pd-accent); }
.pdp-go { padding: 10px 12px; color: var(--pd-accent); text-decoration: none; }
.pdp-go:hover { color: var(--pd-ink); }
.pdp-item:focus-visible, .pdp-go:focus-visible, .pdp-chip:focus-visible { outline: 2px solid var(--pd-accent); outline-offset: -2px; }

/* Karussell – nur auf Handy/Tablet */
.pdp-carousel { display: none; }
@media (max-width: 959px) {
  .pdp .pdp-card { display: none; }
  .pdp-layout { gap: 12px; }
  /* Plan so begrenzen, dass das Karussell darunter noch ins Bild passt */
  .pdp-plan {
    width: min(100%, calc((100vh - var(--pd-fit-mobile, 270px) - var(--pd-inset, 0px)) * var(--pd-ratio, 1)));
    width: min(100%, calc((100svh - var(--pd-fit-mobile, 270px) - var(--pd-inset, 0px)) * var(--pd-ratio, 1)));
    justify-self: center;
  }
  /* Filter und Etagen kompakter */
  .pdp-top { gap: 8px; margin-bottom: 10px; }
  .pdp-chip { padding: 6px 10px; font-size: 12px; gap: 6px; }
  .pdp-tab { padding: 6px 10px; font-size: 12px; }
  .pdp-carousel { display: block; min-width: 0; }
  .pdp-chead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
  .pdp-ccount { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--pd-text); }
  .pdp-arrows { display: flex; gap: 6px; }
  .pdp-arrow {
    width: 36px; height: 36px; display: grid; place-items: center; padding: 0;
    border: 1px solid var(--pd-line); background: var(--pd-paper); color: var(--pd-ink);
    font-size: 22px; line-height: 1; cursor: pointer;
  }
  .pdp-arrow:disabled { opacity: .35; cursor: default; }
  .pdp-track {
    list-style: none; margin: 0; padding: 0 7% 4px; display: flex; gap: 10px;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
  }
  .pdp-track::-webkit-scrollbar { display: none; }
  .pdp-slide {
    flex: 0 0 86%; scroll-snap-align: center; display: flex; min-height: 112px;
    background: var(--pd-paper); border: 1px solid var(--pd-line); transition: border-color .2s, box-shadow .2s;
  }
  .pdp-slide[hidden] { display: none; }
  .pdp-slide.is-sel { border-color: var(--pd-accent); box-shadow: inset 0 0 0 1px var(--pd-accent); }
  .pdp-smedia { position: relative; flex: 0 0 112px; background: var(--pd-tint); overflow: hidden; }
  .pdp-smedia > img, .pdp-smedia > svg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
  .pdp-sbody { flex: 1; min-width: 0; padding: 10px 12px; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
  .pdp-sbody .pdp-kicker { font-size: 11px; margin-bottom: 3px; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pdp-sname {
    margin: 0 0 8px; font-family: var(--pd-head); font-weight: 700; font-size: 17px; line-height: 1.15;
    text-transform: uppercase; color: var(--pd-ink);
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  }
  .pdp-slink { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--pd-accent); text-decoration: none; font-weight: 600; }
  .pdp-slink:hover { color: var(--pd-ink); }
}

@keyframes pdp-in { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .pdp * { transition: none !important; animation: none !important; } }
