/* ============================================================
   GLOBAL RESET & BASE STYLES
   إعدادات أساسية لكل الصفحة
============================================================ */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  /* ===== متغيرات الألوان - عدّلها من هون بس ===== */
  --blue-dark:    #0d47a1;   /* الأزرق الداكن */
  --blue-main:    #1565c0;   /* الأزرق الرئيسي */
  --blue-mid:     #1976d2;   /* أزرق متوسط */
  --blue-light:   #1e88e5;   /* أزرق فاتح للتدرج */
  --white:        #ffffff;
  --white-soft:   rgba(255,255,255,0.15);
  --shadow-color: rgba(13, 71, 161, 0.35);

  /* ===== متغيرات الخط ===== */
  --font-main: 'Tajawal', sans-serif;

  /* ===== متغيرات الحجم ===== */
  --header-height: 70px;
  --border-radius-input: 30px;
  --border-radius-btn: 0 30px 30px 0; /* RTL: زاوية زر البحث */
}

body {
  font-family: var(--font-main);
  background: #f0f4f8;
  color: #222;
}

/* ============================================================
   SECTION 1 STYLES: MAIN HEADER
   ستايلات الهيدر الرئيسي
============================================================ */

/* --- 1. الهيدر الخارجي --- */
.main-header {
  /* تدرج أزرق مودرن من اليمين لليسار */
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 50%, var(--blue-light) 100%);
  height: var(--header-height);
  position: sticky;       /* يبقى فوق الصفحة عند التمرير */
  top: 0;
  z-index: 1000;
  box-shadow: 0 4px 20px var(--shadow-color);
}

/* --- 2. الحاوية الداخلية - تتحكم بالعرض والمحاذاة --- */
.header-container {
  max-width: 1300px;      /* الحد الأقصى للعرض - قابل للتعديل */
  width: 100%;
  height: 100%;
  margin: 0 auto;         /* توسيط أفقي */
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* --- 3A. اسم المتجر والشعار (يمين) --- */
.header-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;         /* لا يتقلص عند ضيق المساحة */
  text-decoration: none;
  cursor: pointer;
}

.brand-logo-placeholder {
  /* مكان مؤقت للشعار - سيُستبدل بـ <img> لاحقاً */
  width: 40px;
  height: 40px;
  background: var(--white-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: var(--white);
  border: 1px solid rgba(255,255,255,0.3);
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.5px;
  white-space: nowrap;    /* منع التفاف النص */
}

/* --- 3B. صندوق البحث (المنتصف) --- */
.header-search {
  flex: 1;                /* يأخذ كل المساحة المتبقية */
  min-width: 0;           /* يمنع overflow في Flexbox */
}

.search-wrapper {
  display: flex;
  align-items: center;
  background: var(--white);
  border-radius: var(--border-radius-input);
  overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  transition: box-shadow 0.2s ease;
}

.search-wrapper:focus-within {
  /* عند التركيز على صندوق البحث */
  box-shadow: 0 0 0 3px rgba(255,255,255,0.4), 0 2px 10px rgba(0,0,0,0.2);
}

.search-input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0 20px;
  height: 44px;
  font-size: 15px;
  font-family: var(--font-main);
  color: #333;
  background: transparent;
  direction: rtl;
}

.search-input::placeholder {
  color: #aaa;
}

.search-btn {
  /* زر أيقونة البحث داخل الصندوق */
  height: 44px;
  width: 52px;
  border: none;
  cursor: pointer;
  background: var(--blue-mid);
  color: var(--white);
  font-size: 16px;
  border-radius: var(--border-radius-btn);
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.search-btn:hover {
  background: var(--blue-dark);
}

/* --- 3C. أيقونات السلة والمفضلة (يسار) --- */
.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.action-btn {
  position: relative;
  width: 44px;
  height: 44px;
  border: none;
  cursor: pointer;
  background: var(--white-soft);
  color: var(--white);
  font-size: 20px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.15s ease;
  border: 1px solid rgba(255,255,255,0.2);
}

.action-btn:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}

