/* ترتيب الهيدر */
.store-header {
  display: flex;
  flex-direction: column;
}

/* الصف الثاني */
#mainnav {
  order: 2;
}

/* الصف الثالث (الإعلان) */
salla-advertisement {
  display: block !important;
  width: 100% !important;
  margin: 0 !important;
  order: 3;
}

/* تنسيق الإعلان */
salla-advertisement .s-advertisement {
  text-align: center;
  font-weight: bold;
  border-radius: 0 !important;
}

salla-advertisement .s-advertisement-content {
  justify-content: center !important;
}

/* الصف الأول (لوغو + بحث + أيقونات) */
#mainnav .container .flex {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

/* البحث */
.header-search {
  flex: 1;
  max-width: 500px;
}

/* اللوغو */
.navbar-brand {
  flex-shrink: 0;
}

/* الأيقونات */
#mainnav .flex.items-center.justify-end {
  flex-shrink: 0;
  display: flex;
  gap: 10px;
}

/* تنظيف top-navbar */
.top-navbar {
  min-height: auto !important;
  padding: 5px 0 !important;
}

.top-navbar .container {
  gap: 0 !important;
}

.top-navbar:empty {
  display: none !important;
}

custom-main-menu {
    min-height: auto;
}

/* إزالة أي قيود */
.s-block--fixed-banner {
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  left: 0;
  position: relative;
}

/* إزالة أي padding داخلي */
.s-block--fixed-banner * {
  margin: 0 !important;
  padding: 0 !important;
}

/* البانر بدون ارتفاع ثابت */
.s-block--fixed-banner .banner {
  display: block;
  width: 100vw;
  height: auto !important;
}

/* الصورة كاملة بدون قص */
.s-block--fixed-banner img {
  width: 100%;
  height: auto !important;
  object-fit: contain !important;
  display: block;
}

/* كل البانرات ماعدا الأول */
.s-block--fixed-banner:not(:first-of-type) {
  margin: 20px !important;
  width: calc(100% - 40px);
  max-width: 100%;
}

/* الكارد */
.s-block--fixed-banner:not(:first-of-type) .banner {
  display: block;
  width: 100%;
  border-radius: 20px;
  overflow: hidden !important;
  position: relative;
}

/* الصورة */
.s-block--fixed-banner:not(:first-of-type) img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  object-fit: contain;
}

/* منع أي overflow */
.s-block--fixed-banner:not(:first-of-type) picture {
  display: block;
  width: 100%;
  overflow: hidden;
}

/* خلفية الفوتر */
.store-footer, .store-footer__inner {
  background: #00a8e8 !important; /* أزرق سماوي */
  color: #fff;
}

/* الشبكة: 3 أعمدة بدل 6 */
.store-footer .grid {
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 30px !important;
}

/* إزالة التمدد الزائد */
.store-footer .lg\:col-span-2 {
  grid-column: span 1 !important;
}

/* العناوين */
.store-footer h3 {
  color: #fff;
  margin-bottom: 10px;
}

/* الروابط */
.store-footer a {
  color: #fff !important;
  opacity: 0.9;
}

.store-footer a:hover {
  opacity: 1;
}

/* السوشال */
.s-social-list {
  display: flex;
  gap: 10px;
}

/* القسم السفلي */
.store-footer .copyright-text {
  color: #fff !important;
}

/* أيقونات الدفع */
.s-payments-list {
  justify-content: center;
}

/* موبايل */
@media (max-width: 767px) {

  /* كل قسم سطر لحالو */
  .store-footer .grid {
    grid-template-columns: 1fr !important;
    text-align: center;
  }

  /* توسيط كل العناصر */
  .store-footer .grid > div {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  /* السوشال بالنص */
  .s-social-list {
    justify-content: center !important;
  }

  /* الدفع بالنص */
  .s-payments-list {
    justify-content: center !important;
  }

  /* روابط الفوتر */
  .store-footer a {
    text-align: center;
  }

}


/* حل الانزياح */
html, body {
  overflow-x: hidden !important;
}

@media (max-width: 768px) {
  .header-search {
    display: none !important;
  }
}

/* موبايل + تابلت */
.s-block--features .grid {
  display: flex !important;
  flex-direction: column !important;
  gap: 16px;
}

/* لابتوب */
@media (min-width: 1024px) {
  .s-block--features .grid {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
  }
}

@media (max-width: 768px) {

  #best-offers-2-slider .swiper,
  #best-offers-4-slider .swiper {
    width: 100% !important;
    margin: 0 auto !important;
  }

  #best-offers-2-slider .swiper-wrapper,
  #best-offers-4-slider .swiper-wrapper {
    transform: translate3d(0,0,0) !important;
    gap: 0 !important;
  }

  /* 2 عناصر */
  #best-offers-2-slider .swiper-slide,
  #best-offers-4-slider .swiper-slide {
    width: 50% !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    padding: 0 !important;
  }

  /* الكرت */
  #best-offers-2-slider .s-product-card-entry,
  #best-offers-4-slider .s-product-card-entry {
    padding: 8px !important;
    min-height: auto !important;
  }

  #best-offers-2-slider .s-product-card-content,
  #best-offers-4-slider .s-product-card-content {
    padding: 6px !important;
  }

  /* الصورة */
  #best-offers-2-slider .s-product-card-image,
  #best-offers-4-slider .s-product-card-image {
    max-height: 140px !important;
    overflow: hidden !important;
  }

  #best-offers-2-slider .s-product-card-image img,
  #best-offers-4-slider .s-product-card-image img {
    width: 100% !important;
    height: auto !important;
    max-height: 140px !important;
    object-fit: cover !important;
  }

  /* العنوان */
  #best-offers-2-slider .s-product-card-content-title a,
  #best-offers-4-slider .s-product-card-content-title a {
    font-size: 13px !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
  }

  /* السعر */
  #best-offers-2-slider .s-product-card-price,
  #best-offers-4-slider .s-product-card-price {
    font-size: 14px !important;
  }

  /* الزر */
  #best-offers-2-slider .s-button-element,
  #best-offers-4-slider .s-button-element {
    padding: 6px !important;
    font-size: 12px !important;
  }

}