/* Общие стили */
.page-wrapper {
  display: flex;
  gap: 20px;
  margin: 20px auto;
  padding: 0 15px;
  font-size: 16px;
  max-width: 1600px;
  width: 100%;
  /* Убедимся, что контейнер растягивается */
}

/* Хлебные крошки */
.breadcrumbs-container {
  display: flex;
  gap: 8px;
  font-size: 14px;
  color: #666;
}

.breadcrumbs-container a {
  color: #337ab7;
  text-decoration: none;
  font-size: 14px;
}

.breadcrumbs-container a:hover {
  text-decoration: underline;
}

.breadcrumbs-container span {
  color: #666;
}

/* Заголовок категории */
.category-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 20px;
  color: #222;
  text-align: left;
  letter-spacing: 0.5px;
}

/* Левая колонка: Фильтры */
.filters-sidebar {
  width: 300px;
  /* Базовая ширина */
  min-width: 300px;
  /* Минимальная ширина, чтобы не сжимался */
  padding: 20px;
  border-radius: 12px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  /* Учитываем padding в ширине */
}

/* Кнопка для открытия фильтров на мобильных устройствах */
.filters-toggle-btn {
  display: none;
  position: fixed;
  top: 85px;
  left: 10px;
  z-index: 2001;
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #fff;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.filters-toggle-btn:hover {
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
}

.filters-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.filter-group {
  margin-bottom: 15px;
}

.filter-group h4 {
  margin: 0 0 10px;
  font-size: 16px;
  font-weight: bold;
  color: #333;
}

.price-range {
  display: flex;
  gap: 10px;
}

.price-range input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  transition: border-color 0.3s ease;
}

.checkbox-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 140px;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.checkbox-list.expanded {
  max-height: 550px;
}

.checkbox-list label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: #555;
  cursor: pointer;
}

.checkbox-list p {
  margin: 0;
  font-size: 14px;
  color: #999;
}

.filter-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.apply-filters {
  background: #007bff;
  color: #fff;
  padding: 10px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  font-size: 14px;
}

.apply-filters:hover {
  background: #0056b3;
}

.reset-filters {
  background: #ff4d4d;
  color: white;
  border: none;
  padding: 8px 15px;
  font-size: 14px;
  border-radius: 5px;
  cursor: pointer;
  text-align: center;
  width: 100%;
}

.reset-filters:hover {
  background: #cc0000;
}

/* Правая колонка: Основной контент */
.content {
  flex-grow: 1;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* Категории */
.categories-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  list-style: none;
  padding: 0;
  gap: 15px;
}

.category-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-decoration: none;
  color: #333;
  transition: transform 0.2s;
}

.category-link:hover {
  transform: scale(1.05);
}

.category-image {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.category-item {
  text-align: center;
  margin: 10px;
  width: 150px;
}

.category-name {
  margin-top: 8px;
  font-size: 16px;
  font-weight: bold;
}

/* Сортировка и пагинация */
.sort-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 25px;
  padding: 10px;
  border-radius: 8px;
}

.sort-pagination form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.sort-pagination select {
  padding: 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

/* Сетка товаров */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Карточка товара */
.product-card {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 350px;
  width: 100%;
  /* Убедимся, что карточка занимает всю доступную ширину */
  box-sizing: border-box;
  /* Учитываем padding и border в ширине */
}

.product-card:hover {
  transform: translateY(-5px) !important;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

.product-image img {
  max-width: 100%;
  height: auto;
  border-radius: 4px;
  aspect-ratio: 1/1;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-name {
  font-size: 14px;
  font-weight: bold;
  margin: 10px 0;
  color: #333 !important;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}



.product-description {
  font-size: 15px;
  color: #555;
}

.product-price {
  font-size: 18px;
  font-weight: 600;
  display: flex;
  align-items: baseline;
  gap: 8px;
  justify-content: center;
}

.product-price .old-price {
  color: #888;
  text-decoration: line-through;
  font-size: 14px;
  font-weight: 400;
  order: 1;
  position: relative;
  top: -7px;
}

.product-price .new-price {
  color: #363636;
  font-size: 18px;
  font-weight: 600;
  order: 0;
}

.pagination-section {
  margin-top: 20px;
  text-align: center;
}

.pagination {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.pagination-link {
  padding: 8px 12px;
  background: #007bff;
  color: #fff;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
}

.pagination-link:hover {
  background: #0056b3;
}

.pagination .active {
  background: #0056b3;
}

/* Фильтры: чекбоксы и кнопки */
.hidden-checkbox {
  display: none;
  margin-left: 20px;
}

.expanded .hidden-checkbox {
  display: inline-block;
}

.toggle-button {
  margin-top: 5px;
  cursor: pointer;
  border: none;
  background-color: #007bff;
  color: white;
  padding: 5px 10px;
  font-size: 14px;
  border-radius: 5px;
  transition: background 0.3s ease;
}

.toggle-button:hover {
  background: #0056b3;
}

.range-container {
  display: flex;
  align-items: center;
  gap: 10px;
}

.range-container span {
  font-weight: bold;
}

.color-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #555;
}

.color-indicator {
  display: inline-block;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1px solid #ccc;
}

/* Модальное окно */
.modal-content {
  border-radius: 8px;
}

.modal-header {
  background: #f8f8f8;
  border-bottom: 1px solid #ddd;
}

.modal-title {
  font-size: 20px;
  font-weight: bold;
  color: #333;
}

#cart-success-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1050;
  display: none;
}

#cart-success-modal.show {
  display: block !important;
}

#cart-success-modal .modal-dialog {
  margin: 1.75rem auto;
  max-width: 500px;
}

#cart-success-modal .modal-content {
  background: #fff;
  border-radius: 0.3rem;
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

#cart-success-modal .modal-header,
#cart-success-modal .modal-body,
#cart-success-modal .modal-footer {
  padding: 1rem;
}

