/* ===== AURIS V5: منع أقسام الرئيسية من الظهور داخل صفحات المنتجات ===== */ function aurisIsProductPage() { const path = window.location.pathname || ''; return ( /\/p\d+\/?$/.test(path) || !!document.querySelector( '[data-testid="store-product-image-slider"], ' + '[data-testid="store-product-title"], ' + '.container--product-details' ) ); } document.addEventListener('DOMContentLoaded', function () { if (document.getElementById('auris-products-section')) return; /* صفحة المنتج تحتوي أيضا على salla-slider للصور، لذلك لا نعتبر وجود السلايدر وحده دليلا على أنها الرئيسية. */ if (aurisIsProductPage()) { document.body.classList.remove('auris-home'); return; } const banner = document.querySelector('salla-slider') || document.querySelector('.main-slider') || document.querySelector('.home-slider'); if (!banner) return; document.body.classList.add('auris-home'); const section = document.createElement('section'); section.id = 'auris-products-section'; section.innerHTML = `

مختارات أوريس

`; banner.insertAdjacentElement('afterend', section); const btn = document.getElementById('aurisLoadMore'); if (btn) { btn.addEventListener('click', function () { const list = document.getElementById('aurisProductsList'); if (!list) return; const currentLimit = parseInt(list.getAttribute('limit')) || 4; list.setAttribute('limit', currentLimit + 4); const clone = list.cloneNode(true); list.replaceWith(clone); }); } }); /* AURIS V8 ترك مكون إضافة المنتج لسلة ليتولى عرض الزر والنص والأيقونة بدون حقن تنسيقات داخل Shadow DOM. */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-occasion-section')) return; const section = document.createElement('section'); section.id = 'auris-occasion-section'; section.innerHTML = `

اختر حسب المناسبة

لكل لحظة اختيار يليق بها

هدايا
ضيافة
مناسبات خاصة
`; const productsSection = document.getElementById('auris-products-section'); if (productsSection) { productsSection.insertAdjacentElement('afterend', section); } else { document.querySelector('main')?.append(section); } }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-flavors-section')) return; const section = document.createElement('section'); section.id = 'auris-flavors-section'; section.innerHTML = `

اختر حسب النكهة

نكهتك المفضلة أقرب مما تتخيل

فستق
كراميل
كندر
لوتس
أوريو
الحشوة المميزة
بيكان
حشوة أوريس المميزة بطابع فاخر ومذاق غني
`; const occasionSection = document.getElementById('auris-occasion-section'); if (occasionSection) { occasionSection.insertAdjacentElement('afterend', section); } else { document.querySelector('main')?.append(section); } }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-gift-section')) return; const section = document.createElement('section'); section.id = 'auris-gift-section'; section.innerHTML = `
هدية من أوريس

أرسلها كهدية

اختر البوكس، أضف رسالتك، واترك الباقي علينا.

اكتشف الهدايا
`; const flavorsSection = document.getElementById('auris-flavors-section'); if (flavorsSection) { flavorsSection.insertAdjacentElement('afterend', section); } else { document.querySelector('main')?.append(section); } }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (!document.getElementById('auris-instagram-section')) { const instagramSection = document.createElement('section'); instagramSection.id = 'auris-instagram-section'; instagramSection.innerHTML = `

تابع تفاصيل أوريس

كل جديد، كل نكهة، وكل لحظة فاخرة

AURIS
CHOCOLATE
LUXURY
تابعنا على Instagram
`; const giftSection = document.getElementById('auris-gift-section'); if (giftSection) { giftSection.insertAdjacentElement('afterend', instagramSection); } else { document.querySelector('main')?.append(instagramSection); } } if (!document.getElementById('auris-contact-section')) { const contactSection = document.createElement('section'); contactSection.id = 'auris-contact-section'; contactSection.innerHTML = `

تواصل معنا

يسعدنا تواصلكم واستفساراتكم

