.s-product-card-promotion-title,
.s-product-card-entry .s-product-card-promotion-title {
  width: 25% !important;
  font-size: 0.5rem !important;
  position: absolute !important;
  right: 1rem !important;
  top: 1rem !important;
}

/* الفوتر - تم الإبقاء على display: none كما في الأصل */
custom-salla-product-card .s-product-card-content-footer {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  position: static !important;
  margin-top: 10px !important;
  transition: none !important;
}

.s-product-card-entry:hover .s-product-card-content-footer,
.s-products-slider-card:hover .s-product-card-content-footer {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

custom-salla-product-card salla-add-product-button {
  width: 100% !important;
  display: block !important;
  border-radius: 8px !important;
}

.s-product-card-content-footer * {
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* ============================================
   تنسيقات الهيدر والـ Navbar (تم دمج التكرارات)
   ============================================ */

.sand-store-header .sand-top-navbar {
  padding: 0 !important;
}

.sand-main-nav > div > div > div {
  justify-content: start !important;
}

#mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div {
  display: flex !important;
}

#mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div:nth-child(1) {
  order: 2 !important;
  gap: 0.2rem !important;
  justify-content: end !important;
}

#mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div:nth-child(2) {
  order: 1 !important;
  flex: 3 !important;
}

#mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div:nth-child(3) {
  order: 3 !important;
}

.top-navbar .header-search > salla-search > div {
  width: 34rem !important;
  max-width: 34rem !important;
}

.top-navbar > div > div > div.flex > div:nth-child(4) > button > i {
  position: absolute !important;
  left: 15% !important;
  top: 2rem !important;
}

/* أيقونة المستخدم */
.s-user-menu-trigger {
  position: absolute !important;
  left: 15% !important;
  top: 10% !important;
}

/* ============================================
   باقي تنسيقات المنتجات والتفاصيل (كما هي)
   ============================================ */

.s-product-card-entry .s-button-btn:hover .s-button-text {
  color: white !important;
}

.s-quick-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  padding-left: 10px;
  padding-right: 10px;
}

.s-product-card-sale-price span.s-discount-pill {
  text-decoration: unset !important;
}

.s-product-card-rating {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #f5f5f5;
  padding: 2px 6px;
  border-radius: 9999px;
  font-size: 11px;
  width: fit-content;
  margin: 0 !important;
}

.s-product-card-rating i {
  font-size: 11px;
}

.s-product-card-promotion-title {
  font-size: 0.5rem !important;
}

.s-product-card-image salla-button button,
.s-product-card-entry .s-product-card-wishlist-btn button {
  padding: 0.2rem !important;
  height: 2rem !important;
  width: 2rem !important;
}

.s-product-card-image > salla-button > button span i {
  font-size: 0.8rem !important;
}

/* وسوم الخصم */
.s-discount-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ffe3e3;
  color: #e02b2b;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 6px;
  margin-inline-start: 6px;
  border-radius: 9999px;
  direction: ltr;
}

.s-product-card-sale-price {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.s-product-card-sale-price span {
  font-size: 12px;
  order: 2;
}

.s-product-card-entry .s-product-card-image {
  flex: unset !important;
  aspect-ratio: 1/1 !important;
}

.s-quick-row {
  justify-content: flex-start !important;
  width: auto !important;
}

.s-cart-icon-wrap {
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  margin-inline-start: auto !important;
  margin-inline-end: 0 !important;
}

.s-cart-icon-wrap salla-add-product-button,
.s-cart-icon-wrap .s-button-wrap,
.s-cart-icon-wrap button,
.s-product-card-entry .s-button-btn {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px !important;
  border-radius: 9999px !important;
  padding: 0 !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background-color: var(--color-btn-card) !important;
  border: 1px solid #eee !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  opacity: 1 !important;
  visibility: visible !important;
}

/* اللون الأبيض للأوفر رايد - تم الإبقاء عليه كما طلبت */
.s-cart-icon-wrap .s-button-outline .s-button-text,
.s-cart-icon-wrap .s-button-outline i {
  color: #ffffff !important;
}

.s-cart-icon-wrap .s-button-text span {
  display: none !important;
}

.s-cart-icon-wrap .s-button-text i {
  font-size: 15px !important;
  color: #333;
}

.s-product-card-content-footer {
  display: none !important;  /* تم الإبقاء عليه كما في الأصل */
}

.s-product-card-content-sub,
.s-product-card-content-main {
  padding: 0 10px !important;
}

.s-cart-icon-wrap .s-button-outline:hover {
  background-color: var(--color-btn-hover-card) !important;
}

.s-cart-icon-wrap .s-button-outline:hover .s-button-text,
.s-cart-icon-wrap .s-button-outline:hover i {
  color: #ffffff !important;  /* اللون الأبيض عند التمرير أيضاً */
}

.s-button-primary-outline:hover {
  fill: #fff !important;
  color: #fff !important;
}

/* ============================================
   تنسيقات الـ Slider والعناوين
   ============================================ */

.s-products-slider-wrapper {
  margin-bottom: 0.8rem !important;
}

.s-block.s-block--best-offers {
  margin-top: 1rem !important;
}

.s-products-slider-card.swiper-slide {
  width: 250px !important;
  height: auto !important;
}

.s-slider-block__title-right h2 {
  font-size: 1.3rem !important;
}

.s-slider-block__display-all,
.s-slider-block__title-left a {
  font-size: 0.8rem !important;
}

.swiper .swiper-wrapper {
  padding-bottom: 0 !important;
  margin-bottom: 0 !important;
}

/* ============================================
   ترتيب محتوى صفحة المنتج
   ============================================ */

#main-content {
  display: flex !important;
  flex-direction: column !important;
}