#cart-success-modal .modal-footer {
  border-top: 1px solid #dee2e6;
}

#cart-success-modal .btn-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  opacity: 0.5;
}

/* Продукт */
.product-container {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
  padding-bottom: 20px;
}

.product_info,
.review-section {
  width: 50%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.product-title {
  font-size: 24px;
  font-weight: 700;
  color: #222;
}

.product-actions {
  display: flex;
  gap: 15px;
  margin-top: 20px;
}

.characteristics-container {
  width: 50%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.3s ease;
}

.characteristics-container:hover {
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.characteristics-title {
  font-size: 18px;
  font-weight: 700;
  color: #222;
  padding: 15px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #ddd;
}

.characteristics-title .toggle-characteristics {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 4px;
}

.characteristics-content {
  padding: 10px 0;
  max-height: 100px;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out;
}

.characteristics-content.expanded {
  max-height: 3000px;
}

.characteristics-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}

.characteristics-table th,
.characteristics-table td {
  padding: 10px 10px;
  border: 1px solid #eee;
  text-align: left;
  font-size: 14px;
  color: #333;
}

.characteristics-table th {
  background: #f0f0f0;
  font-weight: 600;
  width: 50%;
}

.characteristics-table td {
  width: 60%;
  background: #fff;
}

.characteristics-table .hidden-row {
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease-out;
}

.characteristics-table .hidden-row.expanded {
  display: table-row;
  opacity: 1;
  transform: translateY(0);
}

.characteristics-table tr:hover td {
  background: #f9f9f9;
}

.review-section {
  width: 100%;
  background: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.review-section h2 {
  font-size: 20px;
  margin-bottom: 15px;
}

.review-message {
  font-size: 14px;
  color: #777;
  margin-top: 10px;
}

/* Корзина */
.container-cart {
  max-width: 1400px;
  margin: auto;
  padding: 20px;
}

h2 {
  font-weight: bold;
  color: #222;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.cart-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.cart-table th {
  background: #007bff;
  color: #fff;
  padding: 12px;
  text-transform: uppercase;
}

.cart-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
  font-size: 16px;
}

.cart-table tr:hover {
  background: #f1f1f1;
}

.subtotal {
  font-weight: bold;
}

.update-quantity {
  width: 60px;
  text-align: center;
  font-size: 16px;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin: auto;
}

.btn-cart {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 5px;
  border: none;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.btn-cart-primary {
  background: #007bff;
  color: white;
}

.btn-cart-primary:hover {
  background: #0056b3;
}

.btn-cart-danger {
  background: #dc3545;
  color: white;
}

.btn-cart-danger:hover {
  background: #a71d2a;
}

.remove-item {
  background: none;
  border: none;
  color: #dc3545;
  font-size: 24px;
  cursor: pointer;
  transition: 0.3s ease-in-out;
}

.remove-item:hover {
  color: #a71d2a;
}

#cart-total {
  font-size: 24px;
  font-weight: bold;
  color: #007bff;
}

.empty-cart {
  font-size: 20px;
  color: #777;
  text-align: center;
  margin-top: 20px;
}

/* Избранное */
.wishlist-container {
  position: relative;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.wishlist-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.wishlist-product-card {
  position: relative;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 350px;
  width: 100%;
  /* Убедимся, что карточка занимает всю доступную ширину */
  box-sizing: border-box;
  /* Учитываем padding и border в ширине */
}

.wishlist-product-image img {
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  object-fit: cover;
}

.wishlist-product-info {
  margin: 10px 0;
}

.wishlist-product-name {
  font-size: 14px;
  font-weight: bold;
  margin: 10px 0;
  color: #333;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wishlist-product-price {
  font-size: 18px;
  color: #007bff;
}

.wishlist-product-actions {
  margin-top: 10px;
}

.wishlist-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  z-index: 10;
}

.wishlist-clear-btn {
  display: block;
  margin: 20px auto;
  padding: 10px 15px;
  background: #dc3545;
  color: white;
  border: none;
  cursor: pointer;
  border-radius: 5px;
  transition: 0.3s;
}

.wishlist-clear-btn:hover {
  background: #c82333;
}

.wishlist-btn:hover {
  background: rgba(255, 255, 255, 1);
}

.wishlist-btn .wishlist-icon {
  width: 24px;
  height: 24px;
  stroke: #555;
  fill: none;
  transition: all 0.3s ease;
}

.wishlist-btn.active .wishlist-icon {
  fill: red;
  stroke: red;
}

.wishlist-btn-green {
  display: inline-block;
  margin-top: 20px;
  padding: 10px 15px;
  color: white;
  background: #28a745;
  text-decoration: none;
  border-radius: 5px;
  transition: 0.3s;
}

.wishlist-btn-green:hover {
  background: #218838;
}

.wishlist-empty.hidden {
  display: none;
}

.hidden {
  display: none;
}

.wishlist-empty.visible {
  display: block;
  margin-top: 20px;
}

/* Заказы и отзывы */
.container-checkout,
.container-orders,
.container-success,
.container-order-view {
  max-width: 1400px;
  margin: auto;
  padding: 20px;
}

.order-table,
.orders-table,
.order-items-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
}

