/* Базовые настройки для мобильных устройств */
@media (max-width: 768px) {

  body, html {
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  .desktop-only {
        display: none !important;
    }

  /* 1. Сброс общих контейнеров */
  .banner-inner, .categories-inner, 
  .products-inner, .catalog-container, .lk-section, .cart-section {
    width: 100% !important;
    max-width: 100% !important;
    padding: 0 16px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .header {
    height: 60px !important;
    margin: 8px 0 4px 0 !important;
    padding: 0 16px !important;
  }

  /* Прячем десктопные элементы в хедере [cite: 39, 41] */
  .catalog-btn, .search-form, .user-cabinet, .cart-block, .logo-circle {
    display: none !important;
  }

  /* Оставляем только лого-текст (картинку)  */
  .logo-wrapper {
    min-width: auto !important;
  }

  /* .logo-wrapper img {
    width: 140px !important; Уменьшаем лого для мобилки
  } */

  /* 3. Баннер и подбор аксессуаров (image_ac4aa5) */
.banner-inner {
        display: flex !important;
        flex-direction: column !important; /* Складываем в столбик */
        gap: 0 !important;
        padding: 0 !important;
    }

    .slider-wrapper {
        order: 1 !important; /* Баннер первый */
        width: 100% !important;
        height: auto !important;
        background: #E8F0F3; /* Фон как на макете */
        padding-top: 20px;
    }

    /* 2. Верстка блока подбора (2 колонки) */
    .car-selector form, 
    .car-selector .selector-form-container { /* Зависит от твоей обертки в HTML */
        display: block;
    }

    /* Контейнер для селекторов делаем в две колонки */
    .car-selector .inputs-row { /* Добавь этот класс в HTML обертку двух селектов */
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 12px !important;
        margin-bottom: 20px !important;
    }

    /* Если обертки нет, можно применить к самим кнопкам выбора */
    .car-selector .select-btn {
        width: 100% !important;
        height: 64px !important; /* Высокие поля как на макете */
        margin: 0 !important;
        padding: 12px 16px !important;
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        border: 1px solid #EAEAEA !important;
        background: #F9FAFB !important; /* Светлый фон полей */
    }

    .select-btn-label {
        font-size: 11px !important;
        margin-bottom: 4px;
    }

    .select-btn-value {
        font-size: 14px !important;
        font-weight: 500 !important;
    }

    /* Кнопка "Подобрать" на всю ширину */
    .submit-btn {
        width: 100% !important;
        height: 54px !important;
        border-radius: 12px !important;
        font-size: 16px !important;
        margin: 0 !important;
    }

    /* 3. Стили баннера внутри */
    .slide {
      flex-direction: row !important;
      display: flex !important;
      align-items: center !important;
      padding: 20px 16px 30px !important; /* Дополнительный отступ снизу внутри слайда */
      height: auto !important;
      min-height: 200px !important;
    }

    .slide-text {
      flex: 1 !important; /* Занимает оставшееся место */
      text-align: left !important;
      z-index: 2;
    }

    .slide-badge {
      padding: 2px 10px !important;
      font-size: 10px !important;
      margin-bottom: 10px !important;
    }

    .slide-title {
      font-size: 24px !important; /* Уменьшаем шрифт, чтобы поместился в строку */
      line-height: 1.2 !important;
      margin-bottom: 8px !important;
      max-width: 100% !important;
    }

    .slide-desc {
      display: none;
    }

    .slide-image {
      width: 35% !important; /* Ограничиваем ширину картинки */
      height: auto !important;
      flex-shrink: 0 !important;
      margin: 0 !important;
      display: flex !important;
      align-items: center !important;
    }

    .slide-image svg, .slide-image img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
      }

    .slider-arrows {
      display: none !important;
    }

    .slider-dots {
      bottom: 65px !important; /* Позиционируем над блоком подбора */
      left: 20px !important;
      gap: 8px !important;
    }
    
    .dot {
      width: 6px !important;
      height: 6px !important;
    }

  /* 4. Популярные категории и товары (image_ac4ded) */
  .categories-grid {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .cat-card {
    width: 100% !important;
    height: 180px !important;
    border-radius: 12px !important;
  }

  .cat-label {
    font-size: 14px !important;
  }

  .products-grid, .product-grid  {
    display: grid !important;
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }

  .prod-card, .product-card {
    width: 100% !important;
    margin-bottom: 15px !important;
  }

  .prod-img, .product-image {
    height: auto !important;
  }

  .prod-price, .product-price-block {
    font-size: 20px !important;
  }

  .btn-cart, .add-to-cart {
    padding: 0 10px !important;
    font-size: 16px !important;
  }

  /* 5. Акции и преимущества (image_ac4e0a) */

  .promotions{
    margin-top: 36px;
  }

  .promo-grid {
    grid-template-columns: 1fr !important;
    gap: 15px !important;
  }

  .promo-card {
    width: 100% !important;
    height: auto !important;
  }

  .benefits-grid {
    grid-template-columns: 1fr !important;
    gap: 20px !important;
  }

  .benefit-item {
    display: flex !important;
    align-items: center !important;
    text-align: left !important;
    gap: 15px !important;
  }

  .benefit-icon {
    margin-bottom: 0 !important;
  }

  /* 6. Футер и Бренды (image_ac4e27) */
  .brands-columns {
    column-count: 2 !important;
  }

  .footer-main {
    grid-template-columns: 1fr !important;
    gap: 30px !important;
  }

  .footer-col h5 {
    font-size: 18px !important;
    margin-bottom: 15px !important;
  }

  /* 7. Липкое нижнее меню (из макета image_ac4aa5) */
  .mobile-bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: #ffffff;
    display: flex;
    justify-content: space-around;
    align-items: center;
    border-top: 1px solid #EAEAEA;
    z-index: 9999;
    padding-bottom: env(safe-area-inset-bottom);
  }

  .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-decoration: none;
    color: #999;
    font-size: 10px;
  }

  .nav-item.active {
    color: #1a1a1a;
    background: none !important;
    box-shadow: none !important;
  }

  .mobile-only {
        display: block !important;
    }

    .mobile-bottom-nav {
        display: flex !important; /* Показываем нижнее меню */
    }

    /* Стилизация иконок в хедере */
    .mobile-header-actions {
        display: flex !important;
        gap: 12px;
        margin-left: auto;
    }

    .m-icon-btn {
        background: #f4f6f8;
        border: none;
        width: 44px;
        height: 44px;
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #444;
        text-decoration: none;
    }

    /* Настройка хедера, чтобы лого было слева, а иконки справа */
    .header-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        gap: 5px;
    }

    .banner-section {
      height: auto !important;
      padding: 0 !important;
      background: #E8F0F3 !important;
    }

  .banner-inner {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
  }

  /* Показываем мобильные элементы */
  .mobile-bottom-nav { display: flex !important; }

  /* 2. Слайдер на мобилке */
  .slider-wrapper {
    order: 1 !important;
    width: 100% !important;
    height: auto !important; /* Убираем фиксированную высоту */
    /* ГРАМОТНОЕ РЕШЕНИЕ: Резервируем место под наплыв карточки */
    padding-bottom: 80px !important; 
    box-sizing: border-box !important;
  }

  /* 3. Блок подбора (Карточка) */
  .car-selector {
    order: 2 !important;
    width: 100% !important;
    height: auto !important;
    /* Отрицательный маржин тянет блок вверх, но padding слайдера его не дает скрыть текст */
    margin: -60px auto 0 !important; 
    padding: 24px 20px !important;
    border-radius: 0 !important;
    background: #fff !important;
    position: relative;
    z-index: 100;
  }

  .car-selector h3 {
    font-size: 18px !important;
    margin-bottom: 20px !important;
    line-height: 1.2 !important;
    height: auto !important;
  }

  /* 4. Селекторы в одну строку */
  .inputs-row {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }

  .select-btn {
    display: flex !important;
    flex-direction: row !important; /* Выстраиваем элементы в ряд */
    align-items: center !important; /* Центрируем текст и стрелку по вертикали */
    justify-content: space-between !important; /* Расталкиваем текст влево, а стрелку вправо */
    width: 100% !important;
    height: 60px !important;
    padding: 0 12px !important;
    box-sizing: border-box !important;
  }

  .select-btn-content {
    display: flex !important;
    flex-direction: column !important; /* Текст ("Бренд" и "Марка") остается друг под другом */
    justify-content: center !important;
    text-align: left !important;
    /* Убираем возможные отступы, которые могут ломать строку */
    margin: 0 !important; 
  }

  .select-btn-value {
    font-size: 12px !important;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .submit-btn {
    width: 100% !important;
    height: 50px !important;
    margin: 0 !important;
    border-radius: 12px !important;
  }

  .select-btn svg {
    flex-shrink: 0 !important; /* Запрещаем иконке сжиматься */
    margin-left: 8px !important; /* Небольшой отступ от текста */
  }

  /* 5. Точки слайдера */
  .slider-dots {
    bottom: 90px !important;
    left: 20px !important;
  }

/* 1. Уменьшаем размер заголовков секций */

  .categories-section, .products-section{
    padding: 36px 0 56px;
  }

  .categories-title, 
  .products-title, 
  .promo-header h2 {
    font-size: 28px !important; /* Уменьшаем с десктопных 36px */
    line-height: 30px !important;
    margin-bottom: 0 !important;
  }

  /* 2. Превращаем "Смотреть все" в кнопку-иконку */
  .view-all, 
  .categories-link, 
  .products-link {
    font-size: 0 !important; /* Скрывает текст "Смотреть все" */
    width: 32px !important;  /* Делаем блок квадратным */
    height: 32px !important;
    background: #F4F6F8 !important; /* Светло-серый фон как на макете */
    border-radius: 8px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    text-decoration: none !important;
    transition: background 0.2s !important;
  }

  .view-all:hover {
    background: #EAECEF !important;
  }

  /* Настройка иконки внутри кнопки */
  .view-all svg, 
  .categories-link svg, 
  .products-link svg {
    margin: 0 !important;
    width: 18px !important;
    height: 18px !important;
    stroke: #EE4444 !important; /* Фирменный красный цвет стрелки */
  }

  /* 3. Выравнивание шапок секций */
  .categories-header, 
  .products-header, 
  .promo-header {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    margin-bottom: 20px !important;
    padding: 0 4px !important; /* Небольшой отступ по краям */
  }

  .prod-actions, .product-actions {
    display: flex !important;
    flex-direction: column !important; /* Ставим элементы друг под другом */
    gap: 12px !important;
    align-items: stretch !important; /* Растягиваем кнопку на всю ширину */
  }

  /* 2. Растягиваем кнопку на всю ширину карточки */
  .btn-cart, .add-to-cart {
    width: 100% !important;
    height: 46px !important; /* Немного увеличим высоту для удобства нажатия пальцем */
    justify-content: center !important; /* Центрируем текст и иконку внутри кнопки */
    padding: 0 !important;
    margin: 0 !important;
  }

  /* 3. Настраиваем статус (В наличии / Под заказ) под кнопкой */
  .prod-status, .stock-status {
    justify-content: center !important; /* Центрируем статус под кнопкой */
    text-align: center !important;
    font-size: 13px !important;
    margin-top: 4px !important;
  }

  /* Небольшие отступы для всей внутренней части карточки */
  .prod-body {
    padding: 12px 12px 16px !important;
  }

  .promo-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 12px !important;
    width: 100% !important;
  }

  /* 2. Сама карточка становится горизонтальной */
  .promo-card {
    display: flex !important;
    flex-direction: row !important; /* Картинка и текст в ряд */
    width: 100% !important;
    height: 110px !important; /* Фиксируем общую высоту блока */
    background: #F6F6F6 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }

  /* 3. Блок для картинки (слева) */
  .promo-img-wrapper {
    width: 110px !important; /* Ширина равна высоте, чтобы был квадрат (или сделай меньше) */
    height: 100% !important; /* Растягиваем на всю высоту карточки */
    flex-shrink: 0 !important; /* Запрещаем сжиматься */
  }

  .promo-img-wrapper img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important; /* Картинка заполнит блок без искажений */
  }

  /* 4. Блок с текстом */
  .promo-info {
    flex: 1 !important; /* Занимает всё оставшееся пространство */
    padding: 12px 16px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important; /* Центрируем текст по вертикали */
    gap: 4px !important;
  }

  .promo-title {
    font-size: 14px !important; /* Уменьшаем шрифт заголовка */
    line-height: 1.3 !important;
    font-weight: 700 !important;
    margin: 0 !important;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Обрезаем текст, если он длиннее двух строк */
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .promo-date {
    font-size: 11px !important;
    color: #999 !important;
  }

.benefits-section {
    height: auto !important;
    padding: 40px 0 !important;
  }

  .benefits-grid {
    display: flex !important;
    flex-direction: column !important;
    gap: 30px !important;
    padding: 0 20px !important;
  }

  .benefit-item {
    display: grid !important;
    /* Резервируем 54px под иконку, остальное под текст */
    grid-template-columns: 54px 1fr !important;
    column-gap: 20px !important; /* Отступ между иконкой и текстом */
    row-gap: 4px !important;    /* Отступ между заголовком h4 и текстом p */
    align-items: start !important;
    text-align: left !important;
    margin-bottom: 32px !important;
  }

  /* Иконка: должна занимать обе строки по вертикали */
  .benefit-icon {
    grid-row: span 2 !important; /* Растягиваем иконку на 2 ряда сетки */
    width: 54px !important;
    height: 54px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: #fff !important;
    border-radius: 50% !important;
    /* Если есть тени или границы в main.css, обнуляем или корректируем здесь */
  }

  /* Заголовок: во второй колонке, в первом ряду */
  .benefit-item h4 {
    grid-column: 2 !important;
    font-size: 17px !important;
    font-weight: 700 !important;
    margin: 0 !important; /* Убираем десктопные отступы */
    line-height: 1.2 !important;
    align-self: end; /* Слегка прижимаем к низу ячейки для баланса с текстом */
  }

  /* Описание: во второй колонке, во втором ряду */
  .benefit-item p {
    grid-column: 2 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    color: #687074 !important;
    margin: 0 !important;
    align-self: start;
  }

  /* 2. Секция марок (image_ba5aca) */
  .brands-section {
    margin: 40px 0 !important;
    padding: 0 20px !important;
  }

  .brands-columns {
    column-count: 2 !important; /* Бренды в 2 колонки */
    column-gap: 20px !important;
  }

  .brand-group {
    margin-bottom: 15px !important;
  }

  /* 3. Основной футер (image_ba5b23) */
  .footer-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 40px !important;
    padding: 0 20px !important;
    text-align: left !important;
  }

  .footer-col h5 {
    font-size: 20px !important;
    margin-bottom: 20px !important;
    color: #A5B2B8 !important; 
    font-weight: 700 !important;
  }

  .footer-col ul li {
    margin-bottom: 14px !important;
  }

  .footer-col a {
    font-size: 15px !important;
  }

  /* Контакты */
  .footer-phone {
    font-size: 24px !important;
    margin-bottom: 10px !important;
  }

  .address {
    font-size: 14px !important;
    line-height: 1.5 !important;
    color: #687074 !important;
  }

  /* 4. Самый низ (Copyright) */
  .footer-bottom {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 15px !important;
    padding: 30px 20px 100px !important; /* Отступ снизу под меню */
    border-top: 1px solid #EAEAEA !important;
  }

  .bottom-links {
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
  }

  .bottom-links a {
    margin: 0 !important;
    font-size: 12px !important;
  }

  .breadcrumbs {
    margin-top: 0 !important;
  }

  .catalog-title {
    font-size: 24px !important;
    line-height: 30px !important;
  }

