/* 1. منع الكروت من التأثير على حجم الصور العلوية وتثبيت شبكة المنتجات */
.s-products-list-wrapper, 
.s-products-list-vertical-cards {
    display: grid !important;
    align-items: stretch !important;
}

custom-salla-product-card, 
.s-product-card-entry {
    display: flex !important;
    flex-direction: column !important;
    height: 100% !important;
}

/* 2. تثبيت مساحة منطقة النصوص بالكامل (الفورم) لحماية حجم الصورة */
form.s-product-card-content {
    display: flex !important;
    flex-direction: column !important;
    justify-content: space-between !important;
    height: 235px !important; /* ارتفاع ثابت ومثالي يتسع لجميع العناصر دون ضغط الصورة */
    min-height: 235px !important;
    max-height: 235px !important;
    overflow: hidden !important; /* قص أي محتوى يفيض لمنع تفاوت الأبعاد */
}

.s-product-card-content-main {
    display: flex !important;
    flex-direction: column !important;
    height: auto !important;
}

/* 3. السطر الأول (التصنيف والسعر): حجم ثابت */
.s-product-card-content-main > div.center-between {
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    height: 25px !important;
    overflow: hidden !important;
}

/* 4. عنوان المنتج: تثبيت الارتفاع على سطرين بدقة وقص النص الزائد */
.s-product-card-content-title {
    display: -webkit-box !important;
    -webkit-line-clamp: 2 !important;
    -webkit-box-orient: vertical !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    min-height: 2.8em !important; 
    max-height: 2.8em !important;
    line-height: 1.4 !important;
    margin-top: 5px !important;
    margin-bottom: 2px !important;
}

/* 5. الكلاس الجديد (الترجمة/المنصة مثل كلمة PC): تحديد حجم ثابت له */
.s-product-card-content-subtitle {
    display: block !important;
    height: 20px !important;
    min-height: 20px !important;
    max-height: 20px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
    margin-bottom: 2px !important;
}

/* 6. نجوم التقييم: حجم ثابت لمنعها من التحرك */
salla-rating-stars {
    display: block !important;
    height: 20px !important;
    min-height: 20px !important;
    overflow: hidden !important;
}

/* 7. زر إضافة للسلة: يلتصق أسفل الحاوية تماماً بحجم ثابت وممتاز */
.s-product-card-content-footer {
    margin-top: auto !important;
    display: flex !important;
    height: 40px !important;
    min-height: 40px !important;
}

/* الكود النهائي لـ PC: أبيض، عريض، وبحروف كابيتال مجبرة */
.s-product-card-content-main p[class*="product-card-content-subtitle"],
form.s-product-card-content p,
p.s-product-card-content-subtitle {
    color: #ffffff !important;
    fill: #ffffff !important;
    opacity: 1 !important; 
    font-weight: 900 !important;
    -webkit-text-fill-color: #ffffff !important; 
    
    /* حزم إجبار الحروف على مظهر الكابيتال */
    text-transform: uppercase !important; 
    font-variant: small-caps !important; /* يحول أي حروف صغيرة متبقية إلى كابيتال مدمج */
    font-feature-settings: "smcp" on !important; /* تفعيل ميزة الكابيتال على مستوى الجرافيكس للخط */
}

/* تحويل كلمة تسليم فوري إلى اللون الأبيض الناصع */
.div.promotion-title.Tira_rg,
div[class*="promotion-title"],
div[class*="promotion-title"] span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important; /* إجبار المتصفحات على تلوين النص بالأبيض */
    opacity: 1 !important; /* إلغاء أي شفافية باهتة */
}

/* موازاة نجوم التقييم في وسط كرت المنتج تماماً */
div.s-rating-stars-wrapper,
.s-rating-stars-wrapper,
.s-product-card-content-main .s-rating-stars {
    display: flex !important;
    justify-content: center !important; /* دفع النجوم إلى المنتصف */
    align-items: center !important;
    width: 100% !important;
}

/* إجبار الصور المربعة على ملء الحاوية بالكامل بدون قص أو فراغات جانبية */
.s-product-card-image img,
.Tira_hover_glass img,
img.s-product-card-image-cover,
div[class*="product-card-image"] img {
    object-fit: fill !important; /* ملء المربع 237×237 بالكامل وبشكل متناسق */
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    display: block !important;
}