/* خيارات التبرع المستقرة */
.msb-stable-options {
  display: block;
  width: 100%;
  margin: 12px 0;
  padding: 0 10px;
  direction: rtl;
  box-sizing: border-box;
  position: relative;
}

.msb-stable-title {
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 12px;
}

.msb-stable-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.msb-stable-share {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 39px;
  padding: 8px 5px;
  background: #fff;
  color: #283245;
  border: 1px solid #cbd5e1;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.msb-stable-share:last-child {
  grid-column: 1 / -1;
}

.msb-stable-share.is-active {
  background: #367fbe;
  border-color: #367fbe;
  color: #fff;
}

.msb-stable-share:focus-visible {
  outline: 2px solid #367fbe;
  outline-offset: 2px;
}



/* لون السهم عند التحديد */
.msb-stable-share.is-active,
.msb-stable-share[aria-pressed="true"] {
  background: #226E45 !important;
  border-color: #226E45 !important;
  color: #ffffff !important;
}

/* لون السهم عند تمرير الماوس */
.msb-stable-share:hover {
  background: #226E45 !important;
  border-color: #226E45 !important;
  color: #ffffff !important;
}

/* لون إطار التركيز */
.msb-stable-share:focus-visible {
  outline: 2px solid #226E45 !important;
  outline-offset: 2px;
}







/* تنسيق اسم المنتج وتوسيطه */
custom-salla-product-card .product-entry__title,
custom-salla-product-card .product-entry__title a,
salla-product-card .s-product-card-content-title,
salla-product-card .s-product-card-content-title a {
    font-size: 18px !important;
    font-weight: 800 !important;
    text-align: center !important;
    color: #226E45 !important;
    line-height: 1.7 !important;
    display: block !important;
    width: 100% !important;
    margin: 0 auto !important;
}

/* توسيط حاوية عنوان المنتج */
salla-product-card .s-product-card-content-main,
custom-salla-product-card .product-entry__content {
    text-align: center !important;
}

/* ضبط حجم العنوان على الجوال */
@media (max-width: 480px) {
    custom-salla-product-card .product-entry__title,
    custom-salla-product-card .product-entry__title a,
    salla-product-card .s-product-card-content-title,
    salla-product-card .s-product-card-content-title a {
        font-size: 16px !important;
    }
}





/* العنوان الفرعي أسفل اسم المنتج */
.msb-product-subtitle {
    display: block;
    width: 100%;
    font-size: 13px !important;
    font-weight: 400 !important;
    color: #808080 !important;
    text-align: center !important;
    line-height: 1.8 !important;
    margin: 5px auto 15px !important;
    padding: 0 10px;
    box-sizing: border-box;
}

/* ضبط الجوال */
@media (max-width: 480px) {
    .msb-product-subtitle {
        font-size: 12px !important;
    }
}


/* إخفاء عبارة اختر سهم المساهمة */
.msb-stable-title {
    display: none !important;
}








/* توحيد مساحة صور المنتجات */
custom-salla-product-card .product-entry__image,
salla-product-card .s-product-card-image {
    width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    height: auto !important;
    overflow: hidden !important;
    position: relative !important;
    background-color: #ffffff !important;
}

/* إظهار الصورة كاملة دون قص أو تشويه */
custom-salla-product-card .product-entry__image > a,
salla-product-card .s-product-card-image > a {
    display: flex !important;
    width: 100% !important;
    height: 100% !important;
    align-items: center !important;
    justify-content: center !important;
}

/* توحيد أبعاد الصور الفعلية */
custom-salla-product-card .product-entry__image img,
salla-product-card .s-product-card-image img {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
    object-position: center center !important;
    aspect-ratio: auto !important;
    transform: none !important;
}

/* منع تجاوز الصورة حدود البطاقة */
custom-salla-product-card,
salla-product-card {
    overflow: hidden;
}





/* إخفاء العنوان الفرعي المضاف بالكود السابق */
.msb-product-subtitle {
    display: none !important;
}



/* صورة المنتج كاملة - قالب عطاء */

@media (max-width: 767px) {

    /* حاوية معرض الصور */
    .swiper:has(a[data-fslightbox^="product_"]) {
        width: 100% !important;
        height: auto !important;
        max-height: none !important;
    }

    /* ضبط ارتفاع شرائح الصور */
    .swiper-wrapper:has(a[data-fslightbox^="product_"]) {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
        align-items: flex-start !important;
    }

    .swiper-slide:has(> a[data-fslightbox^="product_"]) {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;
    }

    /* رابط الصورة */
    .swiper-slide > a[data-fslightbox^="product_"] {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        padding: 0 !important;
    }

    /* إظهار الصورة كاملة */
    .swiper-slide > a[data-fslightbox^="product_"] > img {
        display: block !important;
        width: 100% !important;
        height: auto !important;
        max-width: 100% !important;
        max-height: none !important;
        aspect-ratio: auto !important;
        object-fit: contain !important;
        object-position: center !important;
        border-radius: 0 !important;
    }

    /* إلغاء احتمالية قص تفاصيل المنتج */
    .product-single {
        height: auto !important;
        max-height: none !important;
    }
}



