/* Add custom JS code below */ (function () { var HERO = "https://i.ibb.co/yFN7DydZ/magnific-use-the-exact-same-image-oh-TUe-RK829.jpg"; document.addEventListener('DOMContentLoaded', function () { hideHeader(); buildHeader(); if (isHomePage()) buildHero(); setupScroll(); }); function isHomePage() { var path = window.location.pathname.replace(/\/+$/, ''); return path === '' || path === '/index'; } // نخفي فقط الهيدر/الناف الأصلي لسلة، وما نلمس شريط الفلترة/الترتيب فوق المنتجات function hideHeader() { ['header', '.site-header', '.header', '.header-wrapper', '[class*="announcement"]'] .forEach(function(s){ document.querySelectorAll(s).forEach(function(el){ if (el.id && el.id.indexOf('lb-') === 0) return; el.style.cssText += 'display:none!important'; }); }); // نخفي بس النافقيشن الرئيسي الأصلي (مو أي nav داخل صفحة المنتجات) document.querySelectorAll('body > nav, header nav, .main-nav, .navbar').forEach(function(el){ el.style.cssText += 'display:none!important'; }); } function buildHeader() { var h = document.createElement('header'); h.id = 'lb-header'; h.innerHTML = '' + 'Lush Beauty' + ''; document.body.prepend(h); var ov = document.createElement('div'); ov.id = 'lb-overlay'; ov.onclick = lbCloseAll; document.body.appendChild(ov); var drw = document.createElement('div'); drw.id = 'lb-drawer'; drw.innerHTML = '
لأن كل تفصيلة تعكس جمالك
'; document.body.appendChild(drw); var sm = document.createElement('div'); sm.id = 'lb-search-modal'; sm.innerHTML = '' + ''; document.body.appendChild(sm); } function buildHero() { document.querySelectorAll('.slideshow,[class*="slideshow"],.banner,[class*="hero-banner"]').forEach(function(el){ el.style.cssText += 'display:none!important'; }); var hero = document.createElement('section'); hero.id = 'lb-hero'; hero.innerHTML = '