واتساب إنستقرام
`; const instagramSection = document.getElementById('auris-instagram-section'); if (instagramSection) { instagramSection.insertAdjacentElement('afterend', contactSection); } else { document.querySelector('main')?.append(contactSection); } } }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; const aurisInstagramProducts = [ 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A3%D9%88%D8%B1%D9%8A%D8%B3/p505880789', 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A3%D9%88%D8%B1%D9%8A%D8%B3/p501180398', 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A3%D9%88%D8%B1%D9%8A%D8%B3/p39859736' ]; const cards = document.querySelectorAll('.auris-instagram-card'); aurisInstagramProducts.forEach(async (productUrl, index) => { if (!cards[index]) return; const card = cards[index]; try { const response = await fetch(productUrl); const html = await response.text(); const doc = new DOMParser().parseFromString(html, 'text/html'); const image = doc.querySelector('meta[property="og:image"]')?.content || doc.querySelector('meta[name="twitter:image"]')?.content; if (image) { card.style.backgroundImage = `linear-gradient(rgba(0,0,0,.05), rgba(0,0,0,.05)), url("${image}")`; card.textContent = ''; } } catch (error) { console.log('AURIS image loading error'); } card.style.cursor = 'pointer'; card.addEventListener('click', function () { window.location.href = productUrl; }); }); }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-footer-section')) return; const footer = document.createElement('section'); footer.id = 'auris-footer-section'; footer.innerHTML = ` `; const contactSection = document.getElementById('auris-contact-section'); if (contactSection) { contactSection.insertAdjacentElement('afterend', footer); } else { document.body.appendChild(footer); } }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; const occasionData = [ { selector: '.auris-gifts', url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3-%D9%84%D9%84%D9%87%D8%AF%D8%A7%D9%8A%D8%A7/p1472577768' }, { selector: '.auris-hospitality', url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A7%D9%84%D8%B6%D9%8A%D8%A7%D9%81%D8%A9/p525171578' }, { selector: '.auris-special', url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A7%D9%84%D9%85%D9%86%D8%A7%D8%B3%D8%A8%D8%A7%D8%AA-%D8%A7%D9%84%D8%AE%D8%A7%D8%B5%D8%A9/p136637204' } ]; occasionData.forEach(async item => { const card = document.querySelector(item.selector); if (!card) return; try { const response = await fetch(item.url); const html = await response.text(); const doc = new DOMParser().parseFromString(html, 'text/html'); const image = doc.querySelector('meta[property="og:image"]')?.content || doc.querySelector('meta[name="twitter:image"]')?.content; if (image) { card.style.backgroundImage = `linear-gradient(rgba(0,0,0,.28), rgba(0,0,0,.28)), url("${image}")`; card.style.backgroundSize = 'cover'; card.style.backgroundPosition = 'center'; card.style.backgroundRepeat = 'no-repeat'; } } catch (error) { console.log('AURIS occasion image error'); } }); }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-trust-cards')) return; const cards = document.createElement('div'); cards.id = 'auris-trust-cards'; cards.innerHTML = `
A
علامة أوريس التجارية
AURIS CHOCOLATE
وثيقة العمل الحر
FL-588254181
`; const headings = [ ...document.querySelectorAll('h1, h2, h3, h4, div, span') ]; const importantLinks = headings.find(el => (el.textContent || '').trim() === 'روابط مهمة' ); if (importantLinks?.parentElement) { importantLinks.parentElement.insertAdjacentElement('beforebegin', cards); } }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-announcement-bar')) return; const bar = document.createElement('div'); bar.id = 'auris-announcement-bar'; bar.innerHTML = ` 🚚 شحن مجاني للطلبات بقيمة 250 ريال فأكثر `; document.body.prepend(bar); document.body.classList.add('auris-has-announcement'); }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; const products = [ { url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A3%D9%88%D8%B1%D9%8A%D8%B3/p39859736', title: 'بوكسات أوريس', badge: 'الأكثر طلبا' }, { url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3-%D9%84%D9%84%D9%87%D8%AF%D8%A7%D9%8A%D8%A7/p1472577768', title: 'بوكس للهدايا', badge: 'هدية مميزة' }, { url: 'https://aurischocolat.com/%D8%B4%D9%88%D9%83%D9%88%D9%84%D8%A7%D8%AA%D8%A9-%D8%A3%D9%88%D8%B1%D9%8A%D8%B3-%D8%A8%D8%AD%D8%B4%D9%88%D8%A9-%D8%A7%D9%84%D9%83%D9%86%D8%AF%D8%B1-%D9%88%D8%A7%D9%84%D9%84%D9%88%D8%B2-16-%D9%82%D8%B7%D8%B9/p43730957', title: 'كندر ولوز 16 قطعة', badge: '' }, { url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A7%D9%84%D9%85%D9%86%D8%A7%D8%B3%D8%A8%D8%A7%D8%AA-%D8%A7%D9%84%D8%AE%D8%A7%D8%B5%D8%A9/p136637204', title: 'بوكسات المناسبات الخاصة', badge: 'للمناسبات' }, { url: 'https://aurischocolat.com/%D8%B4%D9%88%D9%83%D9%88%D9%84%D8%A7%D8%AA%D8%A9-%D8%A3%D9%88%D8%B1%D9%8A%D8%B3-%D8%A8%D8%AD%D8%B4%D9%88%D8%A9-%D8%A7%D9%84%D9%83%D9%86%D8%AF%D8%B1-%D9%88%D8%A7%D9%84%D9%84%D9%88%D8%B2-9-%D9%82%D8%B7%D8%B9/p948060802', title: 'كندر ولوز 9 قطع', badge: '' }, { url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A7%D9%84%D9%8A%D9%88%D9%85-%D8%A7%D9%84%D9%88%D8%B7%D9%86%D9%8A/p1033859529', title: 'بوكسات اليوم الوطني', badge: 'اليوم الوطني' }, { url: 'https://aurischocolat.com/%D8%A3%D9%88%D8%B1%D9%8A%D9%88-%D9%85%D8%B9-%D8%A7%D9%84%D9%85%D9%83%D8%B3%D8%B1%D8%A7%D8%AA-%D9%88%D8%A7%D9%84%D8%B4%D9%88%D9%83%D9%84%D8%A7%D8%AA%D8%A9/p1328708186', title: 'أوريو بالمكسرات والشوكولاتة', badge: 'جديد' } ]; async function getImage(url) { try { const response = await fetch(url); const html = await response.text(); const doc = new DOMParser().parseFromString(html, 'text/html'); return ( doc.querySelector('meta[property="og:image"]')?.content || doc.querySelector('meta[name="twitter:image"]')?.content || '' ); } catch (e) { return ''; } } async function buildNewTicker() { if (document.getElementById('auris-products-v4')) { return true; } const productsSection = document.getElementById('auris-products-section'); if (!productsSection) { return false; } const section = document.createElement('section'); section.id = 'auris-products-v4'; section.style.cssText = ` width:100%; background:#f8f2e8; padding:28px 0 32px; overflow:hidden; box-sizing:border-box; `; section.innerHTML = `

