/* audioceh.ru mobile fixes — injected via nginx sub_filter */

/* ─── Header icons ─── */
@media (max-width: 768px) {
  header .homebuilder .tm-container:last-child .top-links .toggle-wrap {
    align-items: center !important;
    gap: 0 11px !important;
  }
  header .homebuilder .tm-container:last-child .top-links .box-cart {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 36px !important;
  }
  header .homebuilder .tm-container:last-child .top-links .box-cart svg,
  header .homebuilder .tm-container:last-child .top-links .box-cart #searh-h svg,
  header .homebuilder .tm-container:last-child .oc_mm svg {
    width: 30px !important;
    height: 30px !important;
    display: block !important;
    flex-shrink: 0 !important;
  }
  header .homebuilder .tm-container:last-child .top-links #searh-h,
  header .homebuilder .tm-container:last-child .top-links #cart.toggle-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .wishlist-header-btn svg, .compare-header-btn svg,
  #cart .toggle, #searh-h .toggle { transform: none !important; }
  .top-links .box-cart { margin-left: 0 !important; }
}

/* ─── Slider button ─── */
.swiper-desc .btn-primary {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: normal !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ─── "О нас" section ─── */
@media (max-width: 768px) {
  .sl-about { text-align: center !important; }
}

/* ─── "Популярные категории продукции" heading ─── */
@media (max-width: 768px) {
  .html187 h2 {
    padding-left: 15px !important;
    padding-right: 15px !important;
    text-align: left !important;
  }
  .head_cat_main { text-align: left !important; }
  .html187 .row { margin-left: 0 !important; margin-right: 0 !important; }
}

/* ─── Category tiles ─── */
@media (max-width: 768px) {
  /* Stack tiles vertically, compensate parent .row margin: 0 -15px */
  .banner-flex-mob {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    margin-left: 15px !important;
    margin-right: 15px !important;
    overflow: visible !important;
  }
  .banner-flex-mob > [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    flex: none !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  /* Fix Bootstrap float col-sm-12 collapsing to 0 on xs */
  .banner-flex-mob .banners,
  .banner-flex-mob .banners > div,
  .banner-flex-mob .banner-box {
    width: 100% !important;
    float: none !important;
  }

  /* ── Row 1: tall photo tiles, white gradient text bottom-left ── */
  .banner-flex-mob:not(.txt-dwn) .banner-box {
    display: block !important;
    position: relative !important;
    height: 160px !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
  }
  .banner-flex-mob:not(.txt-dwn) .banner-box img {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important;
  }
  .banner-flex-mob:not(.txt-dwn) .s-desc {
    position: absolute !important;
    bottom: 0 !important; left: 0 !important;
    width: 100% !important;
    padding: 32px 12px 10px !important;
    background: linear-gradient(transparent, rgba(0,0,0,.6)) !important;
  }
  .banner-flex-mob:not(.txt-dwn) .text-white-k,
  .banner-flex-mob:not(.txt-dwn) .text-black-k { background: none !important; }
  .banner-flex-mob:not(.txt-dwn) .t1 {
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-align: left !important;
    white-space: normal !important;
    line-height: 1.3 !important;
  }

  /* ── Row 2 (txt-dwn): full-width photo tile, black text bottom-left ── */
  .banner-flex-mob.txt-dwn .banners > div {
    display: block !important;
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
  }
  .banner-flex-mob.txt-dwn .banner-box {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 160px !important;
    overflow: hidden !important;
    border-radius: 8px !important;
    margin-bottom: 8px !important;
    background: #fff !important;
    padding: 0 !important;
    flex-direction: unset !important;
    align-items: unset !important;
    box-sizing: border-box !important;
  }
  .banner-flex-mob.txt-dwn .banner-box img {
    position: absolute !important;
    top: 0 !important; left: 0 !important;
    width: 100% !important; height: 100% !important;
    object-fit: cover !important;
    margin-right: 0 !important;
    flex-shrink: unset !important;
    z-index: 0 !important;
  }
  .banner-flex-mob.txt-dwn .s-desc {
    position: absolute !important;
    bottom: 0 !important; left: 0 !important;
    width: 100% !important;
    padding: 12px 12px 12px !important;
    background: none !important;
    flex: unset !important;
    min-width: unset !important;
    z-index: 1 !important;
    align-self: unset !important;
  }
  .banner-flex-mob.txt-dwn .text-black-k,
  .banner-flex-mob.txt-dwn .text-white-k { background: none !important; }
  .banner-flex-mob.txt-dwn .t1 {
    color: #111 !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    text-align: left !important;
    white-space: normal !important;
    line-height: 1.25 !important;
  }
}

/* ─── "О нас" секция + футер: картинка полностью + зазор ─── */
@media (max-width: 768px) {
  .service_f {
    padding-bottom: 24px !important;
  }
  .service_f_block2 {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .service_f_block2 .service_f_img img {
    width: 100% !important;
    height: auto !important;
    display: block !important;
  }
  footer {
    margin-top: 0 !important;
    padding-top: 40px !important;
  }
}

/* ─── Footer: copyright ниже Политики конфиденциальности ─── */
@media (max-width: 768px) {
  .html257 {
    margin-top: 75px !important;
  }
  .html257 p {
    margin-top: 0 !important;
  }
}


/* ─── Yandex mobile: footer font-size — подвал 10px→14px, фикс «слишком мелкий текст» (2026-06-20) ─── */
@media (max-width: 768px) {
  .cg-sub-title-footer a,
  .footer-info a,
  footer .box-content a,
  footer ul.box-content li a {
    font-size: 14px !important;
    line-height: 1.5 !important;
  }
}

/* ─── Product mobile: фикс «корзина не работает» (структурный, не от правки шрифтов) ───
   На карточке товара слайдер галереи (#gallery .slick-*) раздувался до ~3208px с
   z-index:999 и физически накрывал колонку с кнопкой «В корзину» → тапы попадали в
   ссылку галереи (#gallery a, Fancybox), POST checkout/cart/add не уходил.
   Клипуем галерею до высоты одного слайда — кнопка снова кликабельна. (2026-06-20) */
@media (max-width: 768px) {
  #gallery,
  #gallery .slick-list,
  #gallery .slick-track {
    max-height: 500px !important;
    overflow: hidden !important;
  }
  #gallery .slick-slide {
    height: auto !important;
  }
}

/* ─── Бейдж количества на иконке корзины (регресс после реворка хедера на SVG-иконки):
   #cart-total создаётся, но наследует font-size:6px и прозрачный фон → невидим.
   Возвращаем читаемый бейдж-пузырёк. Появляется только при count≥1 (пустая корзина
   #cart-total не рендерит). На всех вьюпортах. (2026-06-20) */
/* 1:1 как бейдж сравнения/вишлиста (#compare-total / #wishlist-total): зелёный градиент,
   14×14, правый-нижний угол. Раньше #cart-total не имел этого правила → 6px+прозрачный. */
#cart > .toggle #cart-total {
  display: none !important;
  justify-content: center !important;
  align-items: center !important;
  width: 14px !important;
  min-width: 14px !important;
  height: 14px !important;
  padding: 0 !important;
  position: absolute !important;
  right: 2px !important;
  bottom: 2px !important;
  top: auto !important;
  left: auto !important;
  background: linear-gradient(90deg, #56C596 -3.33%, #47D7AC 100%) !important;
  border-radius: 50px !important;
  font-family: "Nextart_Regular", sans-serif !important;
  font-weight: 600 !important;
  font-size: 6px !important;
  line-height: 1 !important;
  color: #000 !important;
}
#cart > .toggle #cart-total:not(:empty) { display: flex !important; }
