function insertCustomerExperiencesSection() { const experiences = [ { image: 'https://i.ibb.co/C3ZNr7Ln/3.png', link: 'https://perflandsa.com/%D8%A7%D9%84%D9%85%D8%AC%D9%85%D9%88%D8%B9%D8%A7%D8%AA-package/c992156758', title: ' المجموعات' }, { image: 'https://i.ibb.co/HLHmqLDY/2.png', link: 'https://perflandsa.com/%D8%A7%D9%84%D8%B9%D8%B7%D9%88%D8%B1-body-spray/c852211523', title: ' عطور' }, { image: 'https://i.ibb.co/SjFq8MY/4.png', link: 'https://perflandsa.com/%D9%85%D9%86%D8%AA%D8%AC%D8%A7%D8%AA-%D8%B9%D9%86%D8%A7%D9%8A%D8%A9-%D8%B7%D8%A8%D9%8A%D8%B9%D9%8A%D8%A9/c100273738', title: ' عناية بالجسم' }, { image: 'https://i.ibb.co/SXPq71GP/1.png', link: 'https://perflandsa.com/offers', title: ' عروض وتخفيضات' } ]; const section = document.createElement('section'); section.className = 'experience-section'; section.innerHTML = `

التصنيفات

${experiences.map(e => `
`).join('')}
`; const style = document.createElement('style'); style.textContent = ` .experience-section { width: 100%; padding: 40px 5vw; background: transparent; direction: rtl; } .section-title { font-size: 28px; margin-bottom: 30px; text-align: center; } .experience-grid { display: flex; justify-content: center; gap: 22px; flex-wrap: wrap; } .experience-box { border: 2px solid #7A4A00; border-radius: 50%; overflow: hidden; transition: transform 0.3s ease, box-shadow 0.3s ease; width: 220px; height: 220px; } .experience-box:hover { transform: scale(1.05); box-shadow: 0 8px 24px rgba(160, 186, 137, 0.4); } .image-wrapper { position: relative; width: 100%; height: 100%; } .image-wrapper img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform 0.3s ease; } .image-wrapper:hover img { transform: scale(1.1); filter: blur(3px) brightness(0.8); } .experience-btn { position: absolute; bottom: 50%; left: 50%; transform: translate(-50%, 50%); background: #7A4A00; color: #fff; padding: 10px 20px; border-radius: 8px; text-decoration: none; font-size: 15px; font-weight: bold; opacity: 0; transition: opacity 0.3s ease; } .image-wrapper:hover .experience-btn { opacity: 1; } `; document.head.appendChild(style); const target = document.querySelector('.advert_banner_component_marquee_wrapper'); if (target) { target.insertAdjacentElement('afterend', section); } } insertCustomerExperiencesSection(); /* سيكشن آراء العملاء */ function insertTestimonialsSection(targetClass = 's-block--features', insertPosition = 'after') { const testimonials = [ { name: 'Shatha', image: 'https://f.top4top.io/p_3643fw8sy1.png', text: 'بخصوص الريحة مو عاااادية ابدًا فيها أنوثة ونعومة ورقه شئ مررره هادي عجزت اوصفها الصدق' }, { name: 'شوق العنزي', image: 'https://f.top4top.io/p_3643fw8sy1.png', text: 'لما عطرت بجامتي الصباح وفتحت الباكيج الليل الريحة تفووووح! وهذا وانا مو عطرتها من بعيد الباكيج كله يفوح من الريحة' }, { name: 'منيرة', image: 'https://f.top4top.io/p_3643fw8sy1.png', text: 'والله المنتجات فوق الخييال وفوااحه حيل خصوصًا بالصيف الريحة تفوح قد ايش تاخذ العقل بعد الشاور مااقدر استغنى عنها واحس لازم تكون عند كل بنت تهتم بالتفاصيل' }, { name: 'شوق العنزي', image: 'https://f.top4top.io/p_3643fw8sy1.png', text: 'مررررره مو عادي ترطيب الكريم ريحة وترطيب تبرد خاطري' }, { name: 'غادة', image: 'https://f.top4top.io/p_3643fw8sy1.png', text: 'احب اي شئ يكفي حجم شنطتي يصير عندي ولاء عظيم لها شكرا بيرفلاند الحب' }, { name: 'عبدالعزيز اليامي', image: 'https://f.top4top.io/p_3643fw8sy1.png', text: 'أحب هذا المتجر وتعاملهم الراقي مع العملاء' }, { name: 'خالد المسعودي', image: 'https://f.top4top.io/p_3643fw8sy1.png', text: 'رهيبين يفكون أزمة. اشتريت من هنا لعيالي وصراحة شئ لا يعلى عليه' }, { name: 'ندى الحسيني', image: 'https://f.top4top.io/p_3643fw8sy1.png', text: 'وصلتني اليوم وطلعت جميلة متحمسة أجربها' } ]; /* إنشاء السيكشن */ const section = document.createElement('section'); section.className = 'testimonials-section'; section.innerHTML = `

آراء العملاء

${testimonials.map(t => `
${t.name}

${t.name}

${t.text}

`).join('')}
`; /* CSS */ const style = document.createElement('style'); style.textContent = ` .testimonials-section { width: 100%; padding: 40px 0; background: #fff; direction: rtl; } .section-title { font-size: 28px; margin: 0 40px 20px; text-align: right; position: relative; } .section-title::after { content: ""; position: absolute; bottom: -6px; right: 0; width: 80px; height: 4px; background: #7A4A00; border-radius: 2px; } .slider-wrapper { position: relative; overflow: hidden; padding: 0 20px; } .testimonial-slider { display: flex; gap: 24px; transition: transform 0.5s ease; will-change: transform; } .testimonial-box { flex: 0 0 calc((100% - 48px) / 3); background: #fff; border: 2px solid #7A4A00; border-radius: 10px; padding: 20px; text-align: center; box-shadow: 0 6px 16px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; } .testimonial-box:hover { transform: scale(1.03); box-shadow: 0 12px 30px rgba(160, 186, 137, 0.4); } .testimonial-box img { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; margin-bottom: 12px; } .testimonial-box h3 { font-size: 18px; margin: 10px 0 6px; color: #333; } .testimonial-box p { font-size: 15px; color: #555; } .slider-btn { position: absolute; top: 50%; transform: translateY(-50%); background: #7A4A00; color: #fff; border: none; font-size: 24px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer; z-index: 5; } .slider-btn.prev { right: 10px; } .slider-btn.next { left: 10px; } @media (max-width: 992px) { .testimonial-box { flex: 0 0 100%; } } `; document.head.appendChild(style); /* إدراج السيكشن */ const target = document.querySelector(`.${targetClass}`); if (target) { target.insertAdjacentElement( insertPosition === 'after' ? 'afterend' : 'beforebegin', section ); } /* منطق السلايدر */ const slider = section.querySelector('.testimonial-slider'); const nextBtn = section.querySelector('.slider-btn.next'); const prevBtn = section.querySelector('.slider-btn.prev'); let currentIndex = 0; function getVisibleItems() { return window.innerWidth <= 992 ? 1 : 3; } function maxIndex() { return testimonials.length - getVisibleItems(); } function updateSlider() { const box = slider.querySelector('.testimonial-box'); if (!box) return; const boxWidth = box.offsetWidth + 24; slider.style.transform = `translateX(${currentIndex * boxWidth}px)`; } nextBtn.onclick = () => { if (currentIndex < maxIndex()) { currentIndex++; updateSlider(); } }; prevBtn.onclick = () => { if (currentIndex > 0) { currentIndex--; updateSlider(); } }; window.addEventListener('resize', () => { currentIndex = 0; updateSlider(); }); /* Auto Play */ setInterval(() => { if (currentIndex < maxIndex()) { currentIndex++; } else { currentIndex = 0; } updateSlider(); }, 5000); } /* تشغيل */ insertTestimonialsSection();