// ✅ تغيير عبارات الأزرار إلى عبارات تحفيزية document.querySelectorAll('button.add-to-cart').forEach(btn => { btn.textContent = "احجزه قبل ما يخلص 🔥"; }); // ✅ عداد تنازلي وهمي const timerBanner = document.createElement('div'); timerBanner.innerHTML = "⏰ عرض لفترة محدودة! ينتهي خلال "; timerBanner.style.backgroundColor = '#ff7a00'; timerBanner.style.color = '#fff'; timerBanner.style.textAlign = 'center'; timerBanner.style.padding = '12px'; timerBanner.style.fontWeight = 'bold'; timerBanner.style.fontSize = '16px'; document.body.prepend(timerBanner); let timeLeft = 600; const countdown = document.getElementById('countdown'); function updateTimer() { const minutes = Math.floor(timeLeft / 60); const seconds = timeLeft % 60; countdown.textContent = `${minutes}:${seconds < 10 ? '0' + seconds : seconds}`; if (timeLeft > 0) timeLeft--; else timerBanner.style.display = 'none'; } setInterval(updateTimer, 1000); // ✅ إشعار وهمي للشراء setInterval(() => { const notify = document.createElement('div'); notify.textContent = "🛍️ عميل اشترى المنتج الآن!"; notify.style.position = 'fixed'; notify.style.bottom = '20px'; notify.style.left = '20px'; notify.style.backgroundColor = '#28a745'; notify.style.color = '#fff'; notify.style.padding = '10px 15px'; notify.style.borderRadius = '10px'; notify.style.boxShadow = '0 4px 10px rgba(0,0,0,0.1)'; notify.style.zIndex = '10001'; document.body.appendChild(notify); setTimeout(() => notify.remove(), 6000); }, 25000); // ✅ أيقونة التصنيفات في اليمين الأعلى – ثلاث خطوط (هامبرقر مينيو) const categoryIcon = document.createElement('div'); categoryIcon.innerHTML = "☰"; categoryIcon.style.position = 'fixed'; categoryIcon.style.top = '15px'; categoryIcon.style.right = '15px'; categoryIcon.style.background = '#ff7a00'; categoryIcon.style.color = 'white'; categoryIcon.style.padding = '10px 14px'; categoryIcon.style.borderRadius = '50%'; categoryIcon.style.fontSize = '20px'; categoryIcon.style.cursor = 'pointer'; categoryIcon.style.zIndex = '10002'; document.body.appendChild(categoryIcon); // ✅ قائمة الفئات const categoriesMenu = document.createElement('div'); categoriesMenu.innerHTML = ` `; document.body.appendChild(categoriesMenu); // ✅ عرض/إخفاء القائمة عند الضغط على الأيقونة categoryIcon.addEventListener('click', () => { const menu = document.getElementById('categories-menu'); menu.style.display = menu.style.display === 'none' ? 'block' : 'none'; }); // ✅ أكورديون للفئات setTimeout(() => { document.querySelectorAll('.category-item').forEach(item => { item.addEventListener('click', () => { const targetId = item.dataset.toggle; const target = document.getElementById(targetId); document.querySelectorAll('.sub-links').forEach(sub => { if (sub !== target) sub.style.display = 'none'; }); target.style.display = target.style.display === 'none' ? 'block' : 'none'; }); }); }, 100);