/* Add custom CSS styles below */
/* ----------------- Mobile Adjustments ----------------- */
@media (max-width: 768px) {
  /* إخفاء الفوتر والأيقونات */
  .s-offer-modal-footer,
  .s-offer-modal-remember-label,
  .s-offer-modal-header-icon {
    display: none !important;
  }

  /* توسيط الهيدر بالكامل */
  .s-offer-modal-header,
  .s-modal-header-inner,
  .s-modal-header-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  /* إزالة أي مسافات أو padding قد تمنع التوسيط */
  .s-modal-header-content {
    margin: 0 !important;
    padding: 0 !important;
  }

  /* تعديل السلايدر وبطاقات المنتج */
  .s-modal-body .s-products-slider-wrapper .swiper-wrapper {
    justify-content: center !important;
  }
  .s-modal-body .s-products-slider-wrapper .swiper-slide {
    width: auto !important;
    margin: 0 !important;
  }
  .s-modal-body .s-products-slider-wrapper custom-salla-product-card,
  .s-modal-body .s-products-slider-wrapper .product-card {
    max-width: 360px;
    width: 90% !important;
    margin-inline: auto !important;
    margin-bottom: 0 !important;
    margin-right: 14px !important;
  }
  .s-modal-body .s-slider-nav-arrow {
    display: none !important;
  }

  /* Adjust Product Titles */
  .product-single__info h1,
  .product-single__info h2 {
    text-align: center !important;
    margin: 0 auto !important;
    display: block !important;
    width: 100% !important;
  }

  salla-rating-stars {
    display: flex !important;
    justify-content: center !important;
    margin: 10px auto !important;
    width: 100% !important;
  }

  .product-price {
    justify-content: center; /* center all children horizontally */
  }

  .flex.flex-col.space-y-5.mb-5 {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    text-align: center !important;
    width: 100% !important;
  }

  small.text-store-text-secondary {
    text-align: center !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
  }

  ul.auto-fit-grid li img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 5px;
    object-fit: cover;
  }

  section:nth-of-type(n+3) {
    margin-top: 1rem;
  }
}

/* ----------------- Navbar ----------------- */
.navbar-brand img {
  width: 170px !important;
  height: auto !important;
}

/* ----------------- Larger Screens ----------------- */
@media (min-width: 768px) {
  .image-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 100%;
    padding: 20px;
  }

  .image-container a img {
    max-width: 160px;
    margin-bottom: 1rem;
  }

  .image-container img.main-image {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  .image-container .subtitle {
    font-weight: 400;
    font-size: 0.45rem;
    color: #333;
    margin-top: 1rem;
  }

  .w-full.md\:w-5\/12 {
    position: relative;
    left: 50%;
    transform: translateX(-50%);
    width: 100vw;
    max-width: 100vw;
    z-index: 1;
  }

  .w-full.md\:w-5\/12 img {
    width: 100%;
    height: auto;
    object-fit: cover;
    display: block;
  }
}

/* ----------------- Product Card Adjustments ----------------- */
.s-products-slider-card {
  margin: 0 8px;
}

.product-card__content-wrapper {
  padding: 8px 10px;
}

.product-card__normal-cart__btn button {
  padding: 6px 12px !important;
  font-size: 0.9rem !important;
}

.product-card__title {
  margin-bottom: 6px;
}

.product-card__subtitle {
  margin-bottom: 10px;
}

.product-card__promotion {
  background-color: #000 !important;
  color: #fff!important;
  padding: 2px 6px;
  font-size: 11px;
  border-radius: 3px;
}

/* ----------------- Headlines ----------------- */
#best-offers-2-slider {
  padding: 0 !important;
  margin: 0 !important;
  background: none !important;
}

/* ----------------- Comments Toggle Button ----------------- */
.comments-toggle-btn {
  background-color: black;
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 80px;
  cursor: pointer;
}

