/**
 * home.css — Кастерн
 * Стили главной страницы (секции Hero, Trust, Catalog preview, Applications, Compare, Production, Steps, Clients, CTA)
 */

/* ══════════════════════════════════════════
   HERO
══════════════════════════════════════════ */
.hero {
  position: relative;
  /* Было 92vh: на высоких экранах (напр. планшет в портрете 1796px)
     герой раздувался до ~1650px и содержимое тонуло в пустоте.
     clamp ограничивает и сверху, и снизу (ландшафт телефона). */
  min-height: clamp(560px, 92vh, 860px);
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-block: var(--space-20);
  background: linear-gradient(135deg, var(--color-primary) 0%, #0a2a42 60%, #1a1f24 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(244,158,30,0.06) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(244,158,30,0.04) 0%, transparent 40%);
  will-change: transform;
}

.hero-bg-photo {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  opacity: 0.35;
  pointer-events: none;
}

@media (max-width: 768px) {
  .hero-bg-photo { display: none; }
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: var(--space-12);
  align-items: center;
  position: relative;
  z-index: 1;
}

@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr 380px;
  }
}

/* Картинки героя нет — не резервируем под неё колонку,
   текст занимает всю ширину (ограничиваем для читабельности). */
.hero__inner--noimg { grid-template-columns: 1fr; }
.hero__inner--noimg .hero__content { max-width: 780px; }
@media (max-width: 1024px) {
  .hero__inner--noimg { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .hero__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .hero__visual { display: none; }
  .hero { min-height: auto; padding-block: var(--space-16) var(--space-12); }
}

.hero__badge {
  display: inline-block;
  background: rgba(244,158,30,0.15);
  border: 1px solid rgba(244,158,30,0.3);
  color: var(--color-accent);
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-5);
}

.hero__title {
  font-size: clamp(2.25rem, 4vw, 3.5rem);
  font-weight: var(--fw-extrabold);
  color: #fff;
  line-height: 1.1;
  margin-bottom: var(--space-5);
}

.hero__accent {
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: var(--space-7);
  max-width: 48ch;
}

/* Статистика */
.hero__stats {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
  flex-wrap: wrap;
}

.hero__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero__stat-num {
  font-size: var(--text-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--color-accent);
  line-height: 1;
}

.hero__stat-label {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Actions */
.hero__actions {
  display: flex;
  gap: var(--space-3);
  flex-wrap: wrap;
}

/* Visual */
.hero__img-wrap {
  position: relative;
}

.hero__img-wrap img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

/* Scroll hint */
.hero__scroll-hint {
  position: absolute;
  bottom: var(--space-8);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255,255,255,0.4);
  font-size: var(--text-xs);
  animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

@media (max-width: 768px) {
  .hero__scroll-hint { display: none; }
}

@media (max-width: 640px) {
  /* Кнопки герое и CTA — на всю ширину */
  .hero__actions {
    flex-direction: column;
  }
  .hero__actions .btn {
    width: 100%;
    justify-content: center;
  }
  /* CTA «Смотреть весь каталог» */
  .catalog-preview__cta .btn {
    width: 100%;
  }
}

/* ══════════════════════════════════════════
   TRUST STRIP
══════════════════════════════════════════ */
.trust-strip {
  padding-block: var(--space-6);
  background: var(--color-surface);
  border-block: 1px solid var(--color-border);
}

.trust-strip__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
}

@media (max-width: 768px) {
  .trust-strip__list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
  }
}

@media (max-width: 400px) {
  .trust-strip__list {
    grid-template-columns: 1fr;
  }
}

.trust-strip__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
}

.trust-strip__icon {
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}

.trust-strip__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.trust-strip__text strong {
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-heading);
}

.trust-strip__text span {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ══════════════════════════════════════════
   СЕКЦИЯ — ОБЩИЕ
══════════════════════════════════════════ */
.section {
  padding-block: var(--space-16);
}

.section--bg-light {
  background: var(--color-surface);
}

.section--bg-dark {
  background: var(--color-primary);
}

.section--bg-accent {
  background: linear-gradient(135deg, var(--color-accent) 0%, #e08a14 100%);
}

.section-header {
  text-align: center;
  margin-bottom: var(--space-10);
}

.section-title {
  font-size: clamp(1.75rem, 2.5vw, 2.5rem);
  font-weight: var(--fw-extrabold);
  color: var(--color-heading);
  margin-bottom: var(--space-3);
}

.section-title--light {
  color: #fff;
}

.section-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 56ch;
  margin-inline: auto;
}

/* ══════════════════════════════════════════
   CATALOG PREVIEW
══════════════════════════════════════════ */
.products-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

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

@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
}