/* عداد صغير فوق الأيقونة */
.action-badge {
  position: absolute;
  top: -6px;
  left: -6px;         /* RTL: فوق اليسار */
  background: #ff3d00;
  color: var(--white);
  font-size: 11px;
  font-weight: 700;
  min-width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
  border: 2px solid var(--blue-main);
  /* أخفِ العداد إذا كان 0 عبر JS */
}

/* ============================================================
   SECTION 2 STYLES: BANNER SLIDER
   ستايلات البانر الإعلاني المتحرك
============================================================ */

/* --- حاوية القسم كاملاً --- */
.banner-section {
  /* مسافة مناسبة من الهيدر */
  padding: 50px 0 20px;
  display: flex;
  justify-content: center;
}

/* --- الإطار الخارجي للبانر --- */
.banner-wrapper {
  position: relative;
  /* أقل من عرض الشاشة بقليل */
  width: min(92%, 1200px);
  /* ارتفاع عرضي مناسب للتصميم */
  height: 300px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.30);
  /* يمنع ظهور المحتوى خارج الحواف المستديرة */
  cursor: grab;
  user-select: none;
}

.banner-wrapper:active {
  cursor: grabbing;
}

/* --- المسار الداخلي الذي يتحرك --- */
.banner-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

/* --- كل شريحة --- */
.banner-slide {
  min-width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 40px 60px;
  position: relative;
  overflow: hidden;
}

/* خلفيات الشرائح - ألوان مختلفة لكل واحدة */
.slide-1 {
  background: linear-gradient(135deg, #0d47a1 0%, #1565c0 50%, #42a5f5 100%);
}

.slide-2 {
  background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 50%, #66bb6a 100%);
}

.slide-3 {
  background: linear-gradient(135deg, #4a148c 0%, #6a1b9a 50%, #ab47bc 100%);
}

/* زخرفة دائرية شفافة خلف الشريحة */
.banner-slide::before {
  content: '';
  position: absolute;
  width: 350px;
  height: 350px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  top: -80px;
  left: -60px;
  pointer-events: none;
}

.banner-slide::after {
  content: '';
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  bottom: -60px;
  right: 200px;
  pointer-events: none;
}

/* --- محتوى النص --- */
.slide-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 1;
  max-width: 60%;
}

.slide-tag {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 20px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.3);
  letter-spacing: 0.5px;
}

.slide-title {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

.slide-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.6;
}

.slide-subtitle strong {
  color: #fff;
  font-size: 18px;
}

.slide-btn {
  margin-top: 6px;
  padding: 10px 28px;
  background: #fff;
  border: none;
  border-radius: 30px;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 700;
  color: #1565c0;
  cursor: pointer;
  width: fit-content;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.slide-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* لون الزر حسب شريحة */
.slide-2 .slide-btn { color: #2e7d32; }
.slide-3 .slide-btn { color: #6a1b9a; }

/* --- الإيموجي / الصورة المؤقتة --- */
.slide-visual {
  font-size: 100px;
  z-index: 1;
  animation: floatVisual 3s ease-in-out infinite;
  flex-shrink: 0;
  line-height: 1;
}

@keyframes floatVisual {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-10px); }
}

/* --- أزرار السهم يمين/يسار --- */
.banner-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.3);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 10;
  opacity: 0;          /* مخفية افتراضياً */
}

/* تظهر عند تحويم الماوس على البانر */
.banner-wrapper:hover .banner-nav {
  opacity: 1;
}

.banner-nav:hover {
  background: rgba(255, 255, 255, 0.35);
}

.banner-prev { right: 16px; }
.banner-next { left: 16px; }

/* --- نقاط التنقل (Dots) --- */
.banner-dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  z-index: 10;
}

.banner-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, width 0.3s ease;
  padding: 0;
}

/* النقطة النشطة تكون بيضاء وأطول */
.banner-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

/* ============================================================
   RESPONSIVE: البانر على الجوال
============================================================ */
@media (max-width: 600px) {
  .banner-wrapper {
    height: 220px;
    border-radius: 16px;
  }

  .banner-slide {
    padding: 24px 28px;
  }

  .slide-title {
    font-size: 20px;
  }

  .slide-subtitle {
    font-size: 13px;
  }

  .slide-visual {
    font-size: 65px;
  }

  .slide-btn {
    font-size: 13px;
    padding: 8px 20px;
  }
}

