/* =========================================
   تنسيقات صفحة المتجر (كاملة وشاملة للتعديلات)
   ========================================= */

.shop-page {
    padding: 60px 0;
    background: #fcfcfc;
}

/* 1. العنوان الموحد - (خط واحد فقط أسفل النص) */
.page-header {
    text-align: center;
    margin-bottom: 50px;
}

.page-header h1 {
    font-family: 'Cairo', sans-serif;
    font-size: 34px;
    font-weight: 900;
    color: #000;
    display: inline-block;
    border-bottom: 5px solid #7dd3fc;
    padding-bottom: 5px;
}

/* 2. الشبكة (Grid) - 4 منتجات في السطر */
.products-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    list-style: none;
    padding: 0;
}

/* 3. بطاقة المنتج */
.product-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 15px;
    text-align: center;
    transition: 0.3s ease-in-out;
    position: relative;
    display: flex;
    flex-direction: column;
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.08);
    border-color: #259bea;
}

.product-image {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 15px;
}

.product-image img {
    width: 100%;
    transition: 0.5s;
    display: block;
}

.product-card:hover .product-image img {
    transform: scale(1.1);
}

/* شارة التخفيض الكبير */
.badge-sale {
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0000;
    color: #fff;
    padding: 5px 12px;
    border-radius: 5px;
    font-size: 13px;
    font-weight: 900;
    z-index: 2;
}

/* 4. معلومات المنتج والأسعار */
.product-info {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.category-tag {
    font-size: 14px;
    color: #ffc107;
    margin-bottom: 8px;
}

.product-title {
    font-size: 17px;
    font-weight: 800;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.4;
    height: 48px;
    overflow: hidden;
}

.product-title a {
    text-decoration: none;
    color: #333;
}

/* --- الضبط النهائي لمكان الأسعار في الكمبيوتر --- */
.product-price {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    /* لجعل ins (الأزرق) يميناً و del (الأحمر) يساراً */
    flex-direction: row; 
}

/* السعر الحالي (الأزرق يميناً) */
.product-price ins {
    color: #259bea;
    text-decoration: none;
    font-size: 22px;
    font-weight: 900;
    order: 1; /* الترتيب الأول في نظام الـ RTL (اليمين) */
}

/* السعر المشطوب (الأحمر يساراً) */
.product-price del {
    color: #ff0000 !important;
    font-size: 15px;
    font-weight: 700;
    text-decoration: line-through;
    order: 2; /* الترتيب الثاني (اليسار) */
}

/* 5. الأزرار */
.btn-buy-now {
    background: #259bea;
    color: #fff;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 16px;
    transition: 0.3s;
    margin-top: auto;
    border: none;
    cursor: pointer;
}

.btn-buy-now:hover {
    background: #1a7eb8;
}

.load-more-wrapper {
    text-align: center;
    margin-top: 60px;
    width: 100%;
}

.load-more-btn {
    background: #fff;
    border: 2px solid #259bea;
    color: #259bea;
    padding: 14px 45px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s;
}

.load-more-btn:hover {
    background: #259bea;
    color: #fff;
}

/* =========================================
   تجاوب الموبايل (التعديلات المطلوبة للأسعار)
   ========================================= */
@media (max-width: 992px) {
    .products-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .products-grid { 
        grid-template-columns: repeat(2, 1fr); 
        gap: 15px; 
    }

    /* الأسعار تحت بعضها في الموبايل */
    .product-price {
        flex-direction: column !important; 
        gap: 5px;
    }

    .product-price ins {
        font-size: 18px;
        order: 1; /* الأزرق فوق */
    }

    .product-price del {
        font-size: 13px;
        order: 2; /* المشطوب تحت بحجم أصغر */
    }

    .product-title { font-size: 14px; height: 40px; }
    .page-header h1 { font-size: 28px; }
}