/* User request 2026-11-13: no automatic WhatsApp greeting; retain direct consultation. */ ;(()=>{ const style=document.createElement('style');style.id='muhrah-whatsapp-direct-style'; style.textContent='html body [data-letsbot-salla-widget]{display:none!important;}#muhrah-whatsapp-contact{position:fixed!important;right:20px!important;left:auto!important;bottom:20px!important;width:58px!important;height:58px!important;display:flex!important;align-items:center!important;justify-content:center!important;border-radius:50%!important;background:#800020!important;color:#fff!important;box-shadow:0 5px 18px #0002!important;z-index:2147483000!important;text-decoration:none!important;}#muhrah-whatsapp-contact i{font-size:32px!important;color:#fff!important;}@media(max-width:767px){#muhrah-whatsapp-contact{bottom:calc(152px + env(safe-area-inset-bottom,0px))!important;}body:has(#cart-drawer.is-open) #muhrah-whatsapp-contact{bottom:calc(min(380px,100dvh - 160px) + env(safe-area-inset-bottom,0px))!important;}}'; document.head.append(style); function mount(){if(!document.body||document.getElementById('muhrah-whatsapp-contact'))return;const a=document.createElement('a');a.id='muhrah-whatsapp-contact';a.href='https://wa.me/966566931312';a.target='_blank';a.rel='noopener noreferrer';a.setAttribute('aria-label',location.pathname.startsWith('/en')?'Contact us on WhatsApp':'تواصل معنا عبر واتساب');a.innerHTML='';document.body.append(a);} if(document.body)mount();else document.addEventListener('DOMContentLoaded',mount,{once:true}); })(); /* Confirmed sale policy, 2026-11-06. Crown retains its three approved configurations. */ const muhrahFixedPackageIds=new Set(['1462665379','907175621','2039472833','403547798']); function muhrahPackageText(option){ const select=option?.closest?.('select'); let text=option?.textContent||''; try{const raw=JSON.parse(select?.closest('salla-product-options')?.getAttribute('options')||'[]');const detail=raw.flatMap(o=>o.details||[]).find(d=>String(d.id)===String(option.value));if(detail)text=detail.name||text;}catch{} return text; } const muhrahVariantKinds={"1344773524":"single","571260053":"combo","597567079":"single","2105230688":"combo","766873674":"single","1192115031":"combo","5426309":"single","1379920774":"combo","1020634269":"single","246596510":"combo","1512104270":"single","873267279":"combo","139307502":"single","1512753391":"combo","1836907063":"original","1266417136":"single","1059643716":"combo","1519857801":"single","880566154":"combo","667519024":"single","1905694513":"combo","564458414":"single","1129767870":"combo","1486873247":"single","711197080":"combo","365428152":"single","1739332793":"combo"}; function muhrahPackageKind(option){const known=muhrahVariantKinds[String(option?.value)];if(known)return known;const text=muhrahPackageText(option); return /(?:^|[^0-9])3\s*(?:عينات|عينة|×|x|(?:(?:random|fixed|assorted)\s+)?(?:[0-9]+\s*ml\s*)?samples)/i.test(text)?'combo':(/1\s*\+\s*2|hair|عطر شعر/i.test(text)?'original':'single'); } /* Muhrah critical navigation: mount before DOMContentLoaded, 2026-11-05. */ ;(() => { function mountNavigation() { const mainnav = document.getElementById('mainnav'); if (!mainnav) return false; if (document.getElementById('muhrah-home-nav')) return true; const lang = location.pathname.startsWith('/en') ? 'en' : 'ar'; const base = location.origin + '/' + lang + '/'; const link = path => base + path; const nav = document.createElement('nav'); nav.id = 'muhrah-home-nav'; nav.dataset.resume = '1030'; nav.dataset.earlyNavigation = document.readyState; nav.setAttribute('aria-label', 'التسوق في مهرة'); nav.innerHTML = 'جميع العطورمختارات الموسم
مجموعات العطور
NobleMagicHeritageAntonella
الهدايامجموعات الاكتشاف'; mainnav.after(nav); nav.querySelectorAll('details a').forEach(a => a.addEventListener('click', () => { nav.querySelector('details').open = false; })); return true; } if (!mountNavigation()) { const observer = new MutationObserver(() => { if (mountNavigation()) observer.disconnect(); }); observer.observe(document.documentElement, {childList:true,subtree:true}); } })(); /* Package image mapping, 2026-11-05 */ const muhrahPackageCatalog={"1930678652":{"combo":"https://cdn.files.salla.network/other/34542279/11e363d7-1393-46ee-a4c1-8c9b31530784-original.webp","volume":15,"framing":{"combo":{"scale":0.920367,"translateY":0.886606}}},"1122017859":{"combo":"https://cdn.files.salla.network/other/34542279/c497d49e-f799-4034-9434-fe712f4583df-original.webp","volume":15,"framing":{"combo":{"scale":0.973981,"translateY":2.80233}}},"658334785":{"combo":"https://cdn.files.salla.network/other/34542279/8d037cba-c413-42ad-be5f-da552601712f-original.webp","volume":15,"framing":{"combo":{"scale":0.988374,"translateY":5.602365}}},"1606547525":{"combo":"https://cdn.files.salla.network/other/34542279/c89e83de-e3d4-48cc-ad2c-9a3f20a67809-original.webp","volume":15,"framing":{"combo":{"scale":0.939766,"translateY":2.778829}}},"699270982":{"combo":"https://cdn.files.salla.network/other/34542279/f2aada10-2407-4dbe-be1a-28c8b5bdc20d-original.webp","volume":15,"framing":{"combo":{"scale":1.021069,"translateY":0.983613}}},"1291382909":{"combo":"https://cdn.files.salla.network/other/34542279/5e5b4f43-7c73-476d-9a57-c0020bf9ce1b-original.webp","volume":15,"framing":{"combo":{"scale":1.004456,"translateY":3.971364}}},"341081209":{"combo":"https://cdn.files.salla.network/other/34542279/6c21f9a0-aa7a-4f84-a762-3e2257cb2125-original.webp","volume":15,"framing":{"combo":{"scale":0.923544,"translateY":1.442025}}},"807385723":{"combo":"https://cdn.files.salla.network/other/34542279/c290ed7a-e425-4139-b424-0b1548f35c30-original.webp","volume":15,"framing":{"combo":{"scale":0.964615,"translateY":2.929231}}},"1048400532":{"combo":"https://cdn.files.salla.network/other/34542279/d0b0b194-9367-453e-ae07-8b1946fd5689-original.webp","volume":10,"original":"https://cdn.files.salla.network/other/34542279/67cb4b52-61a8-4d01-97d9-e0e78c2464e2-original.webp","framing":{"combo":{"scale":0.83513,"translateY":5.832591}}},"1462665379":{"combo":"https://cdn.files.salla.network/other/34542279/d88966b3-3298-4bdc-bb7d-eca9201464e6-original.webp","volume":10,"framing":{"combo":{"scale":0.809849,"translateY":3.783169}}},"907175621":{"combo":"https://cdn.files.salla.network/other/34542279/a7c57594-1881-479c-94e0-43d67c183b2b-original.webp","volume":10,"framing":{"combo":{"scale":0.823138,"translateY":4.042174}}},"2039472833":{"combo":"https://cdn.files.salla.network/other/34542279/69441fb4-5ba0-4013-ae33-d57b7e8ea4a2-original.webp","volume":10,"framing":{"combo":{"scale":0.843025,"translateY":3.702857}}},"403547798":{"combo":"https://cdn.files.salla.network/other/34542279/ebb5927e-9101-4ebd-84f9-6eea5c530ac9-original.webp","volume":10,"framing":{"combo":{"scale":0.843025,"translateY":4.711261}}}}; /* Muhrah active behavior: single gallery, navigation, collection identity and current homepage. Styles live in the CSS editor. */ ;(()=>{ const names={"982474104":["HERITAGE 6 AM","هيريتاج 6 اي ام"],"341081209":["HERITAGE AURA","هيريتاج اورا"],"403547798":["BEAUTY X","بيوتي اكس"],"658334785":["WARM NIGHT","وارم نايت"],"699270982":["TRIBLE LOVE","تربل لوف"],"807385723":["HERITAGE TOBACCO","هيريتاج توباكو"],"907175621":["MISS X","مس إكس"],"938396974":["CAPTAIN","كابتن ماستر كي"],"1048400532":["CROWN","كراون"],"1122017859":["DARKNESS","داركنس"],"1291382909":["HERITAGE BAKHUR","هيريتاج بخور"],"1462665379":["LEGACY","ليجسي"],"1606547525":["FOREVER HERE","فور ايفر هير"],"1806197202":["HERITAGE SIGNATURE","هيريتاج سيجنتشر"],"1930678652":["HERITAGE EXTREME","هيريتاج إكستريم"],"2039472833":["LADY X","ليدي إكس"]}; const records=[{"file":"TRIBLE_LOVE_1200.jpg","old_file":"TRIBLE_LOVE.webp","website_source":"https://cdn.files.salla.network/other/34542279/f3147e47-f4b5-49a9-8b4d-6bc72e826698-original.webp","product_id":"699270982","framing":{"top":176,"bottom":1035,"scale":1.109476,"translateY":1.902212,"translateX":3.273574}},{"file":"FOREVER_HERE_1200.jpg","old_file":"FOREVER_HERE_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/5a563cb7-e8d3-436d-82ed-dc8e26294a87-original.webp","product_id":"1606547525","framing":{"top":163,"bottom":1007,"scale":1.129194,"translateY":3.781991,"translateX":4.682464}},{"file":"WARM_NIGHT_1200.jpg","old_file":"WARM_NIGHT_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/591059d4-b85c-4f87-a858-086f45ce90f8-original.webp","product_id":"658334785","framing":{"top":168,"bottom":1006,"scale":1.137279,"translateY":3.627685,"translateX":4.081146}},{"file":"DARKNESS_1200.jpg","old_file":"DARKNESS_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/afc859e5-aee5-4e9a-89ac-3eece747ed39-original.webp","product_id":"1122017859","framing":{"top":169,"bottom":1004,"scale":1.141365,"translateY":3.686228,"translateX":4.823952}},{"file":"CROWN_1200.jpg","old_file":"CROWN_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/d759edfe-7445-4273-973d-dda7346eb5f8-original.webp","product_id":"1048400532","framing":{"top":80,"bottom":1045,"scale":0.987606,"translateY":5.079793,"translateX":1.968912}},{"file":"LEGACY_1200.jpg","old_file":"LEGACY_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/0a6d597f-4c97-442d-9cd0-bd05cb9931bc-original.webp","product_id":"1462665379","framing":{"top":234,"bottom":925,"scale":1.379219,"translateY":5.224313,"translateX":4.509407}},{"file":"CAPTAIN_单瓶_1200.jpg","old_file":"CAPTAIN_单瓶.webp","website_source":"https://cdn.files.salla.network/other/34542279/1f10807f-e5ca-4593-b902-66de52b6ad8b-original.webp","product_id":"938396974","framing":{"top":165,"bottom":1001,"scale":1.14,"translateY":4.0,"translateX":5.454545}},{"file":"BEAUTY_X_1200.jpg","old_file":"BEAUTY_X_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/b01d2b00-fdab-4986-b777-a88aa7af7579-original.webp","product_id":"403547798","framing":{"top":239,"bottom":921,"scale":1.397419,"translateY":5.237537,"translateX":5.683284}},{"file":"LADY_X_1200.jpg","old_file":"LADY_X_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/ada5f8ab-acc4-4e10-97a1-e0c5f9a6b8a2-original.webp","product_id":"2039472833","framing":{"top":34,"bottom":1184,"scale":0.82873,"translateY":1.189565,"translateX":0.0}},{"file":"MISS_X_1200.jpg","old_file":"MISS_X_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/534633c8-8fa5-4779-9ad9-1a73eadc5dbc-original.webp","product_id":"907175621","framing":{"top":253,"bottom":948,"scale":1.371281,"translateY":2.897842,"translateX":3.608633}},{"file":"HERITAGE_AURA_1200.jpg","old_file":"HERITAGE_AURA_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/9a4b74ee-cfad-4bf7-ac47-a5a5e83da22b-original.webp","product_id":"341081209","framing":{"top":54,"bottom":1124,"scale":0.890692,"translateY":2.699065,"translateX":1.065421}},{"file":"HERITAGE_BAKHUR_1200.jpg","old_file":"HERITAGE_BAKHUR_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/e0622f80-9e75-41b5-a384-c842eb0a7c10-original.webp","product_id":"1291382909","framing":{"top":52,"bottom":1115,"scale":0.896557,"translateY":3.110066,"translateX":1.501411}},{"file":"HERITAGE_EXTREME_1200.jpg","old_file":"HERITAGE_EXTREME_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/ef3ec095-a51d-46e2-bb14-86d69370b9c8-original.webp","product_id":"1930678652","framing":{"top":56,"bottom":1125,"scale":0.891525,"translateY":2.594949,"translateX":0.995323}},{"file":"HERITAGE_TOBACCO_1200.jpg","old_file":"HERITAGE_TOBACCO_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/fc9c5d39-0ad9-488e-bda2-597079962d95-original.webp","product_id":"807385723","framing":{"top":48,"bottom":1146,"scale":0.867978,"translateY":2.076503,"translateX":1.038251}},{"name":"I_AM_COCO","file":"I_AM_COCO_统一1104.jpg","generated":"/Users/yolin/.codex/generated_images/01a1a060-ad5a-7432-98f3-4eddb3ef2f0e/exec-99e752db-c5a8-4ce7-9ee2-73b52000ba80.png","product_id":"1431323968","framing":{"top":143.54066985645932,"bottom":1018.1818181818182,"scale":1.0975929978118162,"translateY":-0.24945295404813805},"website_source":"https://cdn.files.salla.network/other/34542279/e4412f92-5839-4425-ae81-13139472beba-original.webp"},{"name":"I_AM_SAKURA","file":"I_AM_SAKURA_统一1104.jpg","generated":"/Users/yolin/.codex/generated_images/01a1a060-ad5a-7432-98f3-4eddb3ef2f0e/exec-4b757bac-8d8f-4b89-8e18-9de991946fb6.png","product_id":"1897628482","framing":{"top":135.88516746411483,"bottom":1007.6555023923445,"scale":1.1012074643249177,"translateY":0.5905598243688246},"website_source":"https://cdn.files.salla.network/other/34542279/47ee3f05-d300-484e-be5f-0f85a0782e5d-original.webp"},{"name":"HERITAGE_GIRL","file":"HERITAGE_GIRL_统一1104.jpg","generated":"/Users/yolin/.codex/generated_images/01a1a060-ad5a-7432-98f3-4eddb3ef2f0e/exec-ab24034b-75e6-49e1-8473-dfef1577e2a9.png","product_id":"516235134","framing":{"top":124.4019138755981,"bottom":1034.4497607655503,"scale":1.0548895899053627,"translateY":-0.19137749737119236},"website_source":"https://cdn.files.salla.network/other/34542279/e612897e-d40a-4bf2-9795-8c3c51aa1a09-original.webp"},{"name":"HERITAGE_6_AM","file":"HERITAGE_6_AM_统一1104.jpg","generated":"/Users/yolin/.codex/generated_images/01a1a060-ad5a-7432-98f3-4eddb3ef2f0e/exec-37b1bff0-8e0d-470d-b69f-2ef42d0bae6e.png","product_id":"982474104","framing":{"top":138.755980861244,"bottom":1040.1913875598086,"scale":1.064968152866242,"translateY":-1.0658174097664528},"website_source":"https://cdn.files.salla.network/other/34542279/0fe0aefb-e327-49ce-a17e-39ffa13e04af-original.webp"}]; const en=location.pathname.startsWith('/en'); const escape=s=>String(s).replace(/[&<>"']/g,c=>({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c])); const id=location.pathname.match(/\/p(\d+)/)?.[1]; function mount(){ const native=id&&document.getElementById('details-slider-'+id), media=native?.closest('.product-single__main-media'); if(!native||!media||media.querySelector('.muhrah-gallery'))return; let photos;try{photos=JSON.parse(native.getAttribute('data-images')||'[]').filter(p=>p.type==='image'&&p.url);}catch{return;} if(!photos.length)return; const nativePhotos=photos.map(p=>({...p})); const rec=records.find(r=>r.product_id===id); const pack=muhrahPackageCatalog[id]; const packageKind=muhrahPackageKind; const packageSelect=()=>document.querySelector('form.product-form select[name^="options["]'); let packageBound=false,packageLock=false,lastPackageValue=null; if(rec){const first={url:rec.website_source,alt:names[id]?.[0]||photos[0].alt,normalized:true};photos=[first];} if(pack){photos[0].packageKey='single';for(const key of ['combo','original']){const url=pack[key];if(!url)continue;let p=photos.find(x=>x.url===url);if(!p){p={url,type:'image'};photos.push(p);}p.packageKey=key;p.alt=(names[id]?.[0]||'')+' · '+(key==='original'?'100ml + 2 × 10ml':'100ml + 3 × '+pack.volume+'ml');}} if(id==='1806197202'){photos=[{"url": "https://cdn.files.salla.network/other/34542279/f8ec1ac4-ceb5-4553-883d-ffb80507d983-original.webp", "type": "image", "alt": "HERITAGE SIGNATURE · ALL"}, {"url": "https://cdn.files.salla.network/other/34542279/84f3dc7b-72df-4e30-a333-2ca74f1ca189-original.webp", "type": "image", "alt": "HERITAGE SIGNATURE · YELLOW"}, {"url": "https://cdn.files.salla.network/other/34542279/db7e4dff-aa08-4bb0-a5a3-16d446d286e4-original.webp", "type": "image", "alt": "HERITAGE SIGNATURE · MAKEUP"}, {"url": "https://cdn.files.salla.network/other/34542279/31f7b0f1-903b-408b-8cdb-be4714272b0d-original.webp", "type": "image", "alt": "HERITAGE SIGNATURE · WALLET"}, {"url": "https://cdn.files.salla.network/other/34542279/73acef08-f992-4281-9b82-4dee287388cc-original.webp", "type": "image", "alt": "HERITAGE SIGNATURE · CHARMS"}];} const approvedDiscovery={"706053991":"https://cdn.files.salla.network/other/34542279/e872cb3e-4f0b-499a-9197-72c821b15b8c-original.webp","1458784373":"https://cdn.files.salla.network/other/34542279/f31692f8-8555-4fe7-b305-0f4248f30f1a-original.webp","1464489136":"https://cdn.files.salla.network/other/34542279/8fd6740d-ffcd-4714-abbf-0f96c411bb53-original.webp","129868012":"https://cdn.files.salla.network/other/34542279/9d47c7f1-e3a1-47f0-80b3-d5db4abd135a-original.webp"};if(approvedDiscovery[id])photos=[{url:approvedDiscovery[id],type:"image",alt:"Discovery set · 3 × 15ml"}]; const originalGallery={"1122017859":[{"url":"https://cdn.files.salla.network/other/34542279/e2fd550e-7968-465f-b31a-a3ada8a69d91-original.webp","type":"image","alt":"DARKNESS · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/218fa22d-bbde-4dd0-b5d7-6889bc690954-original.webp","type":"image","alt":"DARKNESS · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/975e1215-d9da-47d4-97aa-356faf1b746d-original.webp","type":"image","alt":"DARKNESS · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/ba319f9c-033d-41bc-a661-40341faa0110-original.webp","type":"image","alt":"DARKNESS · Original photo 4"}],"658334785":[{"url":"https://cdn.files.salla.network/other/34542279/9657f574-c1bd-40ac-9ef3-4dc781fd0fff-original.webp","type":"image","alt":"WARM NIGHT · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/0676a104-8ee4-435e-8a9c-b7c49e53b368-original.webp","type":"image","alt":"WARM NIGHT · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/62d8f899-9881-4b38-8aaa-bf96a009fc9e-original.webp","type":"image","alt":"WARM NIGHT · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/3674544b-9e0f-4315-ba43-a1cf06c7eb81-original.webp","type":"image","alt":"WARM NIGHT · Original photo 4"}],"1606547525":[{"url":"https://cdn.files.salla.network/other/34542279/0f7295c1-0f84-458a-9330-79a8b345550a-original.webp","type":"image","alt":"FOREVER HERE · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/41591a92-c309-4f11-ad3f-74d3db550187-original.webp","type":"image","alt":"FOREVER HERE · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/6a321f67-65b1-4eee-85d7-1605877dd5ea-original.webp","type":"image","alt":"FOREVER HERE · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/b6637e7b-da92-420a-8c45-3ce15d2da50a-original.webp","type":"image","alt":"FOREVER HERE · Original photo 4"}],"699270982":[{"url":"https://cdn.files.salla.network/other/34542279/1b81da77-e876-4011-83f8-f4ded48e37af-original.webp","type":"image","alt":"TRIBLE LOVE · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/4ec15f79-69bb-49d2-85a9-c75f19908bf9-original.webp","type":"image","alt":"TRIBLE LOVE · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/081cdcc0-7716-47aa-8d58-b7217b4b7cc6-original.webp","type":"image","alt":"TRIBLE LOVE · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/0203fd60-53b4-42d4-8487-f9ad1f2e37e8-original.webp","type":"image","alt":"TRIBLE LOVE · Original photo 4"}],"938396974":[{"url":"https://cdn.files.salla.network/other/34542279/b49f83fd-4464-4579-b50c-67e522769f01-original.webp","type":"image","alt":"CAPTAIN · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/c715b62d-582b-4a3c-a993-b503bca80bae-original.webp","type":"image","alt":"CAPTAIN · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/03d10e73-583d-4009-954a-0d209e1fc80a-original.webp","type":"image","alt":"CAPTAIN · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/17710f10-042c-400a-b419-ddec285e3a27-original.webp","type":"image","alt":"CAPTAIN · Original photo 4"},{"url":"https://cdn.files.salla.network/other/34542279/9eea952b-daf3-4edb-a6f8-6fbd52f66b02-original.webp","type":"image","alt":"CAPTAIN · Original photo 5"}],"1462665379":[{"url":"https://cdn.files.salla.network/other/34542279/538e5d99-434f-410b-83ef-3962c518e8cd-original.webp","type":"image","alt":"LEGACY · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/322e76ec-51d4-4b81-a6ac-72e733dcc86e-original.webp","type":"image","alt":"LEGACY · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/5167d7cf-e59f-403b-b326-63f9d88a882b-original.webp","type":"image","alt":"LEGACY · Original photo 3"}],"1048400532":[{"url":"https://cdn.files.salla.network/other/34542279/94b5093e-01b3-4cec-bd76-32158554098b-original.webp","type":"image","alt":"CROWN · Original photo 1"}],"2039472833":[{"url":"https://cdn.files.salla.network/other/34542279/eaf3485e-10b2-44eb-bd27-354e164feb99-original.webp","type":"image","alt":"LADY X · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/23ead122-8379-4832-89c6-47a8f6db9882-original.webp","type":"image","alt":"LADY X · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/517cae0e-9ded-4eba-b65b-c1bbb08fb630-original.webp","type":"image","alt":"LADY X · Original photo 3"}],"907175621":[{"url":"https://cdn.files.salla.network/other/34542279/1e6c969a-faea-4a53-ab9f-54a55990a1e5-original.webp","type":"image","alt":"MISS X · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/eac40d47-f9e3-4847-8dcf-41970cc1b3a5-original.webp","type":"image","alt":"MISS X · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/2fd5b621-0226-40e3-8f91-0cf3c2d0b3f1-original.webp","type":"image","alt":"MISS X · Original photo 3"}],"403547798":[{"url":"https://cdn.files.salla.network/other/34542279/645e2288-4834-413f-bca7-8a432ac3fb40-original.webp","type":"image","alt":"BEAUTY X · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/1972b8b3-9698-413f-bc45-208cc619f215-original.webp","type":"image","alt":"BEAUTY X · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/8f501bf8-7d5b-486d-a938-9a71d875529f-original.webp","type":"image","alt":"BEAUTY X · Original photo 3"}],"1291382909":[{"url":"https://cdn.files.salla.network/other/34542279/f31b31ad-fc37-4b4f-ab4f-ffe295bea985-original.webp","type":"image","alt":"HERITAGE BAKHUR · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/3fa29755-bb0b-453f-9285-0309cb9b1ae7-original.webp","type":"image","alt":"HERITAGE BAKHUR · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/d11629fa-f9a3-4f9b-a03e-054e016725e9-original.webp","type":"image","alt":"HERITAGE BAKHUR · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/795d6d4b-ccf6-477e-b859-3f14719a3732-original.webp","type":"image","alt":"HERITAGE BAKHUR · Original photo 4"}],"341081209":[{"url":"https://cdn.files.salla.network/other/34542279/909927ad-9601-4dd3-b82a-e60c375bb3c7-original.webp","type":"image","alt":"HERITAGE AURA · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/54733fc8-d13e-4050-99db-93ff6daebabb-original.webp","type":"image","alt":"HERITAGE AURA · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/44960d6a-7770-4b3c-9b0a-5d5d8bcc64b6-original.webp","type":"image","alt":"HERITAGE AURA · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/7c1b3e24-8d45-4f93-857a-29f5cc261524-original.webp","type":"image","alt":"HERITAGE AURA · Original photo 4"}],"807385723":[{"url":"https://cdn.files.salla.network/other/34542279/fd0f8bd0-b902-497a-b906-545251d54307-original.webp","type":"image","alt":"HERITAGE TOBACCO · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/981ac622-6e31-471b-9cd4-6e3311a0c092-original.webp","type":"image","alt":"HERITAGE TOBACCO · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/8e133267-5a5b-4b19-9e99-102fad1c4dd4-original.webp","type":"image","alt":"HERITAGE TOBACCO · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/c67540c2-89b7-458e-820d-3e9d5299f3a9-original.webp","type":"image","alt":"HERITAGE TOBACCO · Original photo 4"}],"1930678652":[{"url":"https://cdn.files.salla.network/other/34542279/a506549e-6ebd-4558-9ea0-441d11108aba-original.webp","type":"image","alt":"HERITAGE EXTREME · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/b2952774-8db4-4b45-92e6-5708638c9188-original.webp","type":"image","alt":"HERITAGE EXTREME · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/15e44023-8c3a-450d-88cd-5131ce1ec6ea-original.webp","type":"image","alt":"HERITAGE EXTREME · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/064e2468-fc0f-41cf-879c-37fad886e437-original.webp","type":"image","alt":"HERITAGE EXTREME · Original photo 4"}],"1806197202":[{"url":"https://cdn.files.salla.network/other/34542279/31bdcecb-e212-4a36-b579-f06c7e43c17c-original.webp","type":"image","alt":"HERITAGE SIGNATURE · Original photo 1"},{"url":"https://cdn.files.salla.network/other/34542279/1553be90-98ba-4f2f-bd80-bda68f4880f6-original.webp","type":"image","alt":"HERITAGE SIGNATURE · Original photo 2"},{"url":"https://cdn.files.salla.network/other/34542279/716dc284-639a-43ff-96f4-311cc0b77221-original.webp","type":"image","alt":"HERITAGE SIGNATURE · Original photo 3"},{"url":"https://cdn.files.salla.network/other/34542279/a82bebb6-48e3-4970-87e2-3a28fbdb9dff-original.webp","type":"image","alt":"HERITAGE SIGNATURE · Original photo 4"}]}; const seenPhotos=new Set(photos.map(p=>p.url));for(const p of [...(originalGallery[id]||[]),...(approvedDiscovery[id]?nativePhotos:nativePhotos.slice(1))]){if(!seenPhotos.has(p.url)){seenPhotos.add(p.url);photos.push({...p,packageKey:undefined,normalized:false});}} if(id==='938396974')photos=[{url:rec.website_source,type:'image',alt:'CAPTAIN'},...[{"url":"https://cdn.files.salla.network/other/34542279/fb79967a-3378-4dda-976a-6b31bfbbebef-original.webp","type":"image","alt":"CAPTAIN · Captain_01_白底单瓶"},{"url":"https://cdn.files.salla.network/other/34542279/04016a15-f869-4f44-b8e1-34236c8c28d0-original.webp","type":"image","alt":"CAPTAIN · Captain_02_喷头特写"},{"url":"https://cdn.files.salla.network/other/34542279/2135cc28-819b-49bf-a0e3-2937d95e0f95-original.webp","type":"image","alt":"CAPTAIN · Captain_03_礼盒三瓶"},{"url":"https://cdn.files.salla.network/other/34542279/54eb06b7-9f87-4720-acc8-67646b4e0f10-original.webp","type":"image","alt":"CAPTAIN · Captain_04_单瓶配礼盒"},{"url":"https://cdn.files.salla.network/other/34542279/edecb799-8541-4f71-9642-ea02932a6e6d-original.webp","type":"image","alt":"CAPTAIN · Captain_05_草地正面"},{"url":"https://cdn.files.salla.network/other/34542279/3bfe4245-2133-448b-bc29-9794407710d6-original.webp","type":"image","alt":"CAPTAIN · Captain_06_躺椅场景"},{"url":"https://cdn.files.salla.network/other/34542279/17c2cab0-bd27-4934-8ae5-42429e7a5900-original.webp","type":"image","alt":"CAPTAIN · Captain_07_玻璃台场景"},{"url":"https://cdn.files.salla.network/other/34542279/5d80a378-5c8d-4aac-a9fb-c8d0ea3f9a99-original.webp","type":"image","alt":"CAPTAIN · Captain_08_草地俯拍"},{"url":"https://cdn.files.salla.network/other/34542279/a13657ef-1d09-44b9-94ea-cdb354eb71aa-original.webp","type":"image","alt":"CAPTAIN · Captain_09_套装陈列"},{"url":"https://cdn.files.salla.network/other/34542279/def52b0a-c701-4cfd-bdd6-ea770bb02c51-original.webp","type":"image","alt":"CAPTAIN · Captain_10_浅底光影"}]]; const section=document.createElement('section');section.className='muhrah-gallery';section.setAttribute('aria-label',en?'Product images':'صور المنتج'); section.innerHTML=''; const main=section.querySelector('.muhrah-gallery-view img'),list=section.querySelector('.muhrah-gallery-thumbs'),count=section.querySelector('.muhrah-gallery-count'); let active=0; function transform(p){return 'none';} const buttons=photos.map((p,i)=>{const b=document.createElement('button');b.type='button';b.className='muhrah-gallery-thumb';b.setAttribute('aria-label',en?'Show product image '+(i+1)+' of '+photos.length:'عرض الصورة '+(i+1)+' من '+photos.length);b.setAttribute('title',en?'View photo '+(i+1):'عرض الصورة '+(i+1));b.addEventListener('click',()=>show(i));list.append(b);return b;}); function show(index){active=(index+photos.length)%photos.length;const p=photos[active];main.src=p.url;main.alt=p.alt||names[id]?.[0]||'';main.style.transform=transform(p);main.dataset.imageIndex=String(active);count.textContent=(active+1)+' / '+photos.length;buttons.forEach((b,i)=>b.setAttribute('aria-pressed',String(i===active)));} section.querySelectorAll('[data-step]').forEach(b=>b.addEventListener('click',()=>show(active+Number(b.dataset.step)))); section.addEventListener('keydown',e=>{if(['ArrowUp','ArrowLeft','ArrowDown','ArrowRight'].includes(e.key)){e.preventDefault();show(active+(['ArrowUp','ArrowLeft'].includes(e.key)?-1:1));}}); let swipeStart,swipedUntil=0;const view=section.querySelector('.muhrah-gallery-view');view.addEventListener('pointerdown',e=>{swipeStart={x:e.clientX,y:e.clientY};});view.addEventListener('pointerup',e=>{if(!swipeStart)return;const dx=e.clientX-swipeStart.x,dy=e.clientY-swipeStart.y;swipeStart=null;if(Math.abs(dx)>40&&Math.abs(dx)>Math.abs(dy)*1.2){swipedUntil=Date.now()+500;show(active+(dx<0?1:-1));}});view.addEventListener('pointercancel',()=>{swipeStart=null;});view.querySelector('img').draggable=false; section.querySelector('.muhrah-gallery-zoom').addEventListener('click',e=>{if(Date.now()×';d.querySelector('button').addEventListener('click',()=>d.close());d.addEventListener('click',e=>{if(e.target===d)d.close();});document.body.append(d);}d.querySelector('img').src=photos[active].url;d.querySelector('img').alt=main.alt;d.showModal();}); main.addEventListener('load',()=>{section.dataset.firstImageReady='1';},{once:true}); media.prepend(section);show(muhrahFixedPackageIds.has(id)?Math.max(0,photos.findIndex(p=>p.packageKey==='combo')):0); if(main.complete&&main.naturalWidth>0)section.dataset.firstImageReady='1'; if(pack){packageBound=true;function syncPackage(){const select=packageSelect();if(select){const label=location.pathname.startsWith('/en')?'100ml perfume only':'عطر 100ml فقط';for(const option of select.options){if(option.value&&packageKind(option)==='single'&&option.textContent!==label)option.textContent=label;}}if(!select||!select.value||packageLock||select.value===lastPackageValue)return;lastPackageValue=select.value;const key=packageKind(select.selectedOptions[0]),i=photos.findIndex(p=>p.packageKey===key);if(i>=0){packageLock=true;show(i);packageLock=false;}}document.addEventListener('change',e=>{if(e.target===packageSelect())syncPackage();});new MutationObserver(syncPackage).observe(document.querySelector('form.product-form')||document.body,{childList:true,subtree:true,characterData:true});syncPackage();} } function copy(){ document.querySelectorAll('custom-salla-product-card').forEach(c=>{const n=names[c.id.replace('product-','')],a=c.querySelector('.product-card__title a');if(n&&a){const label=n[0]+' · '+n[1];if(a.getAttribute('aria-label')!==label)a.setAttribute('aria-label',label);a.translate=false;}}); const h=document.querySelector('.product-single__info h1'); if(h&&names[id]&&!h.dataset.muhrahBilingual){const n=names[id];h.dataset.muhrahBilingual='1';h.innerHTML=''+escape(n[0])+''+escape(n[1])+'';} } let queued=false;function run(){if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;mount();copy();});} run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.documentElement,{childList:true,subtree:true}); })(); /* Add custom Js styles below */ document.addEventListener("DOMContentLoaded", () => { document.querySelectorAll(".s-product-options-option[data-option-required='true']").forEach(option => { const radios = option.querySelectorAll("input[type='radio'][required]"); if (!radios.length) return; const firstRadio = radios[0]; // رسالة مخصصة firstRadio.addEventListener("invalid", () => { firstRadio.setCustomValidity("الرجاء اختيار أحد الخيارات"); }); // عند أي اختيار radios.forEach(radio => { radio.addEventListener("change", () => { radios.forEach(r => r.setCustomValidity("")); }); }); }); }); if (location.pathname.includes("/cart")) { setTimeout(() => { document.querySelectorAll("input[type=radio][required]").forEach(r => { r.checked = false; r.oninvalid = () => r.setCustomValidity("الرجاء اختيار أحد الخيارات"); r.onchange = () => r.setCustomValidity(""); }); }, 500); } (() => { if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; const gifts=[{"key":"makeup","name":"Make Up Bag","ar":"حقيبة مكياج","image":"https://cdn.files.salla.network/other/34542279/db7e4dff-aa08-4bb0-a5a3-16d446d286e4-original.webp"},{"key":"wallet","name":"Wallet","ar":"محفظة","image":"https://cdn.files.salla.network/other/34542279/31f7b0f1-903b-408b-8cdb-be4714272b0d-original.webp"},{"key":"yellow","name":"Yellow Bag","ar":"حقيبة صفراء","image":"https://cdn.files.salla.network/other/34542279/84f3dc7b-72df-4e30-a333-2ca74f1ca189-original.webp"},{"key":"cherry","name":"Cherry & Horse","ar":"تعليقة الكرز والحصان","image":"https://cdn.files.salla.network/other/34542279/73acef08-f992-4281-9b82-4dee287388cc-original.webp"}], discovery=[{"key":"M01","id":"706053991","name":"MAGIC DISCOVERY 01","ar":"مجموعة ماجيك ديسكفري 01","items":["FOREVER HERE","TRIBLE LOVE","DARKNESS"],"price":59,"image":"https://cdn.files.salla.network/other/34542279/e872cb3e-4f0b-499a-9197-72c821b15b8c-original.webp"},{"key":"M05","name":"MAGIC DISCOVERY 05","ar":"مجموعة ماجيك ديسكفري 05","items":["WARM NIGHT","I AM COCO","TRIBLE LOVE"],"price":59,"image":"https://cdn.files.salla.network/other/34542279/f31692f8-8555-4fe7-b305-0f4248f30f1a-original.webp","id":"1458784373"},{"key":"M06","name":"MAGIC DISCOVERY 06","ar":"مجموعة ماجيك ديسكفري 06","items":["FOREVER HERE","TRIBLE LOVE","I AM SAKURA"],"price":59,"image":"https://cdn.files.salla.network/other/34542279/8fd6740d-ffcd-4714-abbf-0f96c411bb53-original.webp","id":"1464489136"},{"key":"H03","name":"HERITAGE DISCOVERY TRIO","ar":"مجموعة هيريتاج ديسكفري الثلاثية","items":["HERITAGE","HERITAGE 6 AM","HERITAGE AURA"],"price":69,"image":"https://cdn.files.salla.network/other/34542279/9d47c7f1-e3a1-47f0-80b3-d5db4abd135a-original.webp","id":"129868012"}], giftUrl=document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"https://muhrahmaison.com/en/heritage-signature-collection/p1806197202":"https://muhrahmaison.com/ar/هيريتاج-سيجنتشر-من-مهرة-(muhrah)---إصدار-محدود---عطرين-فاخرين-للجنسين/p1806197202"; const esc=s=>String(s).replace(/[&<>"]/g,c=>({'&':'&','<':'<','>':'>','"':'"'}[c])); function discoveryLink(id){const language=location.pathname.startsWith('/en')?'en':'ar';return location.origin+'/'+language+'/-/p'+id;} function activateDiscovery(){ document.querySelectorAll('#muhrah-discovery .muhrah-editorial-card').forEach((card,index)=>{ const img=card.querySelector('img');const d=discovery.find(d=>img?.alt===d.name)||discovery[index];if(!d||!img)return; const href=discoveryLink(d.id);card.dataset.productId=d.id; let frame=img.closest('.muhrah-discovery-frame'); if(!frame||frame.tagName!=='A'){const a=document.createElement('a');a.className='muhrah-discovery-frame muhrah-discovery-image';if(frame){frame.before(a);while(frame.firstChild)a.append(frame.firstChild);frame.remove();}else{img.before(a);a.append(img);}frame=a;} if(frame.getAttribute('href')!==href)frame.href=href;frame.setAttribute('aria-label',d.name); const h=card.querySelector('h3');if(h&&!h.querySelector('.muhrah-discovery-title')){const a=document.createElement('a');a.className='muhrah-discovery-title';a.href=href;while(h.firstChild)a.append(h.firstChild);h.append(a);} card.querySelectorAll('button[data-discovery],.muhrah-coming-soon').forEach(e=>e.remove()); if(!card.querySelector('.muhrah-discovery-cart')){const wrap=document.createElement('div');wrap.className='muhrah-real-cart muhrah-discovery-cart';const add=document.createElement('salla-add-product-button');add.setAttribute('product-id',d.id);add.setAttribute('product-status','sale');add.setAttribute('product-type','product');add.setAttribute('fill','solid');add.setAttribute('width','wide');add.textContent=location.pathname.startsWith('/en')?'Add to cart':'أضف إلى السلة';wrap.append(add);card.append(wrap);} }); } const section=(cls,id,title,sub,content)=>'
'+(/^\/(?:ar\/?|en\/?)?$/.test(location.pathname)?'':'

'+sub+'

')+'

'+title+'

'+content+'
'; function apply(){ activateDiscovery(); const seasonal=document.querySelector('section[component-id="1024420305"]'); if(!seasonal)return; const main=seasonal.parentElement;seasonal.id='seasonal';const heritage=document.querySelector('.muhrah-heritage');if(heritage)heritage.id='heritage'; if(!document.getElementById('muhrah-gifts')){ main.insertAdjacentHTML('beforeend',section('muhrah-gifts','muhrah-gifts',(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"A Gift with Your Signature":"هدية تحمل توقيعك"),'HERITAGE SIGNATURE', '

'+(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?'A thoughtfully chosen gift for someone you love.':document.documentElement.lang==='ar'&&/^\/(?:ar\/?)?$/.test(location.pathname)?'لمن تحب، هدية تختارها بعناية.':'عطران بحجم 100 مل، أربعة عطور بحجم 15 مل، وإكسسوار تختاره.')+'

'+gifts.map(g=>'').join('')+'
')); } if(!document.getElementById('muhrah-discovery')){ main.insertAdjacentHTML('beforeend',section('muhrah-discovery','muhrah-discovery',(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Discover Your Signature":"اكتشف توقيعك"),'THE DISCOVERY COLLECTION','

'+(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?'Start with a selection of travel-size fragrances.':document.documentElement.lang==='ar'&&/^\/(?:ar\/?)?$/.test(location.pathname)?'ابدأ بتجربة عطور بحجم السفر.':'عطور بحجم السفر، لاكتشاف ما يشبهك.')+'

'+discovery.map(d=>'
'+esc(d.name)+'

'+esc(d.name)+'

ثلاثة عطور سفر · 15 مل لكل عطر

'+d.items.map(esc).join(' · ')+'

'+d.price+'

').join('')+'
')); main.querySelectorAll('[data-discovery-step]').forEach(b=>b.addEventListener('click',()=>{const t=main.querySelector('.muhrah-discovery-track');t.scrollBy({left:Number(b.dataset.discoveryStep)*t.clientWidth*.82,behavior:'smooth'});})); } activateDiscovery(); } let scheduled=false;const run=()=>{if(scheduled)return;scheduled=true;requestAnimationFrame(()=>{scheduled=false;apply();});}; if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run(); const observer=new MutationObserver(records=>{if(records.some(r=>r.addedNodes.length))run();});observer.observe(document.body,{childList:true,subtree:true}); })(); /* Keep internal journeys inside the Salla draft preview host */ (()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; const apply=()=>document.querySelectorAll('.muhrah-seasonal,.muhrah-heritage').forEach(section=>{ const track=section.querySelector('.swiper-wrapper');const heading=section.querySelector('.s-slider-block__title');if(!track||!heading||heading.querySelector('.muhrah-carousel-controls'))return; track.dataset.muhrahSwipe='1';track.classList.add('muhrah-native-track');track.tabIndex=0;track.setAttribute('aria-label','تصفح المنتجات'); const viewport=track.parentElement; ['pointerdown','pointermove','touchstart','touchmove'].forEach(type=>viewport.addEventListener(type,e=>e.stopPropagation(),{capture:true,passive:true})); const controls=document.createElement('div');controls.className='muhrah-carousel-controls'; controls.innerHTML=''; controls.querySelectorAll('button').forEach(b=>b.addEventListener('click',()=>track.scrollBy({left:Number(b.dataset.step)*track.clientWidth*.85,behavior:'smooth'}))); heading.append(controls); }); let scheduled=false;const run=()=>{if(scheduled)return;scheduled=true;requestAnimationFrame(()=>{scheduled=false;apply();});}; if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run(); new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); /* Feedback revision 2026-10-30 */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; const apply=()=>{const n=document.querySelector('.muhrah-noble'),a=document.querySelector('.muhrah-antonella');if(n)n.id='noble';if(a)a.id='antonella';};let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true});})(); /* Four desktop columns; two mobile columns, above theme defaults */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; const apply=()=>document.querySelectorAll(".muhrah-seasonal custom-salla-product-card,.muhrah-heritage custom-salla-product-card").forEach(card=>{const content=card.querySelector(".product-card__content"),title=content&&content.querySelector(".product-card__title");if(!title||content.querySelector(".product-card__subtitle"))return;const p=document.createElement("p");p.className="product-card__subtitle";p.setAttribute("aria-hidden","true");title.after(p);});let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true});})(); /* Arrow-free pointer dragging and keyboard access for product rails */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; const bound=new WeakSet();const apply=()=>document.querySelectorAll(".muhrah-native-track,.muhrah-discovery-track,.muhrah-gift-grid").forEach(track=>{if(bound.has(track))return;bound.add(track);track.tabIndex=0;track.setAttribute("aria-label","تصفح المنتجات");const viewport=track.parentElement;let active=null,suppress=false;viewport.addEventListener("pointerdown",e=>{if(e.pointerType!=="mouse"||e.button!==0||!track.contains(e.target)||track.scrollWidth<=track.clientWidth)return;active={x:e.clientX,left:track.scrollLeft,moved:false,id:e.pointerId};},{capture:true});viewport.addEventListener("pointermove",e=>{if(!active||e.pointerId!==active.id)return;const dx=e.clientX-active.x;if(Math.abs(dx)>6){active.moved=true;try{viewport.setPointerCapture(e.pointerId);}catch(_){}e.preventDefault();track.scrollLeft=active.left-dx;}},{capture:true});const finish=()=>{if(active&&active.moved){suppress=true;setTimeout(()=>{suppress=false;},250);}active=null;};viewport.addEventListener("pointerup",finish,{capture:true});viewport.addEventListener("pointercancel",finish,{capture:true});viewport.addEventListener("dragstart",e=>{if(track.contains(e.target))e.preventDefault();},{capture:true});viewport.addEventListener("click",e=>{if(suppress){e.preventDefault();e.stopImmediatePropagation();suppress=false;}},{capture:true});});let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==="loading")document.addEventListener("DOMContentLoaded",run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true});})(); /* Resume 2026-10-30: five-entry navigation and Seasonal Picks */ ;(()=>{ const specs=[['1122017859','DARKNESS','توقيع جلدي عودي'],['658334785','WARM NIGHT','دفء العنبر للمساء'],['699270982','TRIBLE LOVE','لمسة فاكهية شرقية'],['1291382909','BAKHUR','بخور بتوقيع هيريتاج']]; function apply(){ const mainnav=document.getElementById('mainnav'); if(mainnav&&!document.querySelector('#muhrah-home-nav[data-resume="1030"]')){ const home=new URL(mainnav.querySelector('.navbar-brand')?.href||location.origin+'/'); if(location.search.includes('preview=true'))home.searchParams.set('preview','true'); const link=id=>{const routes={'seasonal-picks':'seasonal-picks/page-1951637092',noble:'noble/c662534278',seasonal:'magic/c1658411238',heritage:'heritage/c947131862',antonella:'antonella/c173094103','muhrah-gifts':'gifts/page-443907867','muhrah-discovery':'discovery-collection/page-1218990106'};const u=new URL(home);u.pathname=home.pathname.replace(/\/$/,'')+'/'+routes[id];u.hash='';u.search='';if(['seasonal-picks','muhrah-gifts','muhrah-discovery'].includes(id))u.searchParams.set('layout','20261104');return u.href;}; const catalog=new URL(home);catalog.pathname=home.pathname.replace(/\/$/,'')+'/جميع-المنتجات/c1639653324';catalog.search='';const all=document.querySelector('custom-main-menu a[href*="c1639653324"]')?.href||catalog.href; let nav=document.getElementById('muhrah-home-nav');if(!nav){nav=document.createElement('nav');nav.id='muhrah-home-nav';} nav.dataset.resume='1030';nav.setAttribute('aria-label','التسوق في مهرة'); nav.innerHTML='مختارات الموسمجميع العطور
مجموعات العطور
الهدايامجموعات الاكتشاف'; mainnav.after(nav);nav.querySelectorAll('details a').forEach(a=>a.addEventListener('click',()=>nav.querySelector('details').open=false)); } const source=document.querySelector('section[component-id="1024420305"]');if(!source)return; const items=specs.map(([id,name,reason])=>{const card=document.querySelector('.muhrah-seasonal #product-'+id+',.muhrah-heritage #product-'+id);const title=card?.querySelector('.product-card__title a'),img=card?.querySelector('img.main-image'),price=Array.from(card?.querySelectorAll('.total-price')||[]).find(p=>p.getClientRects().length&&p.textContent.trim()!=='-');if(!title||!img||!price)return null;const content=getComputedStyle(img).content;const picture=content.startsWith('url(')?content.slice(4,-1).replace(/^['"]|['"]$/g,''):img.currentSrc||img.src;const onSale=card.querySelector('.price_is_on_sale');const original=onSale&&!onSale.classList.contains('hidden')?card.querySelector('.before-price')?.textContent.trim():'';return {id,name,reason,href:title.href,image:picture,price:price.textContent.trim(),original:original||''};}); if(items.some(x=>!x))return; let picks=document.getElementById('seasonal-picks');if(!picks){picks=document.createElement('section');picks.id='seasonal-picks';picks.className='muhrah-editorial muhrah-picks';picks.dir='rtl';source.parentElement.append(picks);} const sig=JSON.stringify(items);if(picks.dataset.products===sig)return;picks.dataset.products=sig; picks.innerHTML='

SEASONAL PICKS

'+(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Seasonal Picks":"مختارات الموسم")+'

'; const grid=picks.querySelector('.muhrah-picks-grid'); items.forEach(d=>{const article=document.createElement('article');article.className='muhrah-pick-card';const imageLink=document.createElement('a');imageLink.href=d.href;const image=document.createElement('img');image.src=d.image;image.alt=d.name;image.width=1200;image.height=1200;image.loading='lazy';imageLink.append(image);const title=document.createElement('h3');title.dir='ltr';title.textContent=d.name;const reason=document.createElement('p');reason.textContent=d.reason;const price=document.createElement('p');price.className='muhrah-pick-price';price.dir='ltr';price.textContent=d.price+' ';const currency=document.createElement('small');currency.innerHTML='';price.append(currency);if(d.original){const before=document.createElement('del');before.className='muhrah-pick-original';before.textContent=d.original+' ';before.insertAdjacentHTML('beforeend','');price.append(before);}const cta=document.createElement('a');cta.className='muhrah-product-link';cta.href=d.href;cta.textContent=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Explore product":"اكتشف المنتج");article.append(imageLink,title,reason,price,cta);grid.append(article);}); } let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});}; if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); /* Verified three-product desktop layout 2026-10-30 */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; function apply(){ const picks=document.getElementById('seasonal-picks');if(!picks?.dataset.products)return; picks.querySelectorAll('h3').forEach(e=>{e.translate=false;e.classList.add('notranslate');}); if(document.getElementById('muhrah-captain-feature'))return; const card=document.querySelector('.muhrah-noble #product-938396974');const title=card?.querySelector('.product-card__title a');const livePrice=Array.from(card?.querySelectorAll('.total-price')||[]).find(e=>e.getClientRects().length&&e.textContent.trim()!=='-');if(!title||!livePrice)return;const captain={href:title.href,price:livePrice.textContent.trim(),original:card.querySelector('.before-price')?.textContent.trim()||'329'}; const section=document.createElement('section');section.id='muhrah-captain-feature';section.setAttribute('aria-label','مهرة X محمد نور'); section.innerHTML='
'; section.querySelectorAll('a').forEach(e=>e.href=captain.href);const price=section.querySelector('.muhrah-captain-price');price.textContent=captain.price+' ';const currency=document.createElement('small');currency.innerHTML='';price.append(currency);const original=document.createElement('del');original.className='muhrah-price-original';original.textContent=captain.original+' ';original.insertAdjacentHTML('beforeend','');price.append(original); picks.before(section); } let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});}; if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); /* Final alignment, consistent bottle scale, original brand film and exact banner burgundy */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; function apply(){ const about=document.getElementById('about-7');if(!about||about.dataset.feedbackFilm==='1030')return; const video=about.querySelector('video'),content=about.querySelector('.about__content'),title=about.querySelector('.about__title'),description=about.querySelector('.about__description');if(!video||!content||!title||!description)return; about.dataset.feedbackFilm='1030'; title.textContent=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"The Muhrah Story":"حكايات مهرة");description.textContent=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"From Tuwaiq to the world. Fragrances inspired by Arabian heritage, with stories that quietly leave their mark.":"من طويق إلى العالم. عطور مستوحاة من الإرث العربي، وحكايات تترك أثرها دون أن ترفع صوتها."); const eyebrow=document.createElement('p');eyebrow.className='muhrah-brand-eyebrow notranslate';eyebrow.dir='ltr';eyebrow.translate=false;eyebrow.textContent='MUHRAH IN MOTION';title.before(eyebrow); const story=document.querySelector('footer a[href*="page-585056793"]');if(story){const a=document.createElement('a');a.href=story.href;a.className='muhrah-brand-story-link';a.textContent=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Discover our story →":"اكتشف حكاية مهرة ←");content.append(a);} video.removeAttribute('data-lazy-video');video.autoplay=false;video.removeAttribute('autoplay');video.loop=false;video.controls=true;video.preload='none';video.poster='https://cdn.files.salla.network/other/34542279/11435e54-1f73-45fb-98a1-93db75c50697-original.webp';video.src='https://cdn.files.salla.network/other/34542279/8a3aefbb-8801-4da5-8920-eaf8d31ffcb6-video.mp4';video.setAttribute('aria-label','فيلم مهرة — من طويق إلى العالم'); } let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); ;(()=>{ function apply(){ document.querySelectorAll('.muhrah-pick-price,.muhrah-captain-price,.muhrah-editorial-card .muhrah-price').forEach(p=>{p.translate=false;p.classList.add('notranslate');}); document.querySelectorAll('#muhrah-gifts .muhrah-editorial-card .muhrah-price').forEach(p=>{if(p.querySelector('.muhrah-price-original'))return;const original=document.createElement('del');original.className='muhrah-price-original';original.textContent='479 ';original.insertAdjacentHTML('beforeend','');p.append(original);}); document.querySelectorAll('#muhrah-discovery .muhrah-editorial-card .muhrah-price').forEach(p=>{if(p.querySelector('.muhrah-price-original'))return;const raw=p.textContent.match(/\d+/);if(!raw)return;const before={59:79,69:89}[raw[0]];if(!before)return;const original=document.createElement('del');original.className='muhrah-price-original';original.textContent=before+' ';original.insertAdjacentHTML('beforeend','');p.append(original);}); } let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); /* 2026-10-30: full-bleed collection rhythm and restored original brand films. */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; function apply(){ const source=document.querySelector('section[component-id="1024420305"]');if(!source)return;const main=source.parentElement; const intros=[['noble','NOBLE COLLECTION','حضورٌ يترك أثراً','ثلاثة توقيعات. حضور لا يُنسى.'],['seasonal','MAGIC COLLECTION','لكل لحظة، توقيع','روائح تختارها لتروي حكايتك.'],['heritage','HERITAGE COLLECTION','من عمق الحكاية','نفحات تستلهم دفء الإرث العربي.'],['antonella','ANTONELLA COLLECTION','أنوثة بطريقتك','تفاصيل ناعمة، وأثر يخصّك.']]; const englishIntros={"noble":["A Presence That Lasts","Three signature scents. An unforgettable presence."],"seasonal":["A Signature for Every Moment","Choose the scents that tell your story."],"heritage":["Where the Story Begins","Fragrances inspired by the warmth of Arabian heritage."],"antonella":["Femininity, Your Way","Three fragrances with delicate details."]}; intros.forEach(([id,tag,title,copy])=>{const section=document.getElementById(id);if(!section||section.dataset.r3Intro)return;section.dataset.r3Intro='1';const intro=document.createElement('header');intro.className='muhrah-collection-intro';const small=document.createElement('p');small.textContent=tag;small.dir='ltr';small.translate=false;small.className='notranslate';const h=document.createElement('h2');h.textContent=document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?englishIntros[id][0]:title;const p=document.createElement('p');p.className='muhrah-collection-copy';p.textContent=document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?englishIntros[id][1]:copy;if(!(/^\/(?:ar\/?|en\/?)?$/.test(location.pathname)))intro.append(small);intro.append(h,p);section.prepend(intro);}); if(!document.getElementById('muhrah-brand-stories')){ const films=[['THE CLINIC','https://cdn.files.salla.network/other/34542279/e3d600d8-5bd8-4176-bc05-b1a7253a4eeb-video.mp4','https://cdn.files.salla.network/other/34542279/6f85c2a6-5010-43d0-99be-09b4078331bb-original.webp'],['THE NEWSROOM','https://cdn.files.salla.network/other/34542279/2c726aed-1ac3-41e0-a17e-455bf334568c-video.mp4','https://cdn.files.salla.network/other/34542279/8ca652f3-f049-4c3b-8c0b-0ad35975c987-original.webp']]; const section=document.createElement('section');section.id='muhrah-brand-stories';section.innerHTML='
'+(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?'

Stories That Stay with You

The stories behind our fragrances, told on film.

':document.documentElement.lang==='ar'&&/^\/(?:ar\/?)?$/.test(location.pathname)?'

حكاياتٌ تترك أثراً

حكايات العطر نرويها بالصورة.

':'

MUHRAH FILMS

حكاياتٌ تترك أثراً

')+'
';const grid=section.querySelector('.muhrah-story-grid'); films.forEach(([name,url,poster])=>{const article=document.createElement('article');article.className='muhrah-story-film';const video=document.createElement('video');video.controls=true;video.playsInline=true;video.preload='none';video.src=url;video.poster=poster;video.setAttribute('aria-label',name==='THE CLINIC'?'فيلم مهرة — العيادة':'فيلم مهرة — الأخبار');const label=document.createElement('p');label.dir='ltr';label.translate=false;label.className='notranslate';label.textContent=name;article.append(video,label);grid.append(article);video.addEventListener('play',()=>document.querySelectorAll('main video').forEach(other=>{if(other!==video&&!other.paused)other.pause();}));});main.append(section); } if(!document.getElementById('muhrah-antonella-intro')){const section=document.createElement('section');section.id='muhrah-antonella-intro';section.innerHTML='

ANTONELLA · A SOFTER SIGNATURE

رقةٌ تشبهك

ثلاث حكايات عطرية، لأنوثة لا تتكرر.

';main.append(section);} } let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); ;(()=>{ function apply(){ const nav=document.getElementById('muhrah-home-nav'); if(nav){const all=[...nav.children].find(a=>a.tagName==='A'&&a.href.includes('c1639653324'));if(all&&nav.firstElementChild!==all)nav.prepend(all);} const picks=document.getElementById('seasonal-picks');if(!picks)return; if(!picks.querySelector('.muhrah-seasonal-back')){const a=document.createElement('a');a.className='muhrah-seasonal-back';a.href='#muhrah-seasonal-campaign';a.textContent='العودة إلى الرئيسية ←';picks.prepend(a);} const picture=document.querySelector('#muhrah-seasonal-campaign>picture');if(picture){const a=document.createElement('a');a.className='muhrah-campaign-image-link';a.href='#seasonal-picks';a.setAttribute('aria-label','اكتشف مختارات الموسم');picture.before(a);a.append(picture);} } let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});}; if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run(); new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); /* White editorial pauses between the three opening visuals. */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; const apply=()=>{const campaign=document.querySelector('.muhrah-native-seasonal-campaign');if(!campaign)return;[['muhrah-captain-intro',(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Captain. A Presence of Your Own.":"كابتن… حضورٌ بتوقيعك"),(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?'A special edition in collaboration with Mohammed Noor.':document.documentElement.lang==='ar'&&/^\/(?:ar\/?)?$/.test(location.pathname)?'إصدار خاص بالتعاون مع محمد نور.':'توقيع عطري يترك أثراً.')]].forEach(([id,title,copy])=>{if(document.getElementById(id))return;const section=document.createElement('section');section.id=id;section.className='muhrah-white-pause';const h=document.createElement('h2');h.textContent=title;const p=document.createElement('p');p.textContent=copy;section.append(h,p);campaign.parentElement.append(section);});};let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true});})(); /* Consolidate Antonella to one introduction and retain native image dimensions. */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; const apply=()=>{const p=document.querySelector('#antonella .muhrah-collection-copy');if(p&&p.dataset.finalCopy!=='1'){p.dataset.finalCopy='1';p.textContent=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Three fragrances with delicate details.":"ثلاثة عطور، بتفاصيل ناعمة.");}};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',apply,{once:true});else apply();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))apply();}).observe(document.body,{childList:true,subtree:true});})(); /* Final feedback: tighter spacing, consistent English names, price on each product button. */ ;(()=>{ function setButton(button,sale,before){return;} function apply(){document.querySelectorAll('main .muhrah-native-track custom-salla-product-card').forEach(card=>{const row=card.querySelector('.product-card__price'),cta=card.querySelector('.muhrah-product-link');if(!row||!cta)return;const sale=[...row.querySelectorAll('.total-price')].map(p=>p.textContent.trim()).find(t=>t&&t!=='-');const before=card.querySelector('.before-price')?.textContent.trim()||'';if(sale){const from=['1122017859','658334785','1606547525','699270982','1291382909','341081209','807385723','1930678652'].includes(card.id.replace('product-',''));setButton(cta,(from?'من ':'')+(from?(['1122017859','658334785','1606547525','699270982'].includes(card.id.replace('product-',''))?'169':'189'):sale)+' SAR',before?before+' SAR':'');}});document.querySelectorAll('#seasonal-picks .muhrah-pick-card,#muhrah-gifts .muhrah-editorial-card,#muhrah-discovery .muhrah-editorial-card').forEach(card=>{const row=card.querySelector('.muhrah-pick-price,.muhrah-price'),cta=card.querySelector('.muhrah-product-link');if(!row||!cta)return;const original=row.querySelector('del')?.textContent.trim()||'';const clone=row.cloneNode(true);clone.querySelectorAll('del').forEach(d=>d.remove());setButton(cta,(card.matches('.muhrah-pick-card')?'من ':'')+clone.textContent.replace(/\s+/g,' ').trim(),original);});} let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true});})(); ;(()=>{const names={'982474104':'HERITAGE 6 AM','1122017859':'DARKNESS','658334785':'WARM NIGHT','1606547525':'FOREVER HERE','699270982':'TRIBLE LOVE','938396974':'CAPTAIN','1048400532':'CROWN','1462665379':'LEGACY','2039472833':'LADY X','907175621':'MISS X','403547798':'BEAUTY X','1291382909':'BAKHUR','341081209':'HERITAGE AURA','807385723':'HERITAGE TOBACCO','1930678652':'HERITAGE EXTREME'};const apply=()=>{document.querySelectorAll('#seasonal-picks .muhrah-pick-card h3').forEach(h=>{if(!h.dataset.capacity){h.dataset.capacity='1';h.textContent=h.textContent.trim()+' · 100ml';h.translate=false;h.classList.add('notranslate');}});document.querySelectorAll('#muhrah-gifts .muhrah-editorial-card h3').forEach(h=>{if(!h.dataset.capacity){h.dataset.capacity='1';h.textContent=h.textContent.trim()+' · 2 × 100ml + 4 × 15ml';h.translate=false;h.classList.add('notranslate');}});document.querySelectorAll('#muhrah-discovery .muhrah-editorial-card h3').forEach((h,i)=>{if(!h.dataset.capacity){h.dataset.capacity='1';h.textContent=h.textContent.trim()+' · '+'3 × 15ml';h.translate=false;h.classList.add('notranslate');}});const h=document.querySelector('.muhrah-captain-product h2');if(h&&!h.dataset.capacity){h.dataset.capacity='1';h.textContent='CAPTAIN · 100ml';}};let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true});})(); /* Arabic names copied from the published Muhrah catalog on 2026-10-30. */ ;(()=>{const ar={"341081209":"هيريتاج اورا","403547798":"بيوتي اكس","516235134":"هيريتاج جيرل","658334785":"وارم نايت","699270982":"تربل لوف","807385723":"هيريتاج توباكو","907175621":"مس إكس","938396974":"كابتن ماستر كي","982474104":"هيريتاج 6 اي ام","1048400532":"كراون","1122017859":"داركنس","1291382909":"هيريتاج بخور","1431323968":"أي ام كوكو","1462665379":"ليجسي","1606547525":"فور ايفر هير","1806197202":"هيريتاج سيجنتشر","1812790593":"باقة عراقة الإهداء","1897628482":"أي ام ساكورا","1930678652":"هيريتاج إكستريم","2039472833":"ليدي إكس"};const picks={'DARKNESS':'1122017859','WARM NIGHT':'658334785','TRIBLE LOVE':'699270982','BAKHUR':'1291382909'};const apply=()=>{document.querySelectorAll('#seasonal-picks .muhrah-pick-card').forEach(c=>{const h=c.querySelector('h3'),name=c.querySelector('img')?.alt,id=picks[name];if(!h||!id||h.querySelector('.muhrah-product-ar'))return;h.textContent=name+' · 100ml';const span=document.createElement('span');span.className='muhrah-product-ar';span.lang='ar';span.textContent=ar[id];h.append(span);});};let q=false;const run=()=>{if(q)return;q=true;requestAnimationFrame(()=>{q=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true});})(); /* Last layout review: centered introductions, adjoining backgrounds, natural capacity wraps. */ ;(()=>{ if(!/^(?:\/(?:ar|en))?\/?$/.test(location.pathname)&&!/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname))return; const giftNames=['Make Up Bag','Wallet','Yellow Bag','Cherry & Horse'],discoveryNames=['MAGIC DISCOVERY 01','MAGIC DISCOVERY 05','MAGIC DISCOVERY 06','HERITAGE DISCOVERY TRIO'];function apply(){document.querySelectorAll('#muhrah-gifts,#muhrah-discovery').forEach(section=>{const heading=section.querySelector(':scope>.muhrah-section-heading'),intro=section.querySelector(':scope>.muhrah-intro');if(!heading||!intro)return;const wrap=document.createElement('header');wrap.className='muhrah-unified-heading';heading.before(wrap);wrap.append(heading,intro);});[['#muhrah-gifts',giftNames],['#muhrah-discovery',discoveryNames]].forEach(([selector,names])=>document.querySelectorAll(selector+' .muhrah-editorial-card h3').forEach((h,i)=>{if(h.dataset.finalSplit)return;h.dataset.finalSplit='1';h.textContent=names[i];const cap=document.createElement('span');cap.className='muhrah-name-capacity';cap.textContent=selector==='#muhrah-gifts'?'2 × 100ml + 4 × 15ml':'3 × 15ml';h.append(cap);h.translate=false;h.classList.add('notranslate');}));}let q=false;const run=()=>{if(q)return;q=true;requestAnimationFrame(()=>{q=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true});})(); ;(()=>{const apply=()=>{const link=document.querySelector('#wa-selia a');if(link&&link.getAttribute('href')!=='https://wa.me/966566931312')link.setAttribute('href','https://wa.me/966566931312');};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',apply,{once:true});else apply();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))apply();}).observe(document.body,{childList:true,subtree:true});})(); ;(()=>{ const magic=['1122017859','658334785','1606547525','699270982']; const heritage=['1291382909','341081209','807385723','1930678652','982474104']; const id=location.pathname.match(/\/p(\d+)/)?.[1]; if(!magic.includes(id)&&!heritage.includes(id))return; const series=magic.includes(id)?'Magic':'Heritage'; const fixedSamples={"1930678652":["HERITAGE BAKHUR","HERITAGE TOBACCO","HERITAGE GIRL"],"1122017859": ["WARM NIGHT", "TRIBLE LOVE", "I AM SAKURA"], "658334785": ["FOREVER HERE", "TRIBLE LOVE", "DARKNESS"], "1606547525": ["WARM NIGHT", "I AM COCO", "TRIBLE LOVE"], "699270982": ["FOREVER HERE", "I AM COCO", "I AM SAKURA"], "1291382909": ["HERITAGE", "HERITAGE 6 AM", "HERITAGE AURA"], "341081209": ["HERITAGE", "HERITAGE BAKHUR", "HERITAGE TOBACCO"], "807385723": ["HERITAGE", "HERITAGE BAKHUR", "HERITAGE 6 AM"]}; const scents=fixedSamples[id],en=location.pathname.startsWith('/en'); function apply(){ const form=document.querySelector('form.product-form');if(!form)return; const select=form.querySelector('select[name^="options["]');if(!select)return; const combo=muhrahPackageKind(select.selectedOptions[0])==='combo'; const sub=document.querySelector('.product-single__info > .product-entry__sub-title');const subText=combo?'100ml + 3 × 15ml · '+series+(scents?(en?' — Fixed selection':' — تشكيلة ثابتة'):(en?' — Random samples':' — عينات عشوائية')):(en?'100ml — Perfume only':'100ml — عبوة عطر فقط');if(sub&&sub.textContent!==subText)sub.textContent=subText; document.querySelectorAll('.product-single__info .feature-text h3').forEach(h=>{if(['عينات مجانية فاخرة','ثلاث عينات من نفس المجموعة','خيارات تناسبك'].includes(h.textContent.trim())){const text=combo?'ثلاث عينات من نفس المجموعة':'خيارات تناسبك';if(h.textContent!==text)h.textContent=text;}}); let note=document.getElementById('muhrah-config-note'); if(!note){note=document.createElement('div');note.id='muhrah-config-note';note.className='muhrah-config-note';note.setAttribute('aria-live','polite');select.closest('salla-product-options')?.after(note);if(!note.isConnected)select.parentElement.after(note);} const noteHtml=combo?'100ml + 3 × 15ml · '+series+''+(scents?(en?'Fixed sample selection: ':'تشكيلة العينات الثابتة: ')+scents.join(' · ')+(en?' — 15ml each.':' — 15ml لكل عطر.'):(en?'Three random 15ml samples from the '+series+' collection, subject to availability. Sample scents cannot be selected.':'ثلاث عينات 15ml عشوائية من مجموعة '+series+'، حسب المتوفر عند الشحن. لا يمكن اختيار روائح العينات.')):(en?'100ml perfume onlyFull-size perfume without additional samples.':'عطر 100ml فقطعبوة عطر كاملة بدون عينات إضافية.'); if(note.innerHTML!==noteHtml)note.innerHTML=noteHtml; const media=document.querySelector('.product-single__main-media'); if(media){const state=combo?'1':'0';if(media.dataset.muhrahCombo!==state)media.dataset.muhrahCombo=state;} const sale=form.querySelector('.total-price');const before=form.querySelector('.before-price'); if(sale){document.querySelectorAll('.product-single__info .total-price,.sticky-product-bar .total-price,.sticky-cart-single__price .total-price').forEach(p=>{if(!form.contains(p)&&p.innerHTML!==sale.innerHTML)p.innerHTML=sale.innerHTML;});document.querySelectorAll('.product-single__info .total-price,.sticky-product-bar .total-price,.sticky-cart-single__price .total-price').forEach(p=>{if(form.contains(p))return;const b=p.parentElement.querySelector('.before-price');if(b&&before&&b.innerHTML!==before.innerHTML)b.innerHTML=before.innerHTML;});} } let queued=false;function run(){if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});} if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run(); document.addEventListener('change',e=>{if(e.target.matches('form.product-form select'))run();}); new MutationObserver(run).observe(document.body,{childList:true,subtree:true,characterData:true}); })(); ;(()=>{})(); /* Final warm-gray home photography, equal bottle height, 2026-11-03 */ (function(){})(); /* 2026-11-04: all catalog/recommendation frames, real cart buttons, Captain byline. */ ;(()=>{ function apply(){ const captain=document.querySelector('#muhrah-captain-feature .muhrah-captain-product'); if(captain&&!captain.querySelector('.muhrah-real-cart')){const old=captain.querySelector('a.muhrah-product-link');if(old){const wrap=document.createElement('div');wrap.className='muhrah-real-cart';wrap.innerHTML=''+(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Add to cart":"أضف إلى السلة")+'';old.replaceWith(wrap);}} document.querySelectorAll('#muhrah-captain-feature .muhrah-captain-byline,#muhrah-captain-feature .muhrah-captain-tag').forEach(e=>{const label=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"In collaboration with Mohammed Noor":"إصدار بالتعاون مع محمد نور");if(e.textContent!==label)e.textContent=label;}); document.querySelectorAll('#muhrah-gifts .muhrah-editorial-card>.muhrah-product-link').forEach(e=>{const label=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Choose this edition":"اختر هذا الإصدار ←");if(e.textContent!==label)e.textContent=label;}); document.querySelectorAll('#seasonal-picks .muhrah-pick-card>.muhrah-product-link').forEach(e=>{const label=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Explore product":"اكتشف المنتج");if(e.textContent!==label)e.textContent=label;}); } let q=false;function run(){if(q)return;q=true;requestAnimationFrame(()=>{q=false;apply();});}if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); /* Final six-point review 2026-11-04 */ ;(()=>{ const lang=location.pathname.startsWith('/en')?'en':'ar';const base=location.origin+'/'+lang+'/'; const routes={'seasonal-picks':'seasonal-picks/page-1951637092',noble:'noble/c662534278',seasonal:'magic/c1658411238',heritage:'heritage/c947131862',antonella:'antonella/c173094103','muhrah-gifts':'gifts/page-443907867','muhrah-discovery':'discovery-collection/page-1218990106'}; const groups=[{name:'Noble',path:routes.noble,ids:['938396974','1048400532','1462665379']},{name:'Magic',path:routes.seasonal,ids:['1122017859','658334785','1606547525','699270982']},{name:'Heritage',path:routes.heritage,ids:['1291382909','341081209','807385723','1930678652']},{name:'Antonella',path:routes.antonella,ids:['2039472833','907175621','403547798']},{name:lang==='en'?'Gifts':'الهدايا',path:routes['muhrah-gifts'],ids:['1806197202']}]; function apply(){ document.querySelectorAll('.muhrah-standalone-page .muhrah-seasonal-back').forEach(a=>{if(a.getAttribute('href')!==base)a.href=base;}); document.querySelectorAll('main custom-salla-product-card .product-card__content-wrapper').forEach(w=>{if(!w.querySelector('.product-card__subtitle')){const title=w.querySelector('.product-card__title');if(title){const sub=document.createElement('p');sub.className='product-card__subtitle muhrah-empty-subtitle';sub.setAttribute('aria-hidden','true');title.after(sub);}}}); document.querySelectorAll('#muhrah-home-nav a,#muhrah-seasonal-campaign a').forEach(a=>{let h;try{h=new URL(a.href).hash.slice(1)}catch{return}if(routes[h])a.href=base+routes[h];}); document.querySelectorAll('.muhrah-standalone-page a[href*="muhrahmaison.com"]').forEach(a=>{const u=new URL(a.href);if(/^\/(ar|en)\//.test(u.pathname)&&!u.pathname.startsWith('/'+lang+'/')){u.pathname=u.pathname.replace(/^\/(ar|en)\//,'/'+lang+'/');a.href=u.href;}}); const match=location.pathname.match(/\/p(\d+)/);const group=match&&groups.find(g=>g.ids.includes(match[1])); const bc=document.querySelector('nav.breadcrumbs salla-breadcrumb'); if(group&&bc&&bc.dataset.muhrahSeries!==group.name){const ol=bc.querySelector('ol');if(ol){const last=ol.lastElementChild?.cloneNode(true);ol.innerHTML='';const home=document.createElement('li');home.className='s-breadcrumb-item';const ha=document.createElement('a');ha.href=base;ha.textContent=lang==='en'?'Home':'الرئيسية';home.append(ha);const arrow=()=>{const e=document.createElement('li');e.className='s-breadcrumb-arrow';e.textContent='›';return e;};const series=document.createElement('li');series.className='s-breadcrumb-item';const a=document.createElement('a');a.href=base+group.path;a.textContent=group.name;series.append(a);ol.append(home,arrow(),series);if(last)ol.append(arrow(),last);bc.dataset.muhrahSeries=group.name;}} } let queued=false;const run=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); ;(()=>{ const records=[{"file":"TRIBLE_LOVE_1200.jpg","old_file":"TRIBLE_LOVE.webp","website_source":"https://cdn.files.salla.network/other/34542279/f3147e47-f4b5-49a9-8b4d-6bc72e826698-original.webp","product_id":"699270982","framing":{"top":176,"bottom":1035,"scale":1.109476,"translateY":1.902212,"translateX":3.273574}},{"file":"FOREVER_HERE_1200.jpg","old_file":"FOREVER_HERE_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/5a563cb7-e8d3-436d-82ed-dc8e26294a87-original.webp","product_id":"1606547525","framing":{"top":163,"bottom":1007,"scale":1.129194,"translateY":3.781991,"translateX":4.682464}},{"file":"WARM_NIGHT_1200.jpg","old_file":"WARM_NIGHT_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/591059d4-b85c-4f87-a858-086f45ce90f8-original.webp","product_id":"658334785","framing":{"top":168,"bottom":1006,"scale":1.137279,"translateY":3.627685,"translateX":4.081146}},{"file":"DARKNESS_1200.jpg","old_file":"DARKNESS_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/afc859e5-aee5-4e9a-89ac-3eece747ed39-original.webp","product_id":"1122017859","framing":{"top":169,"bottom":1004,"scale":1.141365,"translateY":3.686228,"translateX":4.823952}},{"file":"CROWN_1200.jpg","old_file":"CROWN_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/d759edfe-7445-4273-973d-dda7346eb5f8-original.webp","product_id":"1048400532","framing":{"top":80,"bottom":1045,"scale":0.987606,"translateY":5.079793,"translateX":1.968912}},{"file":"LEGACY_1200.jpg","old_file":"LEGACY_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/0a6d597f-4c97-442d-9cd0-bd05cb9931bc-original.webp","product_id":"1462665379","framing":{"top":234,"bottom":925,"scale":1.379219,"translateY":5.224313,"translateX":4.509407}},{"file":"CAPTAIN_单瓶_1200.jpg","old_file":"CAPTAIN_单瓶.webp","website_source":"https://cdn.files.salla.network/other/34542279/1f10807f-e5ca-4593-b902-66de52b6ad8b-original.webp","product_id":"938396974","framing":{"top":165,"bottom":1001,"scale":1.14,"translateY":4.0,"translateX":5.454545}},{"file":"BEAUTY_X_1200.jpg","old_file":"BEAUTY_X_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/b01d2b00-fdab-4986-b777-a88aa7af7579-original.webp","product_id":"403547798","framing":{"top":239,"bottom":921,"scale":1.397419,"translateY":5.237537,"translateX":5.683284}},{"file":"LADY_X_1200.jpg","old_file":"LADY_X_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/ada5f8ab-acc4-4e10-97a1-e0c5f9a6b8a2-original.webp","product_id":"2039472833","framing":{"top":34,"bottom":1184,"scale":0.82873,"translateY":1.189565,"translateX":0.0}},{"file":"MISS_X_1200.jpg","old_file":"MISS_X_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/534633c8-8fa5-4779-9ad9-1a73eadc5dbc-original.webp","product_id":"907175621","framing":{"top":253,"bottom":948,"scale":1.371281,"translateY":2.897842,"translateX":3.608633}},{"file":"HERITAGE_AURA_1200.jpg","old_file":"HERITAGE_AURA_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/9a4b74ee-cfad-4bf7-ac47-a5a5e83da22b-original.webp","product_id":"341081209","framing":{"top":54,"bottom":1124,"scale":0.890692,"translateY":2.699065,"translateX":1.065421}},{"file":"HERITAGE_BAKHUR_1200.jpg","old_file":"HERITAGE_BAKHUR_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/e0622f80-9e75-41b5-a384-c842eb0a7c10-original.webp","product_id":"1291382909","framing":{"top":52,"bottom":1115,"scale":0.896557,"translateY":3.110066,"translateX":1.501411}},{"file":"HERITAGE_EXTREME_1200.jpg","old_file":"HERITAGE_EXTREME_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/ef3ec095-a51d-46e2-bb14-86d69370b9c8-original.webp","product_id":"1930678652","framing":{"top":56,"bottom":1125,"scale":0.891525,"translateY":2.594949,"translateX":0.995323}},{"file":"HERITAGE_TOBACCO_1200.jpg","old_file":"HERITAGE_TOBACCO_1200.jpg","website_source":"https://cdn.files.salla.network/other/34542279/fc9c5d39-0ad9-488e-bda2-597079962d95-original.webp","product_id":"807385723","framing":{"top":48,"bottom":1146,"scale":0.867978,"translateY":2.076503,"translateX":1.038251}},{"name":"I_AM_COCO","file":"I_AM_COCO_统一1104.jpg","generated":"/Users/yolin/.codex/generated_images/01a1a060-ad5a-7432-98f3-4eddb3ef2f0e/exec-99e752db-c5a8-4ce7-9ee2-73b52000ba80.png","product_id":"1431323968","framing":{"top":143.54066985645932,"bottom":1018.1818181818182,"scale":1.0975929978118162,"translateY":-0.24945295404813805},"website_source":"https://cdn.files.salla.network/other/34542279/e4412f92-5839-4425-ae81-13139472beba-original.webp"},{"name":"I_AM_SAKURA","file":"I_AM_SAKURA_统一1104.jpg","generated":"/Users/yolin/.codex/generated_images/01a1a060-ad5a-7432-98f3-4eddb3ef2f0e/exec-4b757bac-8d8f-4b89-8e18-9de991946fb6.png","product_id":"1897628482","framing":{"top":135.88516746411483,"bottom":1007.6555023923445,"scale":1.1012074643249177,"translateY":0.5905598243688246},"website_source":"https://cdn.files.salla.network/other/34542279/47ee3f05-d300-484e-be5f-0f85a0782e5d-original.webp"},{"name":"HERITAGE_GIRL","file":"HERITAGE_GIRL_统一1104.jpg","generated":"/Users/yolin/.codex/generated_images/01a1a060-ad5a-7432-98f3-4eddb3ef2f0e/exec-ab24034b-75e6-49e1-8473-dfef1577e2a9.png","product_id":"516235134","framing":{"top":124.4019138755981,"bottom":1034.4497607655503,"scale":1.0548895899053627,"translateY":-0.19137749737119236},"website_source":"https://cdn.files.salla.network/other/34542279/e612897e-d40a-4bf2-9795-8c3c51aa1a09-original.webp"},{"name":"HERITAGE_6_AM","file":"HERITAGE_6_AM_统一1104.jpg","generated":"/Users/yolin/.codex/generated_images/01a1a060-ad5a-7432-98f3-4eddb3ef2f0e/exec-37b1bff0-8e0d-470d-b69f-2ef42d0bae6e.png","product_id":"982474104","framing":{"top":138.755980861244,"bottom":1040.1913875598086,"scale":1.064968152866242,"translateY":-1.0658174097664528},"website_source":"https://cdn.files.salla.network/other/34542279/0fe0aefb-e327-49ce-a17e-39ffa13e04af-original.webp"}]; const bySource=new Map(records.map(r=>[r.website_source,r])); const watched=new WeakSet(); const resize=new ResizeObserver(()=>schedule()); function clean(frame,img){const stage=frame.querySelector(':scope>.muhrah-photo-edge');if(stage)stage.remove();frame.classList.remove('muhrah-photo-surface');img.classList.remove('muhrah-photo-subject');} function extend(img){ const frame=img.parentElement;if(!frame)return; let source=getComputedStyle(img).content; source=source.startsWith('url(')?source.slice(4,-1).replace(/^["']|["']$/g,''):img.currentSrc||img.src; const record=bySource.get(source); if(!record){if(frame.classList.contains('muhrah-photo-surface'))clean(frame,img);return;} const width=frame.clientWidth,height=frame.clientHeight;if(width<2||height<2)return; const computed=getComputedStyle(img),matrix=computed.transform.match(/^matrix\(([^)]+)\)/); const values=matrix?matrix[1].split(',').map(Number):[1,0,0,1,0,0]; const scale=values[0],side=Math.min(img.offsetWidth,img.offsetHeight)*scale; const left=img.offsetLeft+(img.offsetWidth-side)/2+values[4]; const top=img.offsetTop+(img.offsetHeight-side)/2+values[5]; const edges=[Math.max(0,top),Math.max(0,width-left-side),Math.max(0,height-top-side),Math.max(0,left)]; if(edges.every(v=>v<.25)){if(frame.classList.contains('muhrah-photo-surface'))clean(frame,img);return;} frame.classList.add('muhrah-photo-surface');img.classList.add('muhrah-photo-subject'); let stage=frame.querySelector(':scope>.muhrah-photo-edge');if(!stage){stage=document.createElement('span');stage.className='muhrah-photo-edge';stage.setAttribute('aria-hidden','true');frame.prepend(stage);} const signature=source+'|'+edges.map(v=>v.toFixed(3)).join('|'); if(stage.dataset.framing!==signature){stage.dataset.framing=signature;stage.style.borderImageSource='url("'+source+'")';stage.style.borderImageWidth=edges.map(v=>(v+2).toFixed(3)+'px').join(' ');} if(!watched.has(frame)){watched.add(frame);resize.observe(frame);} } function apply(){ document.querySelectorAll('custom-salla-product-card .product-card__image img.main-image,.muhrah-pick-card>a:first-child>img').forEach(extend); const poster=document.querySelector('.muhrah-native-seasonal-campaign'),magic=document.querySelector('section[component-id="1024420305"]'); const story=document.getElementById('about-7'),noble=document.getElementById('noble');if(story&&noble&&story.parentElement===noble.parentElement&&story.previousElementSibling!==noble)noble.after(story);const heritage=document.getElementById('heritage'),films=document.getElementById('muhrah-brand-stories');if(heritage&&films&&heritage.parentElement===films.parentElement&&films.previousElementSibling!==heritage)heritage.after(films); if(poster&&magic&&poster.parentElement===magic.parentElement&&magic.previousElementSibling!==poster)poster.after(magic); } let queued=false;function schedule(){if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});} schedule();document.addEventListener('DOMContentLoaded',schedule,{once:true});window.addEventListener('load',schedule,{once:true});window.addEventListener('resize',schedule,{passive:true}); new MutationObserver(rs=>{if(rs.some(r=>r.type==='childList'||r.attributeName==='src'))schedule();}).observe(document.documentElement,{childList:true,subtree:true,attributes:true,attributeFilter:['src']}); })(); ;(()=>{ const relevant=/page-(1951637092|443907867|1218990106)(?:[/?#]|$)/.test(location.href);if(!relevant)return; let queued=false,previous='',stable=0,finished=false,fontsReady=false; const observer=new MutationObserver(schedule); function schedule(){if(finished||queued)return;queued=true;requestAnimationFrame(check);} function check(){ queued=false;const page=document.querySelector('.muhrah-standalone-page'),nav=document.querySelector('#muhrah-home-nav[data-resume="1030"]'),bc=document.querySelector('nav.breadcrumbs salla-breadcrumb.hydrated ol'); if(!page||!nav||!bc||!fontsReady)return; if(page.querySelector('#seasonal-picks')&&!page.querySelector('.muhrah-seasonal-back'))return; const picks=page.querySelector('#seasonal-picks');if(picks&&picks.querySelector('.muhrah-picks-grid'))[...picks.childNodes].forEach(n=>{if(n.nodeType!==1||!n.matches('.muhrah-seasonal-back,.muhrah-picks-grid'))n.remove();}); const boxes=[nav,bc,page,...page.querySelectorAll('img')].map(e=>{const b=e.getBoundingClientRect(),s=getComputedStyle(e);return [b.x,b.y,b.width,b.height,s.transform,s.content].join(',');}); const signature=boxes.join('|');stable=signature===previous?stable+1:0;previous=signature; if(stable<2){schedule();return;} page.style.removeProperty('visibility');document.documentElement.classList.add('muhrah-inner-ready');finished=true;observer.disconnect(); } observer.observe(document.documentElement,{childList:true,subtree:true,attributes:true,attributeFilter:['class','style','src']}); (document.fonts?.ready||Promise.resolve()).then(()=>{fontsReady=true;schedule();}); document.addEventListener('DOMContentLoaded',schedule,{once:true});window.addEventListener('load',schedule,{once:true});schedule(); })(); /* 2026-10-30: full-bleed collection rhythm and restored original brand films. */ /* User's final Seasonal Picks direction: standalone split-colour campaign below Hero. */ /* White editorial pauses between the three opening visuals. */ /* Consolidate Antonella to one introduction and retain native image dimensions. */ /* Final feedback: tighter spacing, consistent English names, price on each product button. */ /* Arabic names copied from the published Muhrah catalog on 2026-10-30. */ /* Last layout review: centered introductions, adjoining backgrounds, natural capacity wraps. */ /* Final warm-gray home photography, equal bottle height, 2026-11-03 */ (function(){})(); /* 2026-11-04: all catalog/recommendation frames, real cart buttons, Captain byline. */ ;(()=>{ function apply(){ const captain=document.querySelector('#muhrah-captain-feature .muhrah-captain-product'); if(captain&&!captain.querySelector('.muhrah-real-cart')){const old=captain.querySelector('a.muhrah-product-link');if(old){const wrap=document.createElement('div');wrap.className='muhrah-real-cart';wrap.innerHTML=''+(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Add to cart":"أضف إلى السلة")+'';old.replaceWith(wrap);}} document.querySelectorAll('#muhrah-captain-feature .muhrah-captain-byline,#muhrah-captain-feature .muhrah-captain-tag').forEach(e=>{const label=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"In collaboration with Mohammed Noor":"إصدار بالتعاون مع محمد نور");if(e.textContent!==label)e.textContent=label;}); document.querySelectorAll('#muhrah-discovery .muhrah-editorial-card>img,#muhrah-discovery-dialog>img').forEach(img=>{const w=document.createElement('div');w.className='muhrah-discovery-frame';img.before(w);w.append(img);}); document.querySelectorAll('#muhrah-discovery .muhrah-editorial-card>.muhrah-product-link').forEach(e=>{if(e.textContent!=='اكتشف المجموعة ←')e.textContent='اكتشف المجموعة ←';}); document.querySelectorAll('#muhrah-gifts .muhrah-editorial-card>.muhrah-product-link').forEach(e=>{const label=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Choose this edition":"اختر هذا الإصدار ←");if(e.textContent!==label)e.textContent=label;}); document.querySelectorAll('#seasonal-picks .muhrah-pick-card>.muhrah-product-link').forEach(e=>{const label=(document.documentElement.lang==='en'&&/^\/en\/?$/.test(location.pathname)?"Explore product":"اكتشف المنتج");if(e.textContent!==label)e.textContent=label;}); } let q=false;function run(){if(q)return;q=true;requestAnimationFrame(()=>{q=false;apply();});}if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();new MutationObserver(rs=>{if(rs.some(r=>r.addedNodes.length))run();}).observe(document.body,{childList:true,subtree:true}); })(); /* Final six-point review 2026-11-04 */ ;(()=>{ const relevant=/page-(1951637092|443907867|1218990106)(?:[/?#]|$)/.test(location.href);if(!relevant)return; let queued=false,previous='',stable=0,finished=false,fontsReady=false; const observer=new MutationObserver(schedule); function schedule(){if(finished||queued)return;queued=true;requestAnimationFrame(check);} function check(){ queued=false;const page=document.querySelector('.muhrah-standalone-page'),nav=document.querySelector('#muhrah-home-nav[data-resume="1030"]'),bc=document.querySelector('nav.breadcrumbs salla-breadcrumb.hydrated ol'); if(!page||!nav||!bc||!fontsReady)return; if(page.querySelector('#seasonal-picks')&&!page.querySelector('.muhrah-seasonal-back'))return; const picks=page.querySelector('#seasonal-picks');if(picks&&picks.querySelector('.muhrah-picks-grid'))[...picks.childNodes].forEach(n=>{if(n.nodeType!==1||!n.matches('.muhrah-seasonal-back,.muhrah-picks-grid'))n.remove();}); const boxes=[nav,bc,page,...page.querySelectorAll('img')].map(e=>{const b=e.getBoundingClientRect(),s=getComputedStyle(e);return [b.x,b.y,b.width,b.height,s.transform,s.content].join(',');}); const signature=boxes.join('|');stable=signature===previous?stable+1:0;previous=signature; if(stable<2){schedule();return;} page.style.removeProperty('visibility');document.documentElement.classList.add('muhrah-inner-ready');finished=true;observer.disconnect(); } observer.observe(document.documentElement,{childList:true,subtree:true,attributes:true,attributeFilter:['class','style','src']}); (document.fonts?.ready||Promise.resolve()).then(()=>{fontsReady=true;schedule();}); document.addEventListener('DOMContentLoaded',schedule,{once:true});window.addEventListener('load',schedule,{once:true});schedule(); })(); /* Crown purchase configuration: agreed 199 / 229 / 229 SAR. Prices remain native Salla variant data. */ ;(()=>{ if(!/\/p1048400532(?:[/?#]|$)/.test(location.pathname))return; const en=location.pathname.startsWith('/en'); function apply(){ const form=document.querySelector('form.product-form'),select=form?.querySelector('select[name^="options["]');if(!select)return; const text=select.selectedOptions[0]?.textContent||'';if(!text||text==='اختر'||text==='Choose')return; const chosenKind=muhrahPackageKind(select.selectedOptions[0]),trio=chosenKind==='combo',original=chosenKind==='original'; const subtitle=trio?'100ml + 3 × 10ml · CROWN · LEGACY · CAPTAIN':original?'100ml + CROWN 10ml + Hair Mist 10ml':(en?'100ml — Perfume only':'100ml — عبوة عطر فقط'); const sub=document.querySelector('.product-single__info > .product-entry__sub-title');if(sub&&sub.textContent!==subtitle)sub.textContent=subtitle; let note=document.getElementById('muhrah-crown-config-note');if(!note){note=document.createElement('div');note.id='muhrah-crown-config-note';note.className='muhrah-config-note';note.setAttribute('aria-live','polite');(select.closest('salla-product-options')||select).after(note);} const detail=trio?(en?'CROWN 100ml + CROWN, LEGACY and CAPTAIN samples, 10ml each. Fixed selection.':'عطر CROWN بحجم 100ml + عينات CROWN وLEGACY وCAPTAIN بحجم 10ml لكل عطر. تشكيلة ثابتة.'): original?(en?'CROWN 100ml + CROWN perfume 10ml + CROWN hair mist 10ml.':'عطر CROWN بحجم 100ml + عطر CROWN بحجم 10ml + عطر شعر CROWN بحجم 10ml.'):(en?'CROWN perfume 100ml only, without additional samples.':'عطر CROWN بحجم 100ml فقط، بدون عينات إضافية.'); if(note.textContent!==detail)note.textContent=detail; document.querySelectorAll('.product-single__info .feature-text h3').forEach(h=>{if(['عينات مجانية فاخرة','خيارات تناسبك','ثلاث عينات من نفس المجموعة'].includes(h.textContent.trim())){const v=en?'Choose your configuration':'اختر التكوين المناسب لك';if(h.textContent!==v)h.textContent=v;}}); const sale=form.querySelector('.total-price'),before=form.querySelector('.before-price'); const samePrice=sale&&before&&sale.textContent.replace(/[^0-9.]/g,'')===before.textContent.replace(/[^0-9.]/g,''); if(before&&before.style.display!==(samePrice?'none':''))before.style.display=samePrice?'none':''; if(sale)document.querySelectorAll('.product-single__info .total-price,.sticky-product-bar .total-price,.sticky-cart-single__price .total-price').forEach(p=>{if(form.contains(p))return;if(p.innerHTML!==sale.innerHTML)p.innerHTML=sale.innerHTML;const b=p.parentElement.querySelector('.before-price');if(b&&before){if(b.innerHTML!==before.innerHTML)b.innerHTML=before.innerHTML;if(b.style.display!==(samePrice?'none':''))b.style.display=samePrice?'none':'';}}); } let queued=false;function run(){if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});} if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run(); document.addEventListener('change',e=>{if(e.target.matches('form.product-form select'))run();}); new MutationObserver(run).observe(document.body,{childList:true,subtree:true,characterData:true}); })(); /* Fixed 10ml combinations already present in Legacy and Antonella product options. */ ;(()=>{ const fixed={'1462665379':['CROWN','LEGACY','CAPTAIN'],'907175621':['MISS X','LADY X','BEAUTY X'],'2039472833':['MISS X','LADY X','BEAUTY X'],'403547798':['MISS X','LADY X','BEAUTY X']}; const id=location.pathname.match(/\/p(\d+)/)?.[1];if(!fixed[id])return;const en=location.pathname.startsWith('/en'); function apply(){const form=document.querySelector('form.product-form'),select=form?.querySelector('select[name^="options["]');if(!select)return;const combo=muhrahPackageKind(select.selectedOptions[0])==='combo'; const text=combo?'100ml + 3 × 10ml — '+fixed[id].join(' · '):(en?'100ml — Perfume only':'100ml — عبوة عطر فقط');const sub=document.querySelector('.product-single__info > .product-entry__sub-title');if(sub&&sub.textContent!==text)sub.textContent=text; let note=document.getElementById('muhrah-fixed-ten-note');if(!note){note=document.createElement('div');note.id='muhrah-fixed-ten-note';note.className='muhrah-config-note';note.setAttribute('aria-live','polite');(select.closest('salla-product-options')||select).after(note);} const detail=combo?(en?'Fixed sample selection: ':'تشكيلة العينات الثابتة: ')+fixed[id].join(' · ')+(en?' — 10ml each.':' — 10ml لكل عطر.'):(en?'100ml perfume only, without additional samples.':'عطر 100ml فقط، بدون عينات إضافية.');if(note.textContent!==detail)note.textContent=detail; const sale=form.querySelector('.total-price'),before=form.querySelector('.before-price');if(sale)document.querySelectorAll('.product-single__info .total-price,.sticky-product-bar .total-price,.sticky-cart-single__price .total-price').forEach(p=>{if(form.contains(p))return;if(p.innerHTML!==sale.innerHTML)p.innerHTML=sale.innerHTML;const b=p.parentElement.querySelector('.before-price');if(b&&before&&b.innerHTML!==before.innerHTML)b.innerHTML=before.innerHTML;}); } let q=false;function run(){if(q)return;q=true;requestAnimationFrame(()=>{q=false;apply();});}if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();document.addEventListener('change',run);new MutationObserver(run).observe(document.body,{childList:true,subtree:true,characterData:true}); })(); /* Product package defaults: first purchasable option, no empty Choose row. */ ;(()=>{ let queued=false; function apply(){ document.querySelectorAll('form.product-form select[name^="options["]').forEach(select=>{ const id=location.pathname.match(/\/p(\d+)/)?.[1];const fixed=muhrahFixedPackageIds.has(id);const choices=Array.from(select.options).filter(o=>o.value&&!o.disabled&&(!fixed||muhrahPackageKind(o)==='combo'));if(!choices.length)return; const previous=select.value;let changed=false; if(!previous||!choices.some(o=>o.value===previous)){select.value=choices[0].value;changed=true;} Array.from(select.options).filter(o=>!o.value).forEach(o=>o.remove()); if(changed)select.dispatchEvent(new Event('change',{bubbles:true})); }); } function run(){if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});} if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run(); new MutationObserver(run).observe(document.body,{childList:true,subtree:true}); })(); /* Unified product purchase layout, 2026-11-05. Native variants remain the source of price and cart data. */ ;(()=>{ if(!/\/p\d+(?:[/?#]|$)/.test(location.pathname))return; document.documentElement.classList.add('muhrah-shop-layout'); const en=location.pathname.startsWith('/en'),id=location.pathname.match(/\/p(\d+)/)?.[1]; const kind=muhrahPackageKind; function setup(select,form){ const fixed=muhrahFixedPackageIds.has(id);const choices=Array.from(select.options).filter(o=>o.value&&(!fixed||kind(o)==='combo'));if(!choices.some(o=>/ml/i.test(muhrahPackageText(o))))return; if(fixed&&select.value!==choices[0].value){select.value=choices[0].value;select.dispatchEvent(new Event('change',{bubbles:true}));} const host=select.closest('salla-product-options'),row=select.closest('.s-product-options-option');if(!host||!row)return; const gid='muhrah-package-'+select.id; let group=document.getElementById(gid); if(!group){group=document.createElement('div');group.id=gid;group.className='muhrah-package-choice';group.innerHTML='
';host.after(group);group.addEventListener('click',e=>{const button=e.target.closest('.muhrah-package-button');if(!button||button.disabled)return;const native=document.getElementById(group.dataset.selectId);if(!native||native.value===button.dataset.value)return;const y=scrollY;native.value=button.dataset.value;native.dispatchEvent(new Event('change',{bubbles:true}));sync();requestAnimationFrame(()=>{if(Math.abs(scrollY-y)>1)window.scrollTo({top:y,behavior:'instant'});});});} group.dataset.selectId=select.id;host.dataset.muhrahPackageHost='1';row.classList.add('muhrah-package-native-row'); const title=fixed?(en?'Complete set':'المجموعة الكاملة'):(en?'Choose your package':'اختر الباقة');const heading=group.querySelector('.muhrah-package-label'),buttons=group.querySelector('.muhrah-package-buttons');if(heading.textContent!==title)heading.textContent=title;buttons.setAttribute('aria-label',title); const purchaseReady=!!form.querySelector('salla-add-product-button.hydrated button'); const signature=choices.map(o=>o.value+':'+kind(o)+':'+o.disabled).join('|')+'|ready:'+purchaseReady; if(group.dataset.signature!==signature){group.dataset.signature=signature;buttons.replaceChildren();buttons.dataset.count=choices.length; for(const option of choices){const type=kind(option),volume=muhrahPackageCatalog[id]?.volume||(/10\s*ml/i.test(muhrahPackageText(option))?10:15),button=document.createElement('button');button.type='button';button.className='muhrah-package-button';button.dataset.value=option.value;button.setAttribute('role','radio');button.disabled=option.disabled||!purchaseReady; const label=document.createElement('span'),capacity=document.createElement('span');capacity.className='muhrah-package-capacity';capacity.dir='ltr';capacity.translate=false; label.textContent=fixed?(en?'Complete set':'طقم كامل'):type==='single'?(en?'Perfume only':'عطر فقط'):type==='original'?(en?'1 + 2 Set':'طقم 1 + 2'):(en?'With 3 samples':'مع 3 عينات'); if(type==='original'){label.textContent=en?'Set ':'طقم ';const mark=document.createElement('bdi');mark.dir='ltr';mark.textContent='1 + 2';label.append(mark);} capacity.textContent=type==='single'?'100ml':type==='original'?'100ml + 2 × 10ml':'100ml + 3 × '+volume+'ml';button.append(label,capacity);buttons.append(button); } } buttons.querySelectorAll('button').forEach(b=>{const checked=b.dataset.value===select.value;if(b.getAttribute('aria-checked')!==String(checked))b.setAttribute('aria-checked',String(checked));}); } let queued=false; function sync(){ const info=document.querySelector('.product-single__info'),form=info?.querySelector('form.product-form');if(!info||!form)return; const dir=en?'ltr':'rtl';if(info.getAttribute('dir')!==dir)info.setAttribute('dir',dir); const price=info.querySelector('.product-price-top'),tax=info.querySelector('.product-single__tax-note');if(price&&tax&&tax.parentElement!==price)price.append(tax); let note=info.querySelector('.muhrah-payment-note');if(!note){note=document.createElement('div');note.className='muhrah-payment-note';note.textContent=en?'Interest-free instalments with Tabby and Tamara.':'قسّمها بدون فوائد مع تابي وتمارا';info.append(note);} if(en){const texts=['Long-lasting fragrance','Your chosen package','Fast delivery'];info.querySelectorAll('.product-features-item h3').forEach((h,i)=>{if(!h.textContent.trim()&&texts[i])h.textContent=texts[i];});} form.querySelectorAll('select[name^="options["]').forEach(select=>setup(select,form)); form.querySelectorAll('apple-pay-button').forEach(button=>{if(!button.dataset.originalType)button.dataset.originalType=button.getAttribute('type')||'buy';const type=matchMedia('(max-width:767px)').matches?'plain':button.dataset.originalType;if(button.getAttribute('type')!==type)button.setAttribute('type',type);}); } function run(){if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;sync();});} if(document.readyState==='loading')document.addEventListener('DOMContentLoaded',run,{once:true});else run();document.addEventListener('change',run);window.addEventListener('resize',run,{passive:true});new MutationObserver(run).observe(document.body,{childList:true,subtree:true,characterData:true}); })(); /* muhrah-recommendation-gap-fix — 2026-11-05 */ ;(() => { let queued = false; function apply() { document.querySelectorAll('main salla-products-slider').forEach(slider => { const excluded = [...slider.querySelectorAll('custom-salla-product-card#product-1812790593')]; if (!excluded.length) return; const container = slider.querySelector('.swiper'); const swiper = container && container.swiper; const previousSlides = container ? [...container.querySelectorAll('.swiper-wrapper > .swiper-slide')] : []; const removed = new Set(); excluded.forEach(card => { const slide = card.closest('.swiper-slide'); if (slide && slider.contains(slide)) removed.add(slide); }); const active = swiper && !swiper.destroyed ? swiper.activeIndex : 0; const before = previousSlides.slice(0, active).filter(slide => removed.has(slide)).length; removed.forEach(slide => slide.remove()); if (removed.size && swiper && !swiper.destroyed) { swiper.update(); swiper.slideTo(Math.max(0, Math.min(active - before, swiper.slides.length - 1)), 0, false); if (swiper.navigation) swiper.navigation.update(); if (swiper.pagination) { swiper.pagination.render(); swiper.pagination.update(); } if (swiper.scrollbar) { swiper.scrollbar.updateSize(); swiper.scrollbar.setTranslate(); } } }); } function schedule() { if (queued) return; queued = true; requestAnimationFrame(() => { queued = false; apply(); }); } new MutationObserver(records => { if (records.some(record => record.addedNodes.length)) schedule(); }).observe(document.documentElement, { childList: true, subtree: true }); document.addEventListener('DOMContentLoaded', schedule, { once: true }); window.addEventListener('load', schedule, { once: true }); schedule(); })(); /* Fixed sets keep their native cart variant; no alternative single-bottle offer. */ ;(()=>{ if(!/\/cart(?:\/|$)/.test(location.pathname))return; const en=location.pathname.startsWith('/en'); function apply(){document.querySelectorAll('main form[id^="item-"]').forEach(form=>{ const link=form.querySelector('a[href*="/p"]'),id=link?.getAttribute('href')?.match(/\/p(\d+)/)?.[1]; const host=form.querySelector('salla-product-options'),select=host?.querySelector('select');if(!select)return; if(Array.from(select.options).some(o=>muhrahVariantKinds[String(o.value)])){ const label=host.querySelector('.s-product-options-option-label b'),title=en?'Choose your package':'اختر الباقة';if(label&&label.textContent!==title)label.textContent=title; if(!host.classList.contains('muhrah-cart-package-select'))host.classList.add('muhrah-cart-package-select'); Array.from(select.options).forEach(option=>{if(!option.value&&select.value){option.remove();return;}if(muhrahVariantKinds[String(option.value)]==='single'){const text=en?'Perfume only · 100ml':'عطر فقط · 100ml';if(option.textContent!==text)option.textContent=text;}}); } if(!muhrahFixedPackageIds.has(id)||muhrahPackageKind(select.selectedOptions[0])!=='combo')return; if(!host.classList.contains('muhrah-fixed-cart-options'))host.classList.add('muhrah-fixed-cart-options'); let summary=form.querySelector('.muhrah-cart-package-summary');if(!summary){summary=document.createElement('p');summary.className='muhrah-cart-package-summary';host.after(summary);} const text=(en?'Complete set: ':'المجموعة الكاملة: ')+muhrahPackageText(select.selectedOptions[0]);if(summary.textContent!==text)summary.textContent=text; });} let pending=false;function run(){if(pending)return;pending=true;requestAnimationFrame(()=>{pending=false;apply();});} run();document.addEventListener('change',run);new MutationObserver(run).observe(document.body,{childList:true,subtree:true}); })();/* Background comparison, opt-in review links only. */ ;(()=>{ const mode=new URLSearchParams(location.search).get('background-preview'); if(!['greige','white'].includes(mode)||!location.pathname.includes('/p2039472833'))return; const photos={greige:'https://cdn.files.salla.network/other/34542279/ada5f8ab-acc4-4e10-97a1-e0c5f9a6b8a2-original.webp',white:'https://cdn.files.salla.network/other/34542279/5d0741dd-f04c-4125-a2d9-3aafb8bd1999-original.webp'}; let active=mode; function apply(){const gallery=document.querySelector('.muhrah-gallery'),img=gallery?.querySelector('.muhrah-gallery-view img');if(!img)return;if(document.getElementById('muhrah-background-compare')){if(img.getAttribute('src')!==photos[active])img.src=photos[active];img.style.transform='none';img.alt='LADY X — '+(active==='greige'?'浅暖灰米底':'纯白底');return;} const panel=document.createElement('div');panel.id='muhrah-background-compare';panel.dir='ltr';panel.style.cssText='padding:14px 16px;background:#faf8f3;text-align:center;color:#800020;font:13px/1.6 Arial'; const caption=document.createElement('p');caption.textContent='背景效果对比 · 单瓶示例';caption.style.margin='0 0 8px';panel.append(caption); const buttons={};for(const [key,label] of [['greige','浅暖灰米底'],['white','纯白底']]){const b=document.createElement('button');b.type='button';b.textContent=label;b.style.cssText='padding:9px 16px;border:1px solid #800020;border-radius:4px;margin:0 4px;font:13px Arial;cursor:pointer';buttons[key]=b;b.addEventListener('click',()=>show(key));panel.append(b);} function show(key){active=key;img.src=photos[key];img.style.transform='none';img.style.padding='7%';img.style.boxSizing='border-box';img.alt='LADY X — '+(key==='greige'?'浅暖灰米底':'纯白底');gallery.querySelector('.muhrah-gallery-view').style.setProperty('background',key==='greige'?'#e9e5dd':'#fff','important');for(const [name,b] of Object.entries(buttons)){b.setAttribute('aria-pressed',String(name===key));b.style.background=name===key?'#800020':'#faf8f3';b.style.color=name===key?'#fff':'#800020';}} gallery.before(panel);const side=gallery.querySelector('.muhrah-gallery-side');if(side)side.style.setProperty('display','none','important');const zoom=gallery.querySelector('.muhrah-gallery-zoom');if(zoom)zoom.disabled=true;show(active); } let queued=false;const schedule=()=>{if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});};apply();new MutationObserver(schedule).observe(document.documentElement,{childList:true,subtree:true}); })(); /* Nearby product images start before the recommendation enters the viewport. */ ;(()=>{ if(!('IntersectionObserver' in window))return; const marked=new WeakSet(); const observer=new IntersectionObserver(entries=>{entries.forEach(entry=>{ if(!entry.isIntersecting)return; const img=entry.target;const src=img.getAttribute('data-src'); if(src&&img.getAttribute('src')!==src)img.src=src; if(img.hasAttribute('data-srcset')&&img.getAttribute('srcset')!==img.getAttribute('data-srcset'))img.srcset=img.getAttribute('data-srcset'); img.loading='eager';img.decoding='async';observer.unobserve(img); });},{rootMargin:'300px 0px'}); function scan(){document.querySelectorAll('main custom-salla-product-card img,main .muhrah-editorial-card img').forEach(img=>{if(marked.has(img))return;marked.add(img);observer.observe(img);});} let queued=false;function schedule(){if(queued)return;queued=true;requestAnimationFrame(()=>{queued=false;scan();});} scan();new MutationObserver(records=>{if(records.some(r=>r.addedNodes.length))schedule();}).observe(document.documentElement,{childList:true,subtree:true}); document.addEventListener('click',e=>{const nav=e.target.closest('#muhrah-home-nav');if(nav&&e.target.closest('a'))nav.querySelectorAll('details[open]').forEach(d=>d.open=false);}); if(/\/c\d+(?:\/|$)/.test(location.pathname)&&new URLSearchParams(location.search).has('sort')){ const url=new URL(location.href);url.searchParams.delete('sort');location.replace(url.href); } })(); /* Store-wide reviews below the eight navigation product lists, 2026-11-09. */ ;(()=>{ const listing=/\/c(?:1639653324|662534278|1658411238|947131862|173094103)(?:\/|$)/.test(location.pathname); const topic=/\/page-(?:1951637092|443907867|1218990106)(?:\/|$)/.test(location.pathname); const home=['/','/ar','/ar/','/en','/en/'].includes(location.pathname); if(!listing&&!topic&&!home)return; if(home&&!document.querySelector('main>.s-block--testimonials'))return; const key='muhrah-public-store-reviews-v1',en=location.pathname.startsWith('/en'); const heading=en?'Customer reviews of Muhrah':'آراء عملائنا عن متجر مهرة'; let completed=false,fetching=false,attempted=false,observer; function extract(root){return [...root.querySelectorAll('.s-block--testimonials .review')].map(card=>({ name:card.querySelector('.testimonials__review-author-name')?.textContent.trim()||'', text:card.querySelector('.testimonials__text')?.textContent.trim()||'', rating:card.querySelectorAll('.comment__rating .text-amber-400,.comment__rating .text-yellow-400').length, avatar:card.querySelector('.testimonials__review-author img')?.getAttribute('data-src')||card.querySelector('.testimonials__review-author img')?.getAttribute('src')||'' })).filter(r=>r.name);} function cache(records){try{sessionStorage.setItem(key,JSON.stringify({time:Date.now(),records}));}catch{}} function cached(){try{const value=JSON.parse(sessionStorage.getItem(key)||'null');return value&&Date.now()-value.time<1800000&&Array.isArray(value.records)?value.records:[];}catch{return [];}} function finish(){completed=true;observer?.disconnect();} function render(records){ if(completed||!records.length)return; const main=document.querySelector('main');if(!main)return; const existing=main.querySelector('.s-block--testimonials'); const section=existing||document.createElement('section');section.className='s-block s-block--testimonials muhrah-compact-store-reviews';section.dataset.muhrahSharedReviews='1';section.setAttribute('aria-label',heading); const container=document.createElement('div');container.className='container';const title=document.createElement('h2');title.className='testimonials__title';title.textContent=heading; const track=document.createElement('div');track.className='muhrah-store-reviews-track';track.tabIndex=0;track.setAttribute('aria-label',en?'Swipe to browse store reviews':'اسحب لتصفح آراء عملاء المتجر'); for(const record of records){ const card=document.createElement('article');card.className='testimonials__review-card'; if(record.text){const wrap=document.createElement('div');wrap.className='testimonials__text-wrap';const p=document.createElement('p');p.className='testimonials__text';p.textContent=record.text;wrap.append(p);card.append(wrap);}else card.dataset.muhrahRatingOnly='1'; const author=document.createElement('div');author.className='testimonials__review-author';const avatar=document.createElement('img');avatar.width=40;avatar.height=40;avatar.alt=record.name;avatar.loading='lazy'; try{const url=new URL(record.avatar,location.origin);if(url.protocol==='https:'&&/\.(salla\.sa|salla\.network)$/.test(url.hostname))avatar.src=url.href;}catch{} const info=document.createElement('div');info.className='testimonials__review-author-info';const name=document.createElement('p');name.className='testimonials__review-author-name';name.textContent=record.name; const stars=document.createElement('div');stars.className='comment__rating';const rating=Math.max(0,Math.min(5,Number(record.rating)||0));stars.setAttribute('aria-label',en?rating+' out of 5':rating+' من 5'); for(let i=0;i<5;i++){const icon=document.createElement('i');icon.className='sicon-star2 '+(i.s-block--testimonials:not([data-muhrah-shared-reviews])'); if(native){const records=extract(native);if(!records.length)return;cache(records);if(listing)render(records);else finish();return;} if(topic&&document.querySelector('.muhrah-standalone-page')){const records=cached();if(records.length)render(records);else load();} } let queued=false;function schedule(){if(queued||completed)return;queued=true;requestAnimationFrame(()=>{queued=false;apply();});} observer=new MutationObserver(records=>{if(records.some(r=>r.addedNodes.length))schedule();});observer.observe(document.documentElement,{childList:true,subtree:true});apply(); })(); /* LetsBot loader */ (function () { if (window.__letsbotSallaLoader) { return; } window.__letsbotSallaLoader = true; var id = '34542279'; if (!/^[0-9]{1,20}$/.test(id)) { return; } var s = document.createElement('script'); s.async = true; s.src = 'https://letsbot.net/api/wc/v1/salla/' + id + '/loader'; document.head.appendChild(s); })(); /* MUHRAH White Friday 2026-11-18 start */ ;(() => { const images={"antonella":"https://cdn.files.salla.network/other/34542279/6d3e5866-bc78-4453-b812-832e8692036b-original.jpg","heritage":"https://cdn.files.salla.network/other/34542279/dc449a19-7d67-476c-bf07-58c10966b480-standard.jpeg","noble":"https://cdn.files.salla.network/other/34542279/bed2871d-1701-473d-8bc4-b4ad3323d2c7-standard.webp","season":"https://cdn.files.salla.network/other/34542279/8b3c65e7-2bea-4947-a255-2407e0d879b1-original.jpg","mark":"https://cdn.files.salla.network/other/34542279/9b3a91f2-bc6c-4640-81c0-7478fa2303f0-original.png"}; const css="\nhtml.muhrah-wf-home body#app main #seasonal-picks .muhrah-section-heading{display:block!important;text-align:start!important;padding:0 16px 14px!important}\nhtml.muhrah-wf-home body#app main #seasonal-picks .muhrah-section-heading p{display:none!important}\n#muhrah-wf-loading{position:fixed;inset:0;z-index:2147483647;display:grid;place-items:center;background:#f7f3ed}\n#muhrah-wf-loading img{width:64px;height:64px;object-fit:contain}\n\n\nhtml.muhrah-wf-home body#app#app#app#app main #seasonal .s-slider-block__title{margin-top:0!important}\n\nhtml.muhrah-wf-home body#app main #seasonal>.muhrah-wf-picks-title{display:block!important;text-align:start!important;margin:0 0 16px!important;padding:0 16px!important;color:#29251f!important;font-size:clamp(19px,2vw,24px)!important;line-height:1.4!important;font-weight:700!important}\n\n"; const path = location.pathname.replace(/^\/muhrah7\.com(?=\/|$)/, '').replace(/\/$/, ''); const en = path.startsWith('/en'); const home = ['', '/ar', '/en'].includes(path); const base = 'https://muhrahmaison.com/' + (en ? 'en' : 'ar') + '/'; const series = [ ['page-1951637092','season',en?'Seasonal Picks':'مختارات الموسم'], ['c947131862','heritage',en?'Heritage Collection':'مجموعة هيريتاج'], ['c662534278','noble',en?'Noble Collection':'مجموعة نوبل'], ['c1658411238','magic',en?'Magic Collection':'مجموعة ماجيك'], ['c173094103','antonella',en?'Antonella Collection':'مجموعة أنطونيلا'], ].find(([id])=>path.endsWith('/'+id)); const make=(tag,props={})=>Object.assign(document.createElement(tag),props); const photo=(url,alt='')=>make('img',{src:url,alt,decoding:'async'}); const style=make('style',{id:'muhrah-wf-style',textContent:css}); document.head.append(style); if(home)document.documentElement.classList.add("muhrah-wf-home"); function mountSeries(){ if(!series||document.getElementById('muhrah-wf-cover'))return; const [id,key,title]=series; const list=key==='season'?document.querySelector('main .muhrah-standalone-page'):document.querySelector('main salla-products-list[source-value="'+id.slice(1)+'"]'); if(!list)return; const host=make('div',{id:'muhrah-wf-cover'}); host.dataset.series=key; host.append(photo(images[key==='magic'?'season':key],title)); list.before(host); } let homeRevealQueued=false; function revealHome(){ if(!home||homeRevealQueued)return; const menu=document.querySelector('#muhrah-home-nav > a'); const cart=document.querySelector('#mainnav salla-cart-summary.hydrated'); const hero=document.querySelector('main section[component-id="929965240"] .advanced-slider__slide img'); if(!menu||!cart||!hero?.complete||!hero.naturalWidth)return; homeRevealQueued=true; document.removeEventListener('load',handleHomeImageLoad,true); setTimeout(()=>document.body.classList.add('muhrah-home-content-ready'),Math.max(0,650-performance.now())); } function handleHomeImageLoad(event){ if(event.target.matches?.('section[component-id="929965240"] img'))revealHome(); } if(home)document.addEventListener('load',handleHomeImageLoad,true); let scheduled=false; function schedule(){ if(scheduled)return; scheduled=true; requestAnimationFrame(()=>{ scheduled=false;mountSeries();revealHome(); if(home&&document.documentElement.classList.contains('muhrah-wf-home')) { const section=document.querySelector('main #seasonal'); if(section&&!section.querySelector('.muhrah-wf-picks-title')) section.prepend(make('h2',{className:'muhrah-wf-picks-title',textContent:en?'Seasonal Picks':'مختارات الموسم'})); } }); } new MutationObserver(schedule).observe(document.documentElement,{childList:true,subtree:true}); schedule(); document.addEventListener('click',e=>{ const a=e.target.closest?.('main section[component-id="929965240"] a.advanced-slider__slide-link,#muhrah-home-nav a'); if(!a||e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||(a.target&&a.target!=='_self'))return; const url=new URL(a.href,location.href); if(url.origin!==location.origin||url.pathname===location.pathname)return; e.preventDefault(); document.getElementById('muhrah-wf-loading')?.remove(); const overlay=make('div',{id:'muhrah-wf-loading'}); overlay.setAttribute('role','status');overlay.setAttribute('aria-label',en?'Loading':'جارٍ التحميل'); overlay.append(photo(images.mark));document.body.append(overlay); setTimeout(()=>overlay.remove(),2000); requestAnimationFrame(()=>requestAnimationFrame(()=>location.assign(url.href))); }); addEventListener('pageshow',()=>document.getElementById('muhrah-wf-loading')?.remove()); })(); /* MUHRAH White Friday 2026-11-18 end */