/* ============================================================
   RESPONSIVE: شاشات صغيرة
============================================================ */



/* ============================================================
   SECTION 3 STYLES: CATEGORIES
   ستايلات قسم الفئات الدائرية
============================================================ */

/* --- الحاوية الخارجية للقسم --- */
.categories-section {
  padding: 40px 0 10px;
  display: flex;
  justify-content: center;
}

/* --- الحاوية الداخلية - توزيع الدوائر --- */
.categories-container {
  width: min(92%, 1200px);   /* نفس عرض البانر بالضبط */
  display: flex;
  justify-content: space-between;  /* توزيع متساوٍ */
  align-items: flex-start;
  gap: 12px;
  /* تمرير أفقي على الجوال */
  overflow-x: auto;
  padding-bottom: 8px;
  scrollbar-width: none;     /* إخفاء شريط التمرير Firefox */
}

/* إخفاء شريط التمرير Chrome */
.categories-container::-webkit-scrollbar {
  display: none;
}

/* --- كل عنصر فئة (دائرة + اسم) --- */
.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: 1;                   /* توزيع متساوٍ للعناصر */
  min-width: 110px;          /* حد أدنى للعرض على الجوال */
  cursor: pointer;
}

/* --- الدائرة نفسها --- */
.category-circle {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background-color: #f0f2f5;   /* لون الخلفية الرمادية الفاتحة */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  /* حدود خفيفة */
  border: 2px solid transparent;
}

/* تأثير hover على الدائرة */
.category-item:hover .category-circle {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(21, 101, 192, 0.15);
  border-color: #1976d2;
  background-color: #e8f0fe;
}

/* --- الصورة داخل الدائرة --- */
.category-circle img {
  width: 100%;          /* تملأ الدائرة بالكامل */
  height: 100%;
  object-fit: cover;    /* تغطي بدون تشويه */
  border-radius: 50%;   /* ← هاد هو الحل */
  transition: transform 0.25s ease;
}

/* تكبير خفيف للصورة عند hover */
.category-item:hover .category-circle img {
  transform: scale(1.08);
}

/* --- اسم الفئة تحت الدائرة --- */
.category-name {
  font-size: 14px;
  font-weight: 600;
  color: #333;
  text-align: center;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.category-item:hover .category-name {
  color: #1565c0;
}

/* ============================================================
   RESPONSIVE: الفئات على الجوال
============================================================ */
@media (max-width: 600px) {
  .categories-container {
    justify-content: flex-start;  /* تمرير بدلاً من توزيع */
    padding: 0 16px 12px;
  }

  .category-circle {
    width: 90px;
    height: 90px;
  }

  .category-name {
    font-size: 12px;
  }
}
@media (max-width: 600px) {
  .brand-name {
    display: none; /* اخفاء اسم المتجر على الجوال للتوفير */
  }
  .header-container {
    padding: 0 12px;
    gap: 10px;
  }
}
/* ============================================================
   SECTION 4 STYLES: PROMO BANNER (البانر الإعلاني الثابت)
============================================================ */

/* --- الحاوية الخارجية --- */
.promo-section {
  /* مسافة متوسطة من قسم الدوائر */
  padding: 40px 0 10px;
  display: flex;
  justify-content: center;
}

/* --- البانر نفسه --- */
.promo-banner {
  position: relative;
  width: min(92%, 1200px);   /* نفس عرض باقي الأقسام */
  height: 160px;             /* ارتفاع متوسط - عدّله حسب صورتك */
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.promo-banner:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.15);
}

/* --- الصورة داخل البانر --- */
.promo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;      /* تملأ البانر بالكامل بدون تشويه */
  object-position: center;
  display: block;
  border-radius: 18px;
}

/* --- طبقة احتياطية لو ما في صورة بعد --- */
.promo-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #ff6d3f, #ff9a40);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  /* تختفي تلقائياً لما الصورة تتحمل */
  z-index: -1;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
  .promo-banner {
    height: 110px;
    border-radius: 12px;
  }
}

