/* سیستم مقایسه محصولات - استایل مینیمال */

/* ===== دکمه مقایسه ===== */
.compare-button-wrapper {
    display: inline-block;
    margin: 5px 0;
}

.compare-product-btn {
    background: transparent;
    color: #333;
    border: 1px solid #ddd;
    padding: 6px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 400;
    line-height: 1.4;
}

.compare-product-btn .btn-icon {
    font-size: 13px;
}

.compare-product-btn:hover:not(:disabled) {
    background: #f0f0f0;
    border-color: #bbb;
}

.compare-product-btn.added {
    background: #e8f5e9;
    border-color: #4caf50;
    color: #2e7d32;
}

.compare-product-btn:disabled {
    opacity: 0.6;
    cursor: default;
}

/* پیام موفقیت */
.compare-success-message {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 6px 14px;
    border-radius: 4px;
    border: 1px solid #a5d6a7;
}

.compare-success-message .success-icon {
    font-size: 14px;
}

.go-to-compare {
    color: #1b5e20;
    font-weight: 500;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 3px;
    background: rgba(76, 175, 80, 0.15);
    transition: background 0.2s;
}

.go-to-compare:hover {
    background: rgba(76, 175, 80, 0.25);
    text-decoration: none;
}

/* ===== صفحه مقایسه ===== */
#compare-system-app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: inherit;
}

/* هدر */
.compare-header {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    padding: 15px 25px;
    border-radius: 8px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.compare-header h1 {
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #333;
}

.compare-icon {
    margin-left: 8px;
}

.compare-stats {
    display: flex;
    gap: 12px;
    align-items: center;
}

.compare-count {
    font-size: 14px;
    color: #666;
}

.clear-all-btn {
    background: #fee2e2;
    color: #dc2626;
    border: 1px solid #fecaca;
    padding: 5px 14px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s;
}

.clear-all-btn:hover {
    background: #fecaca;
}

/* جدول مقایسه */
.compare-grid-wrapper {
    background: #fff;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    overflow: auto;
}

.compare-grid {
    min-height: 150px;
}

.compare-row {
    display: grid;
    grid-template-columns: 160px repeat(auto-fit, minmax(180px, 1fr));
    gap: 1px;
    background: #f1f3f5;
    border-bottom: 1px solid #e9ecef;
}

.compare-row:last-child {
    border-bottom: none;
}

.feature-label {
    background: #f8f9fa;
    padding: 12px 16px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    font-size: 13px;
    min-height: 44px;
    border-left: 1px solid #e9ecef;
}

.feature-value {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    font-size: 13px;
    position: relative;
    color: #333;
}

.compare-product-image {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    background: #f8f9fa;
    padding: 4px;
}

.compare-product-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0;
    line-height: 1.3;
}

.compare-product-price {
    color: #e67e22;
    font-weight: 600;
    font-size: 16px;
}

.compare-product-stock {
    font-size: 12px;
    padding: 2px 12px;
    border-radius: 12px;
    display: inline-block;
}

.in-stock {
    background: #e8f5e9;
    color: #2e7d32;
}

.out-of-stock {
    background: #ffebee;
    color: #c62828;
}

.remove-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    background: transparent;
    border: none;
    color: #999;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-btn:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* وضعیت خالی */
.empty-state {
    grid-column: 1 / -1;
    padding: 50px 20px;
    text-align: center;
    color: #999;
}

.empty-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 12px;
}

.empty-state p {
    font-size: 16px;
    margin-bottom: 8px;
    color: #666;
}

.empty-state small {
    color: #aaa;
    font-size: 13px;
}

/* ریسپانسیو */
@media (max-width: 768px) {
    .compare-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding: 12px 18px;
    }
    
    .compare-stats {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .compare-row {
        grid-template-columns: 110px repeat(auto-fit, minmax(130px, 1fr));
    }
    
    .feature-label {
        font-size: 12px;
        padding: 8px 10px;
        min-height: 36px;
    }
    
    .feature-value {
        font-size: 12px;
        padding: 8px 10px;
        min-height: 36px;
    }
    
    .compare-product-image {
        width: 60px;
        height: 60px;
    }
    
    .compare-product-title {
        font-size: 12px;
    }
    
    .compare-product-price {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .compare-row {
        grid-template-columns: 80px repeat(auto-fit, minmax(100px, 1fr));
    }
    
    .feature-label {
        font-size: 11px;
        padding: 6px 8px;
        min-height: 32px;
    }
    
    .feature-value {
        font-size: 11px;
        padding: 6px 8px;
        min-height: 32px;
    }
    
    .compare-product-image {
        width: 45px;
        height: 45px;
    }
    
    .compare-product-title {
        font-size: 11px;
    }
    
    .compare-product-price {
        font-size: 12px;
    }
}