.order-table th,
.orders-table th,
.order-items-table th {
  background: #007bff;
  color: #fff;
  padding: 12px;
  text-transform: uppercase;
}

.order-table td,
.orders-table td,
.order-items-table td {
  border: 1px solid #ddd;
  padding: 12px;
  text-align: center;
  font-size: 16px;
}

.order-table tr:hover,
.orders-table tr:hover,
.order-items-table tr:hover {
  background: #f8f9f9;
}

/* Баннер */
.carousel-item img {
  transition: transform 0.5s ease;
}

.carousel-item:hover img {
  transform: scale(1.02);
}

.carousel-caption h5 {
  font-size: 24px;
  font-weight: bold;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

/* CSS-анимации */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes zoomIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.05);
  }

  100% {
    transform: scale(1);
  }
}

.fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

.zoom-in {
  animation: zoomIn 0.5s ease-out forwards;
}

.pulse {
  animation: pulse 1s ease-in-out infinite;
}

/* Общие стили для кнопок */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  font-size: 16px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  text-decoration: none;
  font-weight: 500;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  color: #fff;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0056b3 0%, #003d82 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-success {
  background: linear-gradient(135deg, #1e90ff 0%, #007bff 100%);
  color: #fff;
}

.btn-success:hover {
  background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #40c4ff 0%, #1e90ff 100%);
  color: #fff;
}

