/* =========================================================
   تحسينات التصميم حسب مبادئ أبل (Apple HIG) — 2026-10-20
   ملف مستقل يُحمَّل أخيراً؛ لإلغاء كل التحسينات احذف سطر تحميله فقط.
   ========================================================= */

/* ١) حلقة تركيز واضحة لمن يتنقل بلوحة المفاتيح (إمكانية الوصول) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid #2b6cb0;
  outline-offset: 2px;
  border-radius: 8px;
}

/* ٢) احترام إعداد "تقليل الحركة" في الجوال */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ٣) واجهة العرض الرئيسية: نص أوضح فوق الصورة */
.hero-slide-overlay {
  background:
    linear-gradient(90deg, rgba(10,31,53,.94) 0%, rgba(10,31,53,.72) 45%, rgba(10,31,53,.40) 100%) !important;
}
.hero-slide-content h1,
.hero-slide-content h2,
.hero-slide-content p {
  text-shadow: 0 1px 12px rgba(0,0,0,.35);
}

/* نقاط التنقل: مساحة لمس أكبر وشكل أنظف */
.hero-dots { gap: 2px !important; align-items: center; }
.hero-dot {
  position: relative;
  width: 28px !important;
  height: 28px !important;
  background: transparent !important;
  transform: none !important;
}
.hero-dot::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255,255,255,.55);
  transition: width .25s ease, background-color .25s ease;
}
.hero-dot.active::before { width: 22px; background: #f7b733; }

/* إخفاء الأسهم والنقاط إذا كانت هناك شريحة واحدة فقط */
.hero-dots:has(.hero-dot:only-child) { display: none !important; }
.hero-slider:has(.hero-dot:only-child) .hero-arrow { display: none !important; }

@media (max-width: 700px) {
  /* على الجوال: طبقة داكنة موحدة حتى لا يتزاحم نص الصورة مع نص الصفحة */
  .hero-slide-overlay {
    background: linear-gradient(180deg, rgba(10,31,53,.80) 0%, rgba(10,31,53,.70) 55%, rgba(10,31,53,.86) 100%) !important;
  }
  /* الأسهم تغطي العنوان على الشاشة الصغيرة؛ السحب بالإصبع يغني عنها */
  .hero-arrow { display: none !important; }
  .hero-slide-content h1 { font-size: clamp(26px, 7.5vw, 34px) !important; line-height: 1.3 !important; }
  .hero-slide-content h2 { font-size: clamp(19px, 5.4vw, 24px) !important; line-height: 1.45 !important; }
  .hero-slide-content p  { font-size: 15px !important; line-height: 1.8 !important; }
}

/* ٤) أهداف لمس لا تقل عن 44 نقطة لروابط التنقل */
.nav-links a,
.main-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* ٥) رسالة تعذّر التحميل وزر إعادة المحاولة في صفحة المنتجات */
.catalog-notice {
  color: #173b63;
  font-weight: 500;
  line-height: 1.9;
}
.catalog-retry {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  margin: 14px auto 0;
  padding: 0 22px;
  border: 0;
  border-radius: 12px;
  background: #173b63;
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.catalog-retry:hover { background: #1e527f; }
