let assortments = document.querySelectorAll('.product__item');
assortments.forEach(item =>{
let any = parseInt(item.getElementsByTagName("P")[0].getAttribute("data-filter"));
if(any < 2000){
item.classList.add('none');
}
});
let toBlock = document.querySelector('.section').getBoundingClientRect().top;
console.log(toBlock); (высота до до блока)
window.addEventListener('scroll', () => {
window.scrollTo({
top: toBlock,
behavior: "smooth"
});
})