/* Стили для страницы товаров */
.products-filters {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  position: sticky;
  top: 20px;
  /* Убираем ограничения по высоте для полного отображения */
  height: auto;
  min-height: auto;
  max-height: none;
  overflow: visible;
  /* Улучшенный скролл - удаляем, так как он больше не нужен */
}

.products-filters::-webkit-scrollbar {
  display: none;
}

.products-filters::-webkit-scrollbar-track {
  display: none;
}

.products-filters::-webkit-scrollbar-thumb {
  display: none;
}

.products-filters::-webkit-scrollbar-thumb:hover {
  display: none;
}

.filters-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--light-gray);
}

.filters-header h3 {
  color: var(--dark-gray);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
}

.filters-header h3 i {
  color: var(--primary-color);
  margin-right: 8px;
}

.clear-filters-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #6c757d;
  padding: 8px 15px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.clear-filters-btn:hover {
  background: #e9ecef;
  color: #495057;
}

.filters-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
}

.filter-group label {
  font-weight: 600;
  color: var(--dark-gray);
  margin-bottom: 8px;
  font-size: 14px;
}

.filter-group select,
.filter-group input[type="text"],
.filter-group input[type="number"] {
  padding: 10px 12px;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  font-size: 14px;
  transition: all 0.3s ease;
}

.filter-group select:focus,
.filter-group input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.2);
}

.search-box {
  display: flex;
  position: relative;
}

.search-box input {
  flex: 1;
  padding-right: 40px;
}

.search-box button {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--primary-color);
  cursor: pointer;
  padding: 8px;
  border-radius: 3px;
  transition: background-color 0.3s ease;
}

.search-box button:hover {
  background: rgba(220, 38, 38, 0.1);
}

.price-range {
  display: flex;
  align-items: center;
  gap: 10px;
}

.price-range input {
  flex: 1;
}

.price-range span {
  color: var(--gray);
  font-weight: 500;
}

.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.checkbox-item {
  display: flex;
  align-items: center;
  cursor: pointer;
  font-size: 14px;
  position: relative;
}

.checkbox-item input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.checkmark {
  height: 18px;
  width: 18px;
  background-color: #fff;
  border: 2px solid #dee2e6;
  border-radius: 3px;
  margin-right: 10px;
  position: relative;
  transition: all 0.3s ease;
}

.checkbox-item:hover .checkmark {
  border-color: var(--primary-color);
}

.checkbox-item input:checked ~ .checkmark {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.checkmark:after {
  content: "";
  position: absolute;
  display: none;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-item input:checked ~ .checkmark:after {
  display: block;
}

/* Контент товаров */
.products-content {
  background: white;
  border-radius: 10px;
  padding: 25px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
  min-height: auto;
}

.products-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding-bottom: 15px;
  border-bottom: 2px solid var(--light-gray);
}

.products-count {
  font-size: 16px;
  color: var(--dark-gray);
  font-weight: 500;
}

.products-controls {
  display: flex;
  align-items: center;
  gap: 20px;
}

.items-per-page {
  display: flex;
  align-items: center;
  gap: 8px;
}

.items-per-page label {
  font-size: 14px;
  color: var(--dark-gray);
  font-weight: 500;
  white-space: nowrap;
}

.items-per-page select {
  padding: 6px 10px;
  border: 1px solid #dee2e6;
  border-radius: 5px;
  background: white;
  color: var(--dark-gray);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.3s ease;
}

.items-per-page select:hover {
  border-color: var(--primary-color);
}

.items-per-page select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(var(--primary-color-rgb), 0.25);
}

.view-toggle {
  display: flex;
  gap: 5px;
}

.view-btn {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  background: white;
  cursor: pointer;
  border-radius: 5px;
  color: var(--gray);
  transition: all 0.3s ease;
}

.view-btn:first-child {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  border-right: none;
}

.view-btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.view-btn:hover {
  background: var(--light-gray);
}