/* ============================================================
   SECTION 5 STYLES: NEW ARRIVALS (وصل حديثاً)
============================================================ */

/* --- الحاوية الخارجية للقسم --- */
.arrivals-section {
  padding: 32px 0 20px;
  width: min(92%, 1200px);
  margin: 0 auto;
}

/* --- رأس القسم: العنوان + عرض الكل --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1565c0;       /* نفس أزرق الهيدر */
  border-radius: 10px 10px 0 0;
  padding: 14px 22px;
  margin-bottom: 0;
}

.section-title {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.section-viewall {
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  text-decoration: none;
  opacity: 0.85;
  transition: opacity 0.2s;
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding-bottom: 2px;
}

.section-viewall:hover {
  opacity: 1;
}

/* --- مسار البطاقات القابل للسحب --- */
.products-track {
  display: flex;
  gap: 0;                    /* البطاقات ملاصقة ببعض مثل الصورة */
  overflow-x: auto;
  cursor: grab;
  user-select: none;
  border: 1px solid #e0e0e0;
  border-top: none;
  border-radius: 0 0 10px 10px;
  background: #fff;
  scrollbar-width: none;
  padding: 0;
}

.products-track:active {
  cursor: grabbing;
}

.products-track::-webkit-scrollbar {
  display: none;
}

/* --- بطاقة المنتج الواحدة --- */
.product-card {
  min-width: 240px;          /* عرض البطاقة - عدّله حسب رأيك */
  max-width: 240px;
  display: flex;
  flex-direction: column;
  border-left: 1px solid #e8e8e8;   /* فاصل بين البطاقات */
  background: #fff;
  transition: background 0.2s ease;
  flex-shrink: 0;
}

.product-card:first-child {
  border-left: none;
}

.product-card:hover {
  background: #fafbff;
}

/* --- غلاف الصورة --- */
.product-img-wrap {
  position: relative;
  width: 100%;
  height: 200px;
  background: #f7f7f7;
  overflow: hidden;
  border-bottom: 1px solid #f0f0f0;
}

.product-img {
  width: 100%;
  height: 100%;
  object-fit: contain;       /* الصورة كاملة بدون قص */
  padding: 12px;
  transition: transform 0.3s ease;
}

.product-card:hover .product-img {
  transform: scale(1.05);
}

/* --- زر المفضلة فوق الصورة --- */
.product-wishlist {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #fff;
  color: #999;
  font-size: 15px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  transition: color 0.2s ease, transform 0.2s ease;
  opacity: 0;                /* مخفي - يظهر عند hover */
}

.product-card:hover .product-wishlist {
  opacity: 1;
}

.product-wishlist:hover {
  color: #e53935;
  transform: scale(1.15);
}

/* --- معلومات المنتج النصية --- */
.product-info {
  padding: 14px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}

.product-brand {
  font-size: 12px;
  color: #888;
  font-weight: 500;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.product-name {
  font-size: 14px;
  font-weight: 600;
  color: #222;
  line-height: 1.5;
  /* قطع النص بعد سطرين */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}

.product-price {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
  direction: ltr;
  text-align: right;
}

/* حالة المخزون */
.product-stock {
  font-size: 12px;
  font-weight: 600;
}

.product-stock.in-stock {
  color: #2e7d32;
}

.product-stock.out-of-stock {
  color: #c62828;
}

/* --- زر الإضافة للسلة --- */
.product-add-btn {
  margin-top: auto;          /* يلتصق بالأسفل دايماً */
  padding: 10px 12px;
  background: #1565c0;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transition: background 0.2s ease, transform 0.15s ease;
  width: 100%;
}

.product-add-btn:hover:not(:disabled) {
  background: #0d47a1;
  transform: translateY(-1px);
}

/* زر معطل عند نفاذ المخزون */
.product-add-btn:disabled {
  background: #bdbdbd;
  cursor: not-allowed;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
  .product-card {
    min-width: 175px;
    max-width: 175px;
  }

  .product-img-wrap {
    height: 150px;
  }

  .section-title {
    font-size: 18px;
  }
}


/* ============================================================
   SECTION 6 STYLES: MINI BANNERS
   بانرات صغيرة جانبية قابلة للسحب
============================================================ */

/* --- الحاوية الخارجية --- */
.mini-banners-section {
  padding: 28px 0 10px;
  width: min(92%, 1200px);
  margin: 0 auto;
}

/* --- المسار القابل للسحب --- */
.mini-banners-track {
  display: flex;
  gap: 14px;                 /* الفراغ بين البانرات */
  overflow-x: auto;
  cursor: grab;
  user-select: none;
  padding-bottom: 6px;
  scrollbar-width: none;
}

.mini-banners-track:active {
  cursor: grabbing;
}

.mini-banners-track::-webkit-scrollbar {
  display: none;
}

/* --- كل بانر --- */
.mini-banner-item {
  position: relative;
  /* عرض البانر: متوسط على صغير */
  min-width: 340px;
  max-width: 340px;
  height: 180px;
  flex-shrink: 0;
  overflow: hidden;
  /* حواف مستديرة من الأعلى فقط */
  border-radius: 16px 16px 0 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.mini-banner-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* --- الصورة داخل البانر --- */
.mini-banner-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
}

.mini-banner-item:hover img {
  transform: scale(1.04);
}

/* --- طبقة احتياطية لو ما في صورة --- */
.mini-banner-placeholder {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1565c0, #1e88e5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  z-index: -1;               /* تختفي لما الصورة تتحمل */
  text-align: center;
  padding: 16px;
}

/* ============================================================
   RESPONSIVE
============================================================ */
@media (max-width: 600px) {
  .mini-banner-item {
    min-width: 240px;
    max-width: 240px;
    height: 130px;
    border-radius: 12px 12px 0 0;
  }
}

/* ============================================================
   SECTION 7 STYLES: AD GRID (شبكة البانرات الإعلانية)
============================================================ */

/* --- الحاوية الخارجية --- */
.ad-grid-section {
  padding: 28px 0 10px;
  display: flex;
  justify-content: center;
}

/* --- الشبكة الرئيسية --- */
.ad-grid-wrapper {
  width: min(92%, 1200px);
  display: grid;
  /* عمودان: الأيسر يأخذ 2/3 والأيمن 1/3 */
  grid-template-columns: 2fr 1fr;
  gap: 14px;
}

/* --- المنطقة اليسرى --- */
.ad-grid-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* --- الصف السفلي في اليسار (بانران صغيران) --- */
.ad-grid-bottom {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* --- كل بانر --- */
.ad-banner {
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(0,0,0,0.08);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.ad-banner:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.13);
}

/* --- ارتفاعات البانرات --- */
.ad-banner--wide  { height: 220px; }   /* كبير أعلى اليسار */
.ad-banner--small { height: 180px; }   /* صغيران أسفل اليسار */
.ad-banner--tall  { height: 100%; min-height: 414px; }  /* طولي يمين */

/* --- الصورة داخل البانر --- */
.ad-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.3s ease;
  /* أضف هاد السطر ← */
  position: relative;
  z-index: 2;     /* الصورة فوق الـ placeholder لما تتحمل */
}
.ad-banner:hover img {
  transform: scale(1.04);
}

/* --- طبقة Placeholder لو ما في صورة --- */
.ad-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 24px;
  z-index: 1;     /* ← غيّر من -1 إلى 1 */
}
/* نص الـ placeholder */
.ad-ph-text {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  text-align: right;
}

