.swiper {
  width: 100%;
  height: 425px;
  margin-bottom: 35px;
  border-radius: 15px;
  margin-left: -20px;
  margin-right: -20px;
}

.swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 0 -30px;
}

.swiper-button-next,
.swiper-button-prev {
  color: #35eeff !important;
}

/* LIST */

main {
  margin: 30px auto auto auto !important;
  flex: 1;
}

body h1 {
  margin-bottom: 20px;
}

h2 {
  text-align: center;
  margin-bottom: 50px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.product-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background-color: #fff;
  padding: 16px;
  min-height: 380px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  overflow: hidden;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
}

.product-card:hover {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 8px;
}

.product-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
  line-height: 1.3;
}

.excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
  word-break: break-word;
}

/* Каталог с сайдбаром */
.catalog-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 32px;
  align-items: start;
}

/* Сайдбар */
.catalog-sidebar {
  background: var(--card);
  border-radius: 16px;
  border: 1px solid var(--border);
  overflow: hidden;
  position: sticky;
  top: 20px;
}

.category-nav {
  display: flex;
  flex-direction: column;
}

.category-item {
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
  transition:
    background 0.15s,
    color 0.15s;
}

.category-item:last-child {
  border-bottom: none;
}

.category-item:hover {
  background: var(--bg);
  color: var(--primary-2);
}

.category-item.active {
  background: var(--primary-2);
  color: white;
  font-weight: 500;
}

/* Контент */
.catalog-content {
  min-width: 0;
}

.no-products {
  text-align: center;
  color: var(--muted);
  padding: 48px 0;
}

/* Адаптив */
@media (max-width: 768px) {
  .catalog-layout {
    grid-template-columns: 1fr;
  }

  .catalog-sidebar {
    position: static;
  }

  .category-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px;
  }

  .category-item {
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 6px 14px;
    font-size: 0.82rem;
  }

  .category-item:last-child {
    border-bottom: 1px solid var(--border);
  }
}

@media (max-width: 1024px) {
  .swiper-slide img {
    width: 100%;
    height: 100%;
    object-position: center;
    object-fit: fill;
  }

  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .products-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .swiper {
    margin-left: 0;
    margin-right: 0;
    border-radius: 10px;
  }

  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .products-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .product-card {
    min-height: 360px;
  }
}