.btn-danger:hover {
  background: linear-gradient(135deg, #1e90ff 0%, #007bff 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-secondary {
  background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
  color: #fff;
}

.btn-secondary:hover {
  background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.btn-sm {
  padding: 8px 15px;
  font-size: 14px;
}

/* Цвета для статусов */
.order-status {
  font-weight: bold;
}

[data-status="Ожидание"] {
  color: #ff9800;
}

[data-status="Подтвержден"] {
  color: #28a745;
}

[data-status="Отменен"] {
  color: #dc3545;
}

/* Рейтинг (звезды) */
.rating-stars {
  display: flex;
  gap: 5px;
  font-size: 25px;
  cursor: pointer;
  color: #ddd;
  transition: color 0.3s;
}

.rating-stars .star.selected,
.rating-stars .star.hover {
  color: gold;
}

.modal {
  z-index: 1055 !important;
}

.modal-backdrop {
  z-index: 1050 !important;
}

.product-rating {
  margin: 10px 0;
}

.stars {
  display: flex;
  align-items: center;
  gap: 5px;
}

.star {
  color: #ccc;
  font-size: 16px;
}

.star.filled {
  color: #f5c518;
}

.rating-value {
  font-size: 14px;
  color: #555;
}

.reviews-count {
  font-size: 14px;
  color: #888;
}

/* Адаптивность */

/* Планшеты (768px - 1024px) */
@media (max-width: 1024px) {
  .page-wrapper {
    gap: 15px;
    padding: 0 10px;
    max-width: 100%;
    margin-top: 70px;
  }

  .filters-sidebar {
    width: 240px;
    padding: 15px;
  }

  .filters-form {
    gap: 15px;
  }

  .filter-group h4 {
    font-size: 15px;
  }

  .price-range input {
    padding: 8px;
    font-size: 14px;
  }

  .checkbox-list {
    gap: 6px;
    max-height: 120px;
  }

  .checkbox-list label {
    font-size: 13px;
  }

  .toggle-button {
    padding: 6px 12px;
    font-size: 13px;
  }

  .content {
    padding: 15px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 15px;
  }

  .product-card {
    padding: 12px;
    min-height: 320px;
  }

  .product-name {
    font-size: 15px;
  }

  .product-price {
    font-size: 16px;
  }

  .product-price .old-price {
    font-size: 13px;
    top: -5px;
  }

  .product-price .new-price {
    font-size: 16px;
  }

  .category-image {
    width: 100px;
    height: 100px;
  }

  .category-item {
    width: 120px;
    margin: 8px;
  }

  .category-name {
    font-size: 14px;
  }

  .sort-pagination {
    flex-wrap: wrap;
    gap: 10px;
    padding: 8px;
  }

  .sort-pagination form {
    flex: 1 1 100%;
  }

  .sort-pagination select {
    width: 100%;
    padding: 6px;
    font-size: 14px;
  }

  .pagination-link {
    padding: 6px 10px;
    font-size: 13px;
  }

  .product-container {
    flex-direction: column;
    gap: 20px;
  }

  .product_info,
  .characteristics-container {
    width: 100%;
  }

  .review-section {
    width: 100%;
  }

  .container-cart,
  .container-checkout,
  .container-orders,
  .container-success,
  .container-order-view {
    padding: 15px;
  }

  .cart-table th,
  .cart-table td,
  .order-table th,
  .order-table td,
  .orders-table th,
  .orders-table td,
  .order-items-table th,
  .order-items-table td {
    padding: 10px;
    font-size: 14px;
  }

  .update-quantity {
    width: 50px;
    font-size: 14px;
  }

  #cart-total {
    font-size: 20px;
  }

  .wishlist-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }

  .wishlist-product-card {
    min-height: 280px;
  }

  .wishlist-product-name {
    font-size: 14px;
  }

  .wishlist-product-price {
    font-size: 16px;
  }
}

/* Мобильные устройства (<768px) */
@media (max-width: 767px) {
  .page-wrapper {
    flex-direction: column;
    padding: 0 10px;
    margin: 10px auto;
    position: relative;
    max-width: 100%;
  }

  .filters-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 280px;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 1000;
    overflow-y: auto;
    background: #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    padding: 15px;
  }

  .filters-sidebar.active {
    transform: translateX(0);
  }

  .filters-toggle-btn {
    display: block;
  }

  .overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .overlay.active {
    display: block;
  }

  .content {
    padding: 15px;
    margin-top: 60px;
  }

  .filters-form {
    gap: 12px;
  }

  .filter-group h4 {
    font-size: 14px;
  }

  .price-range input {
    padding: 6px;
    font-size: 13px;
  }

  .checkbox-list {
    gap: 5px;
    max-height: 115px;
  }

  .checkbox-list label {
    font-size: 12px;
  }

  .toggle-button {
    padding: 5px 10px;
    font-size: 12px;
  }

  .category-title {
    font-size: 22px;
  }

  .products-section h2 {
    font-size: 20px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
  }

  .product-card {
    padding: 10px;
    min-height: 280px;
  }

  .product-name {
    font-size: 14px;
  }

  .product-price {
    font-size: 15px;
  }

  .product-price .old-price {
    font-size: 12px;
    top: -4px;
  }

  .product-price .new-price {
    font-size: 15px;
  }

  .sort-pagination {
    flex-direction: column;
    gap: 10px;
    padding: 6px;
  }

  .sort-pagination form {
    width: 100%;
  }

  .sort-pagination select {
    padding: 5px;
    font-size: 13px;
  }

  .category-image {
    width: 80px;
    height: 80px;
  }

  .category-item {
    width: 100px;
    margin: 5px;
  }

  .category-name {
    font-size: 13px;
  }

  .pagination-link {
    padding: 6px 8px;
    font-size: 12px;
  }

  .product-container {
    flex-direction: column;
    gap: 15px;
  }

  .product_info,
  .characteristics-container {
    width: 100%;
    padding: 15px;
  }

  .product-title {
    font-size: 20px;
  }

  .product-price {
    font-size: 16px;
  }

  .product-price .old-price {
    font-size: 12px;
  }

  .product-price .new-price {
    font-size: 16px;
  }

  .product-actions {
    flex-direction: column;
    gap: 10px;
  }

  .characteristics-title {
    font-size: 16px;
  }

  .characteristics-table th,
  .characteristics-table td {
    font-size: 13px;
    padding: 8px;
  }

  .review-section {
    padding: 15px;
  }

  .review-section h2 {
    font-size: 18px;
  }

  .container-cart,
  .container-checkout,
  .container-orders,
  .container-success,
  .container-order-view {
    padding: 10px;
  }

  .cart-table th,
  .cart-table td,
  .order-table th,
  .order-table td,
  .orders-table th,
  .orders-table td,
  .order-items-table th,
  .order-items-table td {
    padding: 8px;
    font-size: 13px;
  }

  .update-quantity {
    width: 45px;
    font-size: 13px;
  }

  .btn-cart {
    padding: 10px 15px;
    font-size: 14px;
  }

  #cart-total {
    font-size: 18px;
  }

  .wishlist-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
  }

  .wishlist-product-card {
    min-height: 240px;
    padding: 10px;
  }

  .wishlist-product-name {
    font-size: 13px;
  }

  .wishlist-product-price {
    font-size: 14px;
  }

  .wishlist-btn {
    width: 32px;
    height: 32px;
    padding: 6px;
  }

  .wishlist-btn .wishlist-icon {
    width: 20px;
    height: 20px;
  }

  .modal {
    width: 90%;
    max-width: 400px;
  }

  #cart-success-modal .modal-dialog {
    max-width: 90%;
  }

  .modal-title {
    font-size: 18px;
  }
}

