/* Add custom JS code below */
document.addEventListener("DOMContentLoaded", function() {
// إنشاء الحاوية الرئيسية للشريط
var zaiemBar = document.createElement("div");
// تصميم الحاوية
zaiemBar.style.cssText = `
background: #c6922e;
padding: 12px 16px;
text-align: center;
direction: rtl;
width: 100%;
box-sizing: border-box;
border-top: 1px solid rgba(255, 215, 0, 0.15);
display: flex;
justify-content: center;
align-items: center;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
`;
// إضافة زر التوقيع المتوهج داخل الحاوية
zaiemBar.innerHTML = `
برمجة وتطوير
ALZaiem
`;
// إضافة أنماط CSS المتقدمة للتأثيرات الضوئية والتفاعلية
var style = document.createElement('style');
style.innerHTML = `
.zaiem-glow-btn {
display: inline-flex;
align-items: center;
gap: 8px;
padding: 8px 20px;
color: #ffffff;
background: linear-gradient(135deg, #1f1a14 0%, #3a2810 100%);
border: 1px solid #d4a017;
border-radius: 50px;
font-size: 13.5px;
font-family: system-ui, -apple-system, sans-serif;
text-decoration: none;
position: relative;
z-index: 1;
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
/* إضاءة وتوهج نيون ذهبي خلف الزر */
box-shadow: 0 0 12px rgba(212, 160, 23, 0.35),
inset 0 1px 1px rgba(255, 255, 255, 0.2);
}
/* نص الماركة الذهبي المتألق */
.zaiem-brand {
color: #ffd700;
font-weight: 800;
letter-spacing: 0.8px;
text-shadow: 0 0 8px rgba(255, 215, 0, 0.6);
}
/* أيقونة البرق النابضة */
.zaiem-icon {
font-size: 12px;
filter: drop-shadow(0 0 4px #ffd700);
animation: pulseGlow 1.8s infinite alternate;
}
/* تأثير التمرير (Hover Effect) - زيادة التوهج والبروز */
.zaiem-glow-btn:hover {
transform: translateY(-3px) scale(1.03);
background: linear-gradient(135deg, #2a2218 0%, #523816 100%);
border-color: #ffe066;
color: #ffffff;
/* زيادة شدة الإضاءة النيون عند حرك الماوس */
box-shadow: 0 0 22px rgba(255, 215, 0, 0.75),
0 0 35px rgba(212, 160, 23, 0.4),
inset 0 1px 2px rgba(255, 255, 255, 0.4);
}
.zaiem-glow-btn:active {
transform: translateY(-1px) scale(0.98);
}
/* أنيميشن نبض الضوء */
@keyframes pulseGlow {
0% {
opacity: 0.6;
transform: scale(0.95);
}
100% {
opacity: 1;
transform: scale(1.15);
}
}
`;
document.head.appendChild(style);
// العثور على الفوتر وإضافة الشريط أسفله مباشرة
var footer = document.querySelector("footer") || document.body;
footer.appendChild(zaiemBar);
});
document.addEventListener("DOMContentLoaded", function() {
// 1. إضافة تنسيقات الـ CSS الفاخرة للنافذة والتبويبات
var style = document.createElement('style');
style.innerHTML = `
/* زر دليل الفوائد العائم على اليسار (مرفوع أكثر للأعلى) وأرفع */
#honeyGuideBtn {
position: fixed;
bottom: 160px;
left: 20px;
background: linear-gradient(135deg, #c6922e, #8a5a00);
color: #fff;
padding: 8px 14px;
border-radius: 30px;
box-shadow: 0 4px 15px rgba(198, 146, 46, 0.35);
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
z-index: 99997;
font-family: inherit;
font-weight: bold;
font-size: 12px;
border: 1.5px solid #f7f0df;
transition: all 0.3s ease;
}
#honeyGuideBtn:hover {
transform: scale(1.05);
background: linear-gradient(135deg, #d4a017, #9b6500);
}
/* نافذة الدليل المنبثقة */
#honeyGuideOverlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(74, 42, 18, 0.6);
backdrop-filter: blur(5px);
z-index: 99999;
display: none;
align-items: center;
justify-content: center;
direction: rtl;
opacity: 0;
transition: opacity 0.3s ease;
}
#honeyGuideOverlay.active {
display: flex;
opacity: 1;
}
#honeyGuideModal {
background: #f7f0df;
width: 90%;
max-width: 600px;
max-height: 85vh;
border-radius: 20px;
overflow: hidden;
box-shadow: 0 20px 40px rgba(0,0,0,0.2);
display: flex;
flex-direction: column;
border: 2px solid #c6922e;
transform: scale(0.9);
transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
#honeyGuideOverlay.active #honeyGuideModal {
transform: scale(1);
}
/* رأس النافذة */
.guide-modal-header {
background: #4a2a12;
color: #f7f0df;
padding: 20px;
text-align: center;
position: relative;
border-bottom: 3px solid #c6922e;
}
.guide-modal-header h3 {
margin: 0;
font-size: 1.2rem;
color: #f3e5ab;
}
.guide-modal-header p {
margin: 5px 0 0;
font-size: 0.8rem;
color: #d1c7b7;
}
.close-guide-modal {
position: absolute;
top: 15px;
left: 15px;
font-size: 18px;
cursor: pointer;
color: #c6922e;
font-weight: bold;
}
/* تبويبات أنواع العسل */
.guide-tabs-nav {
display: flex;
background: #eae2cc;
padding: 10px;
gap: 8px;
justify-content: center;
}
.guide-tab-btn {
background: #fff9ed;
color: #4a2a12;
border: 1px solid #c6922e;
padding: 8px 14px;
border-radius: 30px;
font-size: 0.8rem;
font-weight: 700;
cursor: pointer;
transition: 0.2s;
}
.guide-tab-btn.active {
background: #c6922e;
color: #fff9ed;
box-shadow: 0 3px 10px rgba(198, 146, 46, 0.3);
}
/* محتوى الفوائد */
.guide-tab-content {
padding: 20px;
overflow-y: auto;
flex-grow: 1;
background: #ffffff;
}
.guide-panel {
display: none;
animation: fadeInHoney 0.4s ease-in-out;
}
.guide-panel.active {
display: block;
}
.guide-panel h4 {
color: #4a2a12;
margin-top: 0;
font-size: 1rem;
border-bottom: 2px dashed #c6922e;
padding-bottom: 8px;
display: flex;
align-items: center;
gap: 8px;
}
.guide-benefits-list {
list-style: none;
padding: 0;
margin: 0;
}
.guide-benefits-list li {
position: relative;
padding-right: 22px;
margin-bottom: 10px;
color: #555;
line-height: 1.5;
font-size: 0.85rem;
}
.guide-benefits-list li::before {
content: "✓";
position: absolute;
right: 0;
color: #c6922e;
font-weight: bold;
}
/* تذييل النافذة (يحوي زر إغلاق مخصص) */
.guide-modal-footer {
background: #f7f0df;
padding: 12px 20px;
text-align: center;
border-top: 1px solid #eae2cc;
}
.guide-close-btn {
background: #4a2a12;
color: #f3e5ab;
border: 1px solid #c6922e;
padding: 8px 24px;
border-radius: 20px;
font-size: 0.85rem;
font-weight: bold;
cursor: pointer;
transition: 0.2s;
}
.guide-close-btn:hover {
background: #2D1B00;
}
@keyframes fadeInHoney {
from { opacity: 0; transform: translateY(5px); }
to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 600px) {
#honeyGuideModal {
width: 95%;
max-height: 90vh;
}
.guide-tabs-nav {
flex-direction: column;
gap: 5px;
}
}
`;
document.head.appendChild(style);
// 2. إنشاء زر العرض العائم على اليسار
var floatBtn = document.createElement("div");
floatBtn.id = "honeyGuideBtn";
floatBtn.innerHTML = `📖 دليل الفوائد`;
document.body.appendChild(floatBtn);
// 3. إنشاء النافذة المنبثقة وزر الإغلاق السفلي
var overlay = document.createElement("div");
overlay.id = "honeyGuideOverlay";
overlay.innerHTML = `
✨ فوائد عسل السدر العلاجية
- يقوي المناعة بشكل فعال.
- مناسب للجروح والحروق من خلال الدهن الموضعي على المنطقة المصابة.
- مفيد للقولون ومشاكل الباطنية والمعدة.
- يفتح الشهية وخصوصاً للأطفال / ويساعد في حالات التبول اللاإرادي خلال النوم.
- مفيد لمشاكل الأرق وقلة النوم.
- يستخدم كغذاء مثالي وصحي للكبار والصغار.
- مفيد لمشاكل حموضة المعدة والزائدة.
- مفيد جداً للقضاء على جرثومة المعدة.
- يعتبر مقوياً طبيعياً للرجال.
🔥 فوائد عسل الطلح البري العلاجية
- ينشط البنكرياس وينظم السكر في الدم وخصوصاً لمرضى السكري.
- يعمل كمحفز ومنشط قوي للدورة الدموية.
- من أفضل العلاجات لأمراض الذبحة الصدرية ويعالج أمراض الجهاز التنفسي والرئتين.
- مفيد جداً لصحة المسالك البولية.
🌿 فوائد عسل السمرة العلاجية
- ينشط البنكرياس وينظم السكر في الدم وخصوصاً لمرضى السكري.
- يعالج عسر الهضم، ينشط الأمعاء، ويقاوم البكتيريا والديدان.
- يعالج التهابات القولون ويمنعه من التهيج، ويقلل من التوتر العصبي.
- يمنع الارتداد المريئي ويقضي على الحرقة في المعدة.
- يعالج جرثومة المعدة الحلزونية ويمنع تسبب التهاب وقرحة المعدة.
- يعالج حالات فقدان الشهية، فقر الدم، نقص الحديد، وفيتامين (د).
- يمنع الإسهال ويقلل من حالات الإمساك.
`;
document.body.appendChild(overlay);
// 4. وظائف الفتح والإغلاق والتبديل
function openModal() {
overlay.classList.add("active");
}
function closeModal() {
overlay.classList.remove("active");
}
floatBtn.addEventListener("click", openModal);
document.getElementById("closeGuideTop").addEventListener("click", closeModal);
document.getElementById("closeGuideBottom").addEventListener("click", closeModal);
overlay.addEventListener("click", function(e) {
if(e.target === overlay) closeModal();
});
// تفاعل التبويبات داخل النافذة
const tabBtns = overlay.querySelectorAll('.guide-tab-btn');
const panels = overlay.querySelectorAll('.guide-panel');
tabBtns.forEach(btn => {
btn.addEventListener('click', function() {
tabBtns.forEach(b => b.classList.remove('active'));
panels.forEach(p => p.classList.remove('active'));
this.classList.add('active');
document.getElementById(this.getAttribute('data-panel')).classList.add('active');
});
});
});
/*
* أيقونة نحلة صغيرة وأنيقة (تصميم محدث وجذاب) - لمتجر "وديع العسل" (Salla JS/CSS)
*/
(function() {
'use strict';
// 1. إضافة أنماط CSS للتصميم الفاخر والحركات
const style = document.createElement('style');
style.innerHTML = `
@keyframes floatBeeLeft {
0% { transform: translateY(0px) rotate(0deg); }
50% { transform: translateY(-8px) rotate(-3deg); }
100% { transform: translateY(0px) rotate(0deg); }
}
@keyframes honeyGlow {
0% { filter: drop-shadow(0 3px 8px rgba(198, 146, 46, 0.35)); }
50% { filter: drop-shadow(0 6px 15px rgba(198, 146, 46, 0.65)); }
100% { filter: drop-shadow(0 3px 8px rgba(198, 146, 46, 0.35)); }
}
@keyframes modalShow {
from { opacity: 0; transform: translate(-50%, -40%) scale(0.9); }
to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
#wadie-bee-container {
position: fixed;
bottom: 220px;
left: 20px; /* على الشمال */
z-index: 999990;
cursor: pointer;
animation: floatBeeLeft 3.2s ease-in-out infinite, honeyGlow 2.5s ease-in-out infinite;
transition: transform 0.3s ease;
}
#wadie-bee-container:hover {
transform: scale(1.1) rotate(2deg);
}
.wadie-bee-tooltip {
position: absolute;
top: -28px;
left: 50%;
transform: translateX(-50%);
background: linear-gradient(135deg, #c6922e, #4a2a12);
color: #ffffff;
font-size: 10px;
font-weight: bold;
padding: 3px 8px;
border-radius: 10px;
white-space: nowrap;
box-shadow: 0 3px 8px rgba(0,0,0,0.2);
pointer-events: none;
font-family: inherit;
}
.wadie-bee-tooltip::after {
content: '';
position: absolute;
bottom: -4px;
left: 50%;
transform: translateX(-50%);
border-width: 4px 4px 0 4px;
border-style: solid;
border-color: #4a2a12 transparent transparent transparent;
}
/* نافذة المعلومات */
#wadie-modal-overlay {
display: none;
position: fixed;
top: 0; left: 0; width: 100%; height: 100%;
background: rgba(0, 0, 0, 0.55);
backdrop-filter: blur(4px);
z-index: 999998;
opacity: 0;
transition: opacity 0.3s ease;
}
#wadie-modal-box {
display: none;
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 90%;
max-width: 450px;
background: #f7f0df;
border: 2px solid #c6922e;
border-radius: 24px;
padding: 30px 25px;
box-shadow: 0 20px 40px rgba(74, 42, 18, 0.35);
z-index: 999999;
text-align: center;
direction: rtl;
font-family: inherit;
color: #4a2a12;
}
#wadie-modal-box.active {
display: block;
animation: modalShow 0.35s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}
.wadie-modal-close-btn {
position: absolute;
top: 15px;
left: 18px;
background: rgba(74, 42, 18, 0.1);
border: none;
width: 32px;
height: 32px;
border-radius: 50%;
font-size: 20px;
color: #4a2a12;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}
.wadie-modal-close-btn:hover {
background: rgba(74, 42, 18, 0.2);
}
.wadie-modal-title {
font-size: 23px;
font-weight: 800;
color: #4a2a12;
margin-bottom: 15px;
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
}
.wadie-modal-text {
font-size: 15px;
line-height: 1.8;
color: #4a2a12;
margin-bottom: 20px;
}
.wadie-modal-highlights {
display: flex;
justify-content: center;
gap: 8px;
flex-wrap: wrap;
}
.wadie-chip {
background: rgba(198, 146, 46, 0.18);
color: #4a2a12;
border: 1px solid #c6922e;
padding: 6px 14px;
border-radius: 20px;
font-size: 13px;
font-weight: bold;
}
`;
document.head.appendChild(style);
// 2. تصميم النحلة الجديد: أصغر حجماً، أشيك، وناعم جداً (SVG)
const beeContainer = document.createElement('div');
beeContainer.id = 'wadie-bee-container';
beeContainer.innerHTML = `
عن المتجر 🍯
`;
// 3. إنشاء النافذة التفاعلية وخلفية التظليل
const overlay = document.createElement('div');
overlay.id = 'wadie-modal-overlay';
const modalBox = document.createElement('div');
modalBox.id = 'wadie-modal-box';
modalBox.innerHTML = `
🐝
عن متجر وديع العسل
وديع للعسل البري؛ من مناحلنا المحلية في المملكة العربية السعودية إلى مائدتكم مباشرة.
نُقدم لكم أعسالاً طبيعية نقية علاجية بإشرافنا المباشر، ومنتجات نحل فاخرة وزيت زيتون معصور على البارد.
أصالة المذاق وخبرة توّجتها جوائز عالمية في الجودة.
🌿 عسل طبيعي 100%
🇸🇦 مناحل محليّة
🏆 جوائز جودة عالمية
🫒 زيت زيتون عصارة باردة
`;
// 4. إدراج العناصر بالصفحة
document.body.appendChild(beeContainer);
document.body.appendChild(overlay);
document.body.appendChild(modalBox);
// 5. التحكم بفتح وإغلاق النافذة
function showModal() {
overlay.style.display = 'block';
setTimeout(() => overlay.style.opacity = '1', 10);
modalBox.classList.add('active');
}
function hideModal() {
overlay.style.opacity = '0';
modalBox.classList.remove('active');
setTimeout(() => {
overlay.style.display = 'none';
}, 300);
}
beeContainer.addEventListener('click', showModal);
document.getElementById('wadie-close-trigger').addEventListener('click', hideModal);
overlay.addEventListener('click', hideModal);
})();