.view-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Сетка товаров */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

.products-grid.list-view {
  grid-template-columns: 1fr;
}

.product-card {
  border: 1px solid var(--border-color);
  padding: 20px;
  border-radius: 5px;
  position: relative;
  transition: box-shadow 0.3s;
  background: white;
  cursor: default;
  overflow: visible;
  display: block;
}

.product-card:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.product-image {
  position: relative;
  margin-bottom: 15px;
  text-align: center;
  height: 200px;
  overflow: visible;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transition: transform 0.3s ease;
  background: white;
  padding: 10px;
  box-sizing: border-box;
}

.product-card:hover .product-image img {
  transform: scale(1.02);
}

.product-badges {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  color: white;
  font-size: 12px;
  padding: 5px 10px;
  border-radius: 3px;
  font-weight: bold;
  z-index: 1;
}

.product-badge.featured {
  background-color: #4caf50;
}

.product-badge.new {
  background-color: #2196f3;
}

.product-badge.discount {
  background-color: #ff5722;
}

.product-info {
  padding: 20px;
}

.product-category {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.product-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--dark-gray);
  margin: 12px 0;
  line-height: 1.4;
}

.product-specs {
  font-size: 12px;
  color: var(--gray);
  margin: 8px 0;
  line-height: 1.3;
  padding: 8px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 3px solid var(--primary-color);
}

.product-description {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.4;
  margin-bottom: 15px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.product-price {
  margin-bottom: 15px;
}

.product-price .old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 14px;
  margin-right: 10px;
}

.product-price .current-price {
  font-weight: bold;
  font-size: 18px;
  color: var(--primary-color);
}

.product-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.add-to-cart, .product-details {
  background-color: var(--primary-color);
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s;
  border: none;
  cursor: pointer;
}

.product-details {
  background-color: #666;
  width: auto;
  min-width: 80px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.add-to-cart:hover {
  background-color: #c01e1e;
}

.product-details:hover {
  background-color: #555;
}

.quick-order-btn {
  background-color: #28a745;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.3s;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.quick-order-btn:hover {
  background-color: #218838;
}

.quick-order-btn:disabled {
  background-color: #6c757d;
  cursor: not-allowed;
}

.favorite-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 35px;
  height: 35px;
  border: 1px solid #fff;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  color: #999;
  z-index: 2;
}

.favorite-btn:hover {
  background: white;
  color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.favorite-btn.active {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

/* Список товаров */
.products-grid.list-view .product-card {
  display: flex;
  flex-direction: row;
  height: 180px;
}

.products-grid.list-view .product-image {
  width: 200px;
  height: 100%;
  flex-shrink: 0;
  border-radius: 8px 0 0 8px;
}

.products-grid.list-view .product-image img {
  border-radius: 8px 0 0 8px;
}

.products-grid.list-view .product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
}

.products-grid.list-view .product-title {
  font-size: 18px;
  -webkit-line-clamp: 1;
}

.products-grid.list-view .product-description {
  -webkit-line-clamp: 3;
}

/* Пагинация */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--light-gray);
}

.pagination button {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  background: white;
  cursor: pointer;
  border-radius: 5px;
  color: var(--dark-gray);
  font-weight: 500;
  transition: all 0.3s ease;
}

.pagination button:hover {
  background: var(--light-gray);
}

.pagination button.current-page {
  background: var(--primary-color);
  color: white;
  border-color: var(--primary-color);
}

.pagination span {
  color: var(--gray);
  padding: 8px 4px;
}

/* Загрузка */
.loading-indicator {
  text-align: center;
  padding: 60px 20px;
  color: var(--gray);
}

