/* Стили для страницы товаров */
.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;
  align-items: stretch;
}

.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: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.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: hidden;
  background: var(--light-gray);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 5px;
  flex-shrink: 0;
}

.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: 10;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

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

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

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

.product-info {
  padding: 20px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.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;
  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;
  margin-top: auto;
}

.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;
  flex: 1;
  min-width: 80px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  text-align: center;
}

.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;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
  flex: 1;
}

.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;
  line-clamp: 1;
}

.products-grid.list-view .product-description {
  -webkit-line-clamp: 3;
  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;
}

/* АВТОМАТИЧЕСКОЕ МАСШТАБИРОВАНИЕ НА ОСНОВЕ РАЗМЕРА ЭКРАНА */
:root {
  --modal-scale: clamp(0.75, calc(100vw / 1920), 1.0);
  --modal-font-scale: clamp(0.8, calc(100vw / 1440), 1.1);
  --modal-spacing-scale: clamp(0.7, calc(100vh / 1080), 1.0);
  --modal-responsive-font: clamp(10px, calc(0.7vw + 0.5vh), 16px);
  --modal-responsive-spacing: clamp(4px, calc(0.5vw + 0.3vh), 12px);
  --modal-adaptive-width: clamp(700px, 90vw, 2000px);
  --modal-adaptive-height: clamp(600px, 92vh, 1400px);
  --modal-content-padding: clamp(12px, 2vw, 32px);
}

/* Модальное окно товара */
.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: 2vh auto;
  padding: 0;
  border-radius: 12px;
  width: var(--modal-adaptive-width);
  max-width: var(--modal-adaptive-width);
  height: var(--modal-adaptive-height);
  max-height: var(--modal-adaptive-height);
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  display: flex;
  flex-direction: column;
  min-height: 600px;
}

.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: var(--modal-content-padding);
  flex: 1;
  overflow-y: auto;
  min-height: 0;
  max-height: calc(96vh - 80px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

/* Центрирование только для больших экранов */
@media (min-width: 1441px) {
  .modal-body {
    align-items: center;
  }
}

/* Основная структура модального окна товара */
.product-detail-layout {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 2%;
  min-height: 0;
  height: auto;
  max-height: none;
  min-height: 400px;
  max-width: 100%;
  justify-content: flex-start;
}

/* Центрирование только для больших экранов */
@media (min-width: 1441px) {
  .product-detail-layout {
    justify-content: center;
    height: 100%;
  }
}

.product-images-section {
  display: flex;
  flex-direction: row;
  gap: 2%;
  height: auto;
  min-height: 200px;
  max-height: 300px;
  max-width: 100%;
  overflow: hidden;
  align-items: flex-start;
  justify-content: center;
}

.product-images-section.single-image {
  justify-content: center;
}

.product-details-section {
  display: flex;
  flex-direction: column;
  gap: 16px;
  height: auto;
  min-height: 300px;
  flex: 1;
}

.product-characteristics-section {
  background: #f8f9fa;
  padding: 3%;
  border-radius: 12px;
  border: 2px solid #28a745;
  height: 100%;
  overflow-y: auto;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 300px;
  flex: 1;
  margin: 0;
  max-width: none;
}

.characteristics-calculator-row {
  display: flex;
  flex-direction: row;
  gap: 16px;
  height: auto;
  min-height: 250px;
  flex: 1;
}

/* Базовая адаптация для экранов меньше 1440px */
@media (max-width: 1440px) {
  .modal-body {
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }
  
  .characteristics-calculator-row {
    flex-direction: column;
    gap: 16px;
    height: auto;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    width: 100% !important;
    padding: 2%;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #ccc #f1f1f1;
    max-height: 250px;
  }
  
  .product-characteristics-section::-webkit-scrollbar,
  .product-calculator-section::-webkit-scrollbar {
    width: 4px;
  }
  
  .product-characteristics-section::-webkit-scrollbar-track,
  .product-calculator-section::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 2px;
  }
  
  .product-characteristics-section::-webkit-scrollbar-thumb,
  .product-calculator-section::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 2px;
  }
  
  .product-characteristics-section::-webkit-scrollbar-thumb:hover,
  .product-calculator-section::-webkit-scrollbar-thumb:hover {
    background: #aaa;
  }
}

.product-calculator-section {
  background: #fff;
  padding: 3%;
  border-radius: 12px;
  border: 3px solid #dc3545;
  box-shadow: 0 4px 15px rgba(0, 123, 255, 0.1);
  height: 100%;
  overflow-y: auto;
  min-width: 280px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  min-height: 300px;
  flex: 1;
  margin: 0;
  max-width: none;
}

.product-description-section {
  margin-top: 16px;
  height: auto;
  min-height: 100px;
  max-height: 200px;
  overflow-y: auto;
  flex-shrink: 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  width: 100%;
  max-width: 100%;
}

.product-description-section .product-header {
  display: flex;
  align-items: center;
  gap: 1vw;
  margin-bottom: 1vh;
  flex-wrap: wrap;
}

.product-description-section .category-badge {
  background: #007bff;
  color: white;
  padding: 0.5vh 1vw;
  border-radius: 4px;
  font-size: clamp(10px, 0.8rem, 12px);
  font-weight: 600;
  white-space: nowrap;
}

.product-description-section h2 {
  margin: 0;
  font-size: clamp(14px, 1.2rem, 18px);
  font-weight: 600;
  color: #1a1a1a;
  line-height: 1.3;
}

