/* ============================================================
   1. إعدادات الأداء العامة (Global Performance)
   ============================================================ */
/* إجبار المتصفح على استخدام خط النظام حتى تحميل الخط الخاص */
@font-face { font-family: 'DIN Next LT Arabic'; font-display: swap; }

html, body {
    overflow-x: hidden; /* منع الاهتزاز الجانبي */
    width: 100%;
    scroll-behavior: smooth;
    text-rendering: optimizeSpeed; /* أولوية للسرعة على التجميل الدقيق */
}

/* ============================================================
   2. تثبيت الهيكل العلوي (Header Stability - LCP Protection)
   ============================================================ */
.site-header {
    min-height: 70px;
    contain: layout style; /* عزل الهيدر عن باقي الصفحة */
    z-index: 100;
}
.header-wrapper {
    transform: translateZ(0); /* تسريع الكارت */
}

/* ============================================================
   3. تحسين منطقة البنر الرئيسي (Hero Slider Optimization)
   ============================================================ */
.main-slider, .swiper-container, .swiper-wrapper {
    min-height: 220px; /* حجز مكان للجوال */
    contain: layout style paint; /* عزل كامل للرسم */
    background-color: #f9f9f9; /* لون بديل أثناء التحميل */
    transform: translate3d(0,0,0); /* تفعيل Hardware Acceleration */
}

@media (min-width: 768px) {
    .main-slider, .swiper-container, .swiper-wrapper {
        min-height: 450px; /* حجز مكان للكمبيوتر */
    }
}

/* ============================================================
   4. تحسين الصور (Images & Aspect Ratios)
   ============================================================ */
img {
    max-width: 100%;
    height: auto !important;
    display: block;
    font-size: 0; /* إخفاء أي مسافات زائدة */
}

/* تثبيت كروت المنتجات لمنع القفز */
.product-entry__image {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1; /* إجبار الصورة تكون مربعة */
    overflow: hidden;
    background-color: #fafafa;
    transform: translateZ(0);
}

/* ============================================================
   5. تحسين إمكانية الوصول واللمس (Accessibility & Touch)
   ============================================================ */
/* توسيع نقاط السلايدر (المشكلة التي في التقرير) */
.swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    margin: 0 6px !important;
    position: relative;
}
/* منطقة لمس وهمية واسعة */
.swiper-pagination-bullet::after {
    content: '';
    position: absolute;
    top: -15px; bottom: -15px; left: -15px; right: -15px;
    cursor: pointer;
}

/* تكبير أزرار الهيدر للموبايل */
.header-btn, .mobile-nav--item, .s-cart-summary-wrapper {
    min-width: 48px;
    min-height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   6. تحسين الفوتر والقوائم (Footer Optimization)
   ============================================================ */
/* تأخير رسم الفوتر حتى يصل العميل إليه (Content Visibility) */
footer, .s-block--instagram, .s-block--features {
    content-visibility: auto;
    contain-intrinsic-size: 800px; /* تقدير الارتفاع */
}

/* محاولة إصلاح شكل القوائم بصرياً في حال تأخر الجافا سكريبت */
.payments-wrapper, .s-payments-list-wrap {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none; /* إخفاء النقاط */
    padding: 0;
    margin: 10px 0;
}