/* .products-grid--4 адаптируется через базовые breakpoints .products-grid */

.catalog-preview__cta {
  text-align: center;
}

.catalog-preview__cta .btn svg {
  vertical-align: middle;
  margin-left: var(--space-2);
}

/* ══════════════════════════════════════════
   APPLICATIONS
══════════════════════════════════════════ */
.applications-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-4);
  margin-bottom: var(--space-8);
}

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

@media (max-width: 480px) {
  .applications-grid { grid-template-columns: 1fr; }
}

.app-card {
  background: var(--color-surface-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  text-decoration: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  transition: all var(--duration-fast) var(--ease-out);
  position: relative;
  box-shadow: var(--shadow-xs, 0 1px 3px rgba(0,0,0,0.06));
}

.app-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

.app-card__icon {
  width: 52px;
  height: 52px;
  background: rgba(244,158,30,0.1);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  margin-bottom: var(--space-2);
}

.app-card__title {
  font-size: var(--text-base);
  font-weight: var(--fw-semibold);
  color: var(--color-heading);
}

.app-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.5;
  flex: 1;
}

.app-card__arrow {
  color: var(--color-accent);
  font-size: var(--text-lg);
  align-self: flex-end;
  opacity: 0;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}

.app-card:hover .app-card__arrow {
  opacity: 1;
  transform: translateX(4px);
}

.applications__cta {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.applications__cta p {
  color: var(--color-text-muted);
}

/* ══════════════════════════════════════════
   COMPARE
══════════════════════════════════════════ */
.compare-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 500px;
}

.compare-table th,
.compare-table td {
  padding: var(--space-3) var(--space-4);
  text-align: center;
  border-bottom: 1px solid var(--color-border);
}

.compare-table th:first-child,
.compare-table td:first-child {
  text-align: left;
  width: 50%;
}

.compare-table th {
  font-weight: var(--fw-semibold);
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  background: var(--color-surface);
  padding-block: var(--space-4);
}

.compare-table__our {
  background: rgba(244,158,30,0.05);
}

.compare-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
}

.compare-check--yes {
  background: rgba(22,163,74,0.1);
  color: #16a34a;
}

.compare-check--no {
  background: rgba(220,38,38,0.1);
  color: #dc2626;
}

/* ══════════════════════════════════════════
   PRODUCTION
══════════════════════════════════════════ */
.production__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-12);
  align-items: center;
}

@media (max-width: 768px) {
  .production__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .production__gallery { order: -1; }
}

.production__lead {
  font-size: var(--text-lg);
  color: rgba(255,255,255,0.75);
  line-height: 1.6;
  margin-bottom: var(--space-6);
}

.production__list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-7) 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.production__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  color: rgba(255,255,255,0.85);
  font-size: var(--text-sm);
}

.production__item svg {
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 1px;
}

.production__stats {
  display: flex;
  gap: var(--space-8);
  margin-bottom: var(--space-7);
  flex-wrap: wrap;
}

.production__stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.production__stat-num {
  font-size: var(--text-2xl);
  font-weight: var(--fw-extrabold);
  color: var(--color-accent);
}

.production__stat span:last-child {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.5);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.production__img-wrap {
  border-radius: var(--radius-2xl);
  overflow: hidden;
}

.production__img-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  min-height: 360px;
  background: rgba(255,255,255,0.05);
  border: 1px dashed rgba(255,255,255,0.1);
  border-radius: var(--radius-2xl);
  color: rgba(255,255,255,0.3);
  font-size: var(--text-sm);
  text-align: center;
  padding: var(--space-8);
}

/* ══════════════════════════════════════════
   HOW WE WORK — ШАГИ
══════════════════════════════════════════ */
.steps-list {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-10) 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  position: relative;
}

/* Соединительная линия между шагами (на уровне центра бейджа).
   Видна в промежутках между карточками — эффект «пути». */