مختارات مميزة من أوريس

اكتشفي منتجات مختارة لك

`; productsSection.insertAdjacentElement( 'afterend', section ); const track = section.querySelector( '#auris-v4-track' ); const cards = []; for (const product of products) { const image = await getImage( product.url ); cards.push(` ${ product.badge ? `
${product.badge}
` : '' }
${ image ? ` ${product.title} ` : `
AURIS
` }
${product.title} تسوق الآن
`); } const seven = cards.join(''); track.innerHTML = seven + seven + seven + seven; const oneSetWidth = products.length * 157; let x = 0; let previous = performance.now(); const speed = 25; function animate(now) { const seconds = (now - previous) / 1000; previous = now; x -= speed * seconds; if ( Math.abs(x) >= oneSetWidth ) { x += oneSetWidth; } track.style.transform = `translate3d(${x}px,0,0)`; requestAnimationFrame( animate ); } requestAnimationFrame( animate ); return true; } let attempts = 0; const timer = setInterval( async function () { attempts++; const ready = await buildNewTicker(); if ( ready || attempts >= 10 ) { clearInterval(timer); } }, 500 ); }); /* ========================================= AURIS - آخر لونين متبقين لليوم الوطني تسوق الآن + أسهم البنر إضافة فقط ========================================= */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; const GREEN = '#0B5D3B'; const DARK_GREEN = '#063D29'; /* أسهم البنر باللون الأخضر */ function aurisStyleSliderRoot(root) { if (!root) return; const selectors = [ '.swiper-button-next', '.swiper-button-prev', '.s-slider-block__arrow', '[class*="arrow-next"]', '[class*="arrow-prev"]', '[class*="next-arrow"]', '[class*="prev-arrow"]', 'button[aria-label*="Next"]', 'button[aria-label*="Previous"]', 'button[aria-label*="next"]', 'button[aria-label*="previous"]' ]; root .querySelectorAll(selectors.join(',')) .forEach(btn => { btn.style.setProperty( 'background', GREEN, 'important' ); btn.style.setProperty( 'background-color', GREEN, 'important' ); btn.style.setProperty( 'color', '#ffffff', 'important' ); btn.style.setProperty( 'border-color', GREEN, 'important' ); btn.querySelectorAll('*').forEach(icon => { icon.style.setProperty( 'color', '#ffffff', 'important' ); icon.style.setProperty( 'fill', '#ffffff', 'important' ); icon.style.setProperty( 'stroke', '#ffffff', 'important' ); }); }); /* ندخل لأي Shadow DOM داخلي */ root.querySelectorAll('*').forEach(el => { if (el.shadowRoot) { aurisStyleSliderRoot( el.shadowRoot ); } }); } function aurisFixSliderArrows() { document .querySelectorAll( 'salla-slider, .main-slider, .home-slider, .hero-slider' ) .forEach(slider => { aurisStyleSliderRoot(slider); if (slider.shadowRoot) { aurisStyleSliderRoot( slider.shadowRoot ); } }); } /* ============================== نكرر لثواني لأن سلة تحمل بعض العناصر بعد الصفحة ============================== */ let count = 0; const timer = setInterval(function () { aurisFixSliderArrows(); count++; if (count >= 12) { clearInterval(timer); } }, 500); }); /* ========================================= AURIS - قسم الأكثر طلبا إضافة فقط ========================================= */ document.addEventListener('DOMContentLoaded', async function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-best-sellers')) return; const products = [ { url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A3%D9%88%D8%B1%D9%8A%D8%B3/p39859736', title: 'بوكسات أوريس', badge: 'الأكثر طلبا' }, { url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3-%D9%84%D9%84%D9%87%D8%AF%D8%A7%D9%8A%D8%A7/p1472577768', title: 'بوكس للهدايا', badge: 'هدية مميزة' }, { url: 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A7%D9%84%D9%8A%D9%88%D9%85-%D8%A7%D9%84%D9%88%D8%B7%D9%86%D9%8A/p1033859529', title: 'بوكسات اليوم الوطني', badge: 'وطني' } ]; async function getImage(url) { try { const response = await fetch(url); const html = await response.text(); const doc = new DOMParser().parseFromString(html, 'text/html'); return ( doc.querySelector('meta[property="og:image"]')?.content || doc.querySelector('meta[name="twitter:image"]')?.content || '' ); } catch (e) { return ''; } } const section = document.createElement('section'); section.id = 'auris-best-sellers'; section.innerHTML = `
مختارات العملاء

