Каталог товаров
(function(){function init(){var root=document.querySelector('[data-id="8331373"]'),button=root&&root.querySelector('[data-id="cfToggle"] a'),panel=root&&root.querySelector('[data-id="d8ed970"]');if(!button||!panel||button.dataset.filterToggleReady)return;button.dataset.filterToggleReady="1";panel.id="catalog-mobile-filters";button.setAttribute("role","button");button.setAttribute("aria-controls",panel.id);button.setAttribute("aria-expanded","false");var animation=null,opened=false,mobile=window.matchMedia("(max-width:767px)"),reduced=window.matchMedia("(prefers-reduced-motion:reduce)");function toggle(e){e.preventDefault();if(!mobile.matches)return;var current=panel.getBoundingClientRect().height,opacity=getComputedStyle(panel).opacity;if(animation){animation.cancel();animation=null;}opened=!opened;button.setAttribute("aria-expanded",String(opened));root.classList.add("catalog-filters-open");if(reduced.matches){root.classList.toggle("catalog-filters-open",opened);return;}var target=panel.getBoundingClientRect().height,styles=getComputedStyle(panel);var full={height:target+"px",paddingTop:styles.paddingTop,paddingBottom:styles.paddingBottom,borderTopWidth:styles.borderTopWidth,borderBottomWidth:styles.borderBottomWidth,opacity:1};var collapsed={height:"0px",paddingTop:"0px",paddingBottom:"0px",borderTopWidth:"0px",borderBottomWidth:"0px",opacity:0};var start=current?Object.assign({},full,{height:current+"px",opacity:opacity}):collapsed;animation=panel.animate([start,opened?full:collapsed],{duration:240,easing:"cubic-bezier(.22,.61,.36,1)",fill:"both"});panel.style.overflow="hidden";var active=animation;active.onfinish=function(){if(animation!==active)return;root.classList.toggle("catalog-filters-open",opened);active.cancel();animation=null;panel.style.removeProperty("overflow");};}button.addEventListener("click",toggle);button.addEventListener("keydown",function(e){if(e.key===" ")toggle(e);});mobile.addEventListener("change",function(){if(animation){animation.cancel();animation=null;}panel.style.removeProperty("overflow");root.classList.toggle("catalog-filters-open",opened);});}if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",init);else init();})();