document.addEventListener("DOMContentLoaded", function () {
const photosSlider = document.querySelector(".s-block.s-block--photos-slider");
if (!photosSlider) return;
const newSection = document.createElement("section");
newSection.className = "custom-service-section";
newSection.innerHTML = `
مرحباً بك، نحن متواجدون لخدمتك
برجاء ارسال رقم:
- 1- لتتبع الطلب
- 2- مشكلة
- 3- استفسار
تواصل معنا
`;
whatsappPopup.innerHTML = popupContent;
whatsappFloat.appendChild(whatsappPopup);
var whatsappIcon = document.createElement('img');
whatsappIcon.src = 'https://i.postimg.cc/W1qs7gFw/Cat-playing-animation.gif';
whatsappIcon.alt = 'WhatsApp';
whatsappIcon.className = 'whatsapp-icon';
whatsappFloat.appendChild(whatsappIcon);
document.body.appendChild(whatsappFloat);
// CSS
var style = document.createElement('style');
style.innerHTML = `/* كل ستايلاتك هنا */
.whatsapp-float {
position: fixed;
bottom: 20px;
left: 20px;
z-index: 100;
}
.whatsapp-icon {
width: 100px;
height: 100px;
border-radius: 50%;
cursor: pointer;
transition: transform 0.3s ease-in-out;
}
.whatsapp-popup {
position: fixed;
bottom: 90px;
left: 20px;
background: linear-gradient(var(--second-color), var(--main-color));
width: 300px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
padding: 15px;
color: white;
z-index: 101;
border-radius: 10px;
}
.popup-header {
display: flex;
justify-content: space-between;
align-items: center;
}
.support-text {
font-size: 16px;
font-weight: bold;
}
.close-popup {
background: none;
border: none;
font-size: 20px;
cursor: pointer;
}
.whatsapp-button {
display: block;
width: 100%;
text-align: center;
background-color: #25d366;
color: white;
padding: 10px 15px;
border-radius: 5px;
text-decoration: none;
margin-top: 15px;
}
.whatsapp-button:hover {
background-color: #1ebe55;
}
.adfaz-img {
width: 30px;
height: 30px;
margin-left: 3px;
}
.adfaz-text {
font-size: 12px;
color: white;
}
`;
document.head.appendChild(style);
// Toggle & Close
whatsappIcon.addEventListener('click', function () {
whatsappPopup.style.display = (whatsappPopup.style.display === 'none') ? 'block' : 'none';
});
whatsappPopup.querySelector('.close-popup').addEventListener('click', function () {
whatsappPopup.style.display = 'none';
});
});
//end whatsapp
//hero
// Contact Section
document.addEventListener("DOMContentLoaded", function () {
const contactSection = document.createElement("section");
contactSection.id = "contact-section";
contactSection.style.padding = "3rem 2rem";
contactSection.style.margin = "3rem auto";
contactSection.style.width = "95%";
contactSection.style.maxWidth = "850px";
contactSection.style.borderRadius = "16px";
contactSection.style.background = "#fff";
contactSection.style.boxShadow = "0 8px 25px rgba(0,0,0,0.08)";
contactSection.style.transition = "transform 0.3s ease";
contactSection.innerHTML = `