/* =========================================================
   Belando Betten - Produktkarten + Filter-Chips
   Version 3.2 (02.12.2026)

   Ort: Child-Theme, Ordner belando-assets/karten.css
   Wird von belando-produktkarten.php automatisch geladen.
   NICHT zusaetzlich in Bricks > Benutzerdefinierter Code einfuegen.

   Aufteilung:
   - Layout, Position, Farben, Effekte: hier. Selektoren sind bewusst
     doppelt (z. B. ".bl-card .bl-card__price"), damit sie immer gegen
     abweichende Angaben in den Bricks-Klassen gewinnen.
   - Schriftgroessen und -gewichte: in den Bricks-Klassen (Stil > Typografie).
     Hier stehen nur Standardwerte mit :where(), die jede Bricks-Einstellung
     ueberschreibt.
   - Schriftart: keine Angabe, kommt aus den Theme Styles.
   ========================================================= */

:root {
  --bl-ink: #34373b;
  --bl-text: #5c5f63;
  --bl-mute: #7a7d80;
  --bl-line: #e8e6e2;
  --bl-soft: #f6f5f3;
  --bl-gold: #8a6d33;
  --bl-gold-soft: #c4a65f;
  --bl-radius: 16px;
  --bl-gap: clamp(16px, 2.4vw, 32px);
  --bl-header-h: 80px; /* Startwert; filter.js misst die echte Hoehe des Headers */
}

/* ---------- Raster ---------- */
.bl-grid.bl-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 3vw, 40px) var(--bl-gap);
  width: 100%;
  margin: 0;
  padding-top: clamp(32px, 4vw, 56px);
  list-style: none;
}
@media (max-width: 991px) { .bl-grid.bl-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 767px) { .bl-grid.bl-grid { grid-template-columns: 1fr; gap: 28px; } }

.bl-grid .bl-card { display: block; width: 100%; min-width: 0; }

/* ---------- Karte ---------- */
.bl-card .bl-card__link {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  border-radius: var(--bl-radius);
  overflow: hidden;
  isolation: isolate;
  background: var(--bl-soft);
  color: #fff;
  text-decoration: none;
}
.bl-card .bl-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(to top, rgba(24,22,20,.82) 0%, rgba(24,22,20,.5) 42%, rgba(24,22,20,0) 72%);
  transition: opacity .3s ease;
}
.bl-card .bl-card__link:hover::after { opacity: .86; }
.bl-card .bl-card__link:focus-visible { outline: 3px solid var(--bl-gold); outline-offset: 3px; }

.bl-card .bl-card__link img,
.bl-card .bl-card__img {
  position: absolute !important;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  margin: 0;
  display: block;
  object-fit: cover;
  transition: transform .6s ease, opacity .45s ease;
}
.bl-card .bl-card__img { z-index: 0; }
.bl-card .bl-card__img--hover { z-index: 1; opacity: 0; }
.bl-card .bl-card__link:hover .bl-card__img--hover,
.bl-card .bl-card__link:focus-visible .bl-card__img--hover { opacity: 1; }
.bl-card .bl-card__link:hover img { transform: scale(1.03); }

.bl-card .bl-card__fx {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  color: var(--bl-ink);
  background: rgba(255,255,255,.9);
  border-radius: 999px;
  padding: 4px 12px;
}

.bl-card .bl-card__body {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 3;
  padding: clamp(20px, 2.4vw, 28px);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.bl-card .bl-card__title {
  margin: 0;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -.01em;
  text-shadow: 0 1px 14px rgba(0,0,0,.25);
}
.bl-card .bl-card__text { margin: 0; color: rgba(255,255,255,.92); }

/* Preisbereich: oben Streichpreis + Hauspreis, unten Groesse + Link */
.bl-card .bl-card__price {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: baseline;
  gap: 4px 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.28);
}
.bl-card .bl-card__list {
  grid-column: 1; grid-row: 1;
  white-space: nowrap; color: #fff; opacity: .8;
  text-decoration: line-through;
  border: 0;
}
.bl-card .bl-card__now {
  grid-column: 2 / 4; grid-row: 1;
  white-space: nowrap; color: #fff;
  border: 0;
}
.bl-card .bl-card__size {
  grid-column: 1 / 3; grid-row: 2;
  white-space: nowrap; color: #fff; opacity: .85;
  border: 0;
}
.bl-card .bl-card__go {
  grid-column: 3; grid-row: 2;
  justify-self: end;
  margin: 0;
  color: #fff;
  border: 0;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--bl-gold-soft);
}

