/* Дополнительные исправления для адаптивности карточек товаров */

/* Принудительное исправление для мобильных устройств */
@media (max-width: 768px) {
  /* Сетка товаров */
  .products-row,
  .category-section .products-row,
  .row.products-row,
  .products-row.row {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
    padding: 4px !important;
    margin: 0 !important;
    overflow: visible !important;
    flex-wrap: nowrap !important;
  }

  /* Карточки товаров */
  .product-card,
  .card  .product-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    margin: 0 !important;
    border-radius: 8px !important;
    display: flex !important;
    flex-direction: column !important;
  }

  /* Обертки карточек */
  .product-wrapper,
  .col.product-wrapper,
  .products-row .col,
  .products-row .col-md-2,
  .products-row .col-lg-3,
  .products-row > .col,
  .products-row > .product-wrapper {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    flex: none !important;
  }

  /* Тело карточки */
  .product-card .card-body {
    padding: 0.2rem !important;
    height: auto !important;
    min-height: auto !important;
    max-height: none !important;
    display: flex !important;
    flex-direction: column !important;
    flex: 1 !important;
  }

  /* Изображения */
  .product-card .card-img-top {
    height: 200px !important;
    width: 100% !important;
    object-fit: contain !important;
  }

  /* Текст */
  .product-card .card-title {
    font-size: 0.6rem !important;
    line-height: 0.9 !important;
    margin-bottom: 0.15rem !important;
  }

  .product-card .card-text {
    font-size: 0.5rem !important;
    margin-bottom: 0.05rem !important;
  }

  .product-card .price-text {
    font-size: 0.7rem !important;
    margin-bottom: 0.2rem !important;
  }

  /* Кнопки */
  .product-card .btn {
    padding: 0.2rem 0.5rem !important;
    font-size: 0.55rem !important;
    width: 100% !important;
    height: 24px !important;
  }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  .products-row,
  .category-section .products-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 3px !important;
    padding: 1px !important;
    margin: 0 !important;
  }

  .product-card .card-body {
    padding: 0.8rem !important;
  }

  .product-card .card-img-top {
    height: 180px !important;
    object-fit: contain !important;
  }

  .product-card .card-title {
    font-size: 0.55rem !important;
    line-height: 1.0 !important;
    margin-bottom: 0.15rem !important;
  }

  .product-card .card-text {
    font-size: 0.45rem !important;
    margin-bottom: 0.05rem !important;
  }

  .product-card .price-text {
    font-size: 0.65rem !important;
    margin-bottom: 0.2rem !important;
  }

  .product-card .btn {
    padding: 0.2rem 0.6rem !important;
    font-size: 0.55rem !important;
    width: 100% !important;
  }

  /* Адаптивность для категорий товаров на очень маленьких экранах */
  .category-card {
    padding: 0.6rem !important;
    font-size: 0.8rem !important;
    border-radius: 8px !important;
  }

  .categories-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 6px !important;
  }
}

/* Планшеты */
@media (min-width: 769px) and (max-width: 1024px) {
  .products-row,
  .category-section .products-row {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)) !important;
    gap: 20px !important;
  }

  .product-card .card-img-top {
    height: 190px !important;
  }
}

  /* Принудительное отключение горизонтального скролла */
  .products-row,
  .category-section .products-row {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }



  /* Адаптивность для категорий товаров */
  .category-card {
    padding: 0.8rem !important;
    font-size: 0.9rem !important;
    border-radius: 10px !important;
  }

  .categories-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 8px !important;
  }

/* Исправление для Bootstrap классов */
.row.products-row {
  display: grid !important;
  margin: 0 !important;
}

.row.products-row > * {
  width: 100% !important;
  max-width: none !important;
  min-width: auto !important;
  padding: 0 !important;
  margin: 0 !important;
} 