الأكثر طلبا

اختيارات مميزة تحظى بإعجاب عملائنا

`; const occasionSection = document.getElementById('auris-occasion-section'); if (occasionSection) { occasionSection.insertAdjacentElement('beforebegin', section); } else { document.querySelector('main')?.append(section); } const grid = section.querySelector('.auris-best-grid'); for (const product of products) { const image = await getImage(product.url); const card = document.createElement('a'); card.className = 'auris-best-card'; card.href = product.url; card.innerHTML = `
${ product.badge ? `
${product.badge}
` : '' } ${ image ? ` ${product.title} ` : `
AURIS
` }
${product.title} اكتشفيه الآن
`; grid.appendChild(card); } }); /* ========================================= AURIS - تفاصيل تصنع الفرق إضافة فقط ========================================= */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-details-section')) return; const section = document.createElement('section'); section.id = 'auris-details-section'; section.innerHTML = `
تفاصيل أوريس

تفاصيل تصنع الفرق

لأن الفخامة تبدأ من أدق التفاصيل

شوكولاتة بلجيكية فاخرة

مذاق غني وجودة مختارة بعناية لتجربة تليق بأوريس.

حشوات مختارة

نكهات متنوعة ومتوازنة تمنح كل قطعة طابعا مميزا.

تغليف يليق بالإهداء

