/* ============================================================================
   Klickhome · Markenseiten
   ----------------------------------------------------------------------------
   Gilt fuer:
     - Markenseite   (Hersteller-Artikelliste): custom/kh_brand_header.tpl
                     + Volltext unten aus productlist/index.tpl (#kh-brand-text)
     - Markenuebersicht "Unsere Marken": page/manufacturers.tpl
                     + custom/kh_brand_tiles.tpl
   Nur Tokens aus brand.css, keine neuen Farben. Handy zuerst.
   Geladen in layout/header.tpl (nicht in der Kasse noetig, aber unschaedlich).
   ============================================================================ */

/* ===== 1) Markenseiten-Kopf =============================================== */

.kh-brand-head {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0 0 18px;
}

.kh-brand-head__logo {
  flex: 0 0 auto;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 12px;
}

.kh-brand-head__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.kh-brand-head__body {
  min-width: 0;
}

.kh-brand-head__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 8px;
}

.kh-brand-head__intro {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.6;
  color: var(--color-text-muted);
  max-width: 72ch;
  margin: 0;
}

.kh-brand-head__more {
  display: inline;
  white-space: nowrap;
  font-weight: 700;
  color: var(--brand-primary);
  text-decoration: underline;
}

.kh-brand-head__more:hover,
.kh-brand-head__more:focus {
  color: var(--brand-primary-dark);
}

@media (min-width: 768px) {
  .kh-brand-head--logo {
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
  }
  .kh-brand-head__logo {
    width: 132px;
    height: 132px;
    padding: 12px;
  }
  .kh-brand-head__title {
    font-size: 32px;
  }
  .kh-brand-head__intro {
    font-size: 16px;
  }
}

/* ===== 2) Volltext unter den Produkten ==================================== */

.kh-brand-text {
  /* Sprungziel von "mehr lesen" — Abstand fuer den klebenden Kopf */
  scroll-margin-top: 96px;
  max-width: 78ch;
  margin: 28px 0 8px;
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.7;
  color: var(--color-text-muted);
}

.kh-brand-text h2,
.kh-brand-text h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--color-text);
  margin: 22px 0 8px;
}

.kh-brand-text h2 { font-size: 20px; }
.kh-brand-text h3 { font-size: 17px; }
.kh-brand-text > :first-child { margin-top: 0; }

.kh-brand-text p { margin: 0 0 12px; }

.kh-brand-text ul,
.kh-brand-text ol {
  margin: 0 0 14px;
  padding-left: 20px;
}

.kh-brand-text li { margin-bottom: 6px; }

.kh-brand-text strong { color: var(--color-text); }

.kh-brand-text a {
  color: var(--brand-primary);
  text-decoration: underline;
}

/* ===== 3) Uebersicht "Unsere Marken" ====================================== */

.kh-brands__h1 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  color: var(--color-text);
  margin: 0 0 6px;
}

.kh-brands__lead {
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--color-text-muted);
  max-width: 70ch;
  margin: 0 0 4px;
}

.kh-brands__index {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 20px;
}

.kh-brands__index a,
.kh-brands__index span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 8px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.kh-brands__index a {
  color: var(--brand-primary);
  background: var(--brand-tint-soft);
  text-decoration: none;
}

.kh-brands__index a:hover,
.kh-brands__index a:focus {
  color: var(--brand-on-primary);
  background: var(--brand-primary);
}

.kh-brands__index span {
  color: var(--color-text-soft);
  background: var(--color-surface-soft);
  opacity: .55;
}

.kh-brands__letter {
  scroll-margin-top: 96px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin: 22px 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-line);
}

.kh-brands__row {
  margin-bottom: 4px;
}

.kh-brands__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100%;
  margin-bottom: 16px;
  padding: 14px 10px;
  text-align: center;
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 12px;
  text-decoration: none;
  transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.kh-brands__card:hover,
.kh-brands__card:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 6px 18px rgba(var(--brand-primary-rgb), .12);
  transform: translateY(-2px);
  text-decoration: none;
}

.kh-brands__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 92px;
  margin-bottom: 10px;
}

.kh-brands__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

.kh-brands__initial {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-tint-soft);
  color: var(--brand-primary);
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
}

.kh-brands__name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--color-text);
}

.kh-brands__teaser {
  margin-top: 6px;
  font-family: var(--font-body);
  font-size: 12.5px;
  line-height: 1.45;
  color: var(--color-text-soft);
}

@media (min-width: 768px) {
  .kh-brands__h1 { font-size: 32px; }
  .kh-brands__logo { height: 108px; }
}
