/* =========================================================
   PROXIMA — производители: карточки брендов и плитки на главной
   ========================================================= */

.br-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.br-card {
  display: flex;
  flex-direction: column;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  scroll-margin-top: calc(var(--header-h) + 20px);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.br-card:hover {
  border-color: rgba(47, 138, 114, 0.5);
  box-shadow: 0 18px 40px -30px rgba(8, 11, 10, 0.4);
}
.br-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 14px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.br-card__wordmark {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text);
}
.br-card__count {
  flex: 0 0 auto;
  font-size: 11.5px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.br-card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
}
.br-card__summary {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--muted);
}
.br-card__summary:empty {
  display: none;
}
.br-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}
.br-card__chips li {
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  font-size: 11px;
  color: var(--muted);
}
.br-card__links {
  display: grid;
  gap: 6px;
  margin-bottom: 16px;
}
.br-card__links a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12.5px;
  line-height: 1.35;
  color: var(--text);
  border-bottom: 1px dashed transparent;
  transition: color 0.2s var(--ease);
}
.br-card__links a:hover {
  color: var(--accent);
}
.br-card__links a span {
  flex: 0 0 auto;
  font-size: 11px;
  color: var(--muted);
}
.br-card__more {
  font-size: 11.5px;
  color: var(--muted);
}
.br-card__all {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--accent);
}
.br-card__all span {
  transition: transform 0.2s var(--ease);
}
.br-card__all:hover span {
  transform: translateX(3px);
}

.br-notes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 8px;
}
.br-note {
  padding: 20px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--soft);
}
.br-note b {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
}
.br-note p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
}

/* ---------- плитки брендов на главной ---------- */
.brand-tile--mark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  min-height: 84px;
  text-align: left;
}
.brand-tile__mark {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--text);
}
.brand-tile__meta {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}
.brand-tile--mark:hover .brand-tile__mark {
  color: var(--accent);
}
.brands-foot {
  display: flex;
  justify-content: center;
  margin-top: 22px;
}

/* ---------- тёмная тема ---------- */
.theme-dark .br-card {
  background: var(--dark-2);
  border-color: var(--line-dark);
}
.theme-dark .br-card__head,
.theme-dark .br-card__all {
  border-color: var(--line-dark);
}
.theme-dark .br-card__wordmark,
.theme-dark .br-card__title,
.theme-dark .br-card__links a,
.theme-dark .brand-tile__mark {
  color: var(--on-dark);
}
.theme-dark .br-card__summary,
.theme-dark .br-card__count,
.theme-dark .br-card__more,
.theme-dark .brand-tile__meta {
  color: var(--on-dark-muted);
}
.theme-dark .br-card__chips li {
  background: rgba(255, 255, 255, 0.07);
  color: var(--on-dark-muted);
}
.theme-dark .br-note {
  background: var(--dark-2);
  border-color: var(--line-dark);
}
.theme-dark .br-note p {
  color: var(--on-dark-muted);
}
.theme-dark .brand-tile--mark:hover .brand-tile__mark,
.theme-dark .br-card__links a:hover {
  color: #7fd3ba;
}

/* ---------- адаптив ---------- */
@media (max-width: 1100px) {
  .br-grid,
  .br-notes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 700px) {
  .br-grid,
  .br-notes {
    grid-template-columns: 1fr;
  }
  .br-card {
    padding: 18px;
  }
}

/* ---------- главная: светлая полоса (см. .light-zone в style.css) ----------
   brands.css подключается позже style.css, поэтому светлые значения плиток
   переопределяем здесь — иначе правила .theme-dark ниже по каскаду выигрывают. */
.light-zone .brand-tile {
  background: #fff;
  border-color: var(--line);
  color: #47524d;
}
.light-zone .brand-tile:hover {
  background: var(--soft);
  border-color: rgba(47, 138, 114, 0.45);
  color: var(--accent-2);
}
.light-zone .brand-tile__mark {
  color: var(--text);
}
.light-zone .brand-tile__meta {
  color: var(--muted);
}
.light-zone .brand-tile--mark:hover .brand-tile__mark {
  color: var(--accent);
}
