/* خيوط وادي النيل — لمسات الخيط: تحميل، خيط التمرير، غرزات، مؤشر إبرة */

/* ---------- شاشة التحميل: بكرة خيط ---------- */
#loader { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; align-content: center; gap: 18px; background: radial-gradient(circle at 50% 45%, #0f4468, var(--navy-deep) 70%); color: #fff; transition: opacity .6s var(--ease), visibility .6s; animation: loaderFail .01s 3.4s forwards; }
#loader.is-done { opacity: 0; visibility: hidden; }
html.no-loader #loader { display: none; }
#loader svg { width: 132px; height: 132px; overflow: visible; }
#loader .ld-wrap { stroke: #cfa98f; stroke-width: 4.2; stroke-linecap: round; fill: none; stroke-dasharray: 38; stroke-dashoffset: 38; animation: ldWind 1.5s var(--ease) infinite; }
#loader .ld-tail { stroke: #cfa98f; stroke-width: 3; fill: none; stroke-linecap: round; stroke-dasharray: 90; stroke-dashoffset: 90; animation: ldTail 1.5s var(--ease) infinite; }
#loader .ld-flange { fill: #e9edf1; }
#loader .ld-core { fill: #1b5a85; }
#loader p { margin: 0; font-weight: 800; font-size: 1.15rem; letter-spacing: .02em; opacity: .92; }
@keyframes ldWind { 0% { stroke-dashoffset: 38; } 55%, 100% { stroke-dashoffset: 0; } }
@keyframes ldTail { 0% { stroke-dashoffset: 90; } 60%, 100% { stroke-dashoffset: 0; } }
@keyframes loaderFail { to { opacity: 0; visibility: hidden; } }

@media print { #loader, #needle-fx { display: none !important; } }

/* ---------- غرزات ---------- */
/* خط التطريز تحت عناوين الأقسام بدل الشريط */
.heading h2::after { height: 0; width: 96px; background: none; border-radius: 0; border-top: 3px dashed var(--brown); transition: width 1.1s var(--ease) .15s; }
.js .heading.reveal h2::after { width: 0; }
.js .heading.reveal.is-in h2::after { width: 96px; }
.section--navy .heading h2::after { border-top-color: #cfa98f; }
/* خط الخياطة بين الأقسام */
.section + .section::before { content: ''; position: absolute; top: 12px; inset-inline: 4%; border-top: 2px dashed rgba(116, 82, 63, .38); pointer-events: none; }
.section--navy::before { border-top-color: rgba(207, 169, 143, .55) !important; }
/* غرزة بين صورة المنتج واسمه + حد الكارت عند المرور */
.card__body { border-top: 2px dashed rgba(116, 82, 63, .28); }
.card { position: relative; }
.card::after { content: ''; position: absolute; inset: 7px; border: 1.5px dashed rgba(255, 255, 255, .9); border-radius: calc(var(--radius) - 4px); pointer-events: none; opacity: 0; transition: opacity .35s; z-index: 3; }
.card:hover::after { opacity: 1; }

/* ---------- مؤشر الإبرة (ديسكتوب فقط) ---------- */
#needle-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 400; pointer-events: none; }
