/* ============================================================================
   تصميم بطاقات المنتجات المحسّن - Enhanced Product Cards Design
   ============================================================================ */

/* بطاقة المنتج - تصميم احترافي مع ظلال وتأثيرات */
.single-product-item {
    background: #fff;
    border-radius: 12px;
    /* حواف دائرية ناعمة */
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    /* ظل خفيف */
    margin-bottom: 30px;
    padding: 0;
    height: 100%;
    /* ارتفاع متساوي للبطاقات */
    display: flex;
    flex-direction: column;
}

/* تأثير عند تمرير الماوس - رفع البطاقة */
.single-product-item:hover {
    transform: translateY(-8px);
    /* رفع البطاقة 8 بكسل */
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    /* ظل أقوى */
}

/* صورة المنتج - تحسينات */
.single-product-item .product-image {
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    background: #f5f5f5;
}

/* تأثير تكبير الصورة عند التمرير */
.single-product-item:hover .product-image img {
    transform: scale(1.08);
    /* تكبير 8% */
}

.single-product-item .product-image img {
    width: 100%;
    transition: transform 0.4s ease;
    object-fit: cover;
    /* ملء المساحة مع الحفاظ على النسبة */
}

/* شارة "جديد" على المنتج */
.product-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    /* في اليمين للعربية */
    background: #F28123;
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(242, 129, 35, 0.4);
    z-index: 10;
}

/* شارة الفئة على المنتج - Category Badge */
.product-category-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: linear-gradient(135deg, #F28123 0%, #ff9d50 100%);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(242, 129, 35, 0.3);
    z-index: 10;
    transition: all 0.3s ease;
}

.product-category-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 3px 12px rgba(242, 129, 35, 0.4);
}


/* عنوان المنتج */
.single-product-item .product-title,
.single-product-item h3 {
    font-size: 24px;
    font-weight: 600;
    color: #051922;
    margin: 20px 15px 5px;
    min-height: 50px;
    /* ارتفاع ثابت للعناوين */
    line-height: 1.3;
    text-align: center;
    /* محاذاة للوسط */
}