#main-content > div.container.sand-related-products {
  order: 1 !important;
}

#main-content > salla-comments,
#main-content > salla-comments > div {
  order: 2 !important;
}

/* ============================================
   الشاشات المتوسطة (أقل من 1024px) - تم دمج التكرارات
   ============================================ */

@media (min-width: 1024px) {
  .s-user-menu-dropdown:where([dir="rtl"], [dir="rtl"] *) {
    left: unset !important;
  }
}

@media (max-width: 1024px) {
  .s-slider-block__title h2 {
    font-size: 22px !important;
  }

  .s-products-slider-card.swiper-slide {
    width: 180px !important;
    height: auto !important;
  }

  /* تنسيقات الهيدر للشاشات المتوسطة */
  #mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div:nth-child(1) {
    order: 2 !important;
    gap: 0rem !important;
    width: 100% !important;
    flex: 6 !important;
    padding: 0 !important;
    margin: 0 !important;
  }

  #mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div:nth-child(2) {
    order: 1 !important;
    flex: 1 !important;
    justify-content: start !important;
  }

  #mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div:nth-child(3) {
    order: 3 !important;
    flex: 1 !important;
  }

  .top-navbar .header-search > salla-search > div {
    width: 39rem !important;
    max-width: 39rem !important;
  }
}

/* ============================================
   الشاشات الصغيرة (أقل من 768px) - تم دمج التكرارات
   ============================================ */

@media (max-width: 768px) {
  /* تنسيقات الهيدر */
  #mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div.flex.justify-center {
    order: 2 !important;
    width: 4rem !important;
    justify-content: center !important;
    flex: 1 !important;
  }

  #mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div.flex.gap-4.items-center.justify-end {
    order: 3 !important;
    flex: 1 !important;
    gap: 1rem !important;  /* كانت 1 بدون وحدة، تم إصلاحها لتعمل */
    width: 100% !important;
    justify-content: center !important;
  }

  /* تنسيقات المنتجات */
  .s-product-card-content-title a {
    font-size: 0.8rem !important;
    height: 3.8rem !important;
    overflow: hidden !important;
  }

  .s-product-card-content-subtitle {
    font-size: 0.7rem !important;
  }

  .s-product-card-promotion-title,
  .s-product-card-entry .s-product-card-promotion-title {
    width: 35% !important;   /* تم دمج القيمة الصحيحة الخاصة بالجوال */
    right: 0.1rem !important;
    top: 0.5rem !important;
    font-size: 0.5rem !important;
  }

  .s-product-card-image salla-button button,
  .s-product-card-entry .s-product-card-wishlist-btn button {
    padding: 0.2rem !important;
  }

  .s-product-card-image > salla-button > button span i {
    font-size: 0.7rem !important;
  }

  /* تنسيقات العملة - تم دمج التكرار */
  .sand-currency {
    margin-left: 1rem !important;
  }
  .sand-currency,
  .sand-currency i,
  .sand-color-text {
    font-size: 10px !important;
    padding: 0 !important;
  }

  .s-product-card-entry .s-product-card-content {
    padding-bottom: unset !important;
  }
}@media (max-width: 768px){

#mainnav > div > div.top-navbar.sand-top-navbar.w-full > div{
display: flex !important;
padding: 0 !important;
margin: 0 !important;
flex: unset !important;
width: 100% !important;
justify-content: center !important;
align-items: center !important;
gap: 0 !important;
}
.s-user-menu-trigger .s-user-menu-avatar-wrap img{
width: 2rem !important;
height: 2rem !important;
}
.sand-currency, .sand-currency i, .sand-color-text{
font-size: 13px !important;
}
.sand-top-navbar.w-full > div > div > div.flex.items-center , #mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div:nth-child(1)  {
display: flex !important;
padding: 0 !important;
margin: 0 !important;
flex: unset !important;
width: 100% !important;
justify-content: start !important;
align-items: center !important;
}

#mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div > div.header-buttons.sand-header-buttons *{
font-size: 13px !important;
padding: 0 !important;
margin-right: 0 !important;
}
#mainnav > div > div.top-navbar.sand-top-navbar.w-full > div > div > div > div.header-buttons.sand-header-buttons{
margin-left: 2rem !important;		
}
}