.loading-indicator i {
  font-size: 40px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.loading-indicator p {
  font-size: 18px;
  margin: 0;
}

/* Модальное окно товара */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
  background-color: white;
  margin: 2% auto;
  padding: 0;
  border-radius: 15px;
  width: 95%;
  max-width: 1400px;
  max-height: 96vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.modal-header {
  padding: 20px 25px;
  border-bottom: 1px solid var(--light-gray);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h2 {
  margin: 0;
  color: var(--dark-gray);
  font-size: 24px;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  cursor: pointer;
  color: var(--gray);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  transition: all 0.3s ease;
}

.modal-close:hover {
  background: var(--light-gray);
  color: var(--dark-gray);
}

.modal-body {
  padding: 25px;
  max-height: calc(95vh - 100px);
  overflow-y: auto;
}

/* Основная структура модального окна товара */
.product-details-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  padding: 30px;
}

.product-images {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.main-image {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  background: #f8f9fa;
  min-height: 500px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image img {
  max-width: 100%;
  height: 600px;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 15px;
  border: 1px solid #e9ecef;
  transition: transform 0.3s ease;
  cursor: zoom-in;
  display: block;
}

.main-image img:hover {
  transform: scale(1.02);
}

.product-gallery {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-height: 150px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
}

.product-gallery img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  flex-shrink: 0;
}

.product-gallery img:hover {
  border-color: #007bff;
  transform: scale(1.05);
}

.product-gallery img.active {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.product-info {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 10px 0;
}

.product-info h2 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  margin: 0;
}

.product-category-badge {
  display: inline-block;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 6px 16px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  width: fit-content;
  letter-spacing: 0.5px;
}

.product-info h3 {
  font-size: 28px;
  font-weight: 700;
  color: #1a1a1a;
  line-height: 1.3;
  margin: 0;
}

.product-price-block {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 15px;
}

.product-price-block .old-price {
  text-decoration: line-through;
  color: #6c757d;
  font-size: 20px;
  font-weight: 500;
}

.product-price-block .current-price {
  font-size: 32px;
  font-weight: 700;
  color: var(--primary-color);
}

.product-description,
.product-specifications {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #007bff;
}

.product-description h4,
.product-specifications h4 {
  margin: 0 0 15px 0;
  color: #1a1a1a;
  font-size: 16px;
  font-weight: 600;
}

.product-description p {
  color: #4a5568;
  line-height: 1.6;
  margin: 0;
}

.product-specifications ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.product-specifications li {
  padding: 8px 0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
}

.product-specifications li:last-child {
  border-bottom: none;
}

.product-specifications li strong {
  color: #1a1a1a;
}

.product-actions-modal {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 12px;
}

.quantity-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.quantity-selector label {
  font-weight: 600;
  color: #1a1a1a;
  font-size: 14px;
}

.quantity-controls {
  display: flex;
  align-items: center;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  width: fit-content;
}

.quantity-btn {
  width: 50px;
  height: 50px;
  border: none;
  background: white;
  color: #4a5568;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.quantity-btn:hover {
  background: #f7fafc;
  color: #1a1a1a;
}

.quantity-controls input {
  width: 80px;
  height: 50px;
  border: none;
  text-align: center;
  font-size: 16px;
  font-weight: 600;
  color: #1a1a1a;
  background: white;
}

.quantity-controls input:focus {
  outline: none;
  background: #f7fafc;
}

.action-buttons {
  display: flex;
  gap: 12px;
}

.btn {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  min-height: 48px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color), #b91c1c);
  color: white;
  flex: 1;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(220, 38, 38, 0.3);
}

.btn-secondary {
  background: white;
  color: #4a5568;
  border: 2px solid #e2e8f0;
  flex: 1;
}

.btn-secondary:hover {
  background: #f7fafc;
  border-color: #cbd5e0;
  color: #1a1a1a;
}

.btn-large {
  padding: 16px 32px;
  font-size: 16px;
  min-height: 56px;
}

/* Адаптивность */
@media (max-width: 768px) {
  .products-layout {
    flex-direction: column;
    gap: 20px;
  }
  
  .products-filters {
    position: static;
    width: 100%;
    max-height: none;
    margin-bottom: 0;
  }
  
  .products-content {
    padding: 20px;
  }
  
  .products-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .products-controls {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }
  
  .items-per-page {
    justify-content: space-between;
  }
  
  .items-per-page select {
    flex: 1;
    margin-left: 10px;
  }
  
  .view-toggle {
    justify-content: center;
  }
  
  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .product-card {
    padding: 15px;
  }
  
  .pagination {
    flex-wrap: wrap;
    gap: 5px;
  }
  
  .pagination button {
    padding: 6px 10px;
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .products-grid {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  
  .products-controls {
    gap: 10px;
  }
  
  .items-per-page label {
    font-size: 13px;
  }
  
  .items-per-page select {
    font-size: 13px;
    padding: 5px 8px;
  }
  
  .pagination button {
    padding: 5px 8px;
    font-size: 13px;
  }
}

/* Дополнительные стили для экстра маленьких экранов */
@media (max-width: 360px) {
  .products-filters {
    padding: 12px;
    margin: 0 -5px;
  }

  .filters-header h3 {
    font-size: 16px;
  }

  .price-range input {
    min-width: 60px;
    font-size: 13px;
    padding: 8px 6px;
  }

  .price-range span {
    font-size: 12px;
  }

  .filter-group label {
    font-size: 12px;
  }

  .filter-group select,
  .filter-group input[type="text"],
  .filter-group input[type="number"] {
    padding: 8px;
    font-size: 13px;
  }
}

/* Основной макет страницы - фильтры слева, товары справа */
.products-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  align-items: start;
}

/* Стили для расширенного модального окна товара */
.modal-content.product-modal-content {
  max-width: 1820px;
  width: 95%;
  max-height: 90vh;
  overflow-y: auto;
  margin: 20px auto;
}

.product-modal-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 20px 0;
}

.main-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  background: #f8f9fa;
  min-height: 500px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-image-container .main-image {
  max-width: 100%;
  height: 600px;
  object-fit: contain;
  background: #f8f9fa;
  border-radius: 15px;
  border: 1px solid #e9ecef;
  transition: transform 0.3s ease;
  cursor: zoom-in;
  display: block;
}

.main-image-container .main-image:hover {
  transform: scale(1.02);
}

.image-gallery {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
  justify-content: flex-start;
  max-height: 150px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0;
}

.gallery-thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 2px solid #e9ecef;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  flex-shrink: 0;
}

