/* =========================================================
   WC Sales Count – Absolute Center Alignment (v4.3.0)
   ========================================================= */

/* ضمان التوسيط الكامل للحاويات في ووردبريس */
.wcsc-rating-capsule, 
.wcsc-sales-box {
    margin-left: auto !important;
    margin-right: auto !important;
    display: flex !important;
    float: none !important;
    clear: both !important;
}

/* ---- كبسولة التقييم المدمجة (توسيط مطلق) ---- */
.wcsc-rating-capsule {
    width: fit-content !important;
    max-width: 100% !important;
    margin-top: 15px !important;
    margin-bottom: 15px !important;
    padding: 6px 16px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    border: 1px solid rgba(255, 102, 0, 0.3) !important;
    border-radius: 50px !important;
    align-items: center !important;
    justify-content: center !important; /* توسيط المحتوى الداخلي */
    gap: 10px !important;
    direction: rtl !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
    transition: all 0.3s ease !important;
}

.wcsc-rating-capsule:hover {
    transform: translateY(-2px) !important;
    border-color: rgba(255, 102, 0, 0.6) !important;
}

.wcsc-rating-badge {
    background: #ff6600 !important;
    color: #fff !important;
    padding: 2px 8px !important;
    border-radius: 12px !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    line-height: 1 !important;
}

.wcsc-rating-stars {
    color: #f1c40f !important;
    font-size: 1rem !important;
    letter-spacing: -1px !important;
    display: flex !important;
}

.wcsc-live-dot {
    width: 8px !important;
    height: 8px !important;
    background-color: #2ecc71 !important;
    border-radius: 50% !important;
    position: relative !important;
    flex-shrink: 0 !important;
}

.wcsc-live-dot::after {
    content: '' !important;
    position: absolute !important;
    width: 100% !important;
    height: 100% !important;
    background-color: #2ecc71 !important;
    border-radius: 50% !important;
    animation: wcsc-pulse 2s infinite !important;
}

@keyframes wcsc-pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3); opacity: 0; }
}

.wcsc-rating-count {
    color: #444 !important; 
    font-size: 0.95rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
}

/* ---- صندوق المبيعات (توسيط مطلق) ---- */
.wcsc-sales-box {
    width: 100% !important;
    max-width: 380px !important;
    margin-top: 12px !important;
    margin-bottom: 12px !important;
    padding: 12px 18px !important;
    background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%) !important;
    border: 1px solid #ffd5d5 !important;
    border-radius: 14px !important;
    box-shadow: 0 3px 14px rgba(231, 76, 60, 0.10) !important;
    align-items: center !important;
    justify-content: space-between !important;
    direction: rtl !important;
    border-right: 4px solid #e74c3c !important;
    transition: all 0.3s ease !important; /* إضافة الانتقال السلس */
}

.wcsc-sales-box:hover {
    transform: translateY(-2px) !important; /* الارتفاع الخفيف عند مرور الماوس */
    box-shadow: 0 6px 20px rgba(231, 76, 60, 0.15) !important;
    border-color: #e74c3c !important;
}

.wcsc-sales-icon {
    color: #e74c3c !important;
    font-size: 1.3rem !important;
    animation: wcsc-shake 3s infinite ease-in-out !important;
    flex-shrink: 0 !important;
    order: -1 !important;
    margin-left: 10px !important;
}

.wcsc-sales-text {
    color: #1a1a1a !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    text-align: center !important;
    flex: 1 !important;
    order: 1 !important;
}

.wcsc-sales-text strong {
    color: #e74c3c !important;
}

@keyframes wcsc-shake {
    0%, 100% { transform: rotate(0deg); }
    10%, 30% { transform: rotate(-12deg); }
    20%, 40% { transform: rotate(12deg); }
    50%       { transform: rotate(0deg); }
}

/* تحسينات إضافية للجوال لضمان التوسيط */
@media screen and (max-width: 480px) {
    .wcsc-rating-capsule {
        padding: 5px 12px !important;
        gap: 6px !important;
    }
    .wcsc-rating-badge { font-size: 0.8rem !important; }
    .wcsc-rating-count { font-size: 0.85rem !important; }
    .wcsc-sales-box { 
        max-width: 95% !important; 
    }
}
