!function(){console.log("IM-SCRIPT: loaded and running");var e=["add to cart","add to bag"],t=["buy now"];function n(e,t){var n=(e.textContent||"").trim().toLowerCase();if(!n||n.length>40)return!1;for(var i=0;i0)){var a=r.textContent.trim();if(/[₹$]\s?[\d,]+(\.\d+)?/.test(a)&&a.length<20)return a}}return""}(n||c);(o=document.createElement("div")).className="imsb";var u=''+(s||"")+"
",f='';n&&(f+=''),f+='',f+="
",o.innerHTML=u+f,document.body.appendChild(o),n&&o.querySelector(".imsc").addEventListener("click",function(){n.click()}),o.querySelector(".imsy").addEventListener("click",function(){!function(e){if(e){var t=!1;Ecwid.OnCartChanged.add(n),e.click(),setTimeout(function(){if(!t)try{Ecwid.OnCartChanged.remove(n)}catch(e){}},4e3)}function n(){if(!t){t=!0;try{Ecwid.OnCartChanged.remove(n)}catch(e){}Ecwid.Cart.gotoCheckout()}}}(n)});var m=(c||n).closest("div")||c||n;(r=new IntersectionObserver(function(e){e.forEach(function(e){e.isIntersecting?o.classList.remove("imv"):o.classList.add("imv")})},{threshold:0})).observe(m)}else d<40&&(a=setTimeout(l,250))}var s=null,u=null,f=0;function m(){u&&(clearTimeout(u),u=null),s&&(s.remove(),s=null),f=0}function p(){f++;var n=i(e);i(t)||(n?((s=document.createElement("button")).type="button",s.className="imbn",s.textContent="Buy Now",n.insertAdjacentElement("afterend",s),s.addEventListener("click",function(){var e=s.textContent;s.disabled=!0,s.textContent="Adding...";var t=!1;function i(){if(!t){t=!0;try{Ecwid.OnCartChanged.remove(i)}catch(e){}Ecwid.Cart.gotoCheckout()}}Ecwid.OnCartChanged.add(i),n.click(),setTimeout(function(){if(!t){try{Ecwid.OnCartChanged.remove(i)}catch(e){}s.disabled=!1,s.textContent=e}},4e3)})):f<40&&(u=setTimeout(p,250)))}!function e(){!function(){if(!document.getElementById("imis")){var e=document.createElement("style");e.id="imis",e.textContent=".imsb{display:none;position:fixed;bottom:0;left:0;right:0;z-index:99999;background:#ffffff;box-shadow:0 -2px 12px rgba(0,0,0,0.18);padding:10px 14px;align-items:center;justify-content:space-between;gap:10px;box-sizing:border-box;}.imsb.imv{display:flex;}.imsp{font-weight:700;font-size:16px;color:#111111;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:90px;}.imsa{display:flex;gap:8px;flex:1;justify-content:flex-end;}.imsn{padding:11px 16px;border-radius:6px;font-weight:600;font-size:14px;border:none;cursor:pointer;flex:1;max-width:160px;}.imsc{background:#ffffff;border:1.5px solid #111111;color:#111111;}.imsy{background:#f5a623;color:#111111;}@media (min-width:768px){.imsb{display:none !important;}}.imbn{margin-left:8px;padding:11px 20px;border-radius:6px;font-weight:600;font-size:14px;border:none;cursor:pointer;background:#f5a623;color:#111111;vertical-align:middle;}.imbn[disabled]{opacity:0.6;cursor:default;}@media (max-width:480px){.imbn{display:block;margin-left:0;margin-top:8px;width:100%;}}",document.head.appendChild(e)}}(),"undefined"!=typeof Ecwid?Ecwid.OnAPILoaded.add(function(){Ecwid.OnPageLoaded.add(function(e){"PRODUCT"===e.type?(c(),m(),l(),p()):(c(),m())})}):setTimeout(e,300)}()}();