Offer Countdown
Page: Product Pages (Optimized for Conversions)


Snippet Code
<!-- Countdown Offer Banner -->
<div style="background-color: #fffccf; padding: 20px; text-align: center; font-family: 'Georgia', serif;">
<div style="display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; max-width: 1200px; margin: 0 auto;">
<div style="flex: 1; font-size: 22px; color: #333;">
Get it before it's gone
</div>
<div style="flex: 2; display: flex; justify-content: center; align-items: center; gap: 10px;">
<div>
<span id="days" style="font-size: 28px;">0</span><br><span style="font-size: 12px;">DAYS</span>
</div>
<div style="margin-bottom:20px;">|</div>
<div>
<span id="hours" style="font-size: 28px;">0</span><br><span style="font-size: 12px;">HOURS</span>
</div>
<div style="margin-bottom:20px;">|</div>
<div>
<span id="minutes" style="font-size: 28px;">0</span><br><span style="font-size: 12px;">MINUTES</span>
</div>
<div style="margin-bottom:20px;">|</div>
<div>
<span id="seconds" style="font-size: 28px;">0</span><br><span style="font-size: 12px;">SECONDS</span>
</div>
</div>
<div style="flex: 2; text-align: right; font-size: 14px; color: #444;">
<a href="/collections/sale" style="background-color: #1f1f1f; color: white; padding: 10px 20px; text-decoration: none; border-radius: 3px;">Shop sale</a>
</div>
</div>
</div>
<script>
// Set your countdown deadline
const deadline = new Date(Date.parse(new Date()) + 2 * 24 * 60 * 60 * 1000 + 16 * 60 * 60 * 1000 + 10 * 60 * 1000 + 59 * 1000);
function updateCountdown() {
const now = new Date();
const t = deadline - now;
const seconds = Math.floor((t / 1000) % 60);
const minutes = Math.floor((t / 1000 / 60) % 60);
const hours = Math.floor((t / (1000 * 60 * 60)) % 24);
const days = Math.floor(t / (1000 * 60 * 60 * 24));
document.getElementById('days').textContent = days;
document.getElementById('hours').textContent = hours;
document.getElementById('minutes').textContent = minutes;
document.getElementById('seconds').textContent = seconds;
}
updateCountdown();
setInterval(updateCountdown, 1000);
</script>