/* =============================================================
   MARKEN – proZerspanung Website
   ============================================================= */

/* ----------------------------------------------------------------
       MARKEN PAGE: page-specific styles
    ----------------------------------------------------------------- */

    /* Featured brands (NINE9 + SLOKY) */
    .featured-brands {
      background: var(--color-schwarz);
      padding: var(--space-2xl) 0;
    }

    .featured-brands__grid {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: var(--space-m);
      margin-top: var(--space-xl);
    }

    @media (max-width: 767px) {
      .featured-brands__grid { grid-template-columns: 1fr; }
    }

    .featured-brand {
      position: relative;
      border-radius: var(--radius-m);
      overflow: hidden;
      background: #111;
      aspect-ratio: 4 / 3;
      display: flex;
      flex-direction: column;
      justify-content: flex-end;
      text-decoration: none;
      transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .featured-brand:hover { transform: translateY(-4px); }

    .featured-brand__img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center;
      opacity: 0.52;
      transition: transform 0.5s ease, opacity 0.3s ease;
    }

    .featured-brand:hover .featured-brand__img {
      transform: scale(1.04);
      opacity: 0.62;
    }

    .featured-brand__overlay {
      position: absolute;
      inset: 0;
      background: linear-gradient(
        to top,
        rgba(28, 28, 28, 0.96) 0%,
        rgba(28, 28, 28, 0.55) 45%,
        rgba(28, 28, 28, 0.08) 100%
      );
    }

    .featured-brand__content {
      position: relative;
      z-index: 1;
      padding: var(--space-l);
    }

    .featured-brand__badge {
      display: inline-block;
      font-family: var(--font-heading);
      font-size: 0.6rem;
      font-weight: 700;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      /* Chip-Hintergrund liegt auf dunklem Bild-Overlay, --color-rot dort nur ~4,4:1,
         --color-rot-hover erreicht sicher >4,5:1 */
      color: var(--color-rot-hover);
      background: rgba(238, 62, 73, 0.12);
      border: 1px solid rgba(238, 62, 73, 0.28);
      padding: 0.2rem 0.625rem;
      border-radius: 100px;
      margin-bottom: var(--space-s);
    }

    .featured-brand__name {
      font-family: var(--font-cta);
      font-size: clamp(2.25rem, 4vw, 3.25rem);
      font-weight: 400;
      color: var(--color-weiss);
      line-height: 1;
      margin-bottom: 0.5rem;
    }

    .featured-brand__desc {
      font-family: var(--font-body);
      font-size: 0.875rem;
      color: rgba(255, 255, 255, 0.6);
      line-height: 1.65;
      margin-bottom: var(--space-m);
      max-width: 36ch;
    }

    .featured-brand__link {
      display: inline-flex;
      align-items: center;
      gap: 0.375rem;
      font-family: var(--font-heading);
      font-size: 0.8125rem;
      font-weight: 700;
      color: var(--color-weiss);
      letter-spacing: 0.04em;
      transition: gap 0.2s ease, color 0.15s ease;
    }

    .featured-brand:hover .featured-brand__link {
      color: var(--color-rot-hover);
      gap: 0.625rem;
    }

    /* Brand logo grid */
    .brand-logo-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 1.25rem;
    }

    @media (max-width: 900px) {
      .brand-logo-grid { grid-template-columns: repeat(3, 1fr); }
    }

    @media (max-width: 600px) {
      .brand-logo-grid { grid-template-columns: repeat(2, 1fr); }
    }

    /* Waisen-Karte (allein in der letzten Zeile) zentrieren statt links hängen
       lassen. Selbstheilend über nth-child: greift nur, wenn bei der jeweils
       aktiven Spaltenzahl (4/3/2) wirklich genau 1 Karte übrig bleibt -- bei
       einer künftig anderen Kartenzahl, die glatt aufgeht, greift keine der drei
       Regeln. max-width per calc() aus Spaltenzahl + Gap berechnet, damit die
       Waisen-Karte exakt so breit wie ihre Geschwister bleibt (kein Schätzwert).
       Gleiches Muster wie bei .cat-grid in components.css. */
    @media (min-width: 901px) {
      .brand-logo-grid > .brand-logo-card:last-child:nth-child(4n+1) {
        grid-column: 1 / -1;
        max-width: calc((100% - 3 * 1.25rem) / 4);
        margin-inline: auto;
      }
    }

    @media (min-width: 601px) and (max-width: 900px) {
      .brand-logo-grid > .brand-logo-card:last-child:nth-child(3n+1) {
        grid-column: 1 / -1;
        max-width: calc((100% - 2 * 1.25rem) / 3);
        margin-inline: auto;
      }
    }

    @media (max-width: 600px) {
      .brand-logo-grid > .brand-logo-card:last-child:nth-child(2n+1) {
        grid-column: 1 / -1;
        max-width: calc((100% - 1.25rem) / 2);
        margin-inline: auto;
      }
    }

    .brand-logo-card {
      background: var(--color-weiss);
      border: 1px solid #E8E8E8;
      border-radius: var(--radius-m);
      overflow: hidden;
      transition: box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                  transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                  border-color 0.2s ease;
    }

    .brand-logo-card:hover {
      box-shadow: var(--shadow-card-hover);
      transform: translateY(-2px);
      border-color: #CFCFCF;
    }

    .brand-logo-card__link {
      display: block;
      color: inherit;
      text-decoration: none;
    }

    .brand-logo-card__logo {
      height: 80px;
      background: var(--color-grau-4);
      display: flex;
      align-items: center;
      justify-content: center;
      border-bottom: 1px solid #EEEEEE;
      overflow: hidden;
    }

    .brand-logo-card__logo img {
      max-height: 48px;
      max-width: 140px;
      width: auto;
      height: auto;
      object-fit: contain;
    }

    .brand-logo-card__placeholder {
      font-family: var(--font-cta);
      font-size: 1.25rem;
      font-weight: 400;
      letter-spacing: 0.06em;
      color: var(--color-grau-57);
    }

    .brand-logo-card__info {
      padding: 0.875rem 1rem 1rem;
    }

    .brand-logo-card__name {
      font-family: var(--font-heading);
      font-size: 0.9375rem;
      font-weight: 700;
      color: var(--color-schwarz);
      margin-bottom: 0.2rem;
      line-height: 1.2;
    }

    .brand-logo-card__cat {
      font-family: var(--font-heading);
      font-size: 0.7rem;
      font-weight: 500;
      color: var(--color-grau-57);
      line-height: 1.4;
    }

    /* Dark note strip */
    .brands-note {
      background: var(--color-schwarz);
      border-top: 1px solid rgba(255, 255, 255, 0.06);
      padding: var(--space-l) 0;
    }

    .brands-note__inner {
      display: flex;
      align-items: center;
      gap: var(--space-l);
      justify-content: space-between;
      flex-wrap: wrap;
    }

    .brands-note__text {
      font-family: var(--font-heading);
      font-size: 0.875rem;
      color: rgba(255, 255, 255, 0.55);
      max-width: 52ch;
      line-height: 1.6;
    }

    .brands-note__text strong {
      color: rgba(255, 255, 255, 0.85);
    }
