/* PRODUKTKACHEL (kachel.js) - Bauer B.
   Umbau nach Felix' PDF (28.10.2026): Bild gross und vorn, Name, Set ·
   Nummer, Zustand-Abzeichen (Farbreihe --zustand-1 … --zustand-7) und
   Sprachkuerzel, Preis gross, runder Korb-Knopf (gruen, wenn drin - Felix'
   Wunsch), Rueckseite beim Zeigen (SPEC §7.1).
   Das Fundament legt hier nur einen schlichten Platzhalter-Stil an. */

.kachel-raster { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1023px) { .kachel-raster { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) { .kachel-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 8px; } }

.kachel {
  display: flex; flex-direction: column; min-width: 0; padding: 10px;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
}
.kachel-bild {
  position: relative; display: grid; place-items: center; aspect-ratio: 5 / 7; overflow: hidden;
  border-radius: 6px; background: var(--inset);
}
.kachel-sealed .kachel-bild { aspect-ratio: 1 / 1; }
.kachel-bild img { display: block; width: auto; height: auto; max-width: 92%; max-height: 92%; }
.kachel-ohne-bild { font-size: 13px; color: var(--muted); }
.slab-note {
  position: absolute; top: 8px; left: 8px; padding: 3px 7px; border-radius: 5px;
  font-size: 12px; font-weight: 800; color: #fff; background: var(--navy);
}
.kachel-name { margin: 8px 0 0; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
.kachel-name a { color: var(--navy); text-decoration: none; }
.kachel-name a:hover { text-decoration: underline; }
.kachel-meta { margin: 2px 0 0; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.kachel-merkmale { display: flex; flex-wrap: wrap; gap: 4px; min-height: 20px; margin: 6px 0 0; }
.zustand, .sprache {
  display: inline-flex; align-items: center; height: 20px; padding: 0 6px; border-radius: 5px;
  font-size: 12px; font-weight: 700; color: var(--text-soft); background: var(--bg-soft);
}
.sprache { background: none; box-shadow: inset 0 0 0 1px var(--field-border); }
/* Farbe je Zustand (Felix, 29.10.2026: Near Mint blau, Light Played
   hellorange ...): ein Punkt links neben dem Zustand, ueberall gleich -
   Sortiment-Kachel, Startseiten-Chip, Kartenfenster (kern.js zustandPunkt).
   Von Mint bis Poor einmal durch den Farbkreis, kalt = gut, warm = bespielt. */
.zustand-punkt {
  flex-shrink: 0; width: 8px; height: 8px; margin-right: 5px; border-radius: 50%; background: var(--zustand);
}
.zustand-1 { --zustand: #7b55d6; } /* Mint: violett */
.zustand-2 { --zustand: #2f6fe0; } /* Near Mint: blau */
.zustand-3 { --zustand: #2e9e5f; } /* Excellent: gruen */
.zustand-4 { --zustand: #9fb12a; } /* Good: gelbgruen */
.zustand-5 { --zustand: #f4a259; } /* Light Played: hellorange */
.zustand-6 { --zustand: #e0612b; } /* Played: orange */
.zustand-7 { --zustand: #c62f2f; } /* Poor: rot */
/* Preis (darunter ggf. der Bestand) links, Knopf rechts; wird es zu eng,
   bricht die Zeile um statt seitlich ueberzustehen. */
.kachel-kauf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; }
.kachel-preisblock { display: flex; flex-direction: column; min-width: 0; margin-right: auto; }
.kachel-preis { font-size: 18px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; white-space: nowrap; }
.kachel-bestand { font-size: 12px; font-weight: 700; color: var(--gold-ink); }
@media (max-width: 400px) { .kachel-preis { font-size: 16px; } }
.kachel-korb {
  display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; padding: 0;
  border: none; border-radius: 8px; cursor: pointer; color: #fff; background: var(--navy);
}
.kachel-korb.drin { background: var(--ok); }
/* Rueckmeldung beim Hineinlegen/Herausnehmen (warenkorb.js, knopfPop setzt
   .pop/.pop-raus; die Keyframes stehen in styles.css, dort aber nur fuer die
   alten Knoepfe .add-btn.rund/.hl-korb). Weniger Bewegung: knopfPop setzt
   nichts, styles.css schaltet Animationen ohnehin ab. */
.kachel-korb.pop { animation: knopf-pop .35s cubic-bezier(.3,.7,.4,1); }
.kachel-korb.pop-raus { animation: knopf-raus .25s ease-out; }
.kachel-korb:disabled { opacity: .5; cursor: not-allowed; }
.kachel-korb:focus-visible, .kachel-name a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

.kachel-skelett { pointer-events: none; }
.kachel-skelett .kachel-bild, .skelett-zeile { background: var(--bg-soft); }
.skelett-zeile { height: 14px; margin-top: 10px; border-radius: 5px; }
.skelett-zeile.kurz { width: 55%; }
