/* ── Brandovi (brand index) ────────────────────────────────────────────────
   Concept: a showroom wall of brand signs. Each panel sits quietly at rest
   (logo gently dimmed) and *powers on* on hover/focus — a thin green light-bar
   ignites along the panel base, the logo lifts to full contrast, the border
   turns brand green, the card rises. A status dot by each count reads amber
   (lit) when the brand has products. Restrained; no ambient glow. */

.brands-head {
  padding-top: 28px;
  padding-bottom: 64px;
  /* Soft showroom spotlight from the top-centre, full-bleed behind the wall */
  background: radial-gradient(115% 62% at 50% -6%, #ffffff 0%, #f4f4f4 58%);
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.brands-hero {
  padding: 12px 0 4px;
}

.brands-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  padding: 7px 13px;
  border-radius: 999px;
  background: rgba(0, 119, 101, 0.10);
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.brands-hero__headline {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 14px;
}

.brands-hero__title {
  font-size: clamp(30px, 3.6vw, 46px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-dark);
  white-space: nowrap;
}

/* The power rail: a hairline reaching off the title, lit at its terminal */
.brands-hero__rule {
  position: relative;
  flex: 1;
  height: 1px;
  min-width: 40px;
  background: linear-gradient(90deg, rgba(0, 119, 101, 0.34), rgba(0, 119, 101, 0));
}

.brands-hero__rule::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  transform: translateY(-50%);
  box-shadow: 0 0 0 3px rgba(0, 119, 101, 0.14), 0 0 11px 1px rgba(0, 119, 101, 0.55);
}

.brands-hero__lead {
  margin-top: 12px;
  max-width: 60ch;
  font-size: clamp(14.5px, 1.4vw, 16px);
  color: var(--text-mid);
}

/* ── The wall ───────────────────────────────────────────────────────────── */
.brand-grid {
  margin-top: 34px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(224px, 1fr));
  gap: 18px;
}

.brand-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-light);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdfc 100%);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
}

.brand-card__logo {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 138px;
  padding: 22px 24px;
}

/* The light-bar that ignites along the panel base when the sign turns on */
.brand-card__logo::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 72%;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  opacity: 0;
  transform: translateX(-50%) scaleX(0.2);
  transition: opacity 0.3s ease, transform 0.4s ease;
}

.brand-card__logo img {
  max-height: 62px;
  max-width: 152px;
  object-fit: contain;
  filter: grayscale(0.55);
  opacity: 0.84;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
}

.brand-card__name-fallback {
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-mid);
  transition: color 0.3s ease;
}

.brand-card__meta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 16px;
  border-top: 1px solid var(--border-light);
  background: #ffffff;
}

.brand-card__texts {
  min-width: 0;
}

.brand-card__name {
  display: block;
  font-weight: 600;
  font-size: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-card__count {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-mid);
}

/* On/off indicator: lit amber when the brand carries products */
.brand-card__dot {
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c4cecb;
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

.brand-card__dot.is-on {
  background: #f4b740;
  box-shadow: 0 0 0 2px rgba(244, 183, 64, 0.18), 0 0 7px rgba(244, 183, 64, 0.55);
}

.brand-card__count-label {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-card__arrow {
  flex: none;
  color: var(--text-mid);
  transition: color 0.25s ease, transform 0.25s ease;
}

/* ── Powered on ─────────────────────────────────────────────────────────── */
.brand-card:hover,
.brand-card:focus-visible {
  border-color: var(--primary);
  box-shadow: 0 14px 32px rgba(0, 94, 82, 0.14);
  transform: translateY(-4px);
}

.brand-card:hover .brand-card__logo::after,
.brand-card:focus-visible .brand-card__logo::after {
  opacity: 1;
  transform: translateX(-50%) scaleX(1);
}

.brand-card:hover .brand-card__logo img,
.brand-card:focus-visible .brand-card__logo img {
  filter: none;
  opacity: 1;
  transform: scale(1.02);
}

.brand-card:hover .brand-card__name-fallback,
.brand-card:focus-visible .brand-card__name-fallback {
  color: var(--text-dark);
}

.brand-card:hover .brand-card__arrow,
.brand-card:focus-visible .brand-card__arrow {
  color: var(--primary);
  transform: translateX(3px);
}

.brand-card:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.brands-empty {
  margin-top: 28px;
  color: var(--text-mid);
}

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 760px) {
  .brands-head {
    padding-bottom: 44px;
  }

  .brands-hero__headline {
    gap: 14px;
  }
}

@media (max-width: 640px) {
  .brand-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
  }

  .brand-card__logo {
    height: 104px;
    padding: 16px 16px;
  }

  .brand-card__logo img {
    max-height: 46px;
    max-width: 118px;
  }

  .brand-card__meta {
    padding: 11px 12px;
  }

  .brand-card__name {
    font-size: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .brand-card,
  .brand-card__logo::after,
  .brand-card__logo img,
  .brand-card__dot,
  .brand-card__arrow {
    transition: none;
  }

  .brand-card:hover,
  .brand-card:focus-visible {
    transform: none;
  }

  .brand-card:hover .brand-card__logo::after,
  .brand-card:focus-visible .brand-card__logo::after {
    transform: translateX(-50%) scaleX(1);
  }
}
