/* ============================================================
   DRILL-DOWN-KACHELNAVIGATION
   DESIGN_SPEC §3/§4/§8 – Kategorie-Kacheln, Grid 3 -> 2 -> 1
   ============================================================ */

:root {
  /* Brand blues */
  --p24-blue:        #009DDF; /* Akzent: Nav, Kacheltitel, Headings, Links */
  --p24-blue-dark:   #0390CB; /* Hover / Sekundärblau */

  /* CTA oranges */
  --p24-orange:      #F0A500; /* Primär-CTA */
  --p24-orange-dark: #EC830E;

  /* Neutrals */
  --p24-navy:        #1A3C5E;
  --p24-heading:     #333333;
  --p24-text:        #43454B;
  --p24-border:      #E2E2E2;
  --p24-bg-light:    #F2F2F2;
  --p24-white:       #FFFFFF;
  --p24-success:     #3DA300;

  /* Typography */
  --p24-font: "Open Sans", "Helvetica Neue", Arial, sans-serif;

  /* Layout */
  --p24-tile-gap:    24px;
  --p24-content-max: 1240px;
  --p24-radius:      2px;
}

/* ===== Seitenkopf der Drill-Down-Seite (§5) ===== */
.pn24-category-drilldown {
  font-family: var(--p24-font);
  padding: 24px 0 48px;
}
.pn24-category-drilldown .pn24-container {
  max-width: var(--p24-content-max);
  margin: 0 auto;
  padding: 0 16px;
}
.pn24-cat-header {
  margin-bottom: 24px;
}
.pn24-cat-h1 {
  color: var(--p24-blue);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1.2;
  margin: 12px 0 8px;
}
.pn24-cat-intro {
  color: var(--p24-text);
  font-size: .95rem;
  line-height: 1.6;
  max-width: 80ch;
}
.pn24-cat-intro strong { font-weight: 700; }
.pn24-cat-divider {
  border: 0;
  border-top: 1px solid var(--p24-border);
  margin: 20px 0 0;
}

/* ===== Kachel-Raster (§4 / §8.1 – equal-height) ===== */
.p24-category-grid {
  display: grid;
  gap: var(--p24-tile-gap);
  grid-template-columns: repeat(3, 1fr); /* Desktop */
  align-items: stretch;                  /* gleiche Höhe je Reihe (Punkt E) */
  max-width: var(--p24-content-max);
  margin: 0 auto;
}
@media (max-width: 1024px) {
  .p24-category-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .p24-category-grid { grid-template-columns: 1fr; }
}

/* ===== Einzelne Kachel (§3 / §8.1) ===== */
.p24-tile {
  position: relative;
  background: var(--p24-white);
  border: 1px solid var(--p24-border);
  border-radius: var(--p24-radius);
  display: flex;
  flex-direction: column;       /* Zähler kann nach unten */
  height: 100%;                 /* füllt die Reihen-Höhe → equal-height */
  padding: 16px;
  text-decoration: none;
  transition: box-shadow .15s ease, border-color .15s ease;
  overflow: hidden;
}
.p24-tile:hover {
  box-shadow: 0 4px 14px rgba(0, 0, 0, .10);
  border-color: var(--p24-blue);
}

.p24-tile__title {
  color: var(--p24-blue);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1.3;
  margin: 0 0 12px;
  min-height: 3.9em;            /* exakt 3 Zeilen (3 × 1.3em) – kurze Titel bekommen Leerraum */
  display: -webkit-box;
  -webkit-line-clamp: 3;        /* lange Titel auf 3 Zeilen kürzen → Bild startet immer gleich */
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.p24-tile:hover .p24-tile__title { color: var(--p24-blue-dark); }

.p24-tile__img-wrap {
  aspect-ratio: 4 / 3;          /* einheitliche Bildfläche */
  display: flex;
  align-items: center;
  justify-content: center;
}
.p24-tile__img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.p24-tile__count {
  color: #888;
  font-size: .8rem;
  text-align: right;
  margin-top: auto;             /* Zähler immer am unteren Rand */
}

/* ===== TOPSELLER-Badge (§3) ===== */
.p24-tile__badge {
  position: absolute;
  top: 0;
  right: 16px;
  background: #D0021B;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: 4px 8px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  border-radius: 0 0 var(--p24-radius) var(--p24-radius);
  z-index: 2;
}

/* Seitenkopf auch über der Produktliste (unterste Ebene) */
.pn24-cat-header--list { margin-bottom: 12px; }
.pn24-cat-header--list .pn24-cat-h1 { font-size: 1.6rem; }
