window.addEventListener("DOMContentLoaded",event=>{const stickyATC=document.querySelector("#lumin-sticky-atc"),img=stickyATC.querySelector(".product-content img"),btnSpinner=stickyATC.querySelector('[name="add"]').querySelector(".loading-overlay__spinner"),selectField=stickyATC.querySelector('select[name="id"]'),threshold=document.querySelector('button[name="add"]').getBoundingClientRect().bottom+Number(stickyATC.dataset.offset);window.addEventListener("scroll",()=>{window.scrollY>threshold?(stickyATC.classList.add("show"),document.documentElement.style.paddingBottom=`${stickyATC.clientHeight}px`,document.documentElement.style.height="auto"):(stickyATC.classList.remove("show"),document.documentElement.style.paddingBottom="0")}),selectField&&selectField.addEventListener("change",()=>{img.setAttribute("src",selectField.options[selectField.selectedIndex].dataset.img)}),document.querySelector('.product-form [name="id"]')?.addEventListener("change",e=>{const value=Number(e.target.value);value&&(selectField.value=value)})});
//# sourceMappingURL=/cdn/shop/t/3/assets/lumin-sticky-cart.js.map?v=150754694853952630941760288151
