/* ========== СРАВНЕНИЕ ========== */
.comparison-container {
    max-width: 100%;
    margin: 40px auto;
    padding: 0 20px;
    flex: 1;
}

.comparison-header {
    text-align: center;
    margin-bottom: 30px;
}

.comparison-header h1 {
    font-size: 32px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #1A1A1A;
}

.comparison-subtitle {
    color: #888;
    font-size: 14px;
    margin: 0 0 16px 0;
}

.btn-clear-compare {
    padding: 8px 20px;
    background: #FFF5F0;
    color: #FF6B35;
    border: 1px solid rgba(255, 107, 53, 0.3);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    display: inline-block;
    margin-top: 8px;
    transition: all 0.3s;
}

.btn-clear-compare:hover {
    background: #FF6B35;
    color: white;
}

/* ========== ПУСТОЕ СРАВНЕНИЕ ========== */
.empty-comparison {
    text-align: center;
    padding: 80px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}

.empty-icon { font-size: 64px; margin-bottom: 16px; display: block; }
.empty-comparison h2 { margin-bottom: 12px; color: #1A1A1A; font-size: 22px; }
.empty-comparison p { color: #888; margin-bottom: 24px; font-size: 14px; }

/* ========== ТАБЛИЦА СРАВНЕНИЯ ========== */
.comparison-table-wrapper {
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    min-width: 600px;
}

/* ========== ШАПКА ТАБЛИЦЫ ========== */
.comparison-table thead th {
    background: linear-gradient(180deg, #FAFAFA, #F5F5F5);
    padding: 20px 16px 16px;
    text-align: center;
    vertical-align: top;
    border-bottom: 2px solid #E0E0E0;
    position: sticky;
    top: 0;
    z-index: 2;
}

.comparison-table thead th:first-child {
    background: #F5F5F5;
    min-width: 180px;
    width: 180px;
    position: sticky;
    left: 0;
    z-index: 3;
}

.product-col {
    min-width: 200px;
    max-width: 250px;
    position: relative;
}

/* ========== КАРТОЧКА ТОВАРА В ШАПКЕ ========== */
.comparison-product-image {
    width: 100%;
    height: 180px;
    background: #F8FAFC;
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.comparison-product-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 10px;
}

.comparison-product-image .no-image {
    color: #BBB;
    font-size: 13px;
}

.comparison-product-name {
    display: block;
    font-size: 15px;
    font-weight: 600;
    color: #1A1A1A;
    text-decoration: none;
    line-height: 1.4;
    text-align: center;
}

.comparison-product-name:hover {
    color: #FF6B35;
}

.remove-compare-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.4);
    border: none;
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3;
    transition: all 0.2s;
}

.remove-compare-btn:hover {
    background: #E74C3C;
}

/* ========== ТЕЛО ТАБЛИЦЫ ========== */
.comparison-table tbody td {
    padding: 16px;
    text-align: center;
    border-bottom: 1px solid #F0F0F0;
    font-size: 13px;
    color: #555;
    vertical-align: middle;
}

.comparison-table tbody tr:last-child td {
    border-bottom: none;
}

.comparison-table tbody tr:nth-child(even) td {
    background: #FAFAFA;
}

.comparison-table .spec-label {
    text-align: left;
    font-weight: 600;
    color: #1A1A1A;
    padding-left: 24px;
    font-size: 13px;
    white-space: nowrap;
    position: sticky;
    left: 0;
    background: white;
    z-index: 1;
}

.comparison-table tbody tr:nth-child(even) .spec-label {
    background: #FAFAFA;
}

.spec-value {
    line-height: 1.4;
}

/* ========== ЗАГОЛОВКИ РАЗДЕЛОВ ========== */
.section-header td {
    background: #FF6B35 !important;
    color: white !important;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    padding: 10px 16px !important;
}

/* ========== ЦЕНЫ ========== */
.price-old {
    display: block;
    font-size: 12px;
    color: #999;
    text-decoration: line-through;
}

.price-current {
    font-size: 16px;
    font-weight: 700;
    color: #FF6B35;
}

/* ========== НАЛИЧИЕ ========== */
.stock-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
}

.stock-badge.in-stock {
    background: rgba(39, 174, 96, 0.1);
    color: #27AE60;
}

.stock-badge.out-of-stock {
    background: rgba(150, 150, 150, 0.1);
    color: #999;
}

/* ========== ЛУЧШЕЕ ЗНАЧЕНИЕ ========== */
.best-value {
    background: rgba(39, 174, 96, 0.1) !important;
    font-weight: 600;
    color: #27AE60 !important;
}

/* ========== КНОПКИ ========== */
.btn-primary {
    padding: 12px 24px;
    background: #FF6B35;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s;
}

.btn-primary:hover {
    background: #E55A2B;
    transform: translateY(-2px);
}

/* ========== АДАПТИВНОСТЬ ========== */
@media (max-width: 768px) {
    .comparison-header h1 { font-size: 24px; }
    .comparison-table { min-width: 500px; }
    .comparison-table th, .comparison-table td { padding: 12px 10px; font-size: 12px; }
    .comparison-table .spec-label { padding-left: 16px; min-width: 140px; width: 140px; }
    .product-col { min-width: 160px; }
    .comparison-product-image { height: 140px; }
    .comparison-product-name { font-size: 13px; }
}