<!-- عداد تنازلي للعروض -->
<div class="countdown-widget">
<div class="countdown-header">
<h3>🔥 عرض محدود ينتهي قريباً!</h3>
<p>استفد من العرض قبل انتهاء الوقت</p>
</div>
<div class="countdown-timer">
<div class="time-box">
<div class="time-value" id="days">00</div>
<div class="time-label">يوم</div>
</div>
<div class="time-separator">:</div>
<div class="time-box">
<div class="time-value" id="hours">00</div>
<div class="time-label">ساعة</div>
</div>
<div class="time-separator">:</div>
<div class="time-box">
<div class="time-value" id="minutes">00</div>
<div class="time-label">دقيقة</div>
</div>
<div class="time-separator">:</div>
<div class="time-box">
<div class="time-value" id="seconds">00</div>
<div class="time-label">ثانية</div>
</div>
</div>
<button class="cta-button">احصل على العرض الآن!</button>
</div>
<style>
.countdown-widget {
background: linear-gradient(135deg, #ff6b6b, #ee5a52);
border-radius: 25px;
padding: 40px;
max-width: 700px;
margin: 30px auto;
box-shadow: 0 20px 60px rgba(255,107,107,0.5);
direction: rtl;
}
.countdown-header {
text-align: center;
color: white;
margin-bottom: 35px;
}
.countdown-header h3 {
margin: 0 0 10px;
font-size: 2.2em;
text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
}
.countdown-header p {
margin: 0;
font-size: 1.2em;
opacity: 0.95;
}
.countdown-timer {
display: flex;
justify-content: center;
align-items: center;
gap: 15px;
margin-bottom: 30px;
flex-wrap: wrap;
}
.time-box {
background: white;
padding: 20px;
border-radius: 15px;
min-width: 100px;
text-align: center;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.time-value {
font-size: 3em;
font-weight: 800;
color: #ff6b6b;
font-family: 'Arial', sans-serif;
line-height: 1;
}
.time-label {
font-size: 1em;
color: #666;
margin-top: 8px;
font-weight: 600;
}
.time-separator {
font-size: 3em;
color: white;
font-weight: 700;
}
.cta-button {
width: 100%;
background: white;
color: #ff6b6b;
border: none;
padding: 20px;
border-radius: 15px;
font-size: 1.4em;
font-weight: 800;
cursor: pointer;
transition: all 0.3s;
box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}
.cta-button:hover {
transform: translateY(-5px);
box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}
@media (max-width: 768px) {
.countdown-widget {
padding: 25px 20px;
}
.time-box {
min-width: 70px;
padding: 15px;
}
.time-value {
font-size: 2em;
}
}
</style>
<script>
// تحديد تاريخ انتهاء العرض (7 أيام من الآن)
const countDownDate = new Date().getTime() + (7 * 24 * 60 * 60 * 1000);
const x = setInterval(function() {
const now = new Date().getTime();
const distance = countDownDate - now;
const days = Math.floor(distance / (1000 * 60 * 60 * 24));
const hours = Math.floor((distance % (1000 * 60 * 60 * 24)) / (1000 * 60 * 60));
const minutes = Math.floor((distance % (1000 * 60 * 60)) / (1000 * 60));
const seconds = Math.floor((distance % (1000 * 60)) / 1000);
document.getElementById('days').textContent = String(days).padStart(2, '0');
document.getElementById('hours').textContent = String(hours).padStart(2, '0');
document.getElementById('minutes').textContent = String(minutes).padStart(2, '0');
document.getElementById('seconds').textContent = String(seconds).padStart(2, '0');
if (distance < 0) {
clearInterval(x);
document.querySelector('.countdown-widget').innerHTML = '<div style="text-align:center; color:white; font-size:2em; padding:40px;">⏰ انتهى العرض!</div>';
}
}, 1000);
</script>