.product-description-section .product-description {
  margin-top: 1vh;
}

.product-description-section .product-description h4 {
  margin: 0 0 0.5vh 0;
  font-size: clamp(12px, 1rem, 14px);
  font-weight: 600;
  color: #495057;
}

.product-description-section .product-description p {
  margin: 0;
  font-size: clamp(11px, 0.9rem, 13px);
  line-height: 1.4;
  color: #6c757d;
  text-align: justify;
}

.product-detail-layout h3 {
  margin: 0 0 2% 0;
  font-size: clamp(12px, 1.3rem, 18px);
  font-weight: 700;
  color: #1a1a1a;
  text-align: center;
  padding-bottom: 1.5%;
  border-bottom: 2px solid #e9ecef;
  flex-shrink: 0;
  line-height: 1.2;
}

/* Секции характеристик */
.variants-section h4 {
  margin: 0 0 15px 0;
  font-size: 16px;
  color: #495057;
}

.characteristic-group {
  margin-bottom: 6%;
  flex-shrink: 0;
}

.characteristic-group label {
  display: block;
  margin-bottom: 3%;
  font-weight: 600;
  color: #495057;
  font-size: clamp(11px, 1rem, 14px);
  line-height: 1.2;
}

.option-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 2%;
  justify-content: flex-start;
}

.option-btn {
  padding: 1.5% 2.5%;
  border: 2px solid #dee2e6;
  background: white;
  border-radius: 6px;
  cursor: pointer;
  font-size: clamp(9px, 0.8rem, 12px);
  font-weight: 500;
  color: #495057;
  transition: all 0.2s ease;
  flex: 0 1 auto;
  text-align: center;
  white-space: nowrap;
  min-width: 50px;
  box-sizing: border-box;
  overflow: hidden;
  text-overflow: ellipsis;
}

.option-btn:hover {
  border-color: #007bff;
  color: #007bff;
}

.option-btn.active {
  background: #007bff;
  border-color: #007bff;
  color: white;
}

.characteristics-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.characteristic-item {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #e9ecef;
}

.char-label {
  font-weight: 500;
  color: #495057;
}

.char-value {
  color: #1a1a1a;
}

