/* ===== صفحة العروض ===== */
.offers-page {
    padding: 30px 0;
}

/* شريط التنقل */
.breadcrumb-container {
    margin-bottom: 20px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    padding: 0;
    margin-bottom: 1rem;
    list-style: none;
    background-color: transparent;
}

.breadcrumb-item {
    font-size: 14px;
    color: #666;
}

.breadcrumb-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb-item a:hover {
    color: #e26d00;
    text-decoration: underline;
}

.breadcrumb-item + .breadcrumb-item {
    padding-right: 0.5rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    float: right;
    padding-left: 0.5rem;
    color: #999;
    content: "/";
}

.breadcrumb-item.active {
    color: #333;
    font-weight: 600;
}

.offers-page .section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
}

.offers-page .section-title h1 {
    color: #333;
    font-size: 1.5rem;
    margin: 0;
    position: relative;
    padding-right: 15px;
    font-weight: bold;
}

.offers-page .section-title h1::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 0;
    width: 5px;
    height: 20px;
    background-color: var(--primary-color);
    transform: translateY(-50%);
}

.offers-page .products-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 0 auto;
}

/* تأكد من أن جميع بطاقات المنتجات لها نفس العرض */
.offers-page .products-grid .product-card {
    width: 100%;
    max-width: 200px;
    margin: 0 auto;
}

.offers-page .product-card {
    width: 100%;
    max-width: 200px;
    height: 320px; /* نفس ارتفاع بطاقات الصفحة الرئيسية */
    padding: 10px;
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.offers-page .product-image {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    margin-bottom: 10px;
    height: 160px; /* ارتفاع ثابت لجميع صور المنتجات */
    display: flex;
    align-items: center;
    justify-content: center;
}

.offers-page .product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* سيحافظ على نسبة الصورة دون تشويه */
    max-height: 160px;
}

/* تنسيق قوي مخصص لاسم المنتج في صفحة العروض */
.offers-page .product-name {
    font-size: 0.8rem !important;
    margin-bottom: 5px !important;
    height: 52px !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: -webkit-box !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    -webkit-box-orient: vertical !important;
    font-weight: bold !important;
    color: #333 !important;
}

/* هذا التعليق لتطبيق نفس تنسيق الصفحة الرئيسية على أسماء المنتجات */

.offers-page .product-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 10px 0;
}

.offers-page .product-price .current-price {
    font-weight: bold;
    color: #000;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    margin-left: 0;
    margin-right: auto;
}

.offers-page .product-price .old-price {
    text-decoration: line-through;
    color: var(--grey-color);
    font-size: 0.75rem;
    display: flex;
    align-items: center;
}

/* تحسينات للشاشات المتوسطة والكبيرة */
@media (min-width: 992px) {
    .offers-page .products-grid {
        grid-template-columns: repeat(4, 1fr);
        max-width: 1200px;
        margin: 0 auto;
    }
}

/* تحسينات للشاشات الصغيرة */
@media (max-width: 768px) {
    .offers-page .products-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .offers-page .product-card {
        margin-bottom: 10px;
    }
    
    .offers-page .product-name {
        font-size: 0.85rem;
        line-height: 1.3;
        height: 2.6rem;
        overflow: hidden;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    
    .offers-page .product-price {
        font-size: 0.9rem;
    }
    
    .offers-page .btn-add-cart {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}
