/**
 * ========================================
 * 1️⃣ إعدادات المتغيرات العامة
 * ========================================
 */
:root {
  --main-color: #bd9867; /* اللون الرئيسي للموقع - ذهبي */
}

/* تطبيق اللون الرئيسي على جميع روابط العروض */
a.offers-link * {
  color: var(--main-color) !important;
}

/* خلفية الموقع الأساسية */
body {
  background-color: #ffff !important; /* أبيض نقي */
}


/**
 * ========================================
 * 2️⃣ شريط التنقل العلوي (Header & Nav)
 * ========================================
 */

/* أيقونات المستخدم وسلة التسوق */
.main-nav-container i.header-btn__icon.sicon-user-circle,
.main-nav-container i.header-btn__icon.icon.sicon-shopping-bag {
  background-color: var(--main-color) !important;
  color: white; /* لون الأيقونة أبيض للتباين */
}

/* حاوية القائمة الرئيسية - تعديل الارتفاع */
custom-main-menu {
  height: fit-content;
  min-height: fit-content !important;
}

/* أيقونة القائمة (هامبرغر) */
i.sicon-menu.text-primary.text-2xl {
  color: #fff;
  width: 40px !important;
  height: 40px;
  padding: 2px;
  overflow: hidden;
  position: relative;
  border-radius: 50px; /* شكل دائري */
  background-color: var(--main-color) !important;
}

/* توسيط أيقونة الهامبرغر بدقة */
.sicon-menu:before {
  left: 50% !important;
  top: 50% !important;
  position: absolute;
  transform: translate(-50%, -50%);
}

/* شريط التنقل العلوي - خلفية داكنة */
.top-navbar {
  background-color: #000 !important;
  color: #fff;
}

/* عداد سلة التسوق */
.main-nav-container span.s-cart-summary-count {
  background-color: white;
  color: var(--main-color);
  border: 1px solid var(--main-color);
}

/* حقل البحث */
input.s-search-input {
  background-color: var(--main-color) !important;
  color: #ffff; /* نص أبيض */
}

/* نصPlaceholder داخل حقل البحث */
header input.s-search-input::placeholder {
  color: #fff;
}

/* أيقونة البحث (عدسة) */
header .s-search-input-wrapper svg {
  fill: #fff !important;
}

/* أزرار الهيدر الجانبية */
.header-buttons button.btn--rounded-gray.basis-0 {
  background-color: var(--main-color);
}


/**
 * ========================================
 * 3️⃣ تحسينات سطح المكتب (Media Query >= 992px)
 * ========================================
 */
@media (min-width: 992px) {
  
  /* تثبيت الهيدر في الصفحة الرئيسية */
  body.index header.store-header {
    position: absolute !important;
    z-index: 9 !important;
    top: 0 !important;
    right: 0 !important;
    left: 0 !important;
  }

  /* تحسين عرض السلايدر النشط - padding جانبي */
  body.index section:nth-child(3) .swiper-slide.swiper-slide-active {
    padding-inline: 6rem !important;
    width: 100% !important;
  }

  /* تحسين عرض سلايدر الصور */
  body.index section:nth-child(3) salla-slider.photos-slider .swiper-slide {
    padding-inline: 6rem !important;
    width: 100% !important;
  }

  /* 🎨 تغيير الشعار عند ظهور صورة محددة في السلايدر */
  body.index:has(.swiper-slide.swiper-slide-active img[src="https://cdn.files.salla.network/homepage/587942948/618e6b0a-e47c-48e4-b962-15069fe9104a.webp"]) 
  .main-nav-container a.navbar-brand img:not(.main-nav-container.fixed-header a.navbar-brand img) {
    content: url(https://img.imgdd.com/d7460a27-0481-400d-bc8a-d243e144305b.png);
  }

  /* خط فاصل أسفل النافبار */
  .top-navbar {
    border-bottom: 1px solid #fff;
    padding-bottom: 1.5rem;
  }

  /* جعل خلفية الهيدر شفافة في الصفحة الرئيسية */
  body.index .main-nav-container.shadow-default.bg-white {
    background-color: transparent !important;
    box-shadow: none;
  }

  /* عند التمرير: إعادة خلفية بيضاء للهيدر */
  body.index .main-nav-container.shadow-default.bg-white.fixed-pinned {
    background-color: #fff !important;
  }

  /* ألوان النصوص والأيقونات في الهيدر الشفاف */
  body.index .main-nav-container.shadow-default.bg-white ul li a span,
  body.index .top-navbar,
  body.index div#mainnav i.header-btn__icon.icon.sicon-shopping-bag,
  body.index div#mainnav i.header-btn__icon.sicon-user-circle {
    color: #fff;
  }

  /* عند التثبيت: تغيير لون الأيقونات للوضع الفاتح */
  body.index .main-nav-container.shadow-default.bg-white.fixed-pinned i.header-btn__icon.icon.sicon-shopping-bag,
  body.index .main-nav-container.shadow-default.bg-white.fixed-pinned i.header-btn__icon.sicon-user-circle {
    color: #202b47 !important;
  }

  /* عند التثبيت: تغيير لون روابط القائمة */
  body.index .main-nav-container.shadow-default.bg-white.fixed-pinned ul li a span {
    color: var(--main-color);
  }
}


/**
 * ========================================
 * 4️⃣ ألوان سلة التسوق الديناميكية
 * ========================================
 */