/* Калькулятор */
.calculator-form {
  display: flex;
  flex-direction: column;
  gap: 3%;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.price-display {
  text-align: center;
  padding: 3%;
  background: linear-gradient(135deg, #007bff, #0056b3);
  border-radius: 10px;
  color: white;
  flex-shrink: 0;
  box-sizing: border-box;
  min-height: 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.price-label {
  font-size: clamp(9px, 0.9rem, 12px);
  margin-bottom: 1%;
  opacity: 0.9;
  line-height: 1.2;
}

.price-value {
  font-size: clamp(14px, 1.6rem, 20px);
  font-weight: 700;
  line-height: 1.1;
}

.calc-input-group {
  display: flex;
  flex-direction: column;
  gap: 2%;
  flex-shrink: 0;
}

.calc-input-group label {
  font-weight: 600;
  color: #495057;
  font-size: clamp(10px, 1rem, 13px);
  line-height: 1.2;
}

.quantity-controls {
  display: flex;
  align-items: center;
  border: 2px solid #e9ecef;
  border-radius: 6px;
  overflow: hidden;
  min-height: 40px;
  width: 100%;
}

.quantity-controls button {
  border: none;
  background: #f8f9fa;
  padding: 2.5% 3.5%;
  cursor: pointer;
  font-weight: 600;
  color: #495057;
  transition: background 0.2s ease;
  font-size: clamp(11px, 1rem, 14px);
  flex: 0 0 18%;
  box-sizing: border-box;
  min-width: 30px;
}

.quantity-controls button:hover {
  background: #e9ecef;
}

.quantity-controls input {
  border: none;
  flex: 1;
  text-align: center;
  padding: 2.5%;
  font-size: clamp(12px, 1.2rem, 15px);
  background: white;
  font-weight: 600;
  box-sizing: border-box;
  min-width: 60px;
}

.calc-hint {
  font-size: 10px;
  color: #6c757d;
  text-align: center;
  line-height: 1.1;
  margin-top: 0.5%;
}

.total-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 3%;
  background: #f8f9fa;
  border-radius: 8px;
  border: 1px solid #e9ecef;
  flex-shrink: 0;
  margin-top: auto;
  box-sizing: border-box;
  min-height: 50px;
}

.total-label {
  font-weight: 600;
  color: #495057;
  font-size: clamp(11px, 1.1rem, 14px);
  line-height: 1.2;
}

.total-value {
  font-size: clamp(12px, 1.4rem, 18px);
  font-weight: 700;
  color: #007bff;
  line-height: 1.1;
}

.calculator-actions {
  display: flex;
  gap: 3%;
  flex-shrink: 0;
  margin-top: auto;
  width: 100%;
}

.calculator-actions .btn {
  flex: 1;
  padding: 2.5% 1.5%;
  border-radius: 6px;
  font-weight: 600;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: clamp(9px, 0.9rem, 13px);
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-wrap: break-word;
  line-height: 1.2;
}

.calculator-actions .btn-primary {
  background: #007bff;
  color: white;
  border: 2px solid #007bff;
}

.calculator-actions .btn-primary:hover {
  background: #0056b3;
  border-color: #0056b3;
}

.calculator-actions .btn-secondary {
  background: white;
  color: #6c757d;
  border: 2px solid #e9ecef;
}

.calculator-actions .btn-secondary:hover {
  color: #495057;
  border-color: #adb5bd;
}

/* Простой калькулятор */
.simple-calculator {
  background: #f8f9fa !important;
  border: 1px solid #dee2e6 !important;
}

.simple-calculator .price-display {
  background: linear-gradient(135deg, #6c757d, #495057) !important;
}

/* Большие экраны - расширяем секции */
@media (min-width: 1600px) {
  .product-detail-layout {
    gap: 2.5%;
  }
  
  .product-images-section {
    height: 45%;
    min-height: 350px;
  }
  
  .product-details-section {
    height: 55%;
    min-height: 350px;
  }
  
  .characteristics-calculator-row {
    height: 70%;
    min-height: 250px;
  }
  
  .product-description-section {
    height: 30%;
    min-height: 100px;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    padding: 2.5%;
    min-width: 350px;
  }
  
  .option-btn {
    min-width: 65px;
    padding: 2.2% 3.5%;
  }
  
  .quantity-controls {
    min-height: 48px;
  }
  
  .quantity-controls button {
    min-width: 38px;
  }
  
  .quantity-controls input {
    min-width: 90px;
  }
  
  .main-image {
    max-height: 100%;
  }
  
  .image-gallery {
    max-height: 100px;
  }
  
  .gallery-thumb {
    width: 80px;
    height: 80px;
  }
}

@media (min-width: 1800px) {
  .modal-content {
    max-width: 2000px;
  }
  
  .product-detail-layout {
    gap: 3%;
  }
  
  .product-images-section {
    height: 50%;
    min-height: 400px;
  }
  
  .product-details-section {
    height: 50%;
    min-height: 400px;
  }
  
  .characteristics-calculator-row {
    height: 70%;
    min-height: 280px;
  }
  
  .product-description-section {
    height: 30%;
    min-height: 120px;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    padding: 3%;
    min-width: 380px;
  }
  
  .option-btn {
    min-width: 70px;
    padding: 2.5% 4%;
  }
  
  .quantity-controls {
    min-height: 50px;
  }
  
  .quantity-controls button {
    min-width: 40px;
  }
  
  .quantity-controls input {
    min-width: 100px;
  }
  
  .main-image {
    max-height: 100%;
  }
  
  .image-gallery {
    max-height: 100px;
  }
  
  .gallery-thumb {
    width: 85px;
    height: 85px;
  }
}

/* ОПТИМИЗАЦИЯ ДЛЯ 24-ДЮЙМОВЫХ МОНИТОРОВ И БОЛЬШИХ ЭКРАНОВ */
@media (min-width: 1920px) and (min-height: 1080px) {
  .modal-content {
    width: clamp(1200px, 80vw, 1800px) !important;
    max-width: clamp(1200px, 80vw, 1800px) !important;
    height: clamp(700px, 85vh, 1200px) !important;
    max-height: clamp(700px, 85vh, 1200px) !important;
    margin: 5vh auto !important;
  }
  
  .modal-body {
    padding: 24px !important;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .product-detail-layout {
    gap: 20px !important;
    height: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* УБИРАЕМ НЕОБХОДИМОСТЬ СКРОЛЛА - ДЕЛАЕМ ГОРИЗОНТАЛЬНУЮ КОМПОНОВКУ */
  .characteristics-calculator-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 24px !important;
    height: auto !important;
    min-height: 350px !important;
    flex: 1;
  }
  
  .product-characteristics-section {
    width: 45% !important;
    padding: 20px !important;
    overflow-y: auto !important;
    max-height: 350px !important;
    border: 1px solid #28a745;
    border-radius: 10px;
    background: #f8f9fa;
    margin: 0;
    max-width: none;
  }
  
  .product-calculator-section {
    width: 55% !important;
    padding: 20px !important;
    overflow-y: auto !important;
    max-height: 350px !important;
    border: 1px solid #dc3545;
    border-radius: 10px;
    background: #fff;
    margin: 0;
    max-width: none;
  }
  
  .product-description-section {
    height: auto !important;
    min-height: 120px !important;
    max-height: 180px !important;
    padding: 16px !important;
    overflow-y: auto;
    margin-top: 16px;
  }
  
  .product-images-section {
    height: auto !important;
    min-height: 200px !important;
    max-height: 250px !important;
    margin-bottom: 16px;
  }
}

/* УНИВЕРСАЛЬНАЯ АДАПТАЦИЯ ДЛЯ СРЕДНИХ БОЛЬШИХ ЭКРАНОВ */
@media (min-width: 1441px) and (max-width: 1919px) and (min-height: 901px) {
  .modal-content {
    width: clamp(1000px, 85vw, 1600px) !important;
    max-width: clamp(1000px, 85vw, 1600px) !important;
    height: clamp(700px, 85vh, 1100px) !important;
    max-height: clamp(700px, 85vh, 1100px) !important;
    margin: 5vh auto !important;
  }
  
  .modal-header {
    padding: 16px 20px !important;
    min-height: 50px;
  }
  
  .modal-header h2 {
    font-size: 20px !important;
  }
  
  .modal-close {
    width: 32px !important;
    height: 32px !important;
    font-size: 20px !important;
  }
  
  .modal-body {
    padding: 20px !important;
    overflow-y: auto;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .product-detail-layout {
    gap: 16px !important;
    height: 100%;
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }
  
  /* ГОРИЗОНТАЛЬНАЯ КОМПОНОВКА НА СРЕДНИХ БОЛЬШИХ ЭКРАНАХ */
  .characteristics-calculator-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    height: auto !important;
    min-height: 320px !important;
    flex: 1;
  }
  
  .product-characteristics-section {
    width: 45% !important;
    padding: 18px !important;
    overflow-y: auto !important;
    max-height: 320px !important;
    border: 1px solid #28a745;
    border-radius: 10px;
    background: #f8f9fa;
    margin: 0;
    max-width: none;
  }
  
  .product-calculator-section {
    width: 55% !important;
    padding: 18px !important;
    overflow-y: auto !important;
    max-height: 320px !important;
    border: 1px solid #dc3545;
    border-radius: 10px;
    background: #fff;
    margin: 0;
    max-width: none;
  }
  
  .product-description-section {
    height: auto !important;
    min-height: 100px !important;
    max-height: 160px !important;
    padding: 16px !important;
    overflow-y: auto;
    margin-top: 16px;
  }
  
  .product-images-section {
    height: auto !important;
    min-height: 180px !important;
    max-height: 220px !important;
    margin-bottom: 16px;
  }
  
  /* СТИЛИ ДЛЯ ЭЛЕМЕНТОВ ВНУТРИ */
  .product-detail-layout h3 {
    font-size: 16px !important;
    margin-bottom: 12px !important;
    padding-bottom: 8px !important;
    border-bottom: 2px solid #007bff !important;
    color: #333 !important;
  }
  
  .option-btn {
    padding: 8px 12px !important;
    font-size: 12px !important;
    min-width: 60px !important;
    min-height: 32px !important;
    margin: 2px !important;
  }
  
  .quantity-controls {
    min-height: 40px !important;
  }
  
  .quantity-controls button,
  .quantity-controls input {
    min-height: 40px !important;
    font-size: 14px !important;
  }
  
  .calculator-actions .btn {
    font-size: 13px !important;
    min-height: 40px !important;
    padding: 8px 16px !important;
  }
  
  .price-display {
    padding: 12px !important;
    min-height: 60px !important;
  }
  
  .price-value {
    font-size: 18px !important;
  }
  
  .total-value {
    font-size: 14px !important;
  }
}

/* АДАПТАЦИЯ ДЛЯ 23-ДЮЙМОВЫХ И СРЕДНИХ ЭКРАНОВ (более точное попадание) */
@media (min-width: 1900px) and (max-width: 1920px) and (min-height: 1070px) and (max-height: 1090px) {
  .modal-content {
    width: 90vw !important;
    max-width: 1800px !important;
    height: 90vh !important;
    max-height: 1200px !important;
    margin: 5vh auto !important;
  }
  
  .modal-header {
    padding: 15px 20px !important;
    min-height: 50px;
  }
  
  .modal-header h2 {
    font-size: 18px !important;
  }
  
  .modal-body {
    padding: 15px !important;
    overflow-y: auto;
  }
  
  .product-detail-layout {
    gap: 15px !important;
    height: 100%;
  }
  
  /* ГОРИЗОНТАЛЬНАЯ КОМПОНОВКА НА БОЛЬШИХ ЭКРАНАХ */
  .characteristics-calculator-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 20px !important;
    height: 70% !important;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    width: 50% !important;
    padding: 15px !important;
    overflow-y: auto !important;
    min-height: 300px !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
  }
  
  .product-description-section {
    height: 30% !important;
    padding: 15px !important;
    overflow-y: auto;
  }
  
  .product-images-section {
    height: 35% !important;
    min-height: 200px !important;
  }
  
  .product-details-section {
    height: 65% !important;
  }
}

/* СПЕЦИАЛЬНАЯ АДАПТАЦИЯ ДЛЯ 13-ДЮЙМОВЫХ ЭКРАНОВ (1280x800, 1366x768) */
@media (max-width: 1366px) and (max-height: 800px) {
  .modal-content {
    width: 99vw !important;
    height: 98vh !important;
    max-width: 99vw !important;
    max-height: 98vh !important;
    margin: 0.5vh auto !important;
  }
  
  .modal-header {
    padding: 8px 12px !important;
    min-height: 35px;
  }
  
  .modal-header h2 {
    font-size: 14px !important;
  }
  
  .modal-body {
    padding: 8px !important;
    align-items: flex-start;
    overflow-y: auto;
  }
  
  .product-detail-layout {
    gap: 6px !important;
    justify-content: flex-start;
    height: auto;
    min-height: auto;
  }
  
  .product-images-section {
    min-height: 80px !important;
    max-height: 100px !important;
    margin-bottom: 6px;
  }
  
  /* ХАРАКТЕРИСТИКИ И РАСЧЕТ В КОЛОНКУ НА МАЛЕНЬКИХ ЭКРАНАХ */
  .characteristics-calculator-row {
    flex-direction: column !important;
    gap: 6px;
    min-height: auto;
    height: auto;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    width: 100% !important;
    max-height: 140px !important;
    min-height: 120px !important;
    padding: 8px !important;
    overflow-y: auto;
    margin: 0;
    max-width: none;
    font-size: 12px;
  }
  
  .product-description-section {
    max-height: 80px !important;
    min-height: 60px !important;
    padding: 8px !important;
    margin-top: 6px;
    font-size: 12px;
  }
  
  /* АДАПТАЦИЯ ЗАГОЛОВКОВ И ЭЛЕМЕНТОВ ФОРМЫ */
  .product-detail-layout h3 {
    font-size: 14px !important;
    margin-bottom: 6px !important;
    padding-bottom: 4px !important;
  }
  
  .option-btn {
    padding: 4px 8px !important;
    font-size: 11px !important;
    min-width: 50px !important;
    min-height: 28px !important;
    margin: 1px !important;
  }
  
  .quantity-controls {
    min-height: 32px !important;
  }
  
  .quantity-controls button,
  .quantity-controls input {
    min-height: 32px !important;
    font-size: 12px !important;
    padding: 4px 6px !important;
  }
  
  .calculator-actions .btn {
    font-size: 12px !important;
    min-height: 32px !important;
    padding: 6px 12px !important;
  }
  
  .price-display {
    padding: 8px !important;
    min-height: 50px !important;
  }
  
  .price-value {
    font-size: 16px !important;
  }
  
  .total-value {
    font-size: 12px !important;
  }
}

/* АДАПТАЦИЯ ДЛЯ МАЛЫХ ЭКРАНОВ И НОУТБУКОВ (13-15 дюймов) */
@media (max-width: 1440px) and (min-width: 768px) and (min-height: 801px) {
  .modal-content {
    width: 98vw !important;
    height: 95vh !important;
    max-width: 98vw !important;
    max-height: 95vh !important;
    margin: 1vh auto !important;
  }
  
  .modal-header {
    padding: 12px 16px !important;
    min-height: 40px;
  }
  
  .modal-header h2 {
    font-size: 16px !important;
  }
  
  .modal-body {
    padding: 12px !important;
    align-items: flex-start;
    overflow-y: auto;
  }
  
  .product-detail-layout {
    gap: 8px !important;
    justify-content: flex-start;
    height: auto;
    min-height: auto;
  }
  
  /* ВЕРТИКАЛЬНАЯ КОМПОНОВКА ДЛЯ МАЛЕНЬКИХ ЭКРАНОВ */
  .characteristics-calculator-row {
    flex-direction: column !important;
    gap: 8px;
    min-height: auto;
    height: auto;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    width: 100% !important;
    max-height: 180px !important;
    min-height: 150px !important;
    padding: 12px !important;
    overflow-y: auto;
    margin: 0;
    max-width: none;
  }
  
  .product-images-section {
    min-height: 120px !important;
    max-height: 150px !important;
    margin-bottom: 8px;
  }
  
  .product-description-section {
    max-height: 120px !important;
    min-height: 80px !important;
    padding: 12px !important;
    margin-top: 8px;
  }
}

/* МОБИЛЬНАЯ АДАПТАЦИЯ */
@media (max-width: 767px) {
  .modal-content {
    width: 100vw !important;
    height: 100vh !important;
    max-width: 100vw !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
  }
  
  .modal-body {
    padding: 12px !important;
    align-items: flex-start;
  }
  
  .product-detail-layout {
    gap: 8px !important;
    justify-content: flex-start;
  }
  
  .characteristics-calculator-row {
    flex-direction: column;
    gap: 8px;
    min-height: auto;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    width: 100% !important;
    max-height: 180px;
    padding: 12px !important;
    font-size: 14px;
  }
  
  .product-images-section {
    min-height: 120px !important;
    max-height: 150px !important;
  }
  
  .modal-header h2 {
    font-size: 18px !important;
  }
}

/* КАРДИНАЛЬНАЯ АДАПТАЦИЯ ДЛЯ МАЛЫХ ЭКРАНОВ (старые стили) */
@media (max-width: 1440px) and (max-height: 900px) {
  .modal-content {
    width: 98vw !important;
    height: 98vh !important;
    max-width: 98vw !important;
    max-height: 98vh !important;
    margin: 1vh auto !important;
    padding: 0 !important;
  }
  
  .modal-header {
    padding: 8px 12px !important;
    min-height: 40px;
  }
  
  .modal-header h2 {
    font-size: 16px !important;
    font-weight: 600;
    margin: 0;
  }
  
  .modal-close {
    width: 28px !important;
    height: 28px !important;
    font-size: 18px !important;
  }
  
  .modal-body {
    padding: 8px !important;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  /* УБИРАЕМ ИЗОБРАЖЕНИЯ НА МАЛЫХ ЭКРАНАХ ДЛЯ ЭКОНОМИИ МЕСТА */
  .product-images-section {
    display: none !important;
  }
  
  .product-detail-layout {
    gap: 8px !important;
    height: 100% !important;
    flex: 1;
  }
  
  .product-details-section {
    height: 100% !important;
    flex: 1;
    display: flex;
    flex-direction: column;
  }
  
  /* ВЕРТИКАЛЬНАЯ КОМПОНОВКА ХАРАКТЕРИСТИК И КАЛЬКУЛЯТОРА */
  .characteristics-calculator-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    height: 75% !important;
    flex: 1;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    padding: 8px !important;
    min-width: auto !important;
    max-width: none !important;
    min-height: 200px !important;
    height: auto !important;
    flex: 1;
    overflow-y: auto;
    border-radius: 8px;
  }
  
  /* КОМПАКТНЫЕ ЗАГОЛОВКИ */
  .product-detail-layout h3 {
    font-size: 13px !important;
    margin-bottom: 6px !important;
    padding-bottom: 6px !important;
    font-weight: 600;
    text-align: left !important;
    border-bottom: 1px solid #e9ecef !important;
  }
  
  /* КОМПАКТНЫЕ ХАРАКТЕРИСТИКИ */
  .characteristic-group {
    margin-bottom: 8px !important;
  }
  
  .calc-input-group label,
  .characteristic-group label {
    font-size: 11px !important;
    margin-bottom: 4px !important;
    font-weight: 600;
  }
  
  /* МЕЛКИЕ КНОПКИ ВАРИАНТОВ */
  .option-btn {
    padding: 4px 8px !important;
    font-size: 10px !important;
    min-width: 45px !important;
    min-height: 28px !important;
    margin: 1px !important;
  }
  
  /* КОМПАКТНЫЙ КАЛЬКУЛЯТОР */
  .price-display {
    padding: 8px !important;
    min-height: 50px !important;
  }
  
  .price-value {
    font-size: 14px !important;
  }
  
  .total-value {
    font-size: 12px !important;
  }
  
  .quantity-controls {
    min-height: 32px !important;
    border-width: 1px !important;
  }
  
  .quantity-controls button {
    min-width: 32px !important;
    min-height: 32px !important;
    padding: 4px !important;
    font-size: 14px !important;
  }
  
  .quantity-controls input {
    min-width: 50px !important;
    min-height: 32px !important;
    font-size: 12px !important;
    padding: 4px !important;
  }
  
  .calculator-actions .btn {
    font-size: 10px !important;
    padding: 6px 4px !important;
    min-height: 32px !important;
  }
  
  /* КОМПАКТНОЕ ОПИСАНИЕ */
  .product-description-section {
    height: 25% !important;
    min-height: 80px !important;
    padding: 6px !important;
    margin-top: 8px;
  }
  
  .product-description-section h2 {
    font-size: 14px !important;
    margin-bottom: 4px !important;
  }
  
  .product-description-section .product-description h4 {
    font-size: 11px !important;
    margin-bottom: 2px !important;
  }
  
  .product-description-section .product-description p {
    font-size: 10px !important;
    line-height: 1.3 !important;
  }
  
  /* СКРОЛЛ ДЛЯ СЕКЦИЙ */
  .product-characteristics-section::-webkit-scrollbar,
  .product-calculator-section::-webkit-scrollbar {
    width: 6px !important;
  }
  
  .product-characteristics-section::-webkit-scrollbar-thumb,
  .product-calculator-section::-webkit-scrollbar-thumb {
    background: #999 !important;
    border-radius: 3px !important;
  }
}

/* Компактные элементы для больших экранов с малой высотой */
@media (min-width: 1400px) and (max-height: 900px) {
  .modal-content {
    height: 85vh;
    max-height: 85vh;
  }
  
  .product-images-section {
    height: 35%;
    min-height: 200px;
  }
  
  .product-details-section {
    height: 65%;
    min-height: 280px;
  }
  
  .characteristics-calculator-row {
    height: 70%;
    min-height: 200px;
  }
  
  .product-description-section {
    height: 30%;
    min-height: 80px;
  }
}

/* СПЕЦИАЛЬНО ДЛЯ 13-ДЮЙМОВЫХ ЭКРАНОВ 1366x768 */
@media (min-width: 1360px) and (max-width: 1370px) and (min-height: 760px) and (max-height: 770px) {
  .modal-content {
    width: 98vw !important;
    height: 96vh !important;
    margin: 2vh auto !important;
    max-width: 98vw !important;
    max-height: 96vh !important;
  }
  
  .modal-header {
    padding: 6px 10px !important;
  }
  
  .modal-header h2 {
    font-size: 15px !important;
  }
  
  .modal-body {
    padding: 6px !important;
  }
  
  .product-images-section {
    display: none !important;
  }
  
  .characteristics-calculator-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
    height: 80% !important;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    width: 100% !important;
    padding: 10px !important;
    min-height: 180px !important;
    max-height: 250px !important;
    overflow-y: auto !important;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    background: #fafafa;
  }
  
  .product-detail-layout h3 {
    font-size: 12px !important;
    margin-bottom: 4px !important;
    padding-bottom: 4px !important;
  }
  
  .option-btn {
    padding: 3px 6px !important;
    font-size: 9px !important;
    min-width: 40px !important;
    min-height: 24px !important;
  }
  
  .calc-input-group label,
  .characteristic-group label {
    font-size: 10px !important;
    margin-bottom: 2px !important;
  }
  
  .quantity-controls {
    min-height: 28px !important;
  }
  
  .quantity-controls button,
  .quantity-controls input {
    min-height: 28px !important;
    font-size: 11px !important;
    padding: 2px !important;
  }
  
  .calculator-actions .btn {
    font-size: 9px !important;
    padding: 4px 2px !important;
    min-height: 28px !important;
  }
  
  .product-description-section {
    height: 15% !important;
    min-height: 60px !important;
    padding: 4px !important;
  }
  
  .characteristic-item {
    padding: 2px 0 !important;
  }
  
  .char-label,
  .char-value {
    font-size: 9px !important;
  }
}

/* Адаптивность */
@media (max-width: 1200px) {
  .product-detail-layout {
    grid-template-columns: 1.1fr 1.8fr 1.1fr;
    gap: 2%;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    padding: 2.5%;
    min-width: 250px;
  }
  
  .option-btn {
    min-width: 55px;
    padding: 1.8% 2.8%;
  }
  
  .quantity-controls {
    min-height: 42px;
  }
  
  .quantity-controls button {
    min-width: 32px;
  }
  
  .quantity-controls input {
    min-width: 70px;
  }
  
  .main-image {
    max-height: 100%;
  }
  
  .product-gallery {
    max-height: 100%;
  }
  
  .product-gallery img {
    width: 65px;
    height: 65px;
  }
}

@media (max-width: 1000px) {
  .product-detail-layout {
    gap: 2.5%;
    min-height: 500px;
  }
  
  .product-images-section {
    height: 35%;
    min-height: 200px;
  }
  
  .product-details-section {
    height: 65%;
    min-height: 300px;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    min-width: 250px;
  }
  
  .main-image {
    flex: 1;
  }
  
  .image-gallery {
    flex: 1;
  }
}

@media (max-width: 900px) {
  .modal-content {
    width: 90vw;
    height: 90vh;
    margin: 5vh auto;
  }
  
  .modal-header {
    padding: 10px 15px;
  }
  
  .modal-body {
    padding: 10px 15px;
  }
  
  .product-detail-layout {
    gap: 15px;
    height: 100%;
    min-height: 600px;
  }
  
  .product-images-section {
    height: 25%;
    min-height: 120px;
  }
  
  .product-details-section {
    height: 75%;
    min-height: 400px;
  }
  
  .characteristics-calculator-row {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 70%;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    height: auto;
    min-height: 150px;
    min-width: 100%;
    max-width: 100%;
    padding: 15px;
  }
  
  .product-description-section {
    height: 30%;
    min-height: 100px;
    max-height: none;
    padding: 10px;
  }
  
  .calculator-actions {
    flex-direction: row;
    gap: 10px;
  }
  
  .calculator-actions .btn {
    flex: 1;
    min-height: 40px;
    font-size: 12px;
  }
  
  .main-image {
    height: 100%;
    max-height: none;
  }
  
  .option-btn {
    padding: 8px 12px;
    font-size: 11px;
    min-width: 60px;
  }
  
  .quantity-controls {
    min-height: 40px;
  }
  
  .quantity-controls button,
  .quantity-controls input {
    font-size: 14px;
  }
}

/* Специальная адаптация для экранов с низким разрешением по высоте */
@media (max-height: 768px) and (min-width: 1200px) {
  .modal-content {
    height: 95vh;
    max-height: 95vh;
    margin: 2.5vh auto;
  }
  
  .product-images-section {
    height: 25%;
    min-height: 150px;
  }
  
  .product-details-section {
    height: 75%;
  }
  
  .characteristics-calculator-row {
    height: 80%;
  }
  
  .product-description-section {
    height: 20%;
    min-height: 60px;
  }
}

/* АДАПТАЦИЯ ДЛЯ МАЛЫХ НОУТБУКОВ И ПЛАНШЕТОВ */
@media (max-width: 1366px) and (max-height: 900px) {
  .modal-content {
    width: 96vw !important;
    max-width: 96vw !important;
    height: 94vh !important;
    max-height: 94vh !important;
    margin: 3vh auto !important;
  }
  
  .modal-header {
    padding: 10px 15px !important;
    min-height: 45px;
  }
  
  .modal-header h2 {
    font-size: 16px !important;
  }
  
  .modal-body {
    padding: 10px !important;
  }
  
  .product-images-section {
    height: 25% !important;
    min-height: 140px !important;
    max-height: 200px !important;
  }
  
  .product-details-section {
    height: 75% !important;
  }
  
  .characteristics-calculator-row {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    height: 75% !important;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    width: 100% !important;
    padding: 12px !important;
    min-height: 200px !important;
    max-height: 300px !important;
    overflow-y: auto !important;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fafafa;
  }
  
  .product-description-section {
    height: 25% !important;
    min-height: 100px !important;
    padding: 12px !important;
    overflow-y: auto;
  }
  
  .product-detail-layout h3 {
    font-size: 14px !important;
    margin-bottom: 8px !important;
    padding-bottom: 6px !important;
    border-bottom: 2px solid #007bff !important;
  }
  
  .option-btn {
    padding: 6px 10px !important;
    font-size: 11px !important;
    min-width: 50px !important;
    min-height: 30px !important;
    margin: 2px !important;
  }
  
  .quantity-controls {
    min-height: 36px !important;
  }
  
  .quantity-controls button,
  .quantity-controls input {
    min-height: 36px !important;
    font-size: 13px !important;
  }
  
  .calculator-actions .btn {
    font-size: 12px !important;
    min-height: 36px !important;
    padding: 6px 12px !important;
  }
}

/* УНИВЕРСАЛЬНАЯ ОПТИМИЗАЦИЯ ДЛЯ ПРОМЕЖУТОЧНЫХ РАЗМЕРОВ */
@media (min-width: 1200px) and (max-width: 1366px) and (max-height: 768px) {
  .modal-content {
    width: 98vw !important;
    height: 98vh !important;
    margin: 1vh auto !important;
  }
  
  .modal-header {
    padding: 8px 12px !important;
  }
  
  .modal-body {
    padding: 8px !important;
  }
  
  /* КОМПАКТНАЯ КОМПОНОВКА */
  .product-images-section {
    height: 20% !important;
    min-height: 120px !important;
  }
  
  .product-details-section {
    height: 80% !important;
  }
  
  .characteristics-calculator-row {
    gap: 8px !important;
    height: 80% !important;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    padding: 10px !important;
    min-width: 250px !important;
    overflow-y: auto !important;
  }
  
  .product-detail-layout h3 {
    font-size: 13px !important;
    margin-bottom: 6px !important;
  }
  
  .option-btn {
    padding: 5px 8px !important;
    font-size: 11px !important;
    min-width: 50px !important;
    min-height: 30px !important;
  }
  
  .quantity-controls {
    min-height: 35px !important;
  }
  
  .quantity-controls button,
  .quantity-controls input {
    min-height: 35px !important;
    font-size: 12px !important;
  }
  
  .calculator-actions .btn {
    font-size: 11px !important;
    min-height: 35px !important;
  }
  
  .product-description-section {
    height: 20% !important;
    min-height: 70px !important;
    padding: 8px !important;
  }
}

/* ОБЩАЯ АДАПТИВНОСТЬ ДЛЯ ВСЕХ ЭКРАНОВ - FALLBACK */
@media screen {
  .modal-content {
    /* Обеспечиваем прокрутку если содержимое не помещается */
    overflow-y: auto !important;
  }
  
  .modal-body {
    /* Гарантируем прокрутку для содержимого */
    overflow-y: auto !important;
    flex: 1;
    min-height: 0;
  }
  
  .product-detail-layout {
    /* Минимальная высота для корректного отображения */
    min-height: 400px !important;
    display: flex;
    flex-direction: column;
  }
  
  .characteristics-calculator-row {
    /* Для случаев когда flex не работает корректно */
    min-height: 250px !important;
    flex: 1;
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    /* Обеспечиваем прокрутку внутри секций */
    overflow-y: auto !important;
    flex: 1;
    min-height: 150px !important;
  }
  
  .product-description-section {
    /* Минимальная высота для описания */
    min-height: 80px !important;
    overflow-y: auto !important;
  }
  
  /* Гибкие кнопки опций */
  .option-btn {
    flex-wrap: wrap !important;
    word-break: break-word !important;
  }
  
  /* Адаптивные элементы управления количеством */
  .quantity-controls {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  
  .quantity-controls input {
    text-align: center !important;
    max-width: 80px !important;
  }
}

@media (max-width: 600px) {
  .modal-content {
    border-radius: 8px;
    width: 95vw;
    height: 95vh;
    margin: 2.5vh auto;
  }
  
  .modal-header h2 {
    font-size: clamp(14px, 3.5vw, 16px);
  }
  
  .product-detail-layout h3 {
    font-size: clamp(12px, 3vw, 14px);
    margin-bottom: 1vh;
  }
  
  .product-images-section {
    height: 20%;
    min-height: 100px;
  }
  
  .product-details-section {
    height: 80%;
    min-height: 500px;
  }
  
  .option-btn {
    padding: 8px 12px;
    font-size: clamp(10px, 2.5vw, 12px);
    min-width: 50px;
    min-height: 36px;
  }
  
  .quantity-controls button {
    padding: 8px 12px;
    min-width: 36px;
    min-height: 36px;
  }
  
  .quantity-controls input {
    min-height: 36px;
    font-size: 14px;
  }
  
  .price-value {
    font-size: clamp(14px, 3.5vw, 18px);
  }
  
  .total-value {
    font-size: clamp(12px, 3vw, 16px);
  }
  
  .product-characteristics-section,
  .product-calculator-section {
    max-height: 40vh;
    min-height: 35vh;
    padding: 12px;
  }
  
  .calculator-actions .btn {
    font-size: clamp(10px, 2.5vw, 12px);
    padding: 12px 8px;
    min-height: 44px;
  }
}

/* ФИНАЛЬНАЯ ОПТИМИЗАЦИЯ ДЛЯ ВСЕХ УСТРОЙСТВ */
@media (max-width: 480px) {
  .modal-content {
    width: 98vw;
    height: 98vh;
    margin: 1vh auto;
    border-radius: 4px;
  }
  
  .modal-header {
    padding: 8px 12px;
  }
  
  .modal-body {
    padding: 8px 12px;
  }
  
  .product-detail-layout h3 {
    font-size: 13px;
    margin-bottom: 8px;
  }
  
  .calc-input-group label,
  .characteristic-group label {
    font-size: 11px;
    margin-bottom: 4px;
  }
}

/* УЛУЧШЕНИЯ ДЛЯ ЭКРАНОВ С НИЗКИМ DPI */
@media (max-resolution: 96dpi) {
  .modal-content {
    font-size: calc(var(--modal-responsive-font) * 1.1) !important;
  }
  
  .option-btn,
  .quantity-controls button,
  .calculator-actions .btn {
    border-width: 2px !important;
    font-weight: 600 !important;
  }
  
  .product-detail-layout h3 {
    font-weight: 700 !important;
    text-shadow: 0 1px 1px rgba(0,0,0,0.1) !important;
  }
}

/* УНИВЕРСАЛЬНЫЕ УЛУЧШЕНИЯ ДЛЯ ЧИТАЕМОСТИ */
@media (max-width: 1440px) {
  .modal * {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
  }
  
  .option-btn:focus,
  .quantity-controls button:focus,
  .calculator-actions .btn:focus {
    outline: 3px solid #007bff !important;
    outline-offset: 2px !important;
  }
  
  .characteristic-item:hover {
    background-color: rgba(0, 123, 255, 0.05) !important;
  }
}

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

.main-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: #f8f9fa;
  flex: 2;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  max-height: 300px;
}

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

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

.image-gallery {
  display: flex;
  flex-direction: row;
  gap: 8px;
  justify-content: flex-start;
  max-height: 100px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 5px 0;
  flex: 1;
  min-width: 80px;
}

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

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

.gallery-thumb.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: 2000px;
  width: 90%;
  max-height: 92vh;
  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 {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  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;
}

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