/* Спринт 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}

  /* Баннер на главной ниже: товар виден на первом экране (аудит 4.1) */
  .index_slider_mobile .carousel-inner{height:340px}
  .index_slider_mobile .carousel-inner .item > div,.index_slider_mobile .carousel-inner .item .pict{height:340px}
  .index_slider_mobile .carousel-inner .item .col-md-5.text{height:auto}
  .index_slider_mobile .carousel-inner .item h2{font-size:24px;line-height:1.15;margin:0;padding-top:24px}
  .index_slider_mobile .carousel-inner .item img.visible-xs{height:120px!important;width:auto!important;max-width:none;margin-top:10px!important;margin-bottom:12px!important}
  .index_slider_mobile .carousel-control.left,.index_slider_mobile .carousel-control.right{top:150px}

  /* Нижняя панель: звонок, обратный звонок, каталог, корзина (аудит 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}
}
