/* PASSENDE ARTIKEL (passend.js, 14.11.2026): unter den Angaben einer Karte
   "Mehr aus <Set>" und "Weitere <Name>-Karten" - je eine waagerecht
   rollende Reihe mit der einen Kachel des Shops (.card, styles.css) -,
   darueber klein dieselbe Karte in anderer Ausfuehrung.
   Kartenseite: unter beiden Spalten (.produkt-seite ist ein Raster).
   Kartenfenster: in der rechten Spalte unter dem Kaufblock. */

/* Eine Spalte, die nie breiter wird als ihr Platz - sonst zoege die
   rollende Reihe die Seite auf ihre ganze Laenge auf. */
.passend { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; min-width: 0; }
.passend-abschnitt { min-width: 0; }
.passend[hidden] { display: none; }
.produkt-seite > .passend {
  grid-column: 1 / -1; margin-top: 8px; padding-top: 32px; border-top: 1px solid var(--border);
}
.detail-info > .passend { gap: 26px; padding: 26px 32px 30px; }

/* Kopf je Abschnitt: Ueberschrift, "Alle ansehen", rechts die Pfeile. */
.passend-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-bottom: 12px; }
.passend-kopf .passend-titel {
  margin: 0; font-family: var(--font-display); font-weight: 800; font-size: 24px; line-height: 1.2;
  letter-spacing: -0.02em; color: var(--navy);
}
/* Im Fenster ist die Spalte schmal: Ueberschrift allein, darunter "Alle
   ansehen" links und die Pfeile rechts. */
.detail-info .passend-kopf .passend-titel { flex-basis: 100%; font-size: 19px; }
.passend-alle {
  font-size: 14px; font-weight: 700; color: var(--navy); text-decoration: underline;
  text-decoration-color: var(--gold); text-underline-offset: 5px;
}
.passend-alle:hover { color: var(--gold-ink); }
.passend-pfeile { display: flex; gap: 8px; margin-left: auto; }
.passend-pfeile[hidden] { display: none; }
.passend-pfeil {
  display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border); background: #fff; color: var(--navy); cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease;
}
.passend-pfeil:hover:not(:disabled) { border-color: var(--gold); }
.passend-pfeil:disabled { opacity: .35; cursor: default; }
.passend-pfeil:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }
/* Finger rollen selbst - die Pfeile nur mit Maus. */
@media (hover: none) { .passend-pfeile { display: none; } }

/* Die Reihe: feste Kachelbreite, rollt waagerecht, rastet an den Kacheln ein.
   Oben und unten Luft fuer das Anheben und den Schatten beim Zeigen (.card:hover). */
.passend-reihe {
  /* position: relative haelt auch die unsichtbaren Vorlesetexte der Kacheln
     (.nur-vorleser, position: absolute) in der Reihe - sonst machten die
     Kacheln weit rechts die ganze Seite breiter (gemessen: 2.306 statt 1.425 px). */
  position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: 212px; gap: 16px;
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x proximity; scroll-padding-inline: 4px;
  margin: -6px -4px 0; padding: 6px 4px 18px; scrollbar-width: thin;
}
.passend-reihe > .card { scroll-snap-align: start; }
.detail-info .passend-reihe { grid-auto-columns: 178px; gap: 12px; }

/* Im Fenster gelten fuer .detail-info sonst die Groessen des Fensterkopfs
   (styles.css: .detail-info .chip 24 px; bis R3-10 auch .detail-info h3
   32 px, seitdem .detail-titel) - hier die der Kachel, etwas kleiner. */
.detail-info .passend .card .ttl { font-family: inherit; font-stretch: normal; line-height: 1.3; font-size: 15px; }
.detail-info .passend .chips { margin-top: 4px; }
.detail-info .passend .chip { height: 20px; padding: 0 7px; font-size: 11px; }
.detail-info .passend .card .price { font-size: 19px; }

/* Dieselbe Karte in anderer Sprache, anderem Zustand oder Ausfuehrung. */
.passend-varianten { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.passend-varianten-titel { margin: 0 4px 0 0; font-size: 14px; font-weight: 700; color: var(--navy); }
.passend-variante {
  display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 0 12px; border-radius: 8px;
  font-size: 13px; font-weight: 600; color: var(--text-soft); text-decoration: none;
  background: #fff; border: 1px solid var(--border); transition: border-color .2s ease;
}
.passend-variante span + span::before { content: "·"; margin-right: 8px; color: var(--muted); }
.passend-variante strong { font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.passend-variante:hover { border-color: var(--gold); }
.passend-variante:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

@media (max-width: 900px) {
  .detail-info > .passend { padding: 22px 24px 26px; }
}
/* Handy: gut zwei Kacheln sichtbar (die dritte schaut an), kleinere
   Ueberschrift. Im Fenster rollt dort das ganze Blatt (.detail-box).
   MINDESTENS 156 px je Kachel (Kunden-Rundgang 1, R1-11): Preis ("119,99 €")
   und "Nur 1 verfügbar" brauchen neben dem 44-px-Korbknopf rund 84 px - bei
   320 px waren 44 % nur 127 px, der Knopf lag ueber dem €-Zeichen und
   schnitt "Nur 1 verfüg…" ab. Ab etwa 390 px bleibt es bei 44 %, darunter
   sind es gut anderthalb Kacheln (die zweite schaut an). */
@media (max-width: 640px) {
  .passend { gap: 26px; }
  .produkt-seite > .passend { margin-top: 0; padding-top: 24px; }
  .detail-info > .passend { padding: 20px 16px 24px; }
  .passend-kopf .passend-titel, .detail-info .passend-kopf .passend-titel { font-size: 19px; }
  .passend-reihe, .detail-info .passend-reihe { grid-auto-columns: max(44%, 156px); gap: 10px; }
  .detail-info .passend .chip { height: 19px; padding: 0 6px; }
  .passend-variante { min-height: 40px; }
}
