/* ── Каталог пластиков (/materials/): поиск + фильтр (типы/свойства/палитра) +
   сетка карточек с hero-картинкой. var(--radius) везде, фильтрация на WS. ───── */
.mat { padding: clamp(24px, 4vw, 48px) clamp(16px, 4vw, 48px); }
.mat__title {
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 800; letter-spacing: -0.03em; margin: 0 0 12px; color: var(--fg);
}
.mat__intro {
  color: var(--muted); font-weight: 300; line-height: 1.6;
  margin: 0 0 20px; max-width: 64ch; font-size: 1rem;
}
.mat-search {
  width: 100%; max-width: 520px; height: 46px; padding: 0 16px;
  font: inherit; color: var(--fg); background: var(--bg-2);
  border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s;
}
.mat-search:focus { outline: none; border-color: var(--accent); }
.mat-search::placeholder { color: var(--muted); opacity: .7; }

/* ── фильтр: группы (тип / свойства / цвет) ── */
.mat-filters { display: flex; flex-direction: column; gap: 16px; margin: 22px 0 28px; }
.mat-filter-group { display: flex; flex-direction: column; gap: 8px; }
.mat-filter-label {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted);
}

.mat-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mat-chip {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: var(--radius); padding: 8px 15px; font: inherit; font-size: 0.88rem;
  font-weight: 600; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.mat-chip:hover { color: var(--fg); border-color: var(--accent); }
.mat-chip.is-active { background: var(--accent); color: var(--accent-fg); border-color: var(--accent); }
/* свойства — мультивыбор, чуть мельче, активный подсвечен бирюзой (spark) */
.mat-chip--prop { font-size: 0.82rem; padding: 7px 13px; }
.mat-chip--prop.is-active { background: var(--spark); color: var(--spark-fg); border-color: var(--spark); }

/* палитра — цветовые свотчи (один выбор) */
.mat-palette { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.mat-pal {
  width: 30px; height: 30px; border-radius: var(--radius); cursor: pointer; padding: 0;
  border: 2px solid transparent; outline: 1px solid var(--line); outline-offset: -1px;
  transition: transform .12s, border-color .15s; position: relative;
}
.mat-pal:hover { transform: scale(1.12); }
.mat-pal.is-active { border-color: var(--accent); outline-color: var(--accent); }
.mat-pal--all {
  width: auto; height: 30px; padding: 0 12px; background: transparent; color: var(--muted);
  font: inherit; font-size: 0.82rem; font-weight: 600; outline: 1px solid var(--line);
}
.mat-pal--all.is-active { color: var(--accent); border-color: var(--accent); outline-color: var(--accent); }

/* ── сетка карточек ── */
.mat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px;
}
.mat-card {
  display: flex; flex-direction: column; overflow: hidden; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--bg-2); transition: border-color .15s, transform .12s;
}
.mat-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.mat-card__img {
  position: relative; aspect-ratio: 4 / 3; overflow: hidden;
  background: color-mix(in srgb, var(--fg) 5%, var(--bg));
  display: grid; place-items: center;
}
.mat-card__img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mat-badge {
  position: absolute; top: 8px; right: 8px;
  font-size: 0.6rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--spark); background: color-mix(in srgb, var(--bg) 82%, transparent);
  border: 1px solid color-mix(in srgb, var(--spark) 50%, transparent);
  border-radius: var(--radius); padding: 3px 7px; backdrop-filter: blur(4px);
}

.mat-card__body { display: flex; flex-direction: column; gap: 8px; padding: 14px 16px 16px; flex: 1; }
.mat-card__name { font-size: 1.08rem; font-weight: 700; margin: 0; color: var(--fg); }
.mat-card__slogan { font-size: 0.82rem; color: var(--muted); line-height: 1.4; margin: 0; font-weight: 300; }

.mat-card__props { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 2px; }
.mat-prop {
  font-size: 0.68rem; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 3px 8px;
  white-space: nowrap;
}

.mat-card__foot {
  display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center;
  margin-top: auto; padding-top: 6px;
  font-size: 0.72rem; color: var(--muted);
}
.mat-spec { font-variant-numeric: tabular-nums; }
.mat-spec--colors { color: var(--accent); }

.mat-empty { color: var(--muted); padding: 32px 0; font-weight: 300; grid-column: 1 / -1; }