/* Очень маленькие экраны (<576px) */
@media (max-width: 576px) {
  .page-wrapper {
    padding: 0 5px;
    margin: 5px auto;
  }

  .filters-sidebar {
    width: 260px;
    padding: 10px;
  }

  .filters-toggle-btn {
    top: 78px;
    left: 18px;
    padding: 6px 10px;
    font-size: 12px;
  }

  .content {
    padding: 10px;
    margin-top: 50px;
  }

  .products-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
  }

  .product-card {
    padding: 8px;
    min-height: 240px;
  }

  .product-name {
    font-size: 13px;
  }

  .product-price {
    font-size: 14px;
  }

  .product-price .old-price {
    font-size: 11px;
    top: -3px;
  }

  .product-price .new-price {
    font-size: 14px;
  }

  .category-image {
    width: 70px;
    height: 70px;
  }

  .category-item {
    width: 90px;
    margin: 5px;
  }

  .category-name {
    font-size: 12px;
  }

  .sort-pagination select {
    font-size: 12px;
  }

  .pagination-link {
    padding: 5px 7px;
    font-size: 11px;
  }

  .product_info,
  .characteristics-container {
    padding: 10px;
  }

  .product-title {
    font-size: 18px;
  }

  .product-price {
    font-size: 14px;
  }

  .product-price .old-price {
    font-size: 11px;
  }

  .product-price .new-price {
    font-size: 14px;
  }

  .characteristics-table th,
  .characteristics-table td {
    font-size: 12px;
    padding: 6px;
  }

  .review-section {
    padding: 10px;
  }

  .cart-table th,
  .cart-table td,
  .order-table th,
  .order-table td,
  .orders-table th,
  .orders-table td,
  .order-items-table th,
  .order-items-table td {
    padding: 6px;
    font-size: 12px;
  }

  .update-quantity {
    width: 40px;
    font-size: 12px;
  }

  .btn-cart {
    padding: 8px 12px;
    font-size: 13px;
  }

  #cart-total {
    font-size: 16px;
  }

  .wishlist-products-grid {
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
  }

  .wishlist-product-card {
    min-height: 220px;
    padding: 8px;
  }

  .wishlist-product-name {
    font-size: 12px;
  }

  .wishlist-product-price {
    font-size: 13px;
  }

  .wishlist-btn {
    width: 28px;
    height: 28px;
    padding: 5px;
  }

  .wishlist-btn .wishlist-icon {
    width: 18px;
    height: 18px;
  }
}

/* Адаптивность для кнопок */
@media (max-width: 767px) {
  .btn {
    padding: 8px 15px;
    font-size: 14px;
  }

  .btn-sm {
    padding: 6px 12px;
    font-size: 13px;
  }
}

@media (max-width: 576px) {
  .btn {
    padding: 6px 12px;
    font-size: 13px;
  }

  .btn-sm {
    padding: 5px 10px;
    font-size: 12px;
  }
}