.ad-ph-title {
  font-size: 22px;
  font-weight: 700;
  color: #1a237e;
  line-height: 1.3;
}

.ad-ph-sub {
  font-size: 14px;
  color: #37474f;
}

.ad-ph-sub strong {
  font-size: 20px;
  color: #1565c0;
  font-weight: 800;
}

.ad-ph-btn {
  margin-top: 4px;
  padding: 8px 20px;
  background: #f9c800;
  border: none;
  border-radius: 30px;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 700;
  color: #1a237e;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.12);
}

.ad-ph-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.18);
}

/* ============================================================
   RESPONSIVE: الشبكة على الجوال
============================================================ */
@media (max-width: 768px) {
  .ad-grid-wrapper {
    grid-template-columns: 1fr;   /* عمود واحد */
  }

  .ad-banner--tall {
    min-height: 200px;
  }

  .ad-banner--wide  { height: 180px; }
  .ad-banner--small { height: 150px; }
}

@media (max-width: 480px) {
  .ad-grid-bottom {
    grid-template-columns: 1fr;   /* بانر واحد بكل صف */
  }
}

/* ============================================================
   SECTION 8 STYLES: FOOTER
   ستايلات الفوتر الرئيسي
============================================================ */

/* --- الفوتر الخارجي --- */
.main-footer {
  /* نفس تدرج الهيدر بالضبط */
  background: linear-gradient(135deg, var(--blue-dark) 0%, var(--blue-mid) 50%, var(--blue-light) 100%);
  margin-top: 48px;
  padding-top: 52px;
}

