.compare-page {
    width: 100%;
    max-width: 1160px;
    margin: 0 auto 56px;
    min-width: 0;
}

.compare-page__hero {
    padding-top: 18px;
    margin-bottom: 22px;
}

.compare-page__breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 18px;
    color: #6d737b;
    font-size: 14px;
}

.compare-page__breadcrumbs a {
    color: inherit;
    text-decoration: none;
}

.compare-page__breadcrumbs a:hover {
    color: #c2181f;
}

.compare-page__hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.compare-page h1 {
    margin: 0 0 12px;
    color: #303030;
    font-size: clamp(32px, 5vw, 48px);
    font-weight: 500;
    line-height: 1;
}

.compare-page__lead {
    max-width: 720px;
    margin: 0;
    color: #5f6770;
    font-size: 18px;
    line-height: 1.5;
}

.compare-page__clear-form {
    flex-shrink: 0;
}

.compare-page__clear {
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid rgba(48, 48, 48, 0.12);
    border-radius: 999px;
    background: #fff;
    color: #303030;
    font-size: 14px;
    cursor: pointer;
}

.compare-page__clear:hover {
    border-color: rgba(194, 24, 31, 0.3);
    color: #c2181f;
}

.compare-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 22px;
    margin-bottom: 16px;
    border: 1px solid rgba(48, 48, 48, 0.08);
    border-radius: 22px;
    background: #fbfbfb;
}

.compare-summary__meta {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.compare-summary__pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(194, 24, 31, 0.08);
    color: #c2181f;
    font-size: 14px;
    font-weight: 500;
}

.compare-summary__muted {
    color: #6d737b;
    font-size: 14px;
}

.compare-summary__toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #303030;
    font-size: 14px;
    cursor: pointer;
}

.compare-summary__toggle input {
    width: 16px;
    height: 16px;
    accent-color: #c2181f;
}

.compare-note {
    padding: 16px 18px;
    margin-bottom: 14px;
    border: 1px solid rgba(48, 48, 48, 0.08);
    border-radius: 18px;
    background: #f8f8f8;
    color: #4d555e;
    font-size: 14px;
    line-height: 1.5;
}

.compare-note--warning {
    background: #fff8f2;
    border-color: rgba(194, 24, 31, 0.12);
}

.compare-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.compare-product-card {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    padding: 18px;
    border: 1px solid rgba(48, 48, 48, 0.08);
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(28, 32, 36, 0.06);
}

.compare-product-card__remove {
    position: absolute;
    top: 14px;
    right: 14px;
}

.compare-product-card__remove button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: #f3f3f3;
    color: #303030;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}

.compare-product-card__remove button:hover {
    background: #fdecec;
    color: #c2181f;
}

.compare-product-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    margin-bottom: 14px;
    border-radius: 18px;
    background: #fafafa;
    text-decoration: none;
}

.compare-product-card__image img {
    max-width: 100%;
    max-height: 160px;
    object-fit: contain;
}

.compare-product-card__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.compare-product-card__brand {
    margin: 0 0 6px;
    color: #8a8f96;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.compare-product-card__title {
    margin: 0 0 8px;
    color: #303030;
    font-size: 18px;
    line-height: 1.35;
    text-decoration: none;
}

.compare-product-card__title:hover {
    color: #c2181f;
}

.compare-product-card__article {
    margin: 0 0 14px;
    color: #6d737b;
    font-size: 14px;
}

.compare-product-card__price {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 10px;
    align-items: baseline;
    margin-top: auto;
    min-height: 26px;
}

.compare-product-card__price-current {
    color: #111827;
    font-size: 22px;
    font-weight: 500;
}

.compare-product-card__price-old {
    color: #9ca3af;
    font-size: 15px;
    text-decoration: line-through;
}

.compare-product-card__hint {
    color: #5f6770;
    font-size: 14px;
    line-height: 1.45;
}

.compare-product-card__actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 16px;
}

.compare-product-card__secondary,
.compare-product-card__primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 12px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.compare-product-card__secondary {
    border: 1px solid rgba(48, 48, 48, 0.12);
    background: #fff;
    color: #303030;
}

.compare-product-card__secondary:hover {
    color: #c2181f;
    border-color: rgba(194, 24, 31, 0.28);
}

.compare-product-card__primary {
    border: 1px solid #303030;
    background: #303030;
    color: #fff;
    cursor: pointer;
}

.compare-product-card__primary:hover {
    background: #1f1f1f;
    border-color: #1f1f1f;
}