/* فصل معلومات المنتج عن الصورة - قالب عطاء */
@media (max-width: 767px) {

    /* حاوية معلومات المنتج */
    .main-content:has(> div > h1) {
        position: relative !important;
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        max-height: none !important;
        overflow: visible !important;
        margin-top: 0 !important;
        padding-top: 180px !important;
        transform: none !important;
    }

    /* اسم المنتج والعنوان الفرعي */
    .main-content > div:has(> h1) {
        position: relative !important;
        display: block !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        transform: none !important;
        visibility: visible !important;
        opacity: 1 !important;
    }

    /* اسم المنتج */
    .main-content > div > h1 {
        position: static !important;
        display: block !important;
        margin: 0 0 8px !important;
        font-size: 24px !important;
        font-weight: 700 !important;
        color: #111827 !important;
        line-height: 1.5 !important;
    }

    /* العنوان الفرعي */
    .main-content .product-entry__sub-title {
        position: static !important;
        display: block !important;
        margin: 0 !important;
        font-size: 15px !important;
        line-height: 1.8 !important;
        color: #64748b !important;
    }
}






/* إخفاء المفضلة والمشاركة من صفحة المنتج */

.main-content .share-rate-area {
    display: none !important;
}



/* إخفاء عناصر غير مطلوبة من صفحة المنتج */

.main-content .installment-wrap,
.main-content salla-cashback-banner,
.main-content .s-block--bundle-out-of-stock-alternative,
.main-content salla-quick-order {
    display: none !important;
}




/* تكبير عدد مرات التبرع */

.main-content .flex.text-sm.leading-none.mt-3 > div {
    font-size: 16px !important;
    font-weight: 600 !important;
    line-height: 1.8 !important;
}

/* تكبير أيقونة النار */
.main-content .flex.text-sm.leading-none.mt-3 .sicon-fire {
    font-size: 16px !important;
    color: #ef4444 !important;
}

/* إبراز عدد التبرعات */
.main-content .flex.text-sm.leading-none.mt-3 .text-primary {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: #16803c !important;
}





/* =========================================
   جمعية مصابيح - تصميم خيارات مبلغ التبرع
   ========================================= */

/* نطاق خيارات التبرع فقط */
salla-product-options
.s-product-options-option[data-option-type="donation"] {
    --donation-green: #16803c;
    --donation-light: #f0fdf4;
    --donation-border: #e2e8f0;
}

/* عنوان اختيار المبلغ */
salla-product-options
.s-product-options-option[data-option-type="donation"]
.s-product-options-option-label {
    display: block !important;
    margin-bottom: 14px !important;
    font-size: 19px !important;
    font-weight: 700 !important;
    color: #163b29 !important;
}

/* الوصف المساعد */
salla-product-options
.s-product-options-option[data-option-type="donation"]
.s-product-options-option-label small {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    font-weight: 400;
    color: #64748b;
}

/* تنسيق شبكة الخيارات */
salla-product-options
.s-product-options-donation-options {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px !important;
    width: 100%;
    margin: 12px 0 16px !important;
}

/* بطاقة المبلغ */
salla-product-options
.s-product-options-donation-options-item {
    position: relative;
    min-width: 0;
    margin: 0 !important;
}

/* إخفاء الراديو بصرياً مع بقائه فعالاً */
salla-product-options
.s-product-options-donation-options-item input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    width: 1px !important;
    height: 1px !important;
}

/* شكل البطاقة */
salla-product-options
.s-product-options-donation-options-item label {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    width: 100% !important;
    min-height: 68px !important;
    height: 100% !important;
    padding: 12px 6px !important;
    margin: 0 !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 13px !important;
    background: #ffffff !important;
    color: #26352d !important;
    font-size: 18px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background .2s, border-color .2s,
                box-shadow .2s !important;
    box-sizing: border-box !important;
}

/* أيقونة الريال */
salla-product-options
.s-product-options-donation-options-item
label .sicon-sar {
    font-size: 15px !important;
    margin-inline-start: 3px;
}

