/* Add custom CSS styles below */

/* Hide the legacy GetButton widget; retain the active Selia WhatsApp button. */
[id^="gb-widget-"]:has(a[href="https://wa.me/00966501158998"]) {
  display: none !important;
}

/* Reserve the actual proportions of the current homepage banners. */
.fixed-banner__image {
  aspect-ratio: auto 360 / 139;
}

/* Show customer conversation images in full. */
.reviews__author:has(.reviews__avatar[src*="/other/511117308/"]) { flex-direction: column; align-items: stretch; margin-left: 0; margin-right: 0; }
.reviews__avatar[src*="/other/511117308/"] { width: 100% !important; height: auto !important; max-height: none !important; object-fit: contain !important; border-radius: 0 !important; margin: 0 0 16px !important; }
/* Keep each conversation image directly below its excerpt. */
.reviews__card:has(.reviews__avatar[src*="/other/511117308/"]) { justify-content: flex-start; }
.reviews__card:has(.reviews__avatar[src*="/other/511117308/"]) .reviews__text { margin-bottom: 0; }
.reviews__author:has(.reviews__avatar[src*="/other/511117308/"]) { margin-top: 0; }

/* Keep reviewer names immediately below short reviews. */
.reviews__card { justify-content: flex-start; height: auto; }
.reviews__card .reviews__text { margin-bottom: 0; }
.reviews__card .reviews__author { margin-top: 0; align-items: flex-start; }

/* Let the displayed reviews determine the carousel height. */
.swiper-wrapper:has(> .review.swiper-slide-active) > .review { height: auto !important; align-self: flex-start; }
.review .reviews__card { height: auto !important; }
.swiper-wrapper:has(> .review.swiper-slide-active) > .review:not(.swiper-slide-active) { contain: size; }
@media (min-width: 640px) { .swiper-wrapper:has(> .review.swiper-slide-active) > .review.swiper-slide-next { contain: none; } }
@media (min-width: 960px) { .swiper-wrapper:has(> .review.swiper-slide-active) > .review.swiper-slide-next + .review { contain: none; } }

html:lang(ar):has(#details-slider-1703318957) #product-form::before { content: "عبوة ١ كيلو · تقييم مشترٍ موثّق في يوليو ٢٠٢٦: ٥ من ٥"; display: block; margin-block: .5rem; }
html:lang(ar):has(#details-slider-1703318957 .promotion-title) #product-form::before { content: "عبوة ١ كيلو · شحن مجاني · تقييم مشترٍ موثّق في يوليو ٢٠٢٦: ٥ من ٥"; }

/* Put native product details and live ratings beside the purchase controls. */
.product-single__info:has(> #product-form) { display: flex; flex-direction: column; }
.product-single__info > :has(~ #product-form) { order: -2; }
.product-single__info > :is(.product-entry__sub-title, salla-rating-stars, .product-single__tax-note) { order: -1; }
html:lang(ar):has(#details-slider-1703318957) #product-form::before { content: "عبوة كيلو واحد"; }
html:lang(ar):has(#details-slider-1703318957 .promotion-title) #product-form::before { content: "عبوة كيلو واحد · شحن مجاني"; }

.product-single__info > salla-cashback-banner:has(~ #product-form) { order: -1; }

.product-single__info > :is(.product-entry__sub-title, salla-rating-stars, .product-single__tax-note):has(~ #product-form) { order: -1; }

html:lang(ar) #product-form .product-single__price-label::after { content: "كاش باك ١٠٪ مع طرق الدفع المشمولة · الرصيد صالح لمدة ٣ أشهر من تاريخ إضافته"; display: block; font-size: .875rem; font-weight: normal; line-height: 1.5; }
html:lang(en) #product-form .product-single__price-label::after { content: "10% cashback with eligible payment methods. Credit is valid for 3 months from the date it is added."; display: block; font-size: .875rem; font-weight: normal; line-height: 1.5; }

html:lang(ar) .s-block--fixed-banner .container:has(> a.banner--fixed[href$="/p1564248943"])::before {
  content: "خلطة عسل رويال";
  display: block;
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.65rem;
}
html:lang(ar) .s-block--fixed-banner .container:has(> a.banner--fixed[href$="/p761823255"])::before {
  content: "مرهم رويال العشبي";
  display: block;
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: 0.65rem;
}
html:lang(ar) .s-block--fixed-banner .container:has(> a.banner--fixed[href$="/p1703318957"])::before,
html:lang(ar) .s-block--fixed-banner .container:has(> a.banner--fixed[href$="/p150295194"])::before {
  display: block;
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 700;
  margin-bottom: .65rem;
}
html:lang(ar) .s-block--fixed-banner .container:has(> a.banner--fixed[href$="/p1703318957"])::before { content: "عسل الشفاء رويال"; }
html:lang(ar) .s-block--fixed-banner .container:has(> a.banner--fixed[href$="/p150295194"])::before { content: "زيت رويال العشبي"; padding-top: 24px; }

#details-slider-1479977116 {
  width: min(86%, 50vh, 510px) !important;
  margin-inline: auto;
}
#details-slider-1479977116 .product-single__slide-image {
  object-fit: contain !important;
}

body.index .product-card__image { max-height: min(220px, 40vh) !important; }
body.index .product-card__image img { box-sizing: border-box; object-fit: contain !important; object-position: center; padding: 6px; }
body.index img.fixed-banner__image { max-height: 46vh !important; object-fit: contain !important; }
body.index img.reviews__avatar { max-height: 32vh !important; object-fit: contain !important; }

body.index .circle-links__image-wrap, body.index .circle-links__image-wrap img { border-radius: 0 !important; }
body.index .circle-links__image-wrap img { width: 76px !important; height: 76px !important; object-fit: contain !important; transform: none !important; }
body.index .banner--fixed, body.index .banner--fixed picture { display: block; height: auto !important; aspect-ratio: auto !important; }
body.index .banner--fixed img.fixed-banner__image { display: block; width: 86% !important; max-width: 740px; height: auto !important; max-height: 32vh !important; aspect-ratio: auto !important; margin-inline: auto; object-fit: contain !important; }
body.index .s-block--custom-products ~ .s-block--custom-products .product-card__image { max-height: min(165px, 28vh) !important; }

body.product-index .product-card__image { max-height: min(195px, 32vh) !important; }
body.product-index .product-card__image img { width: 100%; height: 100%; box-sizing: border-box; padding: 8px; object-fit: contain !important; object-position: center; transform: none !important; }
body.index .circle-links__image-wrap img { width: 88px !important; height: 88px !important; }