/* Reserve the same slide geometry before Swiper initializes. */
.banner_index .swiper { --hero-per-view: 1; --hero-slide-width: calc((100% + 20px) / var(--hero-per-view) - 20px); }
.banner_index .swiper:not(.swiper-initialized) .swiper-slide { width: var(--hero-slide-width); flex: 0 0 var(--hero-slide-width); margin-right: 20px; }
.banner_index .swiper:not(.swiper-initialized) .swiper-wrapper { transform: translate3d(calc((100% - var(--hero-slide-width)) / 2 - var(--hero-clones, 0) * (var(--hero-slide-width) + 20px)), 0, 0); }
@media (min-width: 768px) { .banner_index .swiper { --hero-per-view: 1.16; } }
@media (min-width: 1180px) { .banner_index .swiper { --hero-per-view: 1.2; } }

/* Keep catalogue copy and carousel controls readable on narrow screens. */
@media (max-width:768px){
.banner_cat>.item{padding:20px;min-height:190px}
.banner_cat>.item .block{width:60%;max-width:100%;min-width:0}
.banner_cat>.item .block h2{font-size:clamp(1.25rem,5vw,1.75rem);line-height:1.15;margin-bottom:12px;overflow-wrap:anywhere}
.banner_cat>.item .block .text,.banner_cat>.item .block .text p{font-size:.875rem;line-height:1.35;overflow-wrap:anywhere}
.banner_cat>.item .img{width:50%;max-width:280px;height:100%}
.popular>h2{padding-right:90px;line-height:1.3;min-height:36px}
.catalog .catalog_stub_popular_head{position:relative;padding-right:90px;min-height:36px}
.catalog .catalog_stub_popular_head h3{width:100%;max-width:100%;min-width:0;white-space:normal;line-height:1.3;overflow-wrap:anywhere}
.catalog .catalog_stub_popular_nav{position:absolute;top:0;right:0;display:flex;gap:6px}
.catalog .catalog_stub_popular_nav .arrow{position:relative;top:auto;left:auto;right:auto;flex:0 0 36px;width:36px;height:36px}
.catalog .catalog_stub_offer h3{font-size:clamp(1.125rem,4.5vw,1.5rem)}
.catalog .catalog_stub_offer p{font-size:.875rem;line-height:1.35}
}

/* Keep the tablet cart badge inside the header width. */
@media (max-width:1024px){
.header_cart:not(.header_cart_mobile) .header_cart_count{right:0}
}

/* Allow page navigation to fit phone screens without clipping links. */
@media (max-width:768px){
.catalog nav.mfilter-pagination{width:100%;min-width:0}
.catalog .mfilter-pagination .pagination{max-width:100%;flex-wrap:wrap;gap:6px}
.catalog .mfilter-pagination .page-link{width:44px;height:44px;min-width:44px}
}

/* Search form: visible submit control and keyboard focus at every breakpoint. */
.search_page .search_page_inline_form{display:flex;align-items:center;gap:12px;padding:12px}
.search_page .search_page_inline_form .header_search_icon{display:inline-flex;position:static;flex:0 0 44px;width:44px;height:44px;align-items:center;justify-content:center;border:0;border-radius:50%;background:#21a038;cursor:pointer}
.search_page .search_page_inline_form input[type="search"]{flex:1;min-width:0;width:auto}
.search_page .search_page_inline_form :focus-visible{outline:2px solid #167629;outline-offset:3px}
.search_page .search_result h3{overflow-wrap:anywhere}
