main {
    .compare {
        padding: 12px 0 100px;
        .head {
            margin-bottom: 24px;
            h1 {
                font-size: 32px;
                line-height: 1.1;
                color: var(--text-7);
                .count {
                    display: inline-block;
                    margin-left: 10px;
                    font-size: 18px;
                    font-weight: 600;
                    line-height: 28px;
                    color: var(--text-1);
                    &:empty {
                        display: none;
                    }
                }
            }
        }
        .content {
            --label-width: 360px;
            --product-width: 360px;
            .table {
                overflow-x: auto;
                scrollbar-width: none;
                &::-webkit-scrollbar {
                    display: none;
                }
                .row {
                    display: grid;
                    grid-template-columns: var(--label-width) repeat(var(--products), var(--product-width));
                    width: max-content;
                    &.products {
                        margin-bottom: 0;
                        .intro {
                            display: flex;
                            flex-direction: column;
                            justify-content: space-between;
                            gap: 20px;
                            position: sticky;
                            left: 0;
                            z-index: 3;
                            padding: 20px;
                            border: var(--border-6);
                            border-bottom: 0;
                            border-radius: 20px 20px 0 0;
                            background: var(--bg-3);
                            h2 {
                                font-size: 24px;
                                line-height: 1.1;
                                color: var(--text-7);
                            }
                            .differences {
                                display: flex;
                                align-items: center;
                                justify-content: space-between;
                                gap: 12px;
                                width: 100%;
                                min-height: 50px;
                                padding: 13px 16px;
                                border-radius: 12px;
                                background: var(--bg-4);
                                font-size: 14px;
                                font-weight: 700;
                                line-height: 20px;
                                color: var(--text-1);
                                &:hover {
                                    box-shadow: var(--shadow-1);
                                }
                                .track {
                                    position: relative;
                                    flex: none;
                                    width: 46px;
                                    height: 24px;
                                    border-radius: 10px;
                                    background: var(--text-3);
                                    transition: background 0.2s;
                                    &::before {
                                        position: absolute;
                                        top: 2px;
                                        left: 2px;
                                        width: 27px;
                                        height: 20px;
                                        border-radius: 8px;
                                        background: var(--bg-8);
                                        box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.25);
                                        content: '';
                                        transition: transform 0.2s, background 0.2s;
                                    }
                                }
                                &.active {
                                    .track {
                                        background: var(--bg-1);
                                        &::before {
                                            background: var(--bg-5);
                                            transform: translateX(15px);
                                        }
                                    }
                                }
                            }
                        }
                        .product-card {
                            border-left: 0;
                            border-bottom: 0;
                            border-radius: 20px 20px 0 0;
                            &:hover {
                                box-shadow: none;
                            }
                            .meta {
                                padding-right: 0;
                                .controls {
                                    position: relative;
                                    display: flex;
                                    flex: none;
                                    margin-left: auto;
                                    padding-left: 38px;
                                    .actions {
                                        top: 0;
                                        right: 102px;
                                        background: var(--bg-3);
                                    }
                                    .remove {
                                        display: flex;
                                        align-items: center;
                                        justify-content: center;
                                        gap: 4px;
                                        width: 96px;
                                        height: 32px;
                                        border-radius: 8px;
                                        background: var(--bg-3);
                                        font-size: 12px;
                                        font-weight: 700;
                                        line-height: 14px;
                                        color: var(--text-1);
                                        &::before {
                                            font-family: icon;
                                            font-size: 16px;
                                            content: '\f03b';
                                        }
                                        &:hover {
                                            background: var(--bg-8);
                                            color: var(--text-10);
                                        }
                                        &:disabled {
                                            opacity: 0.5;
                                            cursor: wait;
                                        }
                                    }
                                }
                            }
                            .image {
                                height: auto;
                                aspect-ratio: 320 / 224;
                            }
                            .purchase {
                                &:has(.login) {
                                    padding-top: 0;
                                }
                            }
                        }
                    }
                    &.specification {
                        min-height: 60px;
                        background: var(--bg-4);
                        &:nth-child(even) {
                            background: var(--bg-24);
                        }
                        &.stock-row {
                            .cell {
                                .product-stock {
                                    font-size: 16px;
                                    font-weight: 400;
                                    line-height: 20px;
                                }
                            }
                        }
                        &.price-row {
                            background: transparent;
                            &.same-unit {
                                .cell {
                                    &.value {
                                        .price {
                                            .unit {
                                                display: none;
                                            }
                                        }
                                    }
                                }
                            }
                            .cell {
                                display: flex;
                                background: var(--bg-3);
                                align-items: center;
                                border-bottom: var(--border-6);
                                border-radius: 0 0 20px 20px;
                                &.label {
                                    flex-direction: column;
                                    align-items: flex-start;
                                    justify-content: center;
                                    gap: 8px;
                                    .title {
                                        &::after {
                                            margin-left: 4px;
                                            font-family: icon;
                                            font-size: 12px;
                                            content: '\f007';
                                        }
                                    }
                                    .tax {
                                        font-size: 12px;
                                        font-weight: 400;
                                        line-height: 14px;
                                        color: var(--text-1);
                                    }
                                }
                                &.value {
                                    .price {
                                        display: flex;
                                        align-items: center;
                                        flex-wrap: wrap;
                                        gap: 10px;
                                        .current {
                                            font-size: 20px;
                                            font-weight: 700;
                                            line-height: 24px;
                                        }
                                        .old {
                                            font-size: 14px;
                                            color: var(--text-3);
                                            text-decoration: line-through;
                                        }
                                        .unit {
                                            font-size: 14px;
                                        }
                                        .tax {
                                            display: none;
                                        }
                                    }
                                }
                            }
                        }
                        .cell {
                            min-width: 0;
                            padding: 20px;
                            border-right: var(--border-6);
                            background: inherit;
                            font-size: 16px;
                            line-height: 20px;
                            color: var(--text-7);
                            overflow-wrap: anywhere;
                            &.label {
                                position: sticky;
                                left: 0;
                                z-index: 2;
                                border-left: var(--border-6);
                                font-size: 14px;
                                font-weight: 700;
                            }
                        }
                    }
                }
            }
            .scroll {
                display: none;
                height: 16px;
                margin: 24px 0 0 var(--label-width);
                overflow-x: scroll;
                overflow-y: hidden;
                border-radius: 6px;
                background: var(--bg-3);
                &.active {
                    display: block;
                }
                .space {
                    height: 1px;
                }
                &::-webkit-scrollbar {
                    height: 16px;
                }
                &::-webkit-scrollbar-button {
                    display: none;
                }
                &::-webkit-scrollbar-track {
                    border-radius: 6px;
                    background: var(--bg-3);
                }
                &::-webkit-scrollbar-thumb {
                    border: 4px solid var(--bg-3);
                    border-radius: 6px;
                    background: var(--text-1);
                }
                @supports not selector(::-webkit-scrollbar) {
                    scrollbar-width: thin;
                    scrollbar-color: var(--text-1) var(--bg-3);
                }
            }
            .empty {
                display: flex;
                flex-direction: column;
                align-items: center;
                gap: 24px;
                padding: 60px 24px;
                border-radius: 20px;
                background: var(--bg-3);
                text-align: center;
                p {
                    max-width: 720px;
                    font-size: 18px;
                    line-height: 24px;
                }
                a {
                    width: 300px;
                    max-width: 100%;
                }
            }
            .loading {
                padding: 24px 0;
                line-height: 20px;
            }
        }
        .advantages {
            margin: 100px 50px 0;
        }
    }
}
@media (max-width: 1279px) {
    main {
        .compare {
            width: calc(100% - 48px);
            padding-bottom: 80px;
            .head {
                h1 {
                    font-size: 28px;
                }
            }
            .content {
                --label-width: 240px;
            }
            .advantages {
                margin: 80px 0 0;
            }
        }
    }
}
@media (max-width: 767px) {
    main {
        .compare {
            width: calc(100% - 32px);
            padding-bottom: 60px;
            .head {
                h1 {
                    font-size: 26px;
                }
            }
            .content {
                --label-width: 160px;
                --product-width: calc(100vw - 32px);
                .empty {
                    padding: 32px 16px;
                    p {
                        font-size: 14px;
                        line-height: 20px;
                    }
                }
                .table {
                    .row {
                        &.products {
                            .intro {
                                position: static;
                                .differences {
                                    flex-direction: column;
                                    align-items: flex-start;
                                    gap: 8px;
                                    padding: 12px;
                                }
                            }
                        }
                        &.specification {
                            .cell {
                                &.label {
                                    position: static;
                                }
                            }
                        }
                    }
                }
                .scroll {
                    margin-left: 0;
                }
            }
            .advantages {
                margin-top: 60px;
            }
        }
    }
}