.product-category-badge {
    display: inline-block;
    background-color: rgba(242, 129, 35, 0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
}


/* وصف المنتج */
.single-product-item .product-description {
    font-size: 16px;
    color: #000000;
    margin: 3px 5px 5px;
    text-align: center;
    line-height: 1.6;
    min-height: 45px;
    /* ارتفاع ثابت */
}

/* حاوية السعر - تصميم مميز */
.product-price-wrapper,
.single-product-item .product-price {
    background: linear-gradient(135deg, #F28123 0%, #ff9d50 100%);
    /* تدرج برتقالي */
    color: #fff;
    padding: 12px 20px;
    margin: 15px;
    border-radius: 25px;
    text-align: center;
    font-weight: 700;
    box-shadow: 0 3px 12px rgba(242, 129, 35, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 120px;
    /* مسافة بين القيمة والعملة */
}

/* قيمة السعر - أرقام كبيرة */
.product-price-wrapper .price-value,
.single-product-item .product-price .price-value {
    font-size: 20px;
    font-weight: 700;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
    letter-spacing: 1px;
}

/* رمز العملة "ريال يمني" */
.product-price-wrapper .currency-symbol,
.single-product-item .product-price .currency-symbol {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.95;
    white-space: nowrap;
    /* منع التفاف النص */
}

/* زر إضافة للسلة - تحسينات */
.single-product-item .cart-btn {
    background: #100b06;
    color: #fff;
    padding: 12px 25px;
    margin: 10px;
    border-radius: 25px;
    font-weight: 500;
    text-align: center;
    display: inline-block;
    transition: all 0.3s ease;
    text-decoration: none;
    border: 2px solid #F28123;
}

.single-product-item .cart-btn:hover {
    background: #2d231a;
    border-color: #2d231a;
    color: #fff;
    transform: scale(1.05);
    /* تكبير خفيف */
    box-shadow: 0 4px 15px rgba(242, 129, 35, 0.4);
}

.single-product-item .cart-btn i {
    margin-left: 8px;
    /* مسافة بين الأيقونة والنص */
}

/* أزرار الإدارة (للأدمن) */
.single-product-item .admin-actions {
    padding: 10px 15px 20px;
    text-align: center;
    border-top: 1px solid #f0f0f0;
    margin-top: auto;
    /* دفع للأسفل */
}

.single-product-item .admin-actions .btn {
    margin: 0 5px;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 5px;
}

/* تحسين عنوان قسم المنتجات */
.section-title {
    text-align: center !important;
    width: 100% !important;
    margin: 0 auto 50px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    float: none !important;
    position: relative;
    left: 0 !important;
    right: 0 !important;
}

.section-title h2,
.section-title h3 {
    text-align: center !important;
    margin: 0 auto !important;
    width: 100% !important;
    display: block !important;
}

.section-title .section-subtitle {
    text-align: center;
    font-size: 19px;
    color: #000000;
    margin: 15px auto 0;
    line-height: 1.7;
    font-weight: 500;
    width: 100%;
    max-width: 800px;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {

    .single-product-item .product-title,
    .single-product-item h3 {
        font-size: 18px;
        min-height: auto;
    }

    .product-price-wrapper .price-value,
    .single-product-item .product-price .price-value {
        font-size: 24px;
    }

    .section-title {
        margin-bottom: 30px;
    }

    .section-title h2,
    .section-title h3 {
        font-size: 28px;
    }

    .section-title .section-subtitle {
        text-align: center;
        font-size: 14px;
        padding: 0 15px;
    }
}

/* ============================================================================
   قواعد عامة للتوسيط في بيئة RTL - RTL Centering Rules
   ============================================================================ */

/* التوسيط الشامل لحاويات النماذج - Form Wrapper Centering */
.add-product-form-wrapper {
    margin-left: auto !important;
    margin-right: auto !important;
    float: none !important;
}

/* ضمان عمل mx-auto بشكل صحيح في RTL - Ensure mx-auto works in RTL */
[dir="rtl"] .mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

/* ضمان عمل justify-content-center في RTL - Ensure justify-content-center works */
[dir="rtl"] .justify-content-center {
    justify-content: center !important;
}

/* إزالة أي float قد يؤثر على التوسيط - Remove floats that affect centering */
[dir="rtl"] .col-lg-8.mx-auto,
[dir="rtl"] .section-title {
    float: none !important;
}

/* ============================================================================
   تنسيقات Pagination - Pagination Styles
   ============================================================================ */

/* توسيط الـ pagination */
.pagination-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 30px 0;
}

/* تنسيق Laravel pagination */
.pagination-wrap nav {
    width: 100%;
    display: flex;
    justify-content: center;
}

.pagination-wrap .pagination {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0;
    gap: 5px;
}

.pagination-wrap .pagination li {
    display: inline-block;
}

.pagination-wrap .pagination li a,
.pagination-wrap .pagination li span {
    display: block;
    padding: 10px 15px;
    background: #fff;
    border: 2px solid #F28123;
    color: #051922;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.pagination-wrap .pagination li a:hover {
    background: #F28123;
    color: #fff;
}

.pagination-wrap .pagination li.active span {
    background: #F28123;
    color: #fff;
}

.pagination-wrap .pagination li.disabled span {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================================
   تنسيقات التقييمات - Testimonials Styles
   ============================================================================ */

/* توسيط قسم التقييمات */
.testimonail-section {
    text-align: center;
}

.testimonial-sliders {
    max-width: 900px;
    margin: 0 auto !important;
    padding: 20px;
}

.single-testimonial-slider {
    text-align: center !important;
    margin: 0 auto;
    padding: 30px 20px;
}

.client-avater {
    margin: 0 auto 20px !important;
    text-align: center;
}

.client-avater img {
    margin: 0 auto !important;
    display: block;
}

.client-meta {
    text-align: center !important;
    margin: 0 auto;
}

.client-meta h3 {
    text-align: center !important;
    margin: 0 auto;
}

p.testimonial-body {
    text-align: center !important;
    margin: 20px auto !important;
    max-width: 700px !important;
}

.last-icon {
    text-align: center !important;
    margin: 20px auto 0 !important;
}

/* تنسيقات Owl Carousel للتقييمات في RTL */
[dir="rtl"] .testimonial-sliders .owl-stage-outer,
[dir="rtl"] .testimonial-sliders .owl-stage,
[dir="rtl"] .testimonial-sliders .owl-item {
    text-align: center !important;
}

/* توسيط أزرار التنقل في Owl Carousel */
.testimonial-sliders .owl-nav {
    text-align: center;
    margin-top: 20px;
}

/* استجابة للشاشات الصغيرة */
@media (max-width: 768px) {
    .testimonial-sliders {
        max-width: 100%;
        padding: 10px;
    }

    p.testimonial-body {
        max-width: 100% !important;
        font-size: 15px !important;
        padding: 0 15px;
    }
}