.compare-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    margin-bottom: 32px;
}

.compare-title .toggle {
    position: relative;
    display: inline-block;
}

.compare-title .toggle__input {
    display: none;
}

.compare-title .toggle__label {
    display: block;
    width: 152px;
    height: 32px;
    font-family: 'Montserrat';
    font-weight: 500;
    font-size: 12px;
    line-height: 32px;
    padding: 0 8px;
    text-align: right;
    background-color: #F2F4F7;
    border-radius: 99px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.compare-title .toggle__input:checked+.toggle__label {
    background-color: var(--accent-yellow);
    text-align: left;
}

.compare-title .toggle__input:checked+.toggle__label::after {
    left: 126px;
}

.compare-title .toggle__label::after {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    width: 24px;
    height: 24px;
    background-color: #ffffff;
    border-radius: 50%;
    box-shadow: 0px 3px 2px 0px #101C410F, 0px 3px 8px 0px #101C4126;
    transition: left 0.3s ease;
}

.mobile-only:has(.compare-back-btn) {
    margin: 24px auto;
}

.compare-back-btn {
    width: 100%;
    display: none;
    align-items: center;
    gap: 8px;
    padding: 16px;
    font-weight: 500;
    border-radius: 14px;
    border: 1px solid #D0D5DD
}

.compare-back-btn .icon {
    transform: rotate(90deg);
    color: var(--accent);
    font-size: 20px;
}

.compare-catregory-list {
    display: flex;
    align-items: center;
    gap: 24px;
    font-weight: 500;
}

.compare-catregory-list.desktop-only {
    overflow-x: auto;
    padding-bottom: 15px;
}

.compare-catregory-list.desktop-only::-webkit-scrollbar {
	height: 5px;
}

.compare-catregory-list.desktop-only::-webkit-scrollbar-thumb {
	background: #C8C8C8;
	border-radius: 6px;
}

.compare-catregory-list.desktop-only li {
    min-width: fit-content;
}

.compare-catregory-list span:not(.count) {
    color: #939DAF;
    transition: all 0.2s ease;
}

.compare-catregory-list .active span {
    color: var(--text-color);
}

.compare-products {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(245px, 1fr));
    gap: 40px;
}

.compare-item .product__card {
    max-width: 100%;
}

.compare-item .bs-btn {
    width: 100%;
    font-size: 14px;
    border-radius: 10px;
    padding: 0 !important;
}

.compare-delete-btn {
    position: absolute;
    top: 0;
    right: 10px;
    font-size: 20px;
    color: var(--accent);
    cursor: pointer;
    transition: all 0.2s ease;
}

.compare-delete-btn:hover {
    color: var(--text-color);
}

.compare-table-wrapper {
    overflow: clip;
    position: relative;
}

.compare-table {
    position: relative;
    width: 100%;
    border-collapse: collapse;
    font-size: 20px;
}

.compare-table thead th {
    min-width: 340px;
    height: 110px;
    padding: 20px 20px 0;
}

.compare-table tr.sticky {
    position: sticky;
    overflow-x: auto;
    top: 180px;
    z-index: 1;
    background: #ffffff;
    box-shadow: 0px 4px 10px 0px #A9A9A933;
}

.compare-item {
    height: 100%;
    flex: 1 0 auto;
}

.compare-item .product__info_name {
    flex: 1 0 auto;
}

.compare-item .product__info_name .product__name {
    height: 100%;
}

.compare-item .product__description,
.compare-parameters-title {
    text-align: left;
}

.compare-parameters-title p {
    width: max-content;
    margin-left: calc(1360px / 2 - 20px - var(--scrollOffset, 0px));
    transform: translateX(-50%);
}

@media (max-width: 1400px) {
    .compare-parameters-title p {
        margin-left: calc(50vw - 20px - var(--scrollOffset, 0px));
    }

    .compare-table thead th {
        min-width: calc((100vw - 40px) / 3);
    }
}

@media (max-width: 768px) {
    .compare-table thead th {
        min-width: calc(100vw / 2);
        height: 75px;
        padding: 0;
    }
}

@media (max-width: 1400px) {

    .compare-table tr.sticky {
        top: 125px;
    }
}

@media (max-width: 768px) {
    .compare-table tr.sticky {
        top: 95px;
    }
}

