/* ===== ROOT ===== */
:root {
  --blue: #0073c6;
  --blue-dark: #004080;

  --bg-main: #f4f8fc;
  --bg-soft: #eef4fb;

  --text-main: #1a1a1a;
  --text-secondary: #5c6b7a;

  --border: rgba(0,0,0,0.06);
}

/* ===== BODY ===== */
body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
}

/* ===== LAYOUT ===== */
.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 50px 20px;
}

/* ===== SIDEBAR ===== */
.catalog-sidebar {
  position: sticky;
  top: 100px;
  height: fit-content;
  padding: 25px;
  border-radius: 18px;
  background: linear-gradient(135deg,#0b1626,#13233a);
  color: #cfd8e3;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  backdrop-filter: blur(12px);
}

.filter-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: #fff;
}

.filter-group {
  margin-bottom: 25px;
}

.filter-group h4 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #8fa3b8;
  margin-bottom: 10px;
}

.filter-group label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: 0.25s;
}

.filter-group label:hover {
  color: #fff;
  transform: translateX(4px);
}

/* ===== TITLE ===== */
.catalog-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--blue-dark);
  margin-bottom: 30px;
  position: relative;

  /* Скрываем визуально, но оставляем для CSS */
  font-size: 0;
  height: 0;
  margin: 0;
  padding: 0;
  visibility: hidden;
}

.catalog-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 60%;
  height: 3px;
  background: linear-gradient(90deg,#0073c6,#4da3ff);
  border-radius: 3px;
}

/* ===== GRID WRAPPER ===== */
.catalog-grid.scrollable {
  max-height: 720px;
  overflow-y: auto;
  overflow-x: hidden; /* убираем горизонтальный скролл */
  padding: 25px;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.08);
  scroll-behavior: smooth;
}

/* ===== GRID ===== */
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
}

/* ===== CARD ===== */
.equipment-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 8px 24px rgba(0,0,0,0.08);
  transition: all 0.35s ease;
}

.equipment-card:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}

/* ===== ССЫЛКА НА ВСЮ КАРТОЧКУ ===== */
.card-link {
  display: block;
  position: relative;
  text-decoration: none;
  color: inherit;
  z-index: 1;
  pointer-events: auto;
}

/* ===== IMAGE ===== */
.equipment-image {
  background: linear-gradient(135deg,#eef4fb,#e3ecf7);
  padding: 15px;
  text-align: center;
}

.equipment-image img {
  height: 120px;
  object-fit: contain;
  transition: transform 0.5s ease;
}

.card-link:hover .equipment-image img {
  transform: scale(1.12);
}

/* ===== BODY ===== */
.equipment-body {
  padding: 16px;
}

.equipment-title {
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.divider {
  height: 1px;
  background: #eee;
  margin: 10px 0;
}

.equipment-type {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

/* ===== SPEC ===== */
.spec {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 5px 0;
  border-bottom: 1px solid #f0f0f0;
}

/* ===== HOVER КНОПКА ===== */
.equipment-hover {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(135deg,#0073c6,#004080);
  color: #fff;
  text-align: center;
  padding: 12px;
  font-size: 14px;
  font-weight: 700;
  transform: translateY(100%);
  transition: transform 0.3s;
  z-index: 2;
  pointer-events: none;
}

.card-link:hover .equipment-hover {
  transform: translateY(0);
}

/* ===== SCROLLBAR ===== */
.catalog-grid.scrollable::-webkit-scrollbar {
  width: 6px;
}

.catalog-grid.scrollable::-webkit-scrollbar-thumb {
  background: rgba(0,115,198,0.4);
  border-radius: 10px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .catalog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
  }
}