/* Mobile-specific overrides - загружается последним для максимального приоритета */

@media (max-width: 768px) {
  /* Убираем горизонтальный скролл */
  html,
  body {
    overflow-x: hidden !important;
    max-width: 100vw !important;
  }

  /* Все секции категорий */
  .category-section,
  #category1,
  #category2,
  #category3,
  #category4 {
    overflow-x: hidden !important;
    max-width: 100vw !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Заголовки категорий */
  .category-section h2,
  #category1 h2,
  #category2 h2,
  #category3 h2,
  #category4 h2 {
    padding: 0 1rem !important;
    margin: 1.5rem 0 1rem 0 !important;
    font-size: 2rem !important;
  }

  /* Контейнеры категорий */
  .category1-div,
  .category2-div,
  .category3-div,
  .category4-div {
    padding: 1rem !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 auto !important;
    overflow-x: hidden !important;
    box-sizing: border-box !important;
  }

  /* ВСЕ grid-контейнеры на одну колонку */
  .product-grid1,
  .product-grid2,
  .product-grid3,
  .product-grid4,
  .category1-div .product-grid1,
  .category2-div .product-grid2,
  .category3-div .product-grid3,
  .category4-div .product-grid4 {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
  }

  /* ВСЕ карточки товаров на 100% ширины */
  .product-item,
  .product-item3,
  .product-grid1 .product-item,
  .product-grid2 .product-item,
  .product-grid3 .product-item,
  .product-grid4 .product-item,
  .category1-div .product-item,
  .category2-div .product-item,
  .category3-div .product-item,
  .category4-div .product-item,
  #category1 .product-item,
  #category2 .product-item,
  #category3 .product-item,
  #category4 .product-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    height: auto !important;
    padding: 1.25rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    flex-shrink: 1 !important;
  }

  /* Изображения в карточках */
  .product-item img.product-img,
  .product-item3 img.product-img3 {
    width: 100% !important;
    max-width: 200px !important;
    height: 200px !important;
    margin: 0 auto !important;
  }

  /* Слайдеры отключены на мобильных */
  .slider-disabled {
    overflow-x: hidden !important;
  }

  .slider-disabled .slider-viewport {
    overflow: hidden !important;
    padding: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .slider-disabled .product-grid2,
  .slider-disabled .product-grid3,
  .slider-disabled-track {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 1.25rem !important;
    padding: 0 !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  .slider-disabled .product-item,
  .slider-disabled-track .product-item {
    width: 100% !important;
    max-width: 100% !important;
    min-width: unset !important;
    height: auto !important;
    padding: 1.25rem !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .slider-disabled .scroll-btn {
    display: none !important;
  }

  /* Если слайдер активен */
  .slider-viewport:not(.slider-disabled .slider-viewport) {
    overflow-x: auto !important;
    padding: 0 1rem !important;
    box-sizing: border-box !important;
    max-width: 100vw !important;
  }
}