@media (max-width: 600px) {
  .comments-toggle-btn {
    padding: 10px 20px;
    width: 100%;
    box-sizing: border-box;
  }
}

/* ----------------- Reviews and Details ----------------- */
#reviews {
  background-color: #f7f7f7;
}

#details_table {
  font-size: 1rem !important;
  line-height: 1.8;
}

/* ----------------- Sliders ----------------- */
.s-block--photos-slider {
  transform: scale(0.8);
  transform-origin: center;
}

/* ----------------- Titles and Banners ----------------- */
h1 {
  font-weight: bold !important;
}

.fixed-banner--1 {
  margin-top: 15px !important;
}

#about-6 {
  padding-top: 0.1rem !important;
  padding-bottom: 0 !important;
}

.fixed-products--2 .home-block-title {
  display: none !important;
}
.home-block-title h2 {
  margin-top: 20px;
  margin-bottom: 30px;
}

/* ----------------- Store Header ----------------- */
.inner.bg-inherit {
  height: 60px !important;
  padding: 10px !important;
  display: flex;
  align-items: center;
}

/* ----------------- TamTab & Bottom Image ----------------- */
#TamTab {
  display: flex !important;
  gap: 8px;
  margin: 15px 0;
  justify-content: flex-end !important; /* الافتراضي للكمبيوتر: جهة اليمين */
  align-items: center !important;
  flex-wrap: nowrap !important;
  direction: ltr !important;
}

#TamTab img {
  max-width: 140px !important;
  height: auto !important;
  object-fit: contain !important;
}

/* للجوال فقط */
@media (max-width: 768px) {
  #TamTab {
    justify-content: center !important; /* الصور بالمنتصف */
    flex-wrap: wrap !important;         /* السماح بالسطور الجديدة إذا ضاقت الشاشة */
    gap: 5px;                            /* مسافة أصغر بين الصور للجوال */
  }

  #TamTab img {
    max-width: 160px !important;          /* تصغير الصور للجوال */
  }
}

/* ---------- Bottom Image والنص ---------- */
div#BottomImg,
#BottomImg {
  max-width: 70px;
  height: auto;
  vertical-align: middle;
  display: inline-block;
  margin-right: 10px;
}

/* ---------- الموبايل ---------- */
@media (max-width: 768px) {
  #BottomImg {
    max-width: 50px;
    margin-right: 8px;
  }
}

@media (max-width: 768px) {
  #BottomImg-container {
    justify-content: center; 
  }
}

.s-reviews-summary-header-section.s-reviews-summary-recommendation-only {
  display: none !important;
}

/* إخفاء السعر شامل الضريبة */
small.text-store-text-secondary.mb-3.block {
  display: none !important;
}

/* إخفاء أيقونات المشاركة + المفضلة */
.flex.items-center.justify-between.mb-5 {
  display: none !important;
}

.product-card__enhnaced-mini-cart__btn button {
  height: 40px !important;
}

nav.breadcrumbs {
  display: none !important;
}

.product-single__main-media {
  height: auto !important;
  overflow: visible !important;
}

.product-single__main-media img {
  width: 100% !important;
  height: auto !important;
  object-fit: contain !important;
  display: block;
  margin: 0 auto;
}

/* إخفاء قسم ملخص الطلب */
.flex.justify-between.text-sm.mb-5 {
  display: none;
}

@media (max-width: 768px) {
  .product-card__promotion {
    position: absolute !important;
    top: 0 !important;
    left: 0;
    right: 0;
    bottom: auto !important;
    z-index: 99;
  }
}

@media (min-width: 769px) {
  .product-card__promotion {
    right: 0;
    left: auto;
  }
}


#checkout-products-section {
  padding: 15px;
  background: #fff;
  border-radius: 10px;
  margin-top: 15px;
}

#checkout-products-section h2 {
  text-align: center;
  font-size: 22px;
  margin-bottom: 25px;

}