/* Блок категорий - ТОЛЬКО ТЕ, ЧТО ЕСТЬ В МЕНЮ */
.categories {
  margin-bottom: 30px;
}

.section-title {
  font-size: 22px;
  color: #2a5c8a;
  margin-bottom: 15px;
  padding-bottom: 10px;
  border-bottom: 2px solid #e0e0e0;
  text-shadow: 1px 1px 0 rgba(255, 255, 255, 0.8);
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
}

.category-item {
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 5px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  text-decoration: none;
  color: #333;
}

.category-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border-color: #4a8bc8;
  color: #2a5c8a;
}

.category-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 10px;
  background: linear-gradient(to bottom, #e0e0e0, #f5f5f5);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #ddd;
}

.category-icon i {
  font-size: 36px;
  color: #4a8bc8;
}

.category-name {
  font-weight: bold;
  margin-bottom: 5px;
}

.category-count {
  font-size: 12px;
  color: #666;
}

.categories-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.category-item {
  flex: 1 0 calc(50% - 10px);
  min-width: 140px;
}

.category-icon {
  width: 60px;
  height: 60px;
}

.category-icon i {
  font-size: 28px;
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  .category-item {
    flex: 1 0 100%;
  }

  .product-card {
    flex: 1 0 100%;
  }

  .benefit-item {
    flex: 1 0 100%;
  }

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

/* Категории с подкатегориями */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.category-card {
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.3s;
}

.category-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  transform: translateY(-3px);
}

.category-main {
  background: linear-gradient(to bottom, #f8f8f8, #f0f0f0);
  padding: 20px;
  text-align: center;
  border-bottom: 1px solid #ddd;
}

.category-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto 15px;
  background: linear-gradient(to bottom, #4a8bc8, #2a5c8a);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.category-title {
  color: #2a5c8a;
  font-size: 18px;
  margin-bottom: 5px;
  font-weight: bold;
}

.category-count {
  color: #666;
  font-size: 14px;
}

.category-subcategories {
  padding: 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.subcategory-column {
  padding: 10px;
}

.subcategory-title {
  color: #333;
  font-size: 15px;
  margin-bottom: 10px;
  padding-bottom: 5px;
  border-bottom: 1px solid #eee;
  font-weight: bold;
}

.subcategory-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.subcategory-list li {
  margin-bottom: 8px;
}

.subcategory-list a {
  color: #4a8bc8;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s;
  display: block;
  padding: 3px 0;
}

.subcategory-list a:hover {
  color: #ff9900;
  padding-left: 5px;
}

/* Для категорий с 3+ подкатегориями в столбце */
.category-card:nth-child(2) .category-subcategories,
.category-card:nth-child(4) .category-subcategories {
  grid-template-columns: repeat(2, 1fr);
}

/* Адаптивность */
@media (max-width: 768px) {
  .categories-grid {
    grid-template-columns: 1fr;
  }

  .category-subcategories {
    grid-template-columns: 1fr !important;
  }
}