/* Add custom CSS styles below */ 


/* ضبط عرض المنتجات في الجوال */
@media (max-width: 768px) {
  .s-products-list-wrapper {
    gap: 12px !important;
  }

  .s-product-card-entry {
    padding: 8px !important;
  }

  .s-product-card-content-title a {
    font-size: 18px !important;
  }

  .s-product-card-price {
    font-size: 19px !important;
  }

  .s-product-card-image img {
    max-height: 220px !important;
  }

/* تثبيت كرت المنتج */
.s-product-card-entry,
.s-product-card-vertical,
.s-product-card-content {
  position: relative !important;
  overflow: visible !important;
}

/* نقل شارة الخصم فوق الغلاف */
.s-product-card-promotion-title,
.s-product-card-promotion,
.s-product-card-discount,
.s-product-card-sale-badge,
.s-product-card-image .s-product-card-promotion-title,
.s-product-card-image .s-product-card-discount,
[class*="promotion"],
[class*="discount"],
[class*="sale-badge"] {
  position: absolute !important;
  top: 12px !important;
  right: 12px !important;
  left: auto !important;
  z-index: 99999 !important;

  background: #ef4444 !important;
  color: #fff !important;
  font-size: 17px !important;
  font-weight: 700 !important;
  padding: 8px 11px !important;
  border-radius: 7px !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}



  /* 📚 تكبير الغلاف */
  .s-product-card-image {
    height: 170px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .s-product-card-image img {
    max-height: 160px !important;
    object-fit: contain !important;
  }

  /* 📦 حجم المنتج (2.5 تقريبًا) */
  .swiper-slide,
  .s-product-card {
    width: 42vw !important;
    min-width: 42vw !important;
    max-width: 42vw !important;
  }


  /* ✨ تحسين النص */
  .s-product-card-title {
    font-size: 12px !important;
    line-height: 1.4 !important;
  }


  /* 🟢 زر السلة */
  .btn--add-to-cart {
    height: 36px !important;
    font-size: 12px !important;
  }
/* زر إضافة للسلة */
.s-product-card__add-btn,
.s-product-card .s-button-btn,
button.s-button-btn {
  background-color: #16a34a !important;
  border-color: #16a34a !important;
  color: #fff !important;
}

/* الأيقونة داخل الزر */
.s-product-card__add-btn svg,
.s-product-card__add-btn i {
  color: #fff !important;
  fill: #fff !important;
}

/* لون البنفسجي من الهوية */
:root {
  --rs-purple: #8B5A78;
  --rs-green: #18a84f;
}

/* حواف كرت المنتج */
.s-product-card-entry {
  border: 3px solid var(--rs-purple) !important;
  border-radius: 14px !important;
  background: #fff !important;
  overflow: hidden !important;
  padding: 10px !important;
}

/* ضبط المسافة داخل الكرت */
.s-product-card-content {
  padding: 10px 8px !important;
}

/* زر إضافة للسلة كامل ومرتب */
.s-product-card-content-footer,
.s-product-card-content-footer button,
.s-product-card-content-footer .s-button-element {
  width: 100% !important;
}

.s-product-card-content-footer button,
.s-product-card-content-footer .s-button-element,
.s-button-primary {
  background: var(--rs-green) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 10px !important;
  height: 48px !important;
  min-height: 48px !important;
  padding: 0 8px !important;
  font-size: 15px !important;
  font-weight: 500 !important;
  white-space: nowrap !important;
  overflow: visible !important;
  line-height: 1 !important;
}

/* نص زر السلة */
.s-product-card-content-footer button span,
.s-product-card-content-footer .s-button-text {
  font-size: 15px !important;
  white-space: nowrap !important;
}

/* للجوال */
@media (max-width: 768px) {
  .s-product-card-entry {
    border: 2.5px solid var(--rs-purple) !important;
    border-radius: 13px !important;
    padding: 8px !important;
  }

  .s-product-card-content-footer button,
  .s-product-card-content-footer .s-button-element,
  .s-button-primary {
    font-size: 13px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 5px !important;
  }

  .s-product-card-content-footer button span,
  .s-product-card-content-footer .s-button-text {
    font-size: 13px !important;
  }
}
  
/* تكبير مساحة صورة المنتج */
.s-product-card-image{
    height: 290px !important;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
}
/* تكبير الغلاف */
.s-product-card-image img{
    max-height:270px !important;
    width:auto !important;
    object-fit:contain !important;
}

/* حذف الفراغ الكبير داخل كرت المنتج */
salla-product-card,
.s-product-card-entry {
  height: auto !important;
  min-height: auto !important;
}

.s-product-card-image,
.s-product-card-image a,
.s-product-card-image img,
.s-product-card-vertical .s-product-card-image {
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  aspect-ratio: unset !important;
}

/* حجم صورة الغلاف */
.s-product-card-image img {
  width: auto !important;
  height: 210px !important;
  max-height: 210px !important;
  object-fit: contain !important;
  margin: 0 auto !important;
  display: block !important;
}

/* حذف الفراغ بين الصورة والنص */
.s-product-card-content {
  padding-top: 5px !important;
  margin-top: 0 !important;
}

/* تقريب العنوان */
.s-product-card-content-title {
  margin-top: 0 !important;
  margin-bottom: 5px !important;
  min-height: auto !important;
}

/* تقليل ارتفاع العنوان */
.s-product-card-content-title a {
  line-height: 1.35 !important;
  min-height: auto !important;
}

/* تقريب اسم المؤلف والسعر */
.s-product-card-content-subtitle,
.s-product-card-price {
  margin-top: 4px !important;
  margin-bottom: 6px !important;
}

/* حذف المفضلة */
.s-product-card-wishlist-btn,
.s-product-card-wishlist,
button[aria-label*="المفضلة"],
button[aria-label*="wishlist"] {
  display: none !important;
}

/* توحيد ارتفاع عنوان الكتاب */
.s-product-card-content-title,
.s-product-card-content-title a,
.s-product-card-title {
    height: 70px !important;
    min-height: 70px !important;
    max-height: 70px !important;

    display: flex !important;
    align-items: center !important;
    justify-content: center !important;

    text-align: center !important;
    line-height: 1.35 !important;
    overflow: hidden !important;
}

/* توحيد مكان اسم المؤلف */
.s-product-card-content-subtitle,
.s-product-author {
    height: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    overflow: hidden !important;
}

/* توحيد مكان السعر */
.s-product-card-price {
    height: 35px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

/* الزر دائماً بأسفل الكرت */
.s-product-card-content {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

.s-product-card-content-footer {
    margin-top: auto !important;
}

/* إخفاء اسم المؤلف */
.s-product-card-content-subtitle,
.s-product-author,
.product-author,
[class*="author"]{
    display: none !important;
}

/* المنتج المخلص - ثيم رائد */
.s-product-card-out-of-stock {
  position: relative !important;
  overflow: hidden !important;
}

/* تعتيم صورة المنتج */
.s-product-card-out-of-stock .s-product-card-image {
  opacity: .45 !important;
  filter: grayscale(30%) !important;
}

/* ختم نفدت الكمية */
.s-product-card-out-of-stock::before {
  content: "نفدت الكمية";
  position: absolute;
  top: 33%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(-12deg);
  color: #c83a4a;
  border: 2px solid #c83a4a;
  background: rgba(255,255,255,.25);
  padding: 8px 28px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 800;
  z-index: 30;
  white-space: nowrap;
}

/* زر نفدت الكمية / أعلمني عند التوفر */
.s-product-card-out-of-stock button,
.s-product-card-out-of-stock .s-button-element {
  background: #1f1f1f !important;
  border-color: #1f1f1f !important;
  color: #fff !important;
  opacity: 1 !important;
}