.section-product-page .sticky-cta{position:fixed;bottom:var(--px-mobile, 2rem);z-index:1;left:calc(50% - calc(var(--temp-scrollbar-width, 0px) / 2));transform:translate(-50%);max-width:500px}.section-product-page .sticky-cta .button{min-width:160px;padding:1.2rem}document.addEventListener("DOMContentLoaded",() => {const forms = document.querySelectorAll('form[action="/cart/add"]'); forms.forEach(form => {form.addEventListener("submit",async (e) => {e.preventDefault(); const submitBtn = form.querySelector('[type="submit"], .add-to-cart'); if (submitBtn) submitBtn.classList.add("loading"); const formData = new FormData(form); try {const response = await fetch("/cart/add.js",{method: "POST",body: formData,headers: {"X-Requested-With": "XMLHttpRequest","Accept": "application/json"}}); if (!response.ok) throw new Error("Network error"); const data = await response.json(); console.log("\2705  Added to cart:",data); // Optional: trigger cart drawer or confirmation document.dispatchEvent(new CustomEvent("cart:updated",{detail: data}));} catch (err) {console.error("Add to Cart Error:",err); alert("Sorry, something went wrong while adding to cart.");} finally {if (submitBtn) submitBtn.classList.remove("loading");}});});}); .section-product-page .product.grid{z-index:2;position:relative;background:rgb(var(--color-background));background:var(--gradient-background);background-attachment:fixed}footer.footer{z-index:2;position:relative}#MainContent>.section:last-child:has(.sticky-cta) .sticky-cta{display:none}@media screen and (max-width: 749.98px){.section-product-page .sticky-cta{left:0;right:0;bottom:0;width:100%;transform:none;max-width:none;border-radius:0;padding:0}.section-product-page .sticky-cta__info{display:none}.section-product-page .sticky-cta .button,.section-product-page .sticky-cta__button{padding-right:0;width:100%;border-radius:0}.section-product-page .sticky-cta .button{height:calc(40px + var(--px-mobile) + 2px);padding-top:0;padding-bottom:0}}
/*# sourceMappingURL=/cdn/shop/t/4/assets/component-sticky-cta.css.map */