.compare-table tr.sticky .product__info__header,
.compare-table tr.sticky .product__description,
.compare-table tr.sticky .product__parameters,
.compare-table tr.sticky .product__reviews-block,
.compare-table tr.sticky .bs-btn {
    display: none;
}

.compare-table tbody tr:nth-child(odd) {
    font-weight: 700;
    font-size: 20px;
    line-height: 100%;
    text-transform: uppercase;
    padding: 14px;
    background-color: #F4F5F7;
}

.compare-table tbody tr td {
    padding: 24px;
    text-align: center;
    border-right: 1px solid #D0D5DD;
    border-bottom: 1px solid #D0D5DD;
}

.compare-table tbody tr td:last-child {
    border-right: none;
}

.compare-table tbody tr:nth-child(odd) td {
    padding: 14px;
}

.compare-table .compare-parameter {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.compare-table .label {
    padding: 4px 8px;
    background: #FFF395;
}

.compare .products-slider-block {
    overflow: hidden;
}

.compare-table-wrapper .arrows {
    position: sticky;
    top: 150px;
    z-index: 5;
}

.compare-table-wrapper .arrow {
    position: absolute;
    top: 100px;
    bottom: auto;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: row;
    width: 44px;
    height: 44px;
    padding: 10px;
    color: var(--accent);
    font-size: 24px;
    border-radius: 50%;
    transition: all 0.3s ease;
    cursor: pointer;
}

.left-arrow {
    left: 0;
}

.left-arrow .icon {
    transform: rotate(180deg);
}

.right-arrow {
    right: 0;
}

.arrow.hidden {
    display: none;
}

.compare-empty {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 32px;
    padding: 80px 20px;
    color: var(--text-light);
    text-align: center;
    text-wrap: balance;
}

.compare-empty img {
    aspect-ratio: 120/102;
}

@media (max-width: 768px) {

    .compare-content>.margin-bottom {
        margin-bottom: 5px;
    }

    .compare-table-wrapper {
        margin: 0 -16px;
    }

    .compare-catregory-list.mobile-only {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .compare-catregory-list .item {
        display: flex;
        flex-direction: column;
        gap: 14px;
        padding: 16px;
        border-radius: 16px;
        border: 1px solid #D0D5DD;
    }

    .compare-catregory-list span:not(.count) {
        color: var(--text-color);
    }

    .compare-catregory-list .item .row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 16px;
    }

    .row .icons {
        display: flex;
        justify-content: flex-end;
        align-items: center;
        gap: 16px;
        font-size: 20px;
    }

    .compare-catregory-list .bs-btn {
        width: 100%;
    }

    .compare-catregory-list .count {
        background: var(--accent-yellow);
    }

    .products-row-wrapper {
        max-width: 100%;
        overflow: hidden;
    }

    .products-row {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .products-row .product-img {
        max-width: 100px;
        min-width: 100px;
    }

    .products-row .product-img img {
        aspect-ratio: 100/100;
    }

    .compare-title {
        flex-wrap: wrap;
        gap: 20px;
    }

    .compare-title .title {
        line-height: 32px;
    }

    .compare-table-wrapper,
     .products-slider-block{
        display: none;
    }

    .compare-table {
        font-size: 14px;
    }

    .compare-table tbody tr td {
        text-align: start;
        vertical-align: top;
        padding: 16px 10px;
    }

    .compare-table-wrapper .arrows {
        top: 110px;
    }

    .compare-empty img {
        width: 80px;
    }

    .compare-table tbody tr:nth-child(odd) {
        font-size: 16px;
        text-transform: none;
    }

    .compare-table .compare-parameter {
        justify-content: flex-start;
    }

    .sticky .compare-item .product__card {
        padding: 5px 5px 0;
        border-right: 0.78px solid #F4F5F7
    }

    .sticky .compare-item .product__card {
        flex-direction: row;
    }

    .sticky .product__card .top {
        padding: 5px 0;
    }

    .sticky .compare-item .product__card .product__card__img,
    .sticky .compare-item .product__card .product__card__img>img {
        width: 40px;
        height: 40px;
    }

    .compare-table-wrapper .arrows,
    .sticky .compare-item .labels-block,
    .sticky .compare-item .compare-delete-btn,
    .sticky .compare-item .cashback {
        display: none;
    }

    .sticky .compare-item .product__info {
        width: auto;
        flex: unset;
        gap: 8px;
    }

}