
.compare-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.compare-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #eee;
}
/* دسکتاپ: ستون عناوین باریک‌تر (120px) */

.compare-grid{
    display: grid;
    gap: 15px;
    overflow-x: auto;
    justify-content: start;
}

/* موبایل: ستون عناوین باریک‌تر (100px) */
@media (max-width: 768px){
    .compare-grid{
        grid-template-columns: 100px repeat({{ products|length }}, 260px);
    }
}


/* عناوین: وسط‌چین واقعی (افقی و عمودی) */
.compare-label{
background: #f8f9fa;
padding: 8px;                 /* کمی کمتر برای جاگیری بهتر */
font-weight: bold;
border-radius: 8px;
display: flex;
align-items: center;           /* عمودی وسط */
justify-content: center;       /* افقی وسط */
text-align: center;            /* متنِ چند خطی هم وسط بماند */
line-height: 1.3;
}



.compare-row {
    display: contents;
}



.compare-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    position: relative;
}

/* جایگزینِ سبک قبلی تصویر */
.product-image{
width: 100%;
height: 200px;        /* قد ثابت برای یکنواختی کارت‌ها */
object-fit: contain;  /* مهم: تصویر بدون کراپ جا بگیرد */
background: #f7f7f7;  /* فضای خالی اطراف تصویر */
border-radius: 8px;
display: block;
margin-bottom: 10px;
padding: 6px;         /* کمی فاصله از لبه برای عکس‌های مربعی/عمودی */
}

.product-name {
    font-weight: bold;
    margin-bottom: 10px;
    font-size: 16px;
}

.price-section {
    margin: 10px 0;
}

.current-price {
    font-size: 18px;
    font-weight: bold;
    color: #dc3545;
}

.original-price {
    text-decoration: line-through;
    color: #6c757d;
    font-size: 14px;
    margin-right: 8px;
}

.discount-badge {
    background: #ffc107;
    color: #856404;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    margin-top: 5px;
    display: inline-block;
}

.remove-btn {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
}

.empty-compare {
    text-align: center;
    padding: 60px 20px;
    color: #6c757d;
}

.spec-value {
    font-size: 14px;
    line-height: 1.5;
}

.add-more-section {
    text-align: center;
    margin-top: 30px;
    padding: 20px;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
}

@media (max-width: 768px) {
    .compare-grid {
        grid-template-columns: 150px repeat({{ products|length }}, 280px);
    }
    
    .compare-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
}


    /* دکمه شکیل برای افزودن محصول */
.btn-compare {
--c1:#2563eb; /* آبی پرایمری */
--c2:#1d4ed8; /* آبی تیره‌تر برای گرادیان */
display:inline-flex; align-items:center; justify-content:center; gap:.5rem;
padding:.85rem 1.25rem;
border-radius:12px;
background:linear-gradient(135deg,var(--c1),var(--c2));
color:#fff; font-weight:800; letter-spacing:.2px; font-size:16px;
border:none; cursor:pointer;
box-shadow:0 10px 20px rgba(37,99,235,.18), inset 0 -2px 0 rgba(255,255,255,.15);
transition:transform .12s ease, box-shadow .2s ease, filter .2s ease;
}
.btn-compare:hover {
transform:translateY(-1px);
box-shadow:0 14px 28px rgba(37,99,235,.22), inset 0 -2px 0 rgba(255,255,255,.2);
filter:saturate(1.05);
}
.btn-compare:active {
transform:translateY(0);
box-shadow:0 8px 16px rgba(37,99,235,.18);
}
.btn-compare:focus-visible{
outline:3px solid rgba(37,99,235,.35);
outline-offset:2px;
}
.btn-compare .icon {
width:20px; height:20px; display:inline-block;
}

/* هماهنگی با باکس خاکستری */
.add-more-section{
background:#fbfcfe;
border:2px dashed #dbe3f3;
border-radius:14px;
}

/* نسخه جمع‌وجور روی موبایل */
@media (max-width:768px){
.btn-compare{width:100%}
}

