/* ضبط شعار الهيدر بدون تمدد */
.header-logo img,
.navbar-brand img,
.logo img {
  width: auto !important;
  height: 30px !important;
  max-height: 42px !important;
  max-width: 185px !important;
  object-fit: contain !important;
}

/* ===== توسيط اللوجو في الموبايل فقط ===== */
@media (max-width: 1023px) {
  /* اجعل الصف الرئيسي نسبياً لإتاحة الـ absolute positioning */
  .main-nav-container .flex.items-stretch.justify-between {
    position: relative !important;
  }

  /* ضع اللوجو في المنتصف بشكل مطلق */
  a.navbar-brand {
    position: absolute !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
  }
}

/* مساحة الهيدر */
header,
.store-header,
.main-header {
  min-height: 72px !important;
}

/* عناوين الصفحات التعريفية */
.page-title,
.entry-title,
.section-title,
h1 {
    color: #111111 !important;
}
/* تصغير شعار الفوتر */
footer img,
.footer img {
  max-width: 220px !important;
  height: auto !important;
}

/* ===== إخفاء أيقونة البحث في الموبايل فقط ===== */
@media (max-width: 1023px) {

  /* إخفاء حاوية البحث في الشريط العلوي */
  .header-search {
    display: none !important;
  }

  /* إخفاء زر البحث في الـ main navbar */
  #mainnav button[aria-label="Search"],
  #mainnav salla-search,
  .store-header button[aria-label="Search"],
  header button[aria-label="Search"] {
    display: none !important;
  }

  /* إخفاء أيقونة البحث داخل salla-user-menu */
  salla-user-menu::part(search-trigger),
  salla-user-menu::part(search) {
    display: none !important;
  }
}

/* تعديل صفحة المنتج */
/* ===== وصف المنتج ===== */
#more-content {
  width: 100% !important;
  max-width: 100% !important;
  padding: 2rem 0 0 0 !important;
  box-sizing: border-box !important;
  display: block !important;
}

/* ===== الفواصل الذهبية ===== */
.product-description-separator {
  display: block !important;
  width: 80% !important;
  max-width: 700px !important;
  height: 3px !important;
  background-color: #fbbf04 !important;
  border: none !important;
  border-radius: 999px !important;
  margin: 2.5rem auto !important;
}

/* ===== محاذاة وصف المنتج ===== */
#more-content {
  width: 100% !important;
  max-width: 100% !important;
  padding: 2rem 0 0 0 !important;
  box-sizing: border-box !important;
  display: block !important;
  text-align: right !important;
  direction: rtl !important;
}

/* النصوص والعناوين والقوائم — محاذاة لليمين */
#more-content p,
#more-content h1,
#more-content h2,
#more-content h3,
#more-content h4,
#more-content ul,
#more-content ol,
#more-content li,
#more-content span,
#more-content div {
  text-align: right !important;
  direction: rtl !important;
  float: none !important;
}

/* الصور فقط — توسيط */
#more-content img {
  display: block !important;
  margin: 1.5rem auto !important;
  max-width: 100% !important;
  float: none !important;
}

/*انتهى*/

/*تعديل كروت المنتجات */
/* ===== كروت "منتجات قد تعجبك" — تحسين الشكل ===== */

/* الكارد نفسه */
#similar-slider salla-product-card,
#s-similar-products salla-product-card {
  --product-card-btn-bg: #fbbf04 !important;
  --product-card-btn-color: #000 !important;
  --product-card-btn-border: none !important;
  --product-card-btn-hover-bg: #e6ac00 !important;
}

/* إظهار الصورة داخل الكارد */
#similar-slider .swiper-slide img {
  display: block !important;
  width: 100% !important;
  height: 220px !important;
  object-fit: cover !important;
  border-radius: 12px 12px 0 0 !important;
}

/* زر إضافة للسلة — اجعله مثل الصفحة الرئيسية */
#similar-slider button,
#similar-slider [class*="add-to-cart"],
#similar-slider salla-add-product-button::part(base),
#similar-slider salla-add-product-button::part(button) {
  background-color: #fbbf04 !important;
  color: #000 !important;
  border: none !important;
  border-radius: 12px !important;
  width: 100% !important;
  padding: 12px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

/* إزالة الإطار الفارغ من الزر */
#similar-slider .s-product-card__add-btn,
#similar-slider [class*="cart-btn"] {
  background-color: #fbbf04 !important;
  border: none !important;
  color: #000 !important;
}
/*انتهى*/

/* ===== إصلاح صور نموذج التقييم في الوضع الأفقي ===== */

/* نموذج التقييم — منع تمدد الصور */
salla-rating-modal img,
[class*="rating-modal"] img,
[class*="review-modal"] img,
.salla-modal img,
dialog img {
  height: auto !important;
  max-height: 120px !important;
  width: auto !important;
  max-width: 100px !important;
  object-fit: contain !important;
}

/* في الوضع الأفقي تحديداً */
@media (max-height: 500px) and (orientation: landscape) {
  salla-rating-modal img,
  [class*="rating-modal"] img,
  [class*="review-modal"] img,
  .salla-modal img,
  dialog img {
    max-height: 70px !important;
    max-width: 70px !important;
  }

  /* تقليل حجم الـ modal نفسه */
  salla-rating-modal,
  [class*="rating-modal"],
  dialog[open] {
    max-height: 90vh !important;
    overflow-y: auto !important;
  }
}