/* إجمالي السلة في الهيدر العادي */
.inner.bg-inherit.w-full .main-nav-container b.s-cart-summary-total {
  color: #fff !important;
}

/* إجمالي السلة عند تثبيت الهيدر */
div#mainnav.fixed-header .inner.bg-inherit.w-full .main-nav-container b.s-cart-summary-total {
  color: var(--main-color) !important;
}


/**
 * ========================================
 * 5️⃣ قسم السلايدر الرئيسي (Slider Block)
 * ========================================
 */
#main-content > section:nth-child(2) {
  margin-top: 0; /* إزالة الهوامش العلوية */
}

/* ضبط شرائح السلايدر */
body.index section:nth-child(2) .swiper-slide {
  padding: 0 !important;
  margin: 0 !important;
  width: 100% !important;
}

/* إزالة الحواف المستديرة من صور السلايدر */
body.index section:nth-child(2) .swiper-slide,
body.index section:nth-child(2) .swiper-slide img {
  border-radius: 0 !important;
}

/* إزالة padding من حاوية السلايدر */
section.s-block.s-block--photos-slider .swiper.s-slider-container {
  padding: 0 !important;
}

/* إخفاء أزرار التنقل في سلايدر الصور */
.home-slider.photos-slider .s-slider-block__title-nav {
  display: none !important;
}
/** ✅ نهاية قسم السلايدر ***/


/**
 * ========================================
 * 6️⃣ أقسام البانرات (Banners Blocks)
 * ========================================
 */
section#IRT__photos-slider-0 {
  margin-bottom: 0 !important;
}

/* إزالة الهوامش والحد الأقصى للعرض للبانرات */
section.s-block.s-block--fixed-banner.wide-placeholder > .container:not(
  section.s-block.s-block--fixed-banner.wide-placeholder:nth-child(4) > .container
) {
  padding: 0 !important;
  margin: 0 !important;
  max-width: unset !important;
}

/* إزالة border-radius من صور البانرات */
.banner--fixed img {
  border-radius: 0 !important;
}
/** ✅ نهاية قسم البانرات ***/


/**
 * ========================================
 * 7️⃣ بطاقات المنتجات (Product Cards)
 * ========================================
 */
custom-salla-product-card {
  border: 1px solid #dddd;
  transition: 0.5s !important; /* تأثير ناعم عند التحويم */
  overflow: hidden;
}

/* تأثير الرفع والظل عند تمرير الماوس على زر "أضف للسلة" */
body.index custom-salla-product-card:has(
  button.s-button-element.s-button-btn.s-button-outline.s-button-wide.s-button-primary-outline.s-button-loader-center:hover
) {
  transform: translateY(-10px); /* رفع البطاقة للأعلى */
  box-shadow: 3px 3px 5px 4px #ddd !important;
  border: 1px solid var(--main-color);
}

/* نفس التأثير للنسخة العامة */
custom-salla-product-card:has(
  button.s-button-element.s-button-btn.s-button-outline.s-button-wide.s-button-primary-outline.s-button-loader-center:hover
) {
  box-shadow: 3px 3px 5px 4px #ddd !important;
  border: 1px solid var(--main-color);
}

/* padding جانبي لسلايدر المنتجات */
body.index salla-products-slider.s-products-slider-wrapper.hydrated .swiper.s-slider-container {
  padding: 30px 0 !important;
}

/* تصميم الأزرار العامة */
button.s-button-element.s-button-btn.s-button-outline {
  background-color: var(--main-color);
  color: #fff !important;
  border: 1px solid #fff !important;
}

/* أزرار التنقل في السلايدر */
.s-slider-block__title-left button {
  background-color: var(--main-color);
  fill: #fff !important;
}
.s-slider-block__title-left button svg {
  fill: #fff !important;
}

/* خلفية محتوى بطاقة المنتج */
.s-product-card-content {
  background-color: #e2dede;
}


/**
 * ========================================
 * 8️⃣ تخطيط البانرات (Grid Layout)
 * ========================================
 */
section.s-block.s-block--banners.container .md\:grid-cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important; /* 3 أعمدة متساوية */
}


/**
 * ========================================
 * 9️⃣ تذييل الصفحة (Footer)
 * ========================================
 */
footer.store-footer {
  margin-top: 0;
  background-color: var(--main-color) !important;
}

.store-footer__inner {
  background-color: #e3dede !important;
}

footer h3 {
  color: var(--main-color) !important;
}

/* تحسينات الموبايل للفوتر */
@media (max-width: 992px) {
  footer.store-footer * {
    text-align: center;
    justify-content: center;
    align-items: center;
  }
  
  /* تحويل البانرات إلى تخطيط مرن للموبايل */
  section.s-block.s-block--banners.container .md\:grid-cols-3 {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
  }

  /* ضبط حجم روابط البانرات في الموبايل */
  section.s-block.s-block--banners.container .md\:grid-cols-3 a {
    flex-basis: 45%;
    height: 150px;
  }
}

/* إزالة padding العلوي للفوتر */
.store-footer__inner {
  padding-top: 0;
}

/* خلفية شفافة لروابط البانرات */
section.s-block.s-block--banners.container .md\:grid-cols-3 a {
  background-color: transparent;
}


img.img-top-footer {
    margin-top:3rem !important;
}