/* Add custom CSS styles below */ 

/* تحسين الهيدر العلوي للتوافق مع الجوال */
@media (max-width: 1023px) {
  header.store-header.nova-store-header {
    padding-left: 10px !important;
    padding-right: 10px !important;
    padding-top: 10px !important;
  }
  header.store-header.nova-store-header #mainnav.nova-main-nav-container {
    border-radius: 12px !important;
    padding: 8px 12px !important;
  }
  header.store-header.nova-store-header .flex.items-center.justify-between {
    gap: 8px !important;
  }
  header.store-header.nova-store-header .navbar-brand img {
    max-height: 46px !important;
    width: auto !important;
  }
  header.store-header.nova-store-header .header-btn__icon {
    padding: 6px !important;
    font-size: 18px !important;
  }
  header.store-header.nova-store-header .mburger {
    padding: 4px !important;
  }
}

/* تحسين الهيدر العلوي للتمدد */
header.store-header.nova-store-header {
  max-width: 100% !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  padding-top: 0 !important;
  left: 0 !important;
  right: 0 !important;
}

header.store-header.nova-store-header #mainnav.nova-main-nav-container {
  border-radius: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 5px 16px !important;
  box-shadow: none !important;
}

@media (min-width: 1024px) {
  header.store-header.nova-store-header #mainnav.nova-main-nav-container {
    padding: 5px 32px !important;
  }
}

/* عدم عرض ايقونة واتساب في صفحة سلة الشراء */
body.cart .whatsapp-icon, body.cart a:has(.whatsapp-icon) {
  display: none !important;
}

/* نقل وصف المنتج ليظهر أعلى عنصر الكاش باك */
@media (min-width: 768px) {
.nova-main-content {
    display: flex;
    flex-direction: column;
  }
.nova-main-content > div.product__description {
    order: -2;
  }
.nova-main-content > .s-cashback-banner-container {
    order: -1;
  }
}

/* للشاشات الصغيرة والجوال */
.nova-main-content {
  display: flex;
  flex-direction: column;
}
.nova-main-content > div.product__description {
  order: -2;
}
.nova-main-content > .s-cashback-banner-container {
  order: -1;
}

/* Patch 229 */
/* ترتيب عناصر صفحة المنتج بحيث يكون عنوان المنتج قبل وصف المنتج مباشرة */
@media (min-width: 768px) {
.nova-main-content {
    display: flex;
    flex-direction: column;
  }
  /* العنوان في الأعلى تماماً */
.nova-main-content > div:nth-child(2) {
    order: -6;
  }
  /* وصف المنتج يليه مباشرة */
.nova-main-content > div.product__description {
    order: -5;
  }
}

/* للشاشات الصغيرة والجوال */
.nova-main-content {
  display: flex;
  flex-direction: column;
}
.nova-main-content > div:nth-child(2) {
  order: -6;
}
.nova-main-content > div.product__description {
  order: -5;
}

/* Patch 232 */
/* ترتيب عناصر صفحة المنتج ليظهر السعر قبل الوصف مباشرة */
@media (min-width: 768px) {
.nova-main-content {
    display: flex;
    flex-direction: column;
  }
  /* قسم السعر (nova-price) */
.nova-main-content > div.nova-price {
    order: -3;
  }
  /* وصف المنتج يليه مباشرة */
.nova-main-content > div.product__description {
    order: -2;
  }
}

/* للشاشات الصغيرة والجوال */
.nova-main-content {
  display: flex;
  flex-direction: column;
}
.nova-main-content > div.nova-price {
  order: -3;
}
.nova-main-content > div.product__description {
  order: -2;
}


/* نقل قسم المنتجات المرتبطة (قد تعجبك) ليصبح قبل قسم التقييمات */
@media (min-width: 1px) {
  #app.product-single main#main-content {
    display: flex;
    flex-direction: column;
  }
  /* إعادة ترتيب عناصر الصفحة الرئيسية للمنتج */
  #app.product-single main#main-content > .container.nova-related-products {
    order: 4;
  }
  #app.product-single main#main-content > salla-comments {
    order: 5;
  }
  #app.product-single main#main-content > .s-blocks-wrapper.s-before-related {
    order: 3;
  }
  #app.product-single main#main-content > .s-blocks-wrapper.s-after-related {
    order: 6;
  }
}

/* قائمة الأقسام */
@media (max-width: 1023px) {
  header.store-header .mburger {
    display: inline-flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
    line-height: 1 !important;
  }

  header.store-header .mburger::after {
    content: "القائمة";
    font-size: 10px;
    font-weight: 500;
    margin-top: 2px;
    color: inherit;
    display: block;
    white-space: nowrap;
    line-height: 1;
  }
}

/* Patch 286 */
/* تنظيم وتوزيع العناصر في عناصر منفصلة تماماً لتجنب التداخل أو الحذف بالخطأ */
.main-content .mb-4.sm\:mb-6 {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 0.75rem !important;
}


/* قائمة فرز المنتجات */
#product-filter,
#product-filter-container,
.mb-4.sm\:mb-6 > div:has(#product-filter) {
  order: 3 !important;
}

/* اتجاه قائمة الفرز */
#product-filter,
#product-filter-container,
div:has(> #product-filter),
.mb-4.sm\:mb-6 > div:has(#product-filter) {
  margin-right: auto !important;
  margin-left: 0 !important;
  justify-content: flex-end !important;
  text-align: right !important;
}