/* ********************************************صفحه مقایسه **********************************/
.compare-page {
    width: 100%;
    padding: 30px 20px;
    box-sizing: border-box;
}

.compare-page h2 {
    text-align: center;
    margin-bottom: 30px;
    font-weight: bold;
}

.compare-scroll {
    overflow-x: auto;
    width: 100%;
}

.compare-table {
    min-width: 1100px;
    border-collapse: collapse;
    width: 100%;
    text-align: center;
}

.compare-table td,
.compare-table th {
    border: 1px solid #e5e5e5;
    vertical-align: top;
    padding: 20px 15px;
    font-size: 14px;
}

/* ستون عنوان ویژگی */
.compare-table td:first-child {
    background: #f8f9fa;
    font-weight: bold;
    width: 180px;
}

/* کارت محصول */
.compare-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}


/* تصویر محصول - بزرگ و استاندارد */
.compare-card .image img {
    width: 180px;
    height: 180px;
    object-fit: contain;
    margin-bottom: 15px;
}

/* عنوان محصول - دو خط با ... */
.compare-card h4 {
    font-size: 15px;
    margin: 10px 0;
    line-height: 22px;
    height: 44px;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

/* بخش قیمت - ارتفاع ثابت برای تراز شدن دکمه ها */
.compare-card .price {
    margin: 10px 0;
    font-size: 16px;
    min-height: 50px;
    /* مهم برای تراز شدن */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* قیمت عادی (بدون تخفیف) */
.compare-card .price>span,
.compare-card .price ins {
    color: #0d6efd !important;
    /* آبی پررنگ */
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
}

/* قیمت قبل (خط خورده) */
.compare-card .price del {
    color: #999;
    font-size: 14px;
    margin-bottom: 4px;
}


/* دکمه افزودن */
/* دکمه همیشه پایین کارت */
.compare-card .add-cart {
    margin-top: auto;
    /* این باعث تراز شدن همه دکمه ها میشه */
    width: 100%;
    text-align: center;
}

.compare-card .button {
    display: inline-block;
    background: #0044B0;
    color: #fff;
    padding: 8px 18px;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: 0.3s;
}

.compare-card .button:hover {
    background: #084298;
}

/* حذف */
.remove-btn {
    width: 100%;
    text-align: left;
    margin-bottom: 10px;
}

.compare-remove {
    background: none;
    border: none;
    color: #dc3545;
    font-size: 13px;
    cursor: pointer;
}

.compare-remove:hover {
    text-decoration: underline;
}

/* خنثی کردن جابجایی بدنه که توسط اسکریپت ایجاد شده */
body {
    left: 0 !important;
    position: relative !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    width: 100% !important;
    overflow-x: hidden !important;
    /* جلوگیری از اسکرول عرضی */
}


/* اصلاح کانتینر اصلی برای پر کردن عرض صفحه */
.shop-wrapper {
    max-width: 1320px;
    /* یا عرض دلخواه استاندارد */
    margin: 0 auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
}

@media (max-width: 767px) {
    .compare-card {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        padding: 10px 0;
    }
    
    .compare-card .image {
        flex-shrink: 0;
    }
    
    .compare-card .image img {
        width: 70px;
        height: 70px;
        object-fit: cover;
        border-radius: 6px;
    }
    
    .compare-card h4 {
        font-size: 14px;
        margin: 0;
        line-height: 18px;
        height: auto;
        overflow: visible;
        flex: 1;
        text-align: right;
    }
    
    .compare-card .price {
        font-size: 15px;
        min-height: auto;
        margin: 5px 0;
        text-align: left;
    }
    
    .compare-card .price > span,
    .compare-card .price ins {
        font-size: 16px;
    }
    
    .compare-card .add-cart {
        margin-top: 0;
        flex-shrink: 0;
    }
    
    .compare-card .button {
        padding: 8px 16px;
        font-size: 13px;
        min-width: 90px;
    }
    
    .remove-btn {
        order: -1;
        width: auto;
        margin-bottom: 0;
        margin-top: 5px;
    }
}