.compare-product-card__primary.is-added {
    background: #3a7a63;
    border-color: #3a7a63;
}

.compare-product-card__primary--muted,
.compare-product-card__primary:disabled {
    background: #ececec;
    border-color: #ececec;
    color: #6d737b;
    cursor: default;
}

.compare-table-wrap {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid rgba(48, 48, 48, 0.08);
    border-radius: 24px;
    background: #fff;
}

.compare-table__hint {
    display: none;
}

.compare-table {
    min-width: 780px;
}

.compare-table__section {
    padding: 14px 20px;
    border-top: 1px solid rgba(48, 48, 48, 0.08);
    border-bottom: 1px solid rgba(48, 48, 48, 0.08);
    background: #f8f8f8;
    color: #303030;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.compare-table__row {
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) repeat(var(--compare-cols, 2), minmax(180px, 1fr));
}

.compare-table__row + .compare-table__row {
    border-top: 1px solid rgba(48, 48, 48, 0.06);
}

.compare-table__row--head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #303030;
    color: #fff;
}

.compare-table__cell {
    padding: 16px 18px;
    color: #303030;
    font-size: 14px;
    line-height: 1.45;
}

.compare-table__cell--label {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #fff;
    color: #6d737b;
    font-weight: 500;
}

.compare-table__row--head .compare-table__cell--label,
.compare-table__row--head .compare-table__cell {
    background: #303030;
    color: #fff;
}

.compare-table__cell--product {
    font-weight: 500;
}

.compare-table__row.is-same .compare-table__cell {
    background: #fcfcfc;
}

.compare-table__row.is-same .compare-table__cell--label {
    background: #fcfcfc;
}

.compare-table__row.is-hidden {
    display: none;
}

.compare-empty {
    padding: 48px 28px;
    border: 1px dashed rgba(48, 48, 48, 0.16);
    border-radius: 24px;
    background: #fbfbfb;
    text-align: center;
}

.compare-empty h2 {
    margin: 0 0 12px;
    color: #303030;
    font-size: 28px;
    font-weight: 500;
}

.compare-empty p {
    max-width: 620px;
    margin: 0 auto 20px;
    color: #5f6770;
    font-size: 16px;
    line-height: 1.55;
}

.compare-empty__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 18px;
    border-radius: 999px;
    background: #303030;
    color: #fff;
    text-decoration: none;
}

.compare-empty__link:hover {
    background: #1f1f1f;
}

@media (max-width: 1023px) {
    .compare-page {
        max-width: 944px;
        padding: 0 20px;
    }

    .compare-page__hero-top,
    .compare-summary {
        flex-direction: column;
        align-items: stretch;
    }

    .compare-products {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .compare-page {
        max-width: 96%;
        margin-bottom: 36px;
        padding: 0;
    }

    .compare-page__lead {
        font-size: 16px;
    }

    .compare-page__hero-top {
        gap: 16px;
    }

    .compare-page__clear-form,
    .compare-page__clear {
        width: 100%;
    }

    .compare-summary {
        gap: 14px;
        padding: 16px;
        border-radius: 18px;
    }

    .compare-summary__toggle {
        min-height: 38px;
        padding-top: 12px;
        border-top: 1px solid rgba(48, 48, 48, 0.08);
    }

    .compare-products {
        display: flex;
        gap: 12px;
        width: 100%;
        margin-right: 0;
        padding: 0 0 8px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-padding-left: 0;
        scrollbar-width: thin;
    }

    .compare-product-card {
        flex: 0 0 min(80vw, 320px);
        scroll-snap-align: start;
        padding: 16px;
    }

    .compare-products--single {
        display: grid;
        margin-right: 0;
        padding-right: 0;
        overflow: visible;
    }

    .compare-products--single .compare-product-card {
        width: 100%;
        max-width: none;
    }

    .compare-table-wrap {
        border-radius: 18px;
    }

    .compare-table {
        width: max-content;
        min-width: 480px;
    }

    .compare-table__hint {
        display: block;
        margin: 0;
        padding: 12px 14px;
        border-bottom: 1px solid rgba(48, 48, 48, 0.08);
        color: #6d737b;
        font-size: 13px;
        line-height: 1.4;
    }

    .compare-table__row {
        grid-template-columns: 140px repeat(var(--compare-cols, 2), 170px);
    }

    .compare-table__cell {
        padding: 14px 14px;
        font-size: 13px;
    }
}