/* ---------- Typografie-Standardwerte (Bricks-Klassen haben Vorrang) ---------- */
:where(.bl-card__title) { font-size: clamp(1.75rem, 1.45rem + 1.2vw, 2.25rem); font-weight: 400; }
:where(.bl-card__text)  { font-size: 1rem; font-weight: 400; line-height: 1.45; }
:where(.bl-card__now)   { font-size: 1.25rem; font-weight: 600; }
:where(.bl-card__list)  { font-size: .9375rem; }
:where(.bl-card__go)    { font-size: .9375rem; font-weight: 500; }
:where(.bl-card__size)  { font-size: .875rem; }
:where(.bl-card__fx)    { font-size: .875rem; font-weight: 500; line-height: 1.4; }
:where(.bl-chip)        { font-size: 1rem; }
:where(.bl-count, .bl-note) { font-size: .85rem; }

/* ---------- Filter-Chips ---------- */
.bl-chips.bl-chips {
  position: sticky;
  top: var(--bl-header-h);
  z-index: 10;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--bl-line);
  padding: 14px 0;
}
.bl-chips .bl-chips__row {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  scrollbar-width: none;
  padding-inline: var(--bl-gap);
}
@media (max-width: 767px) { .bl-chips .bl-chips__row { justify-content: flex-start; } }
.bl-chips .bl-chip {
  flex: none;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid var(--bl-line);
  background: #fff;
  color: var(--bl-text);
  letter-spacing: normal;
  text-transform: none;
  cursor: pointer;
  transition: border-color .2s ease, background-color .2s ease, color .2s ease;
}
.bl-chips .bl-chip:hover {
  border-color: var(--bl-gold-soft);
  background: #faf8f2;
  color: var(--bl-ink);
}
.bl-chips .bl-chip[aria-pressed="true"]:hover {
  background: var(--bl-ink);
  border-color: var(--bl-gold-soft);
  color: #fff;
}
.bl-chips .bl-chip[aria-pressed="true"] { background: var(--bl-ink); border-color: var(--bl-ink); color: #fff; }
.bl-chips .bl-chip:focus-visible { outline: 3px solid var(--bl-gold); outline-offset: 2px; }
.bl-chips .bl-count { flex: none; margin-left: 8px; color: var(--bl-mute); }

.bl-note { margin: 14px 0 0; text-align: center; color: var(--bl-mute); }

/* ---------- Hilfen ---------- */
.bl-card[hidden], .bl-section[hidden], .bl-ber[hidden],
.abverkauf-card[hidden], [data-bl-karte][hidden] { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  .bl-card .bl-card__link img,
  .bl-card .bl-card__img,
  .bl-card .bl-card__link::after { transition: none; }
  .bl-card .bl-card__link:hover img { transform: none; }
}

/* ---------- Beratungsseite: mitgebrachte Konfiguration ---------- */
.belando-konfig-box {
  margin: 0 0 20px;
  padding: 16px 18px;
  border: 1px solid var(--bl-gold-soft);
  border-radius: 12px;
  background: #faf8f2;
  color: var(--bl-ink);
}
.belando-konfig-box p { margin: 0; }
.belando-konfig-box__titel { font-weight: 600; margin-bottom: 4px !important; }
.belando-konfig-box__produkt { color: var(--bl-text); }
.belando-konfig-box__preis { font-weight: 600; margin-top: 2px !important; }
.belando-konfig-box__aktionen { margin-top: 8px !important; font-size: .9rem; color: var(--bl-mute); }
.belando-konfig-box__aktionen a,
.belando-konfig-box__aktionen button {
  padding: 0; border: 0; background: none; font: inherit; color: var(--bl-ink);
  text-decoration: underline; text-underline-offset: 3px; cursor: pointer;
}

/* ---------- Sprungmarke zum Produktraster ---------- */
#boxspringbetten {
  scroll-margin-top: calc(var(--bl-header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}