/* البطاقة المختارة */
salla-product-options
.s-product-options-donation-options-item
input[type="radio"]:checked + label {
    background: #f0fdf4 !important;
    border: 2px solid #16803c !important;
    color: #16803c !important;
    box-shadow: 0 0 0 2px rgba(22,128,60,.07);
}

/* مؤشر لوحة المفاتيح */
salla-product-options
.s-product-options-donation-options-item
input[type="radio"]:focus-visible + label {
    outline: 3px solid #86efac !important;
    outline-offset: 2px;
}

/* تأثير المرور بالماوس */
@media (hover: hover) {
    salla-product-options
    .s-product-options-donation-options-item
    label:hover {
        border-color: #16803c !important;
        background: #f7fdf9 !important;
    }
}

/* خيار إدخال مبلغ آخر */
salla-product-options
.s-product-options-donation-options-item
input[value="custom"] + label {
    font-size: 14px !important;
    font-weight: 600 !important;
}

/* تنسيق حقل المبلغ المخصص */
salla-product-options
.s-product-options-donation-input-group {
    position: relative;
    margin-top: 12px !important;
}

salla-product-options
.s-product-options-donation-input-group input {
    width: 100% !important;
    min-height: 50px !important;
    border: 1.5px solid #d1d5db !important;
    border-radius: 12px !important;
    background: #fff !important;
    font-size: 16px !important;
    padding: 12px 16px !important;
    transition: border-color .2s !important;
}

salla-product-options
.s-product-options-donation-input-group input:focus {
    border-color: #16803c !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(22,128,60,.1);
}

/* تنسيق الجوال الصغير */
@media (max-width: 360px) {
    salla-product-options
    .s-product-options-donation-options {
        gap: 3px !important;
    }

    salla-product-options
    .s-product-options-donation-options-item label {
        min-height: 60px !important;
        font-size: 16px !important;
        padding: 9px 4px !important;
    }
}





/* توسيط عنوان التبرع */
salla-product-options
.s-product-options-option[data-option-type="donation"]
.s-product-options-option-label {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    text-align: center !important;
    margin-bottom: 18px !important;
}

/* تنسيق العبارة الرئيسية */
salla-product-options
.s-product-options-option[data-option-type="donation"]
.s-product-options-option-label b {
    font-size: 21px !important;
    font-weight: 800 !important;
    line-height: 1.7 !important;
    color: #16803c !important;
    text-align: center !important;
}

/* حذف الوصف أسفل العنوان */
salla-product-options
.s-product-options-option[data-option-type="donation"]
.s-product-options-option-label small {
    display: none !important;
}

/* إخفاء العبارة الزائدة فوق المبالغ */
salla-product-options
.s-product-options-option[data-option-type="donation"]
.s-product-options-donation-wrapper > p[role="status"] {
    display: none !important;
}

/* تحسين عرض خيار المبلغ المخصص */
salla-product-options
.s-product-options-donation-options-item
input[value="custom"] + label {
    font-size: 13px !important;
    font-weight: 700 !important;
    text-align: center !important;
}





/* إخفاء رقم الموديل من صفحة المنتج */

.details-list__item:has(.sicon-barcode) {
    display: none !important;
}

/* إخفاء الحاوية إذا أصبحت فارغة */
.details-list:empty {
    display: none !important;
}


.details-list:has(> .details-list__item:only-child > .details-list__item-label .sicon-barcode) {
    display: none !important;
}




/* تغيير عنوان منتجات مشابهة إلى مشاريع مشابهة */

h2.similar-products__title {
    font-size: 0 !important;
    line-height: 1.5 !important;
}

/* إظهار العنوان الجديد */
h2.similar-products__title::after {
    content: "مشاريع مشابهة" !important;
    display: block !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    color: #333333 !important;
}

/* حجم الخط على الجوال */
@media (max-width: 767px) {
    h2.similar-products__title::after {
        font-size: 24px !important;
    }
}





/* تغيير عنوان العملاء اشتروا أيضًا */

h2.customers-also-bought__title {
    font-size: 0 !important;
}

/* العنوان الجديد */
h2.customers-also-bought__title::after {
    content: "المتبرعون تبرعوا أيضًا" !important;
    display: block !important;
    font-size: 30px !important;
    font-weight: 700 !important;
    line-height: 1.6 !important;
    color: #333333 !important;
}

/* تصغير الخط على الجوال */
@media (max-width: 767px) {
    h2.customers-also-bought__title::after {
        font-size: 24px !important;
    }
}






/* =========================================
   جمعية مصابيح | تحسين تذييل المتجر
   ========================================= */

/* الشبكة الرئيسية للتذييل */
footer .grid-cols-12:has(.about-store) {
    display: grid !important;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: 24px !important;
    row-gap: 24px !important;
    align-items: start !important;
}