.steps-list::before {
  content: "";
  position: absolute;
  top: calc(var(--space-6) + 28px);
  left: 0;
  right: 0;
  height: 2px;
  background: repeating-linear-gradient(
    to right,
    var(--color-border) 0 8px,
    transparent 8px 14px
  );
  z-index: 0;
}

@media (max-width: 768px) {
  .steps-list {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
  .steps-list::before { display: none; }
}

@media (max-width: 480px) {
  .steps-list { grid-template-columns: 1fr; }
}

.step-card {
  position: relative;
  z-index: 1;
  background: var(--color-surface-2, #fff);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  overflow: hidden;
  box-shadow: var(--shadow-xs, 0 1px 3px rgba(0,0,0,0.06));
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(16, 33, 64, .10);
  border-color: var(--color-primary);
}

/* Бейдж с номером шага */
.step-card__badge {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  color: #fff;
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: var(--fw-extrabold, 800);
  line-height: 1;
  margin-bottom: var(--space-3);
  box-shadow: 0 6px 16px rgba(16, 33, 64, .18);
  transition: background var(--transition-fast), color var(--transition-fast);
}
.step-card:hover .step-card__badge {
  background: var(--color-accent);
  color: #14213a;
}

.step-card__title {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--color-heading);
}

.step-card__desc {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  line-height: 1.6;
  flex: 1;
}

.how-we-work__cta {
  text-align: center;
}

/* ══════════════════════════════════════════
   CLIENTS / REVIEWS
══════════════════════════════════════════ */
.clients-logos {
  margin-bottom: var(--space-10);
  overflow: hidden;
}

.clients-logos__inner {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
}

.client-logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
}

.client-logo-item img {
  max-height: 48px;
  width: auto;
  filter: grayscale(1);
  opacity: 0.5;
  transition: all var(--duration-fast);
}

.client-logo-item img:hover {
  filter: grayscale(0);
  opacity: 1;
}

.client-logo-placeholder {
  width: 140px;
  height: 56px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
}

@media (max-width: 768px) {
  .reviews-grid { grid-template-columns: 1fr; }
}

.review-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.review-card__stars {
  color: var(--color-accent);
  font-size: var(--text-lg);
  letter-spacing: 2px;
}

.review-card__text {
  margin: 0;
  font-size: var(--text-base);
  line-height: 1.6;
  color: var(--color-text);
  font-style: normal;
  flex: 1;
}

.review-card__author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: auto;
}

.review-card__avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  flex-shrink: 0;
}

.review-card__name {
  display: block;
  font-size: var(--text-sm);
  font-weight: var(--fw-semibold);
  color: var(--color-heading);
}

.review-card__role {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* ══════════════════════════════════════════
   CTA FINAL — CINEMATIC DARK
══════════════════════════════════════════ */
.cta-final {
  background: var(--color-bg);
  position: relative;
  overflow: hidden;
  padding-block: var(--space-20);
}

.cta-final__content {
  text-align: left;
}

.cta-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Оранжевые свечения */
.cta-final::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 720px 520px at -8% 55%, rgba(244,158,30,0.13) 0%, transparent 65%),
    radial-gradient(ellipse 420px 360px at 108% 90%, rgba(244,158,30,0.07) 0%, transparent 60%);
}

/* Декоративная линия сверху */
.cta-final::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(244,158,30,0.45) 35%, rgba(244,158,30,0.45) 65%, transparent);
}

/* Layout */
.cta-final__inner {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: var(--space-14);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 1100px) {
  .cta-final__inner { grid-template-columns: 1fr 380px; gap: var(--space-10); }
}
@media (max-width: 768px) {
  .cta-final { padding-block: var(--space-14); }
  .cta-final__inner { grid-template-columns: 1fr; gap: var(--space-8); }
}
/* Телефон: карточка формы не должна прижиматься к краям экрана */
@media (max-width: 600px) {
  .cta-final { padding-block: var(--space-12); }
  .cta-final__form-wrap { padding: var(--space-5); }
  .cta-final__form-header { margin-bottom: var(--space-5); padding-bottom: var(--space-4); }
}

/* Badge */
.cta-final__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(244,158,30,0.1);
  border: 1px solid rgba(244,158,30,0.28);
  color: var(--color-accent);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 5px 14px 5px 10px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-6);
}
.cta-final__badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
  animation: cta-pulse 2.2s ease-in-out infinite;
}
@keyframes cta-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.35; transform: scale(0.8); }
}

