document.querySelectorAll('.container').forEach(n => {
const slider = new Swiper(n.querySelector('.product-slider'), {
navigation: {
nextEl: n.querySelector('.swiper-button-next'),
prevEl: n.querySelector('.swiper-button-prev'),
},
spaceBetween: 10,
});
const thumbs = new Swiper(n.querySelector('.product-thumbs'), {
spaceBetween: 5,
centeredSlides: true,
slidesPerView: 4,
touchRatio: 0.2,
slideToClickedSlide: true,
direction: 'vertical',
});
slider.controller.control = thumbs;
thumbs.controller.control = slider;
});