Shop
- You cannot add that amount of "Ganesha Pre Marked Wall Plate" to the cart because there is not enough stock (0 remaining).
No account yet?
Create an Account
/* ==== Settings you can tweak ==== */
const FS_DELAY_MS = 2500; // Delay before showing (2.5s)
const FS_SUPPRESS_DAYS = 7; // Don't show again after close (days)
const FS_STORAGE_KEY = 'fs_free_ship_popup_until';
const FS_MIN_WIDTH = 0; // Set 768 to only show on tablet/desktop
(function(){
const backdrop = document.getElementById('fs-popup-backdrop');
const popup = document.getElementById('fs-popup');
const closeBtn = document.getElementById('fs-popup-close');
if (!backdrop || !popup || !closeBtn) return;
// Respect viewport rule
if (window.innerWidth < FS_MIN_WIDTH) return;
// Respect suppression window
try {
const until = localStorage.getItem(FS_STORAGE_KEY);
if (until && Date.now() {
backdrop.style.display = 'block';
popup.style.display = 'block';
requestAnimationFrame(() => {
backdrop.style.opacity = '1';
popup.style.opacity = '1';
popup.style.transform = 'translate(-50%,-50%) scale(1)';
});
// focus for accessibility
popup.setAttribute('tabindex','-1');
popup.focus({preventScroll:true});
};
const close = () => {
backdrop.style.opacity = '0';
popup.style.opacity = '0';
popup.style.transform = 'translate(-50%,-50%) scale(.96)';
setTimeout(() => {
backdrop.style.display = 'none';
popup.style.display = 'none';
}, 250);
// Set suppression timestamp
try {
const untilTs = Date.now() + FS_SUPPRESS_DAYS*24*60*60*1000;
localStorage.setItem(FS_STORAGE_KEY, String(untilTs));
} catch (e) {}
};
// Open after delay (only if user hasn't interacted heavily yet)
let timer = setTimeout(open, FS_DELAY_MS);
// Close handlers
closeBtn.addEventListener('click', close);
backdrop.addEventListener('click', close);
document.addEventListener('keydown', (e) => {
if (e.key === 'Escape') close();
}, { passive: true });
// Optional: cancel showing if user quickly navigates/scrolls (feel less intrusive)
window.addEventListener('beforeunload', () => clearTimeout(timer));
})();