/* Показываем и настраиваем мобильную панель */
    .catalog-toolbar {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        align-items: center !important;
        gap: 12px !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Кнопка "Фильтры" с серым фоном и красным бейджем */
    .mobile-filter-btn {
        display: flex !important;
        align-items: center !important;
        gap: 8px;
        background: #F0F2F5 !important; /* Светло-серый фон */
        border: none !important;
        border-radius: 10px !important;
        height: 44px !important;
        padding: 0 12px !important;
        flex: 1 !important;
        font-weight: 700 !important;
        font-size: 14px !important;
        color: #1a1a1a !important;
        cursor: pointer !important;
        -webkit-tap-highlight-color: transparent;
    }

    .filter-badge {
        background: #EE4444 !important;
        color: #fff !important;
        min-width: 20px !important;
        height: 20px !important;
        border-radius: 50% !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 11px !important;
        margin-left: auto !important;
    }

    /* Сортировка (имитация селектора с рамкой) */
    .sorting {
        flex: 1.2 !important;
        display: flex !important;
        position: relative !important;
    }

    .sort-link.active.mobile-sort-trigger {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        height: 44px !important;
        border: 1px solid #D1D5DB !important;
        background: #fff !important;
        border-radius: 10px !important;
        padding: 0 12px !important;
        cursor: pointer !important;
    }

    /* Скрываем список по умолчанию */
    .sort-dropdown-mobile {
        display: none !important;
        position: absolute !important;
        top: 100% !important; /* Выпадает СТРОГО под кнопкой */
        left: 0 !important;
        right: 0 !important;
        background: #fff !important;
        border: 1px solid #D1D5DB !important;
        border-top: none !important;
        border-radius: 0 0 10px 10px !important;
        z-index: 1000 !important;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1) !important;
    }

    /* Показываем при активации */
    .sorting.open .sort-dropdown-mobile {
        display: block !important;
    }

    /* Стили ссылок внутри списка */
    .sort-dropdown-mobile .sort-link {
        display: block !important;
        padding: 12px;
        text-decoration: none;
        color: #333;
        border-top: 1px solid #F3F4F6;
    }

    .sort-link.active {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        height: 44px !important;
        background: #fff !important;
        border: 1px solid #D1D5DB !important; /* Рамка как на фото */
        border-radius: 10px !important;
        padding: 0 12px !important;
        font-size: 14px !important;
        font-weight: 500 !important;
        color: #1a1a1a !important;
    }

    .sort-link.active svg {
        display: block !important;
    }

    /* 1. Превращаем сайдбар в модалку */
    .sidebar {
            display: none !important;
        }

    .filter-sidebar.mobile-only {
        display: flex !important;
        flex-direction: column !important; /* ВАЖНО: колонкой */
        position: fixed !important;
        top: 0 !important;
        left: -100% !important;
        width: 100vw !important;
        height: 100vh !important;
        background: #fff !important;
        z-index: 1000000 !important;
        transition: left 0.3s ease !important;
        padding: 0 !important;
    }

    .filter-sidebar.active {
        left: 0 !important;
    }

    /* ШАПКА */
    .m-modal-header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px !important;
        border-bottom: 1px solid #eee !important;
        flex-shrink: 0 !important; /* Чтобы не сжималась */
    }

    .m-header-left {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .m-header-title {
        font-size: 18px !important;
        font-weight: 700 !important;
    }

    .m-header-reset {
        color: #EE4444 !important;
        background: none !important;
        border: none !important;
        font-size: 14px !important;
        margin-left: 5px !important;
    }

    .m-header-close {
        width: 36px !important;
        height: 36px !important;
        background: #F4F6F8 !important;
        border-radius: 8px !important;
        border: none !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* КОНТЕНТ */
    .m-modal-content {
        flex: 1 !important; /* Занимает всё место */
        overflow-y: auto !important; /* Скроллится */
        padding: 20px !important;
    }

    .m-filter-section {
        padding-bottom: 25px !important;
        margin-bottom: 25px !important;
        border-bottom: 1px solid #f5f5f5 !important;
    }

    .m-section-top {
        display: flex !important;
        justify-content: space-between !important;
        margin-bottom: 15px !important;
    }

    .m-section-top label { font-weight: 700 !important; font-size: 16px !important; }
    .m-section-reset { color: #EE4444 !important; background:none; border:none; font-size: 13px !important; }

    .m-select-field {
        height: 50px !important;
        border: 1px solid #D1D5DB !important;
        border-radius: 12px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        padding: 0 15px !important;
        margin-bottom: 10px !important;
    }

    .m-price-inputs {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .m-input-box {
        flex: 1 !important;
        height: 48px !important;
        border: 1px solid #D1D5DB !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 12px !important;
        color: #9CA3AF !important;
    }
    .m-input-box span { color: #000; margin-left: 5px; font-weight: 500; }

    /* ФУТЕР (Кнопка Применить) */
    .m-modal-footer {
        padding: 15px 20px !important;
        border-top: 1px solid #eee !important;
        flex-shrink: 0 !important;
    }

    .m-submit-btn {
        width: 100% !important;
        height: 52px !important;
        background: #EE4444 !important;
        color: #fff !important;
        border: none !important;
        border-radius: 12px !important;
        font-weight: 700 !important;
        font-size: 16px !important;
    }

    /* Чекбоксы */
    .m-check-item {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        margin-bottom: 15px !important;
        font-size: 15px !important;
    }
    .m-box { width: 22px; height: 22px; border: 1.5px solid #D1D5DB; border-radius: 6px; }

    /* 3. Контентная область со скроллом */
    .filter-sidebar-content {
        flex: 1;
        overflow-y: auto;
        padding: 20px 16px;
    }

    /* 4. Кнопка Применить внизу */
    .filter-sidebar-mobile-footer {
        padding: 16px;
        border-top: 1px solid #EAEAEA;
    }

    .m-select-btn {
        width: 100% !important;
        height: 52px !important;
        background: #fff !important;
        border: 1px solid #D1D5DB !important;
        border-radius: 12px !important;
        padding: 0 16px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        font-size: 15px !important;
        cursor: pointer !important;
        margin-bottom: 12px !important;
        outline: none !important;
    }

    /* Стили для полей цены */
    .m-input-container {
        flex: 1 !important;
        height: 48px !important;
        border: 1px solid #D1D5DB !important;
        border-radius: 10px !important;
        display: flex !important;
        align-items: center !important;
        padding: 0 12px !important;
        background: #fff !important;
    }

    .m-prefix {
        color: #9CA3AF !important;
        font-size: 14px !important;
        margin-right: 5px !important;
    }

    .m-input-container input {
        border: none !important;
        width: 100% !important;
        height: 100% !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        outline: none !important;
        background: transparent !important;
    }

    /* Убираем стрелочки у инпутов типа number */
    input::-webkit-outer-spin-button,
    input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

    /* Чекбоксы (настоящие, скрытые) */
    .m-check-item input {
        position: absolute !important;
        opacity: 0 !important;
        cursor: pointer !important;
    }

    /* Красивый чекбокс при клике */
    .m-check-item input:checked + .m-box {
        background: #EE4444 !important;
        border-color: #EE4444 !important;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E") !important;
        background-size: 14px !important;
        background-position: center !important;
        background-repeat: no-repeat !important;
    }

    .m-apply-btn {
        width: 100%;
        height: 50px;
        background: #EE4444;
        color: #fff;
        border: none;
        border-radius: 12px;
        font-size: 16px;
        font-weight: 700;
    }

    /* 5. Управление списком сортировки */
    .sorting.open .sort-link {
        display: flex !important; /* Показываем все ссылки при открытии */
        border-top: none;
        border-radius: 0;
    }
    
    .sorting.open {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        background: #fff;
        flex-direction: column !important;
        border: 1px solid #D1D5DB;
        border-radius: 10px;
    }

    .product-gallery {
          display: flex;
          flex-direction: column;
      }

    /* Прячем столбик превью */
    .thumbnails.desktop-only {
        display: none !important;
    }

    .main-image {
        touch-action: pan-y;
    }

    .main-image img {
        width: 100% !important;
        height: auto !important;
    }

    /* Оформляем точки под фото */
    .gallery-dots {
        display: flex !important;
        justify-content: center !important;
        gap: 6px;
        margin-top: 15px;
    }

    .dot {
        cursor: pointer;
        padding: 5px; /* Увеличиваем область нажатия */
        background-clip: content-box;
        background: #bbb;
    }

    .dot.active {
        background: #000; /* Черный активный */
    }

    /* ===== МОБИЛЬНАЯ СТРАНИЦА ПРОДУКТА ===== */

    /* Скрываем сайдбар на странице продукта */
    .main-layout {
        flex-direction: column !important;
        gap: 0 !important;
    }

    /* Убираем отступы у каталог-контейнера */
    .catalog-container {
        padding: 0 !important;
    }

    .catalog-header-inner {
        padding: 0 16px !important;
    }

    /* Хлебные крошки */
    .breadcrumbs {
        font-size: 12px !important;
        padding: 20px 0 !important;
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    .breadcrumb-item.current {
        max-width: 120px !important;
        display: inline-block !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        white-space: nowrap !important;
        vertical-align: bottom !important;
    }

    /* Карточка продукта: переводим в одну колонку */
    .product-card-container {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Галерея: на всю ширину экрана, без отступов */
    .product-gallery {
        width: 100% !important;
        gap: 0 !important;
    }

    .main-image {
        border-radius: 0 !important;
        width: 100% !important;
    }

    .main-image img {
        width: 100% !important;
        height: auto !important;
        max-height: 320px !important;
        object-fit: cover !important;
    }

    /* Шапка продукта (заголовок + рейтинг) */
    .product-header {
        grid-column: unset !important;
        grid-row: unset !important;
        padding: 16px 16px 0 !important;
        order: 2 !important;
    }

    .product-title {
        font-size: 18px !important;
        font-weight: 700 !important;
        line-height: 1.35 !important;
        margin-bottom: 10px !important;
    }

    .product-meta {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        flex-wrap: wrap !important;
        gap: 6px !important;
        margin-bottom: 20px;
    }

    .rating {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }

    .stars {
        font-size: 16px !important;
    }

    .rating-val {
        font-size: 14px !important;
        font-weight: 700 !important;
    }

    .reviews-link {
        font-size: 13px !important;
        color: #EE4444 !important;
        border-bottom: 1px dashed #ffaaaa !important;
    }

    .sku {
        font-size: 12px !important;
        color: #aaa !important;
    }

    /* Опции и характеристики */
    .product-info-column {
        grid-column: unset !important;
        grid-row: unset !important;
        padding: 0 16px !important;
        border-top: none !important;
        order: 3 !important;
    }

    /* Блок цены и кнопок — снизу, на всю ширину */
    .product-actions-box {
    display: flex !important;
    flex-direction: column !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 0 !important;
}

    /* Скрываем цену и старую цену в прилипшем блоке — показываем только кнопки */
    .product-actions-box .price-row {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 10px !important;
    margin-bottom: 6px !important;
}

  .product-actions-box .stock-status-detailed {
    display: flex !important;
    margin-bottom: 14px !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
}

.product-actions-box > input[type="hidden"] {
    display: none !important;
}

  .product-actions-box .btn-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    width: 100% !important;
}

.product-actions-box .btn-row .btn-add-cart,
.product-actions-box .btn-row .btn-buy-now {
    flex: 1 1 0 !important;
    width: 0 !important;
    min-width: 0 !important;
    height: 50px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border-radius: 12px !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
}

    /* Кнопки в ряд */
    .btn-add-cart,
    .btn-buy-now {
        display: inline-flex !important;
        width: calc(50% - 6px) !important;
        height: 50px !important;
        font-size: 15px !important;
        font-weight: 700 !important;
        border-radius: 12px !important;
        margin-bottom: 0 !important;
        vertical-align: top !important;
    }

    .btn-add-cart {
        margin-right: 12px !important;
    }

    /* Контейнер кнопок */
    .product-actions-box > .btn-add-cart,
    .product-actions-box > .btn-buy-now {
        display: inline-flex !important;
        justify-content: center !important;
    }

    /* Делаем кнопки в строку через flex */

    .product-actions-box > * {
        flex: 1 !important;
    }

    /* Скрываем всё кроме двух основных кнопок в прилипшем блоке */
    .product-actions-box > input[type="hidden"]{
        display: none !important;
        flex: none !important;
    }

    /* Заголовок продукта как на скриншоте — показываем цену над кнопками */
    .product-header .product-title {
        font-size: 18px !important;
        line-height: 1.35 !important;
    }

    /* Галерея-точки */
    .gallery-dots {
        margin-top: 12px !important;
        margin-bottom: 4px !important;
    }

    /* Скрываем десктопные элементы внутри страницы продукта */
    .product-info-column .product-short-specs {
        display: none !important;
    }

    .content-area {
        max-width: 100%;
        padding: 0 16px !important;
    }

    /* Правильный порядок блоков */
.product-header {
    order: 1 !important;
}

.product-info-column {
    order: 2 !important;
}

.product-actions-box {
    order: 3 !important;
}

/* Внутри .product-actions-box порядок: цена → остаток → кнопки */
.product-actions-box .price-row {
    order: 1 !important;
}

.product-actions-box .stock-status-detailed {
    order: 2 !important;
    margin-bottom: 14px !important;
}

.product-actions-box .btn-row {
    order: 3 !important;
}

.related-products-section,
    .description-specs-section,
    .reviews-section,
    .questions-section {
        padding-top: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        margin-top: 0 !important;
    }

    .product-section-title, 
    .reviews-title, 
    .questions-title
    {
        font-size: 28px !important;
        margin-bottom: 20px !important;
    }

    .related-header {
      margin-top: 20px !important;
    }

    .slider-navigation {
      display: none !important;
    }

    .product-section-title, .reviews-header, .questions-header {
      padding-top: 20px !important;
      padding-bottom: 0 !important;
      border-top: 1px solid #e5e7eb !important;
      border-bottom: 0 !important;
    }

    .reviews-layout {
        display: flex !important;
        flex-direction: column !important;
    }

    .reviews-sidebar {
        order: 1 !important;
    }

    .reviews-list {
        order: 2 !important;
    }

    .overall-rating-block {
        display: flex !important;
        flex-wrap: wrap !important;
        align-items: center !important;
        gap: 8px !important;
        margin-bottom: 0 !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    .rating-score,
    .overall-stars {
        display: flex !important;
        align-items: center !important;
    }

    .overall-stars {
        margin-bottom: 20px !important;
    }

    .rating-subtitle {
        display: none !important;
    }

    .add-review-box {
      padding: 5px 16px !important;
    }

    .questions-layout {
        display: flex !important;
        flex-direction: column !important;
    }

    .questions-sidebar {
        order: 1 !important;
    }

    .questions-list {
        order: 2 !important;
    }

    .brands-columns-car-page {
      column-count: 3 !important;
      margin-top: 0 !important;
      margin-bottom: 10px !important;
    }

    .btn-remove {
        order: 1 !important;
    }

    .quantity-selector {
        order: 2 !important;
    }

    .item-name {
      font-size: 18px !important;
    }

    .cart-title {
      font-size: 24px !important;
      line-height: 30px !important;
  }

  .cart-item {
    padding: 15px 0 !important;
  }

  .cart-count {
      width: 24px !important;
      height: 24px !important;
      font-size: 14px !important;
  }

/* ─── CHECKOUT PAGE ─── */

  /* Переключаем двухколоночный layout в одну колонку */
  .page {
    flex-direction: column !important;
    gap: 16px !important;
    padding: 0 16px !important;
    margin-bottom: 40px !important;
  }

  /* left-col идёт первым (по умолчанию), right-col — вторым */
  .left-col {
    width: 100% !important;
    order: 1 !important;
  }

  .right-col {
    width: 100% !important;
    flex-shrink: unset !important;
    order: 2 !important;
  }

  /* Карточки на всю ширину */
  .card,
  .order-card {
    border-radius: 12px !important;
    padding: 16px !important;
  }

  .card-title {
    font-size: 20px !important;
  }

  .card-subtitle {
    font-size: 13px !important;
    margin-bottom: 20px !important;
  }

  /* Поля формы — складываем в столбик */
  .input-row {
    flex-direction: column !important;
    gap: 12px !important;
  }

  .input-wrap[style] {
    flex: unset !important;
    width: 100% !important;
  }

  /* Варианты доставки — стек */
  .delivery-options {
    flex-direction: column !important;
    gap: 10px !important;
    margin-bottom: 20px !important;
  }

  .del-opt {
    width: 100% !important;
  }

  /* Таблица курьеров — скрываем лишние колонки на совсем маленьких экранах */
  .courier-table thead td:nth-child(3),
  .courier-table tbody td:nth-child(3) {
    display: none !important;
  }

  .courier-table thead td,
  .courier-table tbody td {
    font-size: 13px !important;
    padding: 10px 6px !important;
  }

  /* Самовывоз — header в столбик */
  .selfpickup-header {
    flex-direction: column !important;
    gap: 10px !important;
  }

  .selfpickup-col[style] {
    flex: unset !important;
    width: 100% !important;
  }

/* ─── Mobile Search Overlay ─── */

.m-search-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    z-index: 99999;
    flex-direction: column;
    padding: 0;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-100%);
    opacity: 0;
}

.m-search-overlay.is-open {
    display: flex;
    animation: mSearchSlideIn 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.m-search-overlay.is-closing {
    display: flex;
    animation: mSearchSlideOut 0.28s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes mSearchSlideIn {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

@keyframes mSearchSlideOut {
    from { transform: translateY(0);    opacity: 1; }
    to   { transform: translateY(-100%); opacity: 0; }
}

.m-search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    border-bottom: 1px solid #e5e5e5;
    height: 74px;
    flex-shrink: 0;
    background: #fff;
}

/* Кнопка «назад» */
.m-search-back {
    background: #f4f6f8;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #444;
    cursor: pointer;
    flex-shrink: 0;
}

/* Обёртка инпута */
.m-search-input-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    border: 1px solid #f29999;
    border-radius: 10px;
    padding: 0 12px;
    background: #fff;
    box-sizing: border-box;
    min-width: 0;
}

.m-search-icon {
    color: #999;
    flex-shrink: 0;
}

.m-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 14px;
    color: #222;
    background: transparent;
    min-width: 0;
    font-family: inherit;
}

.m-search-input::placeholder {
    color: #999;
}

.m-search-clear {
    background: none;
    border: none;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    color: #bbb;
    cursor: pointer;
    flex-shrink: 0;
}

/* Кнопка «Найти» */
.m-search-submit {
    background: #EE4444;
    color: #fff;
    border: none;
    height: 44px;
    padding: 0 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: inherit;
    transition: background 0.2s;
}

.m-search-submit:active {
    background: #d63d3d;
}

}

/* Маркетплейсы — под ценой и кнопками (Марат 27.09.2026): у блока не было order,
   и на телефоне он всплывал первым в колонке .product-actions-box */
.product-actions-box .mp-buy {
    order: 4 !important;
}