.gallery-thumb:hover,
.gallery-thumb.active {
  border-color: #007bff;
  box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.gallery-thumb:hover {
  transform: scale(1.05);
}

.category-badge {
  display: inline-block;
  background: linear-gradient(135deg, #007bff, #0056b3);
  color: white;
  padding: 6px 16px;
  border-radius: 25px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  width: fit-content;
  letter-spacing: 0.5px;
}

.price-info {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 15px 0;
  border-bottom: 1px solid #e9ecef;
}

.old-price {
  text-decoration: line-through;
  color: #999;
  font-size: 18px;
  font-weight: 500;
}

.current-price {
  font-size: 32px;
  font-weight: 800;
  color: #007bff;
  text-shadow: 0 1px 2px rgba(0, 123, 255, 0.1);
}

.product-description,
.product-specifications {
  background: #f8f9fa;
  padding: 20px;
  border-radius: 12px;
  border-left: 4px solid #007bff;
}

.product-description h4,
.product-specifications h4 {
  margin: 0 0 15px 0;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 600;
}

.product-specifications ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.product-specifications li {
  padding: 12px 0;
  border-bottom: 1px solid #e9ecef;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.product-specifications li:last-child {
  border-bottom: none;
}

.product-specifications li strong {
  color: #1a1a1a;
  font-weight: 600;
}

/* Обновленные стили для кнопок в модальном окне */
.product-actions {
  display: flex;
  flex-direction: column;
  gap: 25px;
  padding-top: 25px;
  border-top: 2px solid #e9ecef;
  margin-top: 10px;
}

.btn-large {
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 600;
  border-radius: 8px;
}

.btn-large i {
  margin-right: 8px;
}

.btn-secondary.active {
  background: #dc3545;
  border-color: #dc3545;
  color: white;
}

.btn-secondary.active:hover {
  background: #c82333;
  border-color: #bd2130;
}

/* Адаптивность для планшетов */
@media (max-width: 1024px) {
  .products-layout {
    grid-template-columns: 260px 1fr;
    gap: 25px;
    padding: 25px 15px;
  }

  .products-filters {
    padding: 20px;
  }

  .price-range {
    gap: 8px;
  }

  .price-range input {
    min-width: 90px;
  }
}

/* Адаптивность для средних экранов */
@media (max-width: 900px) {
  .products-layout {
    grid-template-columns: 240px 1fr;
    gap: 20px;
  }

  .products-filters {
    padding: 18px;
    min-height: auto;
  }

  .filters-content {
    gap: 16px;
  }

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

  .price-range {
    gap: 6px;
  }

  .price-range input {
    min-width: 75px;
    padding: 8px 10px;
  }

  .filter-group select,
  .filter-group input[type="text"],
  .filter-group input[type="number"] {
    padding: 8px 10px;
  }
}

/* Адаптивность для широких экранов */
@media (min-width: 1400px) {
  .products-layout {
    max-width: 1600px;
    grid-template-columns: 320px 1fr;
    gap: 40px;
  }

  .products-filters {
    padding: 30px;
  }

  .price-range input {
    padding: 12px 15px;
    font-size: 15px;
  }

  .filter-group select,
  .filter-group input[type="text"],
  .filter-group input[type="number"] {
    padding: 12px 15px;
    font-size: 15px;
  }
} 

/* --- Улучшенная адаптивность для всех устройств --- */

.products-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 30px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 20px;
  align-items: start;
}

@media (max-width: 1200px) {
  .products-layout {
    grid-template-columns: minmax(180px, 260px) 1fr;
    gap: 18px;
    padding: 20px 6px;
  }
  .products-filters {
    padding: 18px 8px;
  }
}

@media (max-width: 900px) {
  .products-layout {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 10px 2vw;
  }
  .products-filters {
    position: static;
    width: 100%;
    max-width: 100vw;
    margin-bottom: 0;
    border-radius: 8px;
    box-shadow: none;
    padding: 12px 4px;
  }
}

@media (max-width: 600px) {
  .products-layout {
    padding: 2vw 1vw;
    gap: 8px;
  }
  .products-filters {
    padding: 8px 2px;
    border-radius: 6px;
  }
  .products-content {
    padding: 8px 0;
  }
  .products-header, .products-controls {
    flex-direction: column;
    gap: 8px;
    align-items: stretch;
  }
  .products-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .product-card {
    padding: 8px 2px;
  }
}

/* Для очень больших экранов (4K и выше) */
@media (min-width: 1800px) {
  .products-layout {
    max-width: 1800px;
    grid-template-columns: minmax(260px, 400px) 1fr;
    gap: 40px;
    padding: 40px 40px;
  }
  .products-filters {
    padding: 32px 24px;
    font-size: 1.15rem;
  }
  .product-card {
    font-size: 1.1rem;
    padding: 2rem 1.5rem;
  }
}

/* Глобально для изображений товаров */
.product-image img, .main-image, .gallery-thumb {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Кнопки и формы */
button, .btn, input, select {
  font-size: 1em;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

/* Фильтры и группы */
.filters-content, .filter-group, .price-range, .checkbox-group {
  flex-wrap: wrap;
  gap: 8px;
}

.filter-group label, .filters-header h3 {
  word-break: break-word;
}

/* Убрать горизонтальный скролл */
html, body {
  overflow-x: hidden;
}

/* --- Конец адаптивных улучшений --- */ 