/* catalog.css — каталог, разделы, карточки товаров, пагинация. */

/* ===== Линии продукции (фильтр) ===== */
.line-switcher {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 12px;
  margin-bottom: 24px;
  background: var(--color-bg-alt);
  border-radius: var(--radius);
}
.line-switcher__label {
  font-weight: 600;
  color: var(--color-primary);
  font-size: 1.05rem;
}
.line-switcher a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.line-switcher a:hover { background: rgba(41,45,150,.1); }
.line-switcher a--active {
  background: var(--color-accent);
  color: #fff;
  font-weight: 600;
}

/* ===== Сетка плиток разделов ===== */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 20px;
}
.category-tile {
  display: block;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  text-align: center;
  transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}
.category-tile:hover {
  box-shadow: var(--shadow);
  border-color: var(--color-primary);
  transform: translateY(-2px);
}
.category-tile__num {
  display: inline-block;
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--color-primary);
  margin-bottom: 8px;
}
.category-tile__name {
  font-size: 0.9rem;
  color: var(--color-text);
  line-height: 1.4;
}

/* ===== Карточка товара в списке ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 20px;
}
.product-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: box-shadow var(--transition), border-color var(--transition);
}
.product-card:hover { box-shadow: var(--shadow); border-color: var(--color-primary); }
.product-card__photo {
  position: relative;
  aspect-ratio: 4 / 3;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.product-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 12px;
  transition: transform var(--transition);
  cursor: zoom-in;
}
.product-card:hover .product-card__photo img { transform: scale(1.05); }
.product-card__photo--empty {
  color: var(--color-text-muted);
  font-size: 0.85rem;
}
.product-card__body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.product-card__sku {
  font-weight: 700;
  color: var(--color-primary);
  font-size: 0.95rem;
}
.product-card__name {
  font-size: 0.92rem;
  line-height: 1.35;
}
.product-card__desc {
  font-size: 0.82rem;
  color: var(--color-text-muted);
  line-height: 1.4;
  flex: 1;
}
.product-card__footer {
  padding: 10px 14px;
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--color-bg-alt);
}
.product-card__link-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  transition: color var(--transition);
}
.product-card__link-btn:hover { color: var(--color-accent); }
.product-card__link-btn--copied { color: var(--color-success); }

/* ===== Stepper количества ===== */
.qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.qty-stepper button {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--color-primary);
  transition: background var(--transition);
}
.qty-stepper button:hover { background: var(--color-bg-alt); }
.qty-stepper input {
  width: 36px;
  height: 28px;
  text-align: center;
  border: none;
  border-left: 1px solid var(--color-border);
  border-right: 1px solid var(--color-border);
  font-size: 0.85rem;
  -moz-appearance: textfield;
}
.qty-stepper input::-webkit-outer-spin-button,
.qty-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ===== Пагинация ===== */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 32px;
}
.pagination a, .pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  transition: all var(--transition);
}
.pagination a:hover { border-color: var(--color-primary); color: var(--color-primary); }
.pagination .active {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}
.pagination .disabled { color: var(--color-border); cursor: not-allowed; }

/* ===== Заголовок раздела ===== */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.section-header__num {
  display: inline-block;
  padding: 2px 10px;
  background: var(--color-primary);
  color: #fff;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
}
.section-count { color: var(--color-text-muted); font-size: 0.9rem; }
