/* Modern storefront layer — loaded after the base theme so it is safe to update.
   Refines the base styles toward a clean, minimal, editorial e-commerce look
   (generous whitespace, restrained color, small-radius controls, light borders). */
:root{--ink:#18181b;--soft:#fafafa;--line:#e4e4e7;--modern-shadow:0 16px 40px rgba(0,0,0,.08)}
body{color:var(--ink);background:#fff;-webkit-font-smoothing:antialiased}
.container{max-width:1380px;padding-inline:28px}
.site-header{box-shadow:none;border-bottom:1px solid var(--line);backdrop-filter:blur(14px);background:rgba(255,255,255,.96)}
/* The home hero header (.site-header--hero) must stay fully transparent so it overlays
   the hero image — the blurred white background above is for the regular solid header
   only. Two classes beats the single-class rule above regardless of source order. */
.site-header.site-header--hero{background:transparent;backdrop-filter:none;border-bottom:0}
.header-top-bar{padding:8px 20px;font-weight:500;letter-spacing:.02em}
.header-inner{max-width:1380px;padding:18px 28px;gap:32px}
.logo-text{font-size:22px;letter-spacing:-.4px;color:var(--ink);font-weight:700}
.search-wrap{height:46px;border:1px solid var(--line);background:var(--soft);box-shadow:none}
.search-wrap:focus-within{background:#fff;box-shadow:0 0 0 3px rgba(0,0,0,.06)}
.search-btn{height:46px;min-width:54px;justify-content:center}
.action-btn{width:40px;height:40px;justify-content:center;border-radius:50%}
.nav-inner{max-width:1380px}.nav-list{justify-content:center;gap:6px}.nav-list>li>a{padding:14px 16px;font-weight:500}
.hero-slider{margin:0 auto;border-radius:0}.slide{height:min(560px,62vw)}
.slide-content{position:relative;z-index:2;padding-inline:7vw}.slide-content h2{font-size:clamp(32px,4vw,58px);letter-spacing:-1.2px}.slide-content p{text-shadow:0 2px 10px rgba(0,0,0,.45)}
.btn{min-height:44px;padding-inline:22px;border-radius:8px;font-weight:600;transition:transform .15s,box-shadow .2s,background .2s,opacity .2s}
.btn-primary:hover{opacity:.88}
.home-top-three{padding:20px 0 0}.home-top-three-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.home-top-three-item{position:relative;min-height:118px;border-radius:10px;overflow:hidden;background:var(--soft);color:#fff}
.home-top-three-item img{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;transition:transform .5s}
.home-top-three-item::after{content:"";position:absolute;inset:0;background:linear-gradient(90deg,rgba(9,9,11,.65),rgba(9,9,11,.06))}
.home-top-three-item:hover img{transform:scale(1.04)}.home-top-three-copy{position:absolute;z-index:2;inset-inline-start:22px;top:50%;transform:translateY(-50%);display:grid}
.home-top-three-copy strong{font-size:17px;font-weight:600}.home-top-three-copy small{opacity:.85}
.home-animated-banners{margin:28px 0}.home-animated-banner{display:block;position:relative;overflow:hidden;background:var(--soft)}
/* Full-height hero banner — height:100vh so the image fills the viewport (per site owner
   request: "give it a bit more height, 100% [of viewport height]"), with a sensible floor
   for very short/landscape-mobile viewports and a ceiling so it never gets absurd on
   ultra-tall desktop monitors. */
.home-animated-banner img{display:block;width:100%;height:100vh;min-height:520px;max-height:980px;object-fit:cover}
.home-animated-copy{position:absolute;inset:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;padding:clamp(24px,7vw,120px);color:#fff}
.home-animated-copy strong{display:block;font-size:clamp(32px,5.5vw,72px);line-height:1.05;font-weight:800;letter-spacing:-1.5px;max-width:680px;text-shadow:0 2px 18px rgba(0,0,0,.5)}
.home-animated-copy small{display:block;font-size:clamp(15px,1.6vw,19px);font-weight:400;line-height:1.6;margin-top:16px;max-width:420px;text-shadow:0 2px 10px rgba(0,0,0,.5)}
.home-animated-copy em{font-style:normal;display:inline-flex;align-items:center;gap:10px;background:#fff;color:#111;padding:16px 26px;border-radius:4px;margin-top:28px;font-weight:700;font-size:14px;letter-spacing:.3px}
.home-animated-copy em::after{content:"→";font-size:16px;transition:transform .2s}
.rtl .home-animated-copy em::after{content:"←"}
.home-animated-banner:hover .home-animated-copy em::after{transform:translateX(4px)}
.rtl .home-animated-banner:hover .home-animated-copy em::after{transform:translateX(-4px)}
.section{padding:72px 0}.section:nth-of-type(even){background:#fafafa}.section-header{margin-bottom:30px}
.section-title{font-size:clamp(22px,2.2vw,30px);letter-spacing:-.5px;font-weight:700}
.products-grid{grid-template-columns:repeat(5,minmax(0,1fr));gap:24px 18px}
.product-card{border:1px solid var(--line);border-radius:var(--r,10px);box-shadow:0 1px 3px rgba(0,0,0,.05);background:#fff;overflow:hidden}
.product-image-wrap{background:#f4f4f5}
.categories-grid{grid-template-columns:repeat(6,minmax(0,1fr));gap:16px}.category-card{border:0;background:transparent;border-radius:10px;padding:18px 10px;box-shadow:none}
.category-card img{width:96px;height:96px}.cat-name{font-size:13.5px;font-weight:500}
.brands-list{grid-template-columns:repeat(6,minmax(0,1fr))!important}.brand-item{height:96px;padding:16px;border-radius:8px;background:#fff;border-color:var(--line)}.brand-item img{height:52px;max-width:120px;filter:none}
.features-bar{background:var(--soft)}.feature-item{justify-content:center}.feature-icon{background:#fff;border:1px solid var(--line);width:48px;height:48px;border-radius:10px;display:grid;place-items:center}
.site-footer{background:#0a0a0a}
@media(max-width:1024px){.products-grid{grid-template-columns:repeat(3,1fr)}.categories-grid,.brands-list{grid-template-columns:repeat(4,1fr)!important}.header-inner{gap:16px}.home-top-three-grid{gap:10px}}
@media(max-width:768px){.container{padding-inline:16px}.hero-slider{margin-top:0}.slide{height:420px}.slide-content{padding-inline:22px}.slide-content h2,.slide-content p{display:block}.products-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 12px}.categories-grid{display:flex;overflow:auto;scroll-snap-type:x mandatory;padding-bottom:8px}.category-card{min-width:120px;scroll-snap-align:start}.brands-list{grid-template-columns:repeat(3,1fr)!important}.home-top-three-grid{display:flex;overflow:auto;scroll-snap-type:x mandatory}.home-top-three-item{min-width:82%;scroll-snap-align:center}.section{padding:46px 0}.section-header{margin-bottom:20px}.section-title{font-size:22px}.checkout-grid,[style*="grid-template-columns:1fr 360px"]{display:block!important}[style*="position:sticky;top:90px"]:not(.filters-sidebar){position:static!important;margin-top:20px}
  /* Header icon buttons are a fixed 40x40 circle by default (see .action-btn above) — on
     narrow phones that eats too much width and truncates the store name next to it, so
     shrink them here. The language pill (AR/EN text, not an icon) needs its own natural
     width instead of being forced into the same square. */
  .action-btn{width:32px;height:32px}
  .lang-toggle{width:auto;height:auto}
  /* This file loads after store.php's inline styles, so it's the only place that can
     reliably override .site-header's backdrop-filter (set above, at file scope) for
     mobile. A backdrop-filter here would make the header the containing block for the
     position:fixed #site-nav drawer, trapping it at the header's own ~60px height
     instead of letting it stretch to the full viewport. */
  .site-header{backdrop-filter:none}
}
@media(max-width:480px){.logo-text{font-size:19px}.products-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.product-info{padding:12px 10px}.product-name{font-size:13px}.price-current{font-size:14.5px}.btn-add-cart{padding:9px 8px;font-size:12px}.brands-list{grid-template-columns:repeat(2,1fr)!important}.slide{height:360px}.slide-content p{font-size:14.5px}.slider-prev,.slider-next{display:none}}

/* ⚠️ 2026-10-04 — الكتلة أدناه كُتبت أوّلاً في store.css، وهو ملفٌ **لا يُحمَّل
   في الموقع إطلاقاً**: layouts/store.php يُحمّل modern-store.css وحده ثم كتلة
   <style> مضمَّنة. فبقيت container-type بلا أثر وحُسب حجم الخط من عرض النافذة
   لا من عرض البانر (قيس: 84px على الحاسوب و23px على الجوال — أي 6% من النافذة).
   تُكتب تنسيقات الواجهة هنا لا هناك. */

/* ═══════════════════════════════════════════════════════════════════════
   2026-10-04 — طبقات البانر الحرّة (نصوص وأزرار يضعها صاحب المتجر)
   ═══════════════════════════════════════════════════════════════════════
   .bl-wrap غلافٌ يملأ البانر، و.bl-l طبقةٌ موضَّعة بالنسبة المئوية.

   container-type:inline-size هو مربط الفرس: يجعل الغلافَ «حاويةَ استعلام»
   فتُحسب وحدة cqw في حجم الخطّ نسبةً إلى عرضه هو لا عرض النافذة. وبهذا
   يصغر النصّ مع الصورة على الجوال تلقائياً — بلا @media ولا JavaScript،
   ومهما تغيّرت أبعاد البانر التي يضبطها صاحب المتجر.

   ولماذا لا vw؟ لأنها تقيس نافذة المتصفّح لا البانر: بانرٌ عرضه نصف
   الصفحة كان نصّه سيُرسَم بحجم بانرٍ بعرضها كاملاً.

   ⚠️ والمواضع تُكتب سطريّاً (inline) في HTML لا هنا: هي بيانات صاحب
   المتجر لكل طبقة، لا تنسيقٌ مشترك. وهذا الملف يحمل السلوك المشترك فقط.
   ═══════════════════════════════════════════════════════════════════════ */
.bl-wrap {
  position: absolute; inset: 0; z-index: 3;
  container-type: inline-size;
  pointer-events: none;            /* الصورة كلّها رابطٌ أحياناً — فلا يحجبه الغلاف */
}
.bl-l { position: absolute; pointer-events: auto; }
.bl-l a { transition: filter .15s, transform .15s; }
.bl-l a:hover { filter: brightness(1.08); transform: translateY(-1px); }

/* البانر الذي يحمل طبقات يصير مرجعَ تموضعها */
.slide, .ht-bdim, .home-animated-banner { position: relative; }

/* ⚠️ لا @media للحدّ الأدنى هنا. جُرِّبت `font-size:max(11px,1em)` فلم تفعل
   شيئاً: `1em` حجمُ الأب لا حجمُ العنصر، فكانت تُعيد الموروث لا تحمي منه —
   وقيس الزرّ على جوال 390px فكان ٩ بكسل. الحدّ الآن مخبوزٌ في قيمة كل طبقة
   التي يكتبها Banner::layersHtml: max(12px, Scqw) — يعمل عند أي عرض بلا
   نقطة انكسار، ويتبع حجمَ الطبقة الذي اختاره صاحب المتجر فوق ذلك. */

/* ═══════════════════════════════════════════════════════════════════════
   2026-10-05 — صفحة القسم: بانر بعرضٍ كامل + أقسامٌ فرعية دوائرَ بصورها
   ═══════════════════════════════════════════════════════════════════════
   الدائرة بحجمٍ ثابت (aspect-ratio:1 مع عرضٍ محدّد) لا بنسبة من الأب:
   صورةٌ طويلة وأخرى عريضة في صفٍّ واحد كانتا ستُنتجان دوائرَ بأقطارٍ
   مختلفة. و object-fit:cover يقصّ الزائد ويُبقي المركز.

   والاسم تحت الدائرة بسطرين كحدٍّ أقصى (line-clamp): اسمٌ طويل كان يمدّ
   صفّه كلّه فتتباعد الدوائر بلا سبب — وهو ما يحدث مع أسماء مثل
   «Men's Underwear & Sleepwear» في المرجع الذي أرسله صاحب المتجر.
   ═══════════════════════════════════════════════════════════════════════ */
/* 2026-10-05 (v1.57.0) — مخفيٌّ بصرياً لا عن محرّكات البحث وقارئات الشاشة.
   يُستعمل لعنوان h1 في صفحة القسم بعد حذف البطاقة التي كانت تحمله: صفحةٌ بلا
   h1 تُضعف الأرشفة ويتيه فيها قارئ الشاشة، والصنف لا يأخذ بكسلاً واحداً. */
.sr-only{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;
  overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

/* 2026-10-05 (v1.57.0) — المسافات مضغوطة بطلب صاحب المتجر: الترويسة كانت
   تأكل الصفحة قبل ظهور أي منتج (أوّل منتج عند 894px وارتفاع الشاشة 900). */
.cat-banner{margin:0 0 4px;border-radius:14px;overflow:hidden;line-height:0}
.cat-banner img{width:100%;height:auto;display:block}

.cat-circles{
  display:flex;gap:18px;overflow-x:auto;padding:0 2px 4px;margin-bottom:4px;
  scroll-snap-type:x proximity;-webkit-overflow-scrolling:touch;
}
.cat-circles::-webkit-scrollbar{height:6px}
.cat-circles::-webkit-scrollbar-thumb{background:var(--border);border-radius:3px}
.cat-circle{
  flex:0 0 auto;width:104px;display:flex;flex-direction:column;align-items:center;gap:5px;
  text-decoration:none;color:var(--text);scroll-snap-align:start;
}
.cat-circle-img{
  width:88px;aspect-ratio:1;border-radius:50%;overflow:hidden;background:#f1f5f9;
  display:flex;align-items:center;justify-content:center;
  border:1px solid var(--border);transition:transform .16s,border-color .16s,box-shadow .16s;
}
.cat-circle-img img{width:100%;height:100%;object-fit:cover;display:block}
.cat-circle-ltr{font-size:30px;font-weight:800;color:var(--muted-2,#9ca3af);line-height:1}
.cat-circle:hover .cat-circle-img{transform:translateY(-2px);border-color:var(--primary);box-shadow:0 6px 16px rgba(0,0,0,.10)}
.cat-circle-name{
  font-size:12.5px;font-weight:600;text-align:center;line-height:1.45;
  display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;
}
.cat-circle:hover .cat-circle-name{color:var(--primary)}

@media (max-width:768px){
  .cat-circles{gap:13px}
  .cat-circle{width:84px}
  .cat-circle-img{width:72px}
  .cat-circle-name{font-size:11.5px}
}