تفاصيل راقية تجعل الهدية جميلة قبل أن تفتح.

`; const bestSellers = document.getElementById('auris-best-sellers'); const occasionSection = document.getElementById('auris-occasion-section'); if (bestSellers) { bestSellers.insertAdjacentElement('afterend', section); } else if (occasionSection) { occasionSection.insertAdjacentElement('beforebegin', section); } else { document.querySelector('main')?.append(section); } }); /* ========================================= AURIS - كيف تهدي أوريس؟ إضافة فقط ========================================= */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-gift-steps')) return; const section = document.createElement('section'); section.id = 'auris-gift-steps'; section.innerHTML = `
تجربة إهداء أوريس

كيف تهدي أوريس؟

ثلاث خطوات بسيطة لهدية أنيقة ومميزة

01

اختاري البوكس

اختاري ما يناسب المناسبة والذوق.

02

أضيفي رسالتك

أضيفي كلماتك الخاصة لتصبح الهدية أكثر قربا.

03

نجهزها للإهداء

نعتني بالتفاصيل والتغليف لتصل بأجمل صورة.

اكتشفي الهدايا
`; const detailsSection = document.getElementById('auris-details-section'); const giftSection = document.getElementById('auris-gift-section'); if (detailsSection) { detailsSection.insertAdjacentElement('afterend', section); } else if (giftSection) { giftSection.insertAdjacentElement('beforebegin', section); } else { document.querySelector('main')?.append(section); } }); /* ========================================= AURIS - لمسة أوريس إضافة فقط ========================================= */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-luxury-touch')) return; const section = document.createElement('section'); section.id = 'auris-luxury-touch'; section.innerHTML = `
AURIS

لمسة أوريس

تفاصيل راقية، مذاق فاخر، وهدية تحفظ في الذاكرة.

اكتشفي أوريس
`; const giftSteps = document.getElementById('auris-gift-steps'); const flavors = document.getElementById('auris-flavors-section'); if (giftSteps) { giftSteps.insertAdjacentElement('afterend', section); } else if (flavors) { flavors.insertAdjacentElement('afterend', section); } else { document.querySelector('main')?.append(section); } }); /* ========================================= AURIS - شريط الثقة الفاخر إضافة فقط ========================================= */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-trust-strip-v2')) return; const section = document.createElement('section'); section.id = 'auris-trust-strip-v2'; section.innerHTML = `
شوكولاتة فاخرة مختارة بعناية
حشوات متنوعة نكهات مميزة
تغليف أنيق جاهز للإهداء
تفاصيل أوريس تجربة متكاملة
`; const luxury = document.getElementById('auris-luxury-touch'); const instagram = document.getElementById('auris-instagram-section'); if (luxury) { luxury.insertAdjacentElement('afterend', section); } else if (instagram) { instagram.insertAdjacentElement('beforebegin', section); } else { document.querySelector('main')?.append(section); } }); /* ========================================= AURIS - شريط لماذا أوريس المتحرك إضافة فقط ========================================= */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-why-ticker')) return; const trustStrip = document.getElementById('auris-trust-strip-v2'); if (!trustStrip) return; const ticker = document.createElement('div'); ticker.id = 'auris-why-ticker'; ticker.innerHTML = `
لماذا أوريس؟
شوكولاتة فاخرة حشوات متنوعة تغليف أنيق تفاصيل أوريس شوكولاتة فاخرة حشوات متنوعة تغليف أنيق تفاصيل أوريس
`; trustStrip.insertAdjacentElement( 'beforebegin', ticker ); }); /* ========================================= AURIS - من أوريس للوطن إضافة فقط ========================================= */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-national-gift')) return; const section = document.createElement('section'); section.id = 'auris-national-gift'; section.innerHTML = `
اليوم الوطني