/* ضبط جميع الأقسام */
footer .grid-cols-12:has(.about-store) > div {
    min-width: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* عنوان كل قسم */
footer .footer-title,
footer .s-contacts-title {
    font-size: 17px !important;
    font-weight: 700 !important;
    line-height: 1.5 !important;
    color: #246638 !important;
    margin: 0 0 12px !important;
    padding: 0 0 8px !important;
    border-bottom: 1px solid #e5e7eb;
}

/* وصف الجمعية */
footer .about-store {
    gap: 0 !important;
}

footer .about-store p {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    color: #555f59 !important;
    font-size: 30px !important;
    font-weight: 400 !important;
    line-height: 1.9 !important;
    text-align: right !important;
}

/* إزالة الفقرات الفارغة */
footer .about-store p:empty {
    display: none !important;
}

/* روابط حسابي */
footer .s-user-menu-inline {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    margin: 0 !important;
    padding: 0 !important;
}

footer .s-user-menu-dropdown-item {
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
}

footer .s-user-menu-dropdown-item-link {
    display: flex !important;
    align-items: center !important;
    gap: 9px !important;
    padding: 5px 0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    color: #4b5563 !important;
    text-decoration: none !important;
    transition: color .2s ease;
}

/* أيقونات حسابي */
footer .s-user-menu-dropdown-item-prefix,
footer .s-user-menu-dropdown-item-prefix svg {
    width: 17px !important;
    height: 17px !important;
    flex-shrink: 0 !important;
}

/* قائمة الروابط المهمة */
footer .s-menu-footer-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 7px !important;
}

footer .s-menu-footer-item {
    display: block !important;
    margin: 0 !important;
    padding: 4px 0 !important;
    color: #4b5563 !important;
    font-size: 14px !important;
    line-height: 1.7 !important;
    text-decoration: none !important;
}

/* التواصل */
footer .s-contacts-list {
    display: flex !important;
    flex-direction: column !important;
    gap: 8px !important;
}

footer .s-contacts-item {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 4px 0 !important;
    font-size: 14px !important;
}

footer .s-contacts-icon svg {
    width: 19px !important;
    height: 19px !important;
}

/* تأثير التفاعل */
@media (hover: hover) {
    footer .s-user-menu-dropdown-item-link:hover,
    footer .s-menu-footer-item:hover,
    footer .s-contacts-item:hover {
        color: #16803c !important;
    }
}

/* =========================================
   الكمبيوتر
   ========================================= */
@media (min-width: 1024px) {
    footer .grid-cols-12:has(.about-store) {
        column-gap: 26px !important;
        row-gap: 18px !important;
    }
}

/* =========================================
   الأجهزة اللوحية
   ========================================= */
@media (min-width: 640px) and (max-width: 1023px) {
    footer .grid-cols-12:has(.about-store) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 24px !important;
    }

    footer .grid-cols-12:has(.about-store) > div {
        grid-column: auto !important;
    }
}

/* =========================================
   الجوال
   ========================================= */
@media (max-width: 639px) {

    /* عمودان لتقليل طول الفوتر */
    footer .grid-cols-12:has(.about-store) {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 16px !important;
        row-gap: 22px !important;
    }

    /* قسم عن الجمعية بعرض كامل */
    footer .about-store {
        grid-column: 1 / -1 !important;
    }

    /* إزالة امتداد الأعمدة الأصلي */
    footer .grid-cols-12:has(.about-store)
    > div:not(.about-store) {
        grid-column: auto !important;
    }

    /* إبقاء تواصل معنا بعرض كامل */
    footer .grid-cols-12:has(.about-store)
    > div:has(> salla-contacts) {
        grid-column: 1 / -1 !important;
    }

    /* إخفاء عمود التطبيقات الفارغ فقط */
    footer .grid-cols-12:has(.about-store)
    > div:has(> salla-apps-icons:only-child) {
        grid-column: 1 / -1 !important;
    }

    footer .footer-title,
    footer .s-contacts-title {
        font-size: 16px !important;
        margin-bottom: 9px !important;
        padding-bottom: 7px !important;
    }

    footer .about-store p {
        font-size: 13px !important;
        line-height: 1.8 !important;
    }

    footer .s-user-menu-dropdown-item-link,
    footer .s-menu-footer-item {
        font-size: 13px !important;
        line-height: 1.6 !important;
    }

    footer .s-user-menu-inline,
    footer .s-menu-footer-list {
        gap: 4px !important;
    }
}




/* إخفاء قسم اطلبها مجدداً بالكامل */

#reorder-section {
    display: none !important;
}