/* --- الحاوية الداخلية - توزيع الأعمدة --- */
.footer-container {
  max-width: 1200px;
  width: min(92%, 1200px);
  margin: 0 auto;
  display: grid;
  /* 4 أعمدة: العلامة التجارية أعرض من الباقي */
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}

/* --- كل عمود --- */
.footer-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ====================================================
   العمود 1: البراند
==================================================== */
.footer-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.footer-logo {
  width: 40px;
  height: 40px;
  background: var(--white-soft);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.3);
  flex-shrink: 0;
}

.footer-brand-name {
  font-size: 20px;
  font-weight: 700;
  color: #fff;
}

.footer-desc {
  font-size: 13.5px;
  color: rgba(255,255,255,0.75);
  line-height: 1.8;
}

/* --- أيقونات السوشيال ميديا --- */
.footer-social {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.social-btn {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  color: #fff;
  text-decoration: none;
  transition: transform 0.2s ease, filter 0.2s ease;
  border: 1px solid rgba(255,255,255,0.25);
}

.social-btn:hover {
  transform: translateY(-3px);
  filter: brightness(1.2);
}

/* ألوان كل منصة */
.social-instagram { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); }
.social-facebook  { background: #1877f2; }
.social-whatsapp  { background: #25d366; }
.social-twitter   { background: #1da1f2; }
.social-tiktok    { background: #010101; }
.social-youtube   { background: #ff0000; }
/* لإضافة منصة جديدة: أضف class جديد بلونها هنا */

/* ====================================================
   الأعمدة 2 و 3 و 4: روابط وتواصل
==================================================== */

/* --- عنوان العمود --- */
.footer-col-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  padding-bottom: 10px;
  border-bottom: 2px solid rgba(255,255,255,0.2);
  position: relative;
}

/* خط أزرق فاتح تحت العنوان */
.footer-col-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  right: 0;
  width: 36px;
  height: 2px;
  background: rgba(255,255,255,0.7);
  border-radius: 2px;
}

/* --- قائمة الروابط --- */
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links li a {
  color: rgba(255,255,255,0.75);
  text-decoration: none;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
  transition: color 0.2s ease, gap 0.2s ease;
}

.footer-links li a::before {
  content: '←';
  font-size: 12px;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.footer-links li a:hover {
  color: #fff;
  gap: 10px;
}

.footer-links li a:hover::before {
  opacity: 1;
}

/* --- قائمة التواصل --- */
.footer-contact {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.footer-contact li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  line-height: 1.5;
}

.footer-contact li i {
  color: rgba(255,255,255,0.9);
  font-size: 15px;
  margin-top: 2px;
  flex-shrink: 0;
  width: 16px;
  text-align: center;
}

/* ====================================================
   شريط حقوق النشر السفلي
==================================================== */
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15);
  padding: 16px 0;
  background: rgba(0,0,0,0.15);
}

.footer-bottom-inner {
  max-width: 1200px;
  width: min(92%, 1200px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,0.65);
}

.footer-bottom-sep {
  opacity: 0.4;
}

/* ============================================================
   RESPONSIVE: الفوتر على الجوال
============================================================ */
@media (max-width: 900px) {
  .footer-container {
    grid-template-columns: 1fr 1fr;
    gap: 28px;
  }
}

@media (max-width: 500px) {
  .footer-container {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .footer-bottom-inner {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }
}