من أوريس للوطن

هدايا فاخرة بروح وطنية، صممت لتليق بالمناسبة وبمن تحبين.

اكتشفي المجموعة الوطنية
`; const occasionSection = document.getElementById('auris-occasion-section'); if (occasionSection) { occasionSection.insertAdjacentElement('beforebegin', section); } else { document.querySelector('main')?.append(section); } }); document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; if (document.getElementById('auris-luxury-marquee')) return; const bar = document.createElement('section'); bar.id = 'auris-luxury-marquee'; bar.innerHTML = `
AURIS شوكولاتة بلجيكية حشوات فاخرة هدايا استثنائية تغليف أنيق مذاق لا ينسى AURIS شوكولاتة بلجيكية حشوات فاخرة هدايا استثنائية تغليف أنيق مذاق لا ينسى
`; /* * نحاول وضعه بعد قسم تفاصيل تصنع الفرق. * وإذا لم نجده، يوضع قبل الفوتر بأمان. */ const details = document.getElementById('auris-details-section'); if (details) { details.insertAdjacentElement('afterend', bar); } else { const footer = document.querySelector('footer'); if (footer) { footer.insertAdjacentElement('beforebegin', bar); } else { document.body.appendChild(bar); } } }); /* ===== AURIS SHOWCASE FINAL ===== */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; const old = document.getElementById('auris-showcase-v2'); if (old) old.remove(); if (document.getElementById('auris-showcase-final')) return; const section = document.createElement('section'); section.id = 'auris-showcase-final'; section.style.cssText = ` display:block !important; width:100% !important; max-width:1180px !important; margin:28px auto !important; padding:0 !important; position:relative !important; overflow:hidden !important; background:#063D29 !important; border-top:1px solid #D7B36A !important; border-bottom:1px solid #D7B36A !important; box-sizing:border-box !important; `; /* الصورة */ const photo = document.createElement('div'); photo.style.cssText = ` display:block !important; width:100% !important; margin:0 !important; padding:0 !important; background:#F8F2E8 !important; `; const img = document.createElement('img'); img.src = 'https://cdn.files.salla.network/products/1907723677/9a75dff0-2311-4c85-8d73-646fe0f0e640-original.webp'; img.alt = 'بوكسات أوريس المميزة'; img.style.cssText = ` display:block !important; width:100% !important; height:auto !important; margin:0 !important; padding:0 !important; border:0 !important; position:relative !important; `; photo.appendChild(img); /* اللوحة الخضراء */ const panel = document.createElement('div'); panel.style.cssText = ` display:flex !important; width:100% !important; min-height:330px !important; margin:0 !important; padding:38px 22px 34px !important; box-sizing:border-box !important; flex-direction:column !important; align-items:center !important; justify-content:center !important; position:relative !important; direction:rtl !important; text-align:center !important; background: radial-gradient( circle at 80% 0%, rgba(215,179,106,.16), transparent 38% ), linear-gradient( 145deg, #0B5D3B 0%, #063D29 72%, #052E20 100% ) !important; color:#F8F2E8 !important; `; const brand = document.createElement('div'); brand.textContent = 'AURIS'; brand.style.cssText = ` display:block !important; margin:0 0 9px !important; color:#D7B36A !important; font-family:Georgia,serif !important; font-size:17px !important; letter-spacing:7px !important; direction:ltr !important; `; const star = document.createElement('div'); star.textContent = '✦'; star.style.cssText = ` display:block !important; margin:0 0 10px !important; color:#D7B36A !important; font-size:15px !important; `; const title = document.createElement('div'); title.textContent = 'تفاصيل تصنع لتهدى'; title.style.cssText = ` display:block !important; width:100% !important; margin:0 !important; padding:0 !important; color:#F3D88D !important; font-size:29px !important; font-weight:800 !important; line-height:1.5 !important; text-align:center !important; `; const text = document.createElement('div'); text.innerHTML = 'شوكولاتة بلجيكية فاخرة، بحشوات مختارة
وتفاصيل تمنح كل هدية طابع أوريس الخاص.'; text.style.cssText = ` display:block !important; width:100% !important; max-width:520px !important; margin:11px auto 23px !important; padding:0 !important; color:#F8F2E8 !important; font-size:14px !important; font-weight:400 !important; line-height:1.9 !important; text-align:center !important; `; const button = document.createElement('a'); button.href = 'https://aurischocolat.com/%D8%A8%D9%88%D9%83%D8%B3%D8%A7%D8%AA-%D8%A3%D9%88%D8%B1%D9%8A%D8%B3-%D8%A7%D9%84%D9%85%D9%85%D9%8A%D8%B2%D8%A9/p111403377'; button.innerHTML = 'اكتشفي أوريس   ←'; button.style.cssText = ` display:inline-flex !important; width:auto !important; min-width:190px !important; margin:0 auto !important; padding:13px 26px !important; align-items:center !important; justify-content:center !important; border:1px solid #E9CE83 !important; border-radius:999px !important; background: linear-gradient( 135deg, #F0D991, #D7B36A ) !important; color:#063D29 !important; text-decoration:none !important; font-size:15px !important; font-weight:800 !important; box-shadow: 0 10px 24px rgba(0,0,0,.18) !important; `; const signature = document.createElement('div'); signature.textContent = 'MORE THAN CHOCOLATE'; signature.style.cssText = ` display:block !important; margin:22px 0 0 !important; color:#D7B36A !important; font-size:9px !important; font-weight:500 !important; letter-spacing:4px !important; direction:ltr !important; text-align:center !important; `; panel.appendChild(brand); panel.appendChild(star); panel.appendChild(title); panel.appendChild(text); panel.appendChild(button); panel.appendChild(signature); section.appendChild(photo); section.appendChild(panel); const best = document.getElementById('auris-best-sellers'); const details = document.getElementById('auris-details-section'); if (best) { best.insertAdjacentElement( 'afterend', section ); } else if (details) { details.insertAdjacentElement( 'beforebegin', section ); } }); /* ========================================= AURIS SIGNATURE MOMENT ========================================= */ document.addEventListener('DOMContentLoaded', function () { if (!document.body.classList.contains('auris-home')) return; /* إزالة الشريط التجريبي السابق إن وجد */ const oldStrip = document.getElementById('auris-premium-strip'); if (oldStrip) oldStrip.remove(); if (document.getElementById('auris-signature-moment')) return; /* نبحث عن عنوان مختارات أوريس */ const headings = Array.from( document.querySelectorAll('h1,h2,h3,h4,.section-title,.s-block__title') ); const title = headings.find(el => { const text = (el.textContent || '').replace(/\s+/g, ' ').trim(); return text.includes('مختارات أوريس') || text.includes('مختارات مميزة من أوريس'); }); if (!title) return; const target = title.closest('section') || title.closest('.s-block') || title.parentElement; if (!target || !target.parentNode) return; /* =============================== CSS خاص بهذا القسم فقط =============================== */ if (!document.getElementById('auris-signature-style')) { const style = document.createElement('style'); style.id = 'auris-signature-style'; style.textContent = ` #auris-signature-moment, #auris-signature-moment * { box-sizing: border-box; } #auris-signature-moment { width: 100%; margin: 22px 0 26px; overflow: hidden; background: #F8F2E8; position: relative; } /* الشريط الذهبي */ #auris-signature-moment .auris-signature-ticker { width: 100%; overflow: hidden; padding: 12px 0; background: linear-gradient( 90deg, #C89D45 0%, #E6C979 50%, #C89D45 100% ); border-top: 1px solid rgba(11,93,59,.14); border-bottom: 1px solid rgba(11,93,59,.14); } #auris-signature-moment .auris-signature-track { display: flex; align-items: center; width: max-content; white-space: nowrap; animation: aurisSignatureMove 18s linear infinite; will-change: transform; } #auris-signature-moment .auris-signature-set { display: flex; align-items: center; flex: 0 0 auto; white-space: nowrap; } #auris-signature-moment .auris-signature-set span { display: inline-block; padding: 0 15px; color: #063D29 !important; font-size: 14px; font-weight: 800; white-space: nowrap; } #auris-signature-moment .auris-signature-set .auris-en { letter-spacing: 3px; font-family: Georgia, serif; } #auris-signature-moment .auris-signature-set b { color: rgba(6,61,41,.70) !important; font-size: 11px; font-weight: 700; } /* الجزء الفاخر */ #auris-signature-moment .auris-signature-main { position: relative; overflow: hidden; padding: 35px 20px 32px; text-align: center; background: radial-gradient( circle at 50% -20%, rgba(215,179,106,.18), transparent 45% ), #F8F2E8; } #auris-signature-moment .auris-signature-main::before { content: ""; position: absolute; width: 170px; height: 170px; top: -120px; left: 50%; transform: translateX(-50%); border: 1px solid rgba(215,179,106,.22); border-radius: 50%; pointer-events: none; } /* AURIS */ #auris-signature-moment .auris-signature-brand { position: relative; z-index: 2; margin-bottom: 8px; color: #B99245 !important; font-family: Georgia, serif; font-size: 15px; font-weight: 600; letter-spacing: 7px; direction: ltr; } /* النجمة */ #auris-signature-moment .auris-signature-star { margin-bottom: 8px; color: #D7B36A !important; font-size: 13px; } /* العنوان */ #auris-signature-moment .auris-signature-title { margin: 0 !important; color: #0B5D3B !important; font-size: 28px; font-weight: 800; line-height: 1.5; text-align: center; } /* الخط */ #auris-signature-moment .auris-signature-line { width: 62px; height: 1px; margin: 17px auto 0; background: linear-gradient( 90deg, transparent, #D7B36A, transparent ); } /* النص الصغير */ #auris-signature-moment .auris-signature-sub { margin-top: 11px; color: #756A5F !important; font-size: 12px; font-weight: 500; letter-spacing: .2px; } @keyframes aurisSignatureMove { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } } @media (max-width: 768px) { #auris-signature-moment { margin: 18px 0 22px; } #auris-signature-moment .auris-signature-ticker { padding: 11px 0; } #auris-signature-moment .auris-signature-set span { padding: 0 12px; font-size: 13px; } #auris-signature-moment .auris-signature-main { padding: 30px 18px 28px; } #auris-signature-moment .auris-signature-title { font-size: 25px; } } `; document.head.appendChild(style); } /* =============================== المحتوى =============================== */ const section = document.createElement('section'); section.id = 'auris-signature-moment'; section.setAttribute('dir', 'rtl'); const items = ` AURIS شوكولاتة بلجيكية حشوات فاخرة هدايا مميزة تفاصيل تصنع لتهدى `; section.innerHTML = `
${items}
${items}
AURIS
الفخامة ترى قبل أن تذاق
تفاصيل مختارة بعناية لتصنع تجربة أوريس
`; /* وضعه مباشرة فوق مختارات أوريس */ target.parentNode.insertBefore(section, target); });