/* Иконка в шапке — рядом с избранным */
.ms-compare-mini {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-width: 44px;
    min-height: 44px;
    padding: 0 5px;
    cursor: pointer;
    color: #111;
    text-decoration: none;
}
.ms-compare-mini .compare-icon-svg {
    display: block;
    margin-bottom: 12px;
}
.ms-compare-mini .compare-count {
    position: absolute;
    min-width: 18px;
    height: 18px;
    right: 0;
    top: -5px;
    text-align: center;
    background: #28a745;
    border-radius: 50px;
    font-size: 11px;
    color: #fff;
    line-height: 18px;
    padding: 0 4px;
}

/* Кнопка на карточке / детальной */
.compare-add {
    position: absolute;
    z-index: 5;
    background: transparent;
    border: 0;
    padding: 6px;
    cursor: pointer;
    color: #111;
    line-height: 0;
}
.compare-add--card {
    top: 26px;
    right: 22px;
}
.compare-add--detail {
    top: 17px;
    left: 56px;
}
.compare-add.is-active .compare-icon-svg {
    color: #28a745;
}

.compare-table-wrap {
    overflow-x: auto;
}
.compare-grid--labels {
    min-width: 160px;
}
.compare-label,
.compare-cell {
    padding: 10px 12px;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}
.compare-label {
    font-weight: 600;
    color: #333;
}
.compare-cell--name a {
    font-weight: 600;
}
/* Сравнение: выравнивание строк между колонками */
.compare-grid--labels,
.compare-grid--product {
    display: flex;
    flex-direction: column;
}
.compare-label,
.compare-cell {
    flex: 0 0 auto;
}

/* Таблица сравнения: строки синхронны между колонками */
.compare-matrix th.compare-th { width: 180px; vertical-align: top; font-weight: 600; font-size: 14px; }
.compare-matrix td.compare-td { vertical-align: top; }
.compare-name-row {
    display: flex;
    flex-wrap: wrap;
    flex-direction:column;
    gap: 0.5rem 1rem;
}
.compare-title-link { font-weight: 600; }

/* compare: cart link + remove button */
.compare-btn-cart {
    text-decoration: none;
    white-space: nowrap;
}
.compare-btn-cart:hover,
.compare-btn-cart:focus {
    color: #fff;
    text-decoration: none;
}
.compare-btn-remove {
    text-decoration: none !important;
    background: #dc3545 !important;
    color: #fff !important;
    border-radius: 40px;
}
.compare-btn-remove:hover,
.compare-btn-remove:focus {
    background-color: #c82333 !important;
    color: #fff !important;
    border-color: #bd2130 !important;
    text-decoration: none !important;
}

/* Тулбар сравнения: подписи как у строк таблицы (.compare-th) */
.compare-toolbar-label {
    font-size: 14px;
    line-height: 1.4;
    font-weight: 600;
    color: #333;
}
.compare-toolbar-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
}
.compare-toolbar-label--shown {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Режим «все / только отличия»: раздельно, без рамки фокуса, active чуть темнее */
.compare-mode-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}
.compare-mode-btn {
    margin: 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.45;
    font-weight: 400;
    padding: 0.4rem 0.9rem;
    border: 1px solid #ced4da;
    border-radius: 4px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.compare-mode-btn:hover {
    background: #f8f9fa;
}
.compare-mode-btn:focus,
.compare-mode-btn:active,
.compare-mode-btn:focus-visible {
    outline: none;
    box-shadow: none;
}
.compare-mode-btn.active {
    background: #dee2e6;
    border-color: #c1c9d0;
    color: #212529;
}
.compare-mode-btn.active:hover {
    background: #d3d8dc;
}