/* Title */
.cta-final__title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.2vw, 3rem);
  font-weight: 800;
  color: #ffffff;
  line-height: 1.15;
  margin-bottom: var(--space-5);
}
.cta-final__accent { color: var(--color-accent); }

/* Text */
.cta-final__text {
  font-size: var(--text-base);
  color: rgba(255,255,255,0.62);
  line-height: 1.75;
  margin-bottom: 2vw;
  max-width: 50ch;
}

/* Guarantee list */
.cta-guarantees {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
}
.cta-guarantee {
  display: flex;
  align-items: flex-start;
  gap: var(--space-4);
}
.cta-guarantee__num {
  font-family: var(--font-heading);
  font-size: var(--text-xs);
  font-weight: 800;
  color: var(--color-accent);
  letter-spacing: 0.06em;
  min-width: 24px;
  padding-top: 3px;
  opacity: 0.75;
  flex-shrink: 0;
}
.cta-guarantee__body {
  display: flex;
  flex-direction: column;
  gap: 3px;
  border-left: 1px solid rgba(244,158,30,0.2);
  padding-left: var(--space-3);
}
.cta-guarantee__title {
  font-family: var(--font-heading);
  font-size: var(--text-sm);
  font-weight: 700;
  color: #ffffff;
  display: block;
}
.cta-guarantee__desc {
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.42);
  line-height: 1.55;
  display: block;
}

/* Форма-карточка */
.cta-final__form-wrap {
  background: #ffffff;
  border-radius: var(--radius-2xl);
  padding: var(--space-8);
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.05),
    0 28px 64px rgba(0,0,0,0.5),
    0 4px 20px rgba(244,158,30,0.1);
}
.cta-final__form-header {
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-5);
  border-bottom: 1px solid #f0f2f5;
}
.cta-final__form-title {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  font-weight: 800;
  color: #111318;
  margin: 0 0 var(--space-1) 0;
}
.cta-final__form-sub {
  font-size: var(--text-sm);
  color: #6b7280;
  margin: 0;
}

/* success state */
.form-success {
  text-align: center;
  padding: var(--space-6);
}
.form-success.is-visible { display: block; }


/* ══════════════════════════════════════════
   КАТЕГОРИИ НА ГЛАВНОЙ (по образцу ZPK)
══════════════════════════════════════════ */
.home-cat-group {
  margin-bottom: var(--space-6);
  background: var(--color-surface-2, #fff);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.home-cat-group:last-child { margin-bottom: 0; }

.home-cat-group__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
  background: var(--color-primary);
  color: #fff;
  text-decoration: none;
}
.home-cat-group__icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .14);
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-cat-group__title {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: var(--text-lg);
}
.home-cat-group__all {
  margin-left: auto;
  font-size: var(--text-sm);
  color: rgba(255, 255, 255, .82);
  white-space: nowrap;
  transition: color var(--transition-fast);
}
.home-cat-group__head:hover .home-cat-group__all { color: var(--color-accent); }

.home-cat-group__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
  background: var(--color-surface-2, #fff);
}
.home-cat-item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  /* Единая высота плиток: короткие названия (напр. складская техника)
     не выглядят «куцыми». Имя ограничено 3 строками — без 4-строчных
     выбросов, поэтому все плитки одной высоты. */
  min-height: 84px;
  background: var(--color-surface-2, #fff);
  text-decoration: none;
  transition: background var(--transition-fast);
  /* Каждая плитка рисует свои разделители сама (справа+снизу),
     поэтому даже без соседа снизу/справа линия есть.
     Пустые «хвосты» рядов остаются белыми — без серых ячеек. */
  border-right: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
/* Последняя плитка в неполном ряду не должна оставлять «хвостовой» вертикальный тик */

.home-cat-item:hover { background: var(--color-accent-light); }
.home-cat-item__thumb {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.home-cat-item__thumb img { width: 100%; height: 100%; object-fit: contain; }
.home-cat-item__name {
  font-size: var(--text-sm);
  color: var(--color-heading);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* SEO-текст: стили сворачивания вынесены в components.css (нужны и на каталоге) */
