/* ======================================================================== */
/* MFATIHY SUITE - UI MODERNIZATION (2026 STANDARD)                         */
/* ======================================================================== */

/* ========================================== */
/* 1. صفوف الطلبات (تصميم البطاقات العائمة) */
/* ========================================== */

.s-orders-table-tbody-tr.animated {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 14px;
    margin-bottom: 14px;
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.s-orders-table-tbody-tr.animated:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.06);
    border-color: rgba(220, 38, 38, 0.2);
    z-index: 5;
}

/* --- تصميم الكمبيوتر --- */
@media (min-width: 769px) {
    .s-orders-table-tbody-tr.animated {
        padding: 16px 24px;
        padding-left: 150px !important;
    }

    .s-orders-table-tbody-tr.animated::after {
        content: 'عرض التفاصيل ←';
        position: absolute;
        left: 24px;
        top: 50%;
        transform: translateY(-50%);
        background-color: rgba(220, 38, 38, 0.05);
        color: #dc2626;
        font-size: 13px;
        font-weight: 700;
        padding: 8px 16px;
        border-radius: 99px;
        opacity: 0; /* إخفاء الزر حتى التحويم لفخامة أكثر */
        pointer-events: none;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }

    .s-orders-table-tbody-tr.animated:hover::after {
        opacity: 1;
        background-color: #dc2626;
        color: #ffffff;
        box-shadow: 0 4px 12px rgba(220, 38, 38, 0.25);
    }
}

/* --- تصميم الجوال --- */
@media (max-width: 768px) {
    .s-orders-table-tbody-tr.animated {
        display: flex;
        flex-direction: column;
        padding: 16px;
        padding-bottom: 48px !important;
    }

    .s-orders-table-tbody-tr.animated::after {
        content: 'عرض تفاصيل الطلب';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        height: 40px;
        background-color: #fafafa;
        color: #6b7280;
        border-top: 1px solid rgba(0, 0, 0, 0.03);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        font-weight: 600;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .s-orders-table-tbody-tr.animated:active::after {
        background-color: rgba(220, 38, 38, 0.05);
        color: #dc2626;
    }
}

/* ========================================== */
/* 2. زر المحتوى الرقمي (تأثير Glassmorphism) */
/* ========================================== */

a[href*="/orders/digital/"] {
    background: linear-gradient(135deg, #f04444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    font-size: 15px !important;
    padding: 12px 24px !important;
    border-radius: 99px !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.2) !important;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) !important; /* تأثير الزنبرك (Spring) */
    text-decoration: none !important;
}

a[href*="/orders/digital/"]::before {
    content: '🔑';
    font-size: 1.1em;
}

a[href*="/orders/digital/"]:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.3) !important;
    background: linear-gradient(135deg, #f45555 0%, #e53935 100%) !important;
}

@media (max-width: 768px) {
    a[href*="/orders/digital/"] {
        width: 100%;
        padding: 14px 20px !important;
    }
}

/* ========================================== */
/* 3. أزرار وصندوق التقييم (فخامة هادئة) */
/* ========================================== */

.btn--rounded-full.s-button-element.s-button-btn.s-button-solid.s-button-light.s-button-loader-after {
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%) !important;
    color: #1c1917 !important; /* لون داكن جداً بدل الأسود الصريح لراحة العين */
    font-weight: 800 !important;
    font-size: 1.1rem !important;
    padding: 14px 36px !important;
    min-width: 200px;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    border-radius: 99px !important;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn--rounded-full.s-button-element.s-button-btn.s-button-solid.s-button-light.s-button-loader-after:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.5);
    background: linear-gradient(135deg, #fcd34d 0%, #f59e0b 100%) !important;
}

.rating-header.gradient-bg.center-between {
    background: #ffffff !important;
    border: 1px solid rgba(245, 158, 11, 0.2) !important;
    color: #b45309 !important;
    border-radius: 12px;
    padding: 12px 24px;
    font-weight: 700;
    font-size: 1.1em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.rating-header.gradient-bg.center-between::before {
    content: '★';
    color: #f59e0b;
    margin-left: 8px;
    font-size: 1.3em;
}

salla-modal p.text-sm,
.s-rate-order-modal p.text-sm,
#modal-rate-order p.text-sm {
    display: none !important;
}

/* ========================================== */
/* 4. إصلاحات البنية (CLS) */
/* ========================================== */

.product-entry__image,
.product-detials__slider .swiper-slide {
    position: relative;
    overflow: hidden;
    aspect-ratio: 1 / 1; 
    background-color: #fafafa;
    border-radius: 12px; /* لمسة ناعمة لصور المنتجات */
}

.product-entry__image img,
.product-detials__slider .swiper-slide img {
    object-fit: contain;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

body {
    overflow-x: hidden;
}

/* ========================================== */
/* 5. تصميم المدونة (Modern Clean Cards) */
/* ========================================== */

body.blog-index {
    background-color: #f9fafb;
}

body.blog-index .post-entry {
    border: 1px solid rgba(0, 0, 0, 0.04);
    border-radius: 16px;
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
    overflow: hidden;
}

body.blog-index .post-entry:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.05);
    border-color: rgba(33, 131, 101, 0.15);
}

body.blog-index .post-entry__image {
    height: 220px;
    border-radius: 16px 16px 0 0;
}

body.blog-index .post-entry__image img {
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

body.blog-index .post-entry:hover .post-entry__image img {
    transform: scale(1.06);
}

body.blog-index .post-entry__title a {
    color: #111827;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.5;
    transition: color 0.3s ease;
}

body.blog-index .post-entry__title a:hover {
    color: #218365;
}

body.blog-index .post-entry .text-gray-500 {
    font-size: 0.8rem;
    color: #6b7280;
    background: #f3f4f6;
    padding: 6px 12px;
    border-radius: 99px; /* شكل "Pill" عصري */
    width: fit-content;
    font-weight: 500;
}

body.blog-index .post-entry .border-t {
    border-top: 1px solid rgba(0, 0, 0, 0.04) !important;
    padding-top: 16px !important;
}

body.blog-index .post-entry a.rounded-large {
    background-color: transparent;
    color: #218365;
    border: 1px solid #218365;
    font-weight: 600;
    font-size: 0.8rem;
    border-radius: 99px;
    padding: 6px 16px;
    transition: all 0.3s ease;
}

body.blog-index .post-entry a.rounded-large:hover {
    background-color: #218365;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(33, 131, 101, 0.2);
}