* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
body {
  background-color: #f4f6f9;
  color: #333;
}
.container {
  display: flex;
  min-height: 100vh;
}
/* === СТИЛИ ДЛЯ ЛЕВОГО МЕНЮ === */
.sidebar {
  width: 280px;
  background-color: #ffffff;
  border-right: 1px solid #e0e0e0;
  padding: 20px;
  flex-shrink: 0;
}
.sidebar h2 {
  font-size: 20px;
  margin-bottom: 20px;
  color: #2c3e50;
  border-bottom: 2px solid #3498db;
  padding-bottom: 8px;
}
.catalog-menu {
  list-style: none;
}
.category {
  margin-bottom: 8px;
}
.category-btn, .single-link {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  padding: 12px;
  cursor: pointer;
  color: #34495e;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
  text-decoration: none;
}
.category-btn:hover, .single-link:hover, .submenu a:hover {
  background-color: #ebf5fb;
  color: #3498db;
}
.arrow {
  font-size: 12px;
  transition: transform 0.3s;
}
/* Раскрывающийся список */
.submenu {
  list-style: none;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
  padding-left: 15px;
}
.submenu li a {
  display: block;
  padding: 8px 12px;
  font-size: 14px;
  color: #666;
  text-decoration: none;
  border-radius: 4px;
  transition: color 0.2s;
}
/* Активное состояние аккордеона */
.category.open .submenu {
  max-height: 200px; /* Достаточно для нескольких пунктов */
}

.category.open .arrow {
  transform: rotate(180deg);
}
.submenu a.active, .single-link.active {
  color: #3498db;
  font-weight: bold;
}
/* === СТИЛИ ДЛЯ СЕТКИ ТОВАРОВ === */
.content {
  flex-grow: 1;
  padding: 30px;
}
.content h1 {
  font-size: 24px;
  margin-bottom: 25px;
  color: #2c3e50;
}
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}
/* Карточка товара */
.product-card {
  background: #ffffff;
  border: 1px solid #e1e8ed;
  border-radius: 8px;
  padding: 15px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.2s, box-shadow 0.2s;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}
.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 15px;
}
.product-card .model {
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 8px;
  text-align: center;
}
.product-card .price {
  font-size: 18px;
  font-weight: bold;
  color: #27ae60;
  margin-top: auto;
}
/* Дополнительные стили для ссылки-обертки */
.product-link {
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
}
.product-link img {
  width: 100%;
  height: 180px;
  object-fit: cover; /* Для сохранения пропорций */
  border-radius: 6px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: opacity 0.2s;
}
.product-link:hover img {
  opacity: 0.9;
}
.product-link:hover .model {
  color: #3498db; /* Подсвечивать название при наведении */
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    border-right: none;
    border-bottom: 1px solid #e0e0e0;
  }
}
footer{
    background:#1f4e79;
    color:white;
    text-align:center;
    padding:25px;
}