/* Add custom JS code below */
/* Add custom Js styles below */
/* Add custom Js styles below */
document.addEventListener("DOMContentLoaded", function() {
// اختار القسم اللي بدك تضيف داخله العنوان
const section = document.querySelector("#featured-products-style2-8 .container");
if(section){
// إنشاء الـ HTML
const titleBox = document.createElement("div");
titleBox.innerHTML = `
مختارات مميزة لكم
`;
// إضافة العنوان قبل التابات مباشرة
const tabsElement = section.querySelector(".tabs");
section.insertBefore(titleBox, tabsElement);
}
});
// document.addEventListener("DOMContentLoaded", () => {
// function closeSimplePopup() {
// document.getElementById("simple-overlay")?.remove();
// document.getElementById("simple-modal")?.remove();
// }
// function createSimplePopup(message, bgColor, textColor) {
// const overlay = document.createElement("div");
// overlay.className = "simple-popup-overlay";
// overlay.id = "simple-overlay";
// overlay.addEventListener("click", closeSimplePopup);
// const modal = document.createElement("div");
// modal.className = "simple-popup-box";
// modal.id = "simple-modal";
// const closeButton = document.createElement("button");
// closeButton.className = "simple-popup-close-btn";
// closeButton.innerHTML = "×";
// closeButton.addEventListener("click", closeSimplePopup);
// const header = document.createElement("div");
// header.className = "simple-popup-header";
// header.textContent = message || "عرض خاص";
// header.style.backgroundColor = bgColor || "#000";
// header.style.color = textColor || "#fff";
// modal.appendChild(closeButton);
// modal.appendChild(header);
// document.body.appendChild(overlay);
// document.body.appendChild(modal);
// setTimeout(() => modal.classList.add("show"), 50);
// document.addEventListener("keydown", (e) => {
// if (e.key === "Escape") closeSimplePopup();
// });
// }
// function tryCreatePopup() {
// const banner = document.querySelector(".promotion-banner");
// const textLink = banner?.querySelector("a");
// if (!banner || !textLink) return false;
// const message = textLink.textContent.replace(/\s+/g, " ").trim();
// const bgColor = banner.style.backgroundColor || "#000";
// const textColor = textLink.style.color || "#fff";
// setTimeout(() => {
// createSimplePopup(message, bgColor, textColor);
// }, 2000);
// return true;
// }
// function init() {
// if (tryCreatePopup()) return;
// const observer = new MutationObserver(() => {
// if (tryCreatePopup()) observer.disconnect();
// });
// observer.observe(document.body, {
// childList: true,
// subtree: true
// });
// }
init();
});
const contactSection = document.querySelector('.contact-us');
if (contactSection) {
contactSection.id = 'contact-us';
}