/* Спринт 1 аудита (июль 2026): мобильная версия — каталог, карточка, нижняя панель, баннер, рейтинг. */

/* Рейтинг в шапке и в карточке (аудит P0-12) */
.wf-rating{display:inline-flex;align-items:center;gap:6px;font-size:13px;line-height:1.2;color:#4a5a6a;text-decoration:none;white-space:nowrap}
.wf-rating,.wf-rating:visited{color:#4a5a6a}
.wf-rating:hover{color:#1e7fb5;text-decoration:none}
.wf-rating__star{color:#f5a623;font-size:15px}
.wf-rating b{color:#222;font-weight:700}
.wf-rating--header{display:flex;justify-content:center;margin:14px 0 0}
.wf-rating--card{margin:4px 0 12px}
body.wf-card-page .wf-rating--header{display:none}

/* Нижняя панель — только телефон и планшет */
.wf-bottom-bar{display:none}

@media (max-width:767px){
  /* Лента брендов вместо вертикального списка (аудит P0-1) */
  .catalog_sections > .row{display:flex;flex-wrap:nowrap;overflow-x:auto;-webkit-overflow-scrolling:touch;gap:8px;margin:0 -15px;padding:2px 15px 10px;scrollbar-width:none}
  .catalog_sections > .row::before,.catalog_sections > .row::after{display:none}
  .catalog_sections > .row::-webkit-scrollbar{display:none}
  .catalog_sections > .row > a.catalog_projects_more{flex:0 0 auto;display:block}
  .catalog_sections > .row > a.catalog_projects_more .catalog_sections_one{float:none;width:auto;padding:0;margin:0}
  .catalog_sections > .row > a.catalog_projects_more .catalog_sections_one table{width:auto;margin:0;border:1px solid #dfe6ee;border-radius:24px;background:#fff;white-space:nowrap}
  .catalog_sections > .row > a.catalog_projects_more .catalog_sections_one td{padding:4px 12px 4px 6px;font-size:14px;line-height:1}
  .catalog_sections > .row > a.catalog_projects_more .catalog_sections_one td:first-child{width:auto!important;padding-right:0}
  .catalog_sections > .row > a.catalog_projects_more .catalog_sections_one td:first-child > div{height:32px!important;width:32px!important;margin-right:8px!important}

  /* Закреплённая панель: фильтр, быстрые фильтры, сортировка */
  .wf-m-bar{position:-webkit-sticky;position:sticky;top:50px;z-index:9500;display:flex;align-items:center;gap:8px;overflow-x:auto;white-space:nowrap;margin:0 -15px 10px;padding:7px 15px;background:#fff;border-bottom:1px solid #e6ebf0;box-shadow:0 3px 8px rgba(0,0,0,.06);-webkit-overflow-scrolling:touch;scrollbar-width:none}
  .wf-m-bar::-webkit-scrollbar{display:none}
  .wf-m-bar > *{flex:0 0 auto}
  .wf-m-bar a.collapse_link.btn{width:auto!important;padding:6px 14px;font-size:14px;line-height:1.3;margin:0}
  .wf-m-bar .wf-chip{border:1px solid #1e9ad6;border-radius:18px;padding:6px 13px;font-size:14px;line-height:1.3;color:#1e9ad6;background:#fff;cursor:pointer}
  .wf-m-bar .wf-chip.is-on{background:#1e9ad6;color:#fff}
  .wf-m-bar .wf-sep{width:1px;height:22px;background:#d9e0e7}
  .wf-m-bar .sort_catalog,.wf-m-bar .mobile_catalog_sort{display:contents}
  .wf-m-bar .btn.btn-xs{padding:6px 11px;font-size:13px}
  .wf-m-bar-host .filtr_mobile{margin:0}

  /* Фото товара крупнее, миниатюры лентой (аудит P0-3) */
  .bx_item_detail .col-md-5 > a[data-gallery] img.img-responsive{max-height:62vh!important;width:auto;max-width:100%;margin:0 auto}
  .bx_item_detail .photo_more{display:flex;flex-wrap:nowrap;overflow-x:auto;gap:8px;padding:8px 0 4px;text-align:left;-webkit-overflow-scrolling:touch}
  .bx_item_detail .photo_more .more_pict{flex:0 0 68px;width:68px!important;height:68px!important;padding:0!important}
  .bx_item_detail .photo_more .more_pict a{display:block;width:68px;height:68px}
  .bx_item_detail .photo_more .more_pict img{width:68px;height:68px;object-fit:cover;border:1px solid #dfe6ee;border-radius:6px}
  .bx_item_detail .photo_more .more_pict.is-on img{border-color:#1e9ad6;box-shadow:0 0 0 1px #1e9ad6}
  .wf-door-card__image{cursor:zoom-in}

  /* Меню не должно перекрывать следующий блок отрицательным отступом. */
  nav.navbar.menu_mobile{margin-bottom:0}

  /* Главный слайдер: единая раскладка вместо независимых фиксированных высот. */
  .index_slider_mobile #carousel_mobile .carousel-inner,
  .index_slider_mobile #carousel_mobile .carousel-inner > .item{height:auto}
  .index_slider_mobile #carousel_mobile .item > .container{
    display:block!important;width:100%;height:auto;padding:20px 44px 22px;
  }
  .index_slider_mobile #carousel_mobile .item .text{
    display:flex;flex-direction:column;align-items:center;float:none;
    width:100%;height:auto;padding:0;text-align:center;
  }
  .index_slider_mobile #carousel_mobile .item h2{
    display:flex;align-items:center;justify-content:center;width:100%;
    min-height:2.4em;margin:0;padding:0;font-size:clamp(20px,5.4vw,26px);line-height:1.2;
  }
  .index_slider_mobile #carousel_mobile .item img.visible-xs{
    width:100%!important;max-width:100%;height:clamp(140px,38vw,190px)!important;
    max-height:none;margin:12px 0!important;object-fit:contain;
  }
  .index_slider_mobile #carousel_mobile .item .pict{display:none!important}
  .index_slider_mobile #carousel_mobile .item .btn{
    min-height:44px;max-width:100%;margin:0;padding:10px 28px;font-size:16px;line-height:22px;
  }
  .index_slider_mobile #carousel_mobile .carousel-control{
    display:flex;align-items:center;justify-content:center;
    top:50%;bottom:auto;width:40px;height:40px;padding:0;
    transform:translateY(-50%);
  }
  .index_slider_mobile #carousel_mobile .carousel-control.left{left:4px!important}
  .index_slider_mobile #carousel_mobile .carousel-control.right{right:4px!important}

  /* Нижняя панель: звонок, обратный звонок, каталог, корзина (аудит 4.1) */
  body.wf-has-bar{padding-bottom:62px}
  .wf-bottom-bar{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:10001;background:#fff;border-top:1px solid #dbe3eb;box-shadow:0 -3px 12px rgba(0,0,0,.09);padding-bottom:env(safe-area-inset-bottom)}
  .wf-bottom-bar a{position:relative;flex:1 1 0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;min-height:56px;padding:6px 2px;font-size:11px;line-height:1.1;color:#2b3a4a!important;text-decoration:none!important}
  .wf-bottom-bar a svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
  .wf-bottom-bar a.wf-bb-call{background:#1e9ad6;color:#fff!important}
  .wf-bottom-bar .wf-bb-count{position:absolute;top:4px;left:calc(50% + 6px);min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#e53935;color:#fff;font-size:11px;line-height:17px;text-align:center}
  .wf-bottom-bar .wf-bb-count:empty{display:none}
  body.wf-has-bar .go_top{bottom:76px!important}
}

/* Увеличенное фото (карточки поставщиков) */
.wf-zoom{position:fixed;inset:0;z-index:20000;background:rgba(0,0,0,.92);overflow:auto;-webkit-overflow-scrolling:touch;touch-action:pan-x pan-y pinch-zoom}
.wf-zoom img{display:block;margin:0 auto;max-width:none;width:min(220vw,1400px);height:auto}
.wf-zoom button{position:fixed;top:10px;right:12px;z-index:20001;width:44px;height:44px;border:0;border-radius:22px;background:rgba(255,255,255,.92);font-size:26px;line-height:44px;color:#222}

/* Фото товара на десктопе: главное фото крупнее (аудит P0-3) */
@media (min-width:768px){
  .bx_item_detail .col-md-5 > a[data-gallery] img.img-responsive{max-height:560px!important;width:auto;max-width:100%;margin:0 auto}
  .bx_item_detail .photo_more .more_pict{width:84px;display:inline-block;padding:3px}
  .bx_item_detail .photo_more .more_pict img{width:78px;height:78px;object-fit:cover}
}

/* Карточки в двух колонках: тот же порог, на котором скрыт счётчик количества. */
@media (max-width:750px){
  .prod_plitki .plitki_more .btn-group{
    display:flex;flex-direction:column;align-items:stretch;
  }
  .prod_plitki .plitki_more .btn-group > .btn{
    float:none;width:100%;margin:0;white-space:normal;
  }
  .prod_plitki .plitki_cart .btn-default.car,
  .prod_plitki .plitki_cart .btn-default.car_no_kol,
  .prod_plitki .plitki_cart a.zakaz{
    display:block;width:100%;min-height:44px;margin:0;
    border-radius:22px!important;padding:10px 6px!important;line-height:22px;
  }
}

/* Быстрые действия карточки: видимые иконки, состояния и клавиатурный фокус. */
.prod_plitki.wf-card-compact .wf-card-actions{
  display:block;position:absolute;top:8px;right:8px;z-index:5;
  width:36px;height:auto;margin:0;padding:0;
}
.prod_plitki.wf-card-compact .wf-card-actions--discount{top:56px}
.prod_plitki.wf-card-compact .wf-card-actions .btn-group{
  display:flex;flex-direction:column;gap:8px;width:36px!important;
}
.prod_plitki.wf-card-compact .wf-card-actions .btn-group > .wf-card-action{
  position:relative;display:flex;align-items:center;justify-content:center;
  flex:0 0 36px;float:none;width:36px;height:36px;min-height:36px;
  margin:0;padding:0;border:1px solid #dbe5eb;border-radius:50%!important;
  background:#fff;color:#1c94c4!important;font-size:18px;line-height:1;
  box-shadow:0 1px 4px rgba(0,0,0,.09);cursor:pointer;
}
.prod_plitki.wf-card-compact .wf-card-actions .wf-card-action::before{
  content:"";position:absolute;inset:-4px;
}
.prod_plitki.wf-card-compact .wf-card-actions .wf-card-action.active{
  color:#fff!important;background:#1c94c4;border-color:#1c94c4;
}
.prod_plitki.wf-card-compact .wf-card-actions .wf-card-action:focus-within{
  outline:2px solid #12638a;outline-offset:3px;
}
.wf-card-action__input{
  position:absolute;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;
}
.prod_plitki.wf-card-compact:hover{height:530px;margin-bottom:0;transform:none}
@media(max-width:750px){
  .prod_plitki.wf-card-compact,.prod_plitki.wf-card-compact:hover{
    height:auto;min-height:0;
  }
}
