.compare-dock[hidden] {
    display: none !important;
}

.compare-dock {
    position: fixed;
    z-index: 950;
    right: 22px;
    bottom: 22px;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: calc(100% - 44px);
    padding: 13px 15px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    background: #102d54;
    box-shadow: 0 16px 38px rgba(3, 19, 43, .28);
    color: #fff;
}

body:has(.catalog-selection:not([hidden])) .compare-dock {
    bottom: 106px;
}

.page-compare .compare-dock {
    display: none !important;
}

.compare-dock__copy {
    display: flex;
    align-items: center;
    gap: 9px;
    font: 700 14px/1.35 "Noto Sans", sans-serif;
}

.compare-dock__count {
    display: inline-flex;
    width: 27px;
    height: 27px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    color: #0E50BD;
}

.compare-dock__actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.compare-dock__link,
.compare-dock__clear {
    display: inline-flex;
    min-height: 37px;
    align-items: center;
    justify-content: center;
    padding: 0 13px;
    border: 0;
    border-radius: 8px;
    font: 700 13px/1 "Noto Sans", sans-serif;
    cursor: pointer;
}

.compare-dock__link {
    background: #fff;
    color: #0E50BD;
    text-decoration: none;
}

.compare-dock__clear {
    background: transparent;
    color: #fff;
}

.compare-dock__link:hover,
.compare-dock__link:focus-visible,
.compare-dock__clear:hover,
.compare-dock__clear:focus-visible {
    background: #CA0505;
    color: #fff;
}

[data-compare-product][aria-pressed="true"] {
    background: #CA0505 !important;
    color: #fff !important;
}

#product-catalog .catalog-compare-button,
.related-compounds-section .related-compare-button {
    position: absolute;
    z-index: 4;
    top: 10px;
    left: 12px;
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #dce6f1;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 8px rgba(20, 47, 78, .08);
    color: #0E50BD;
    font: 700 12px/1 "Noto Sans", sans-serif;
    cursor: pointer;
}

#product-catalog .product-thumbnail__media:has(.controlled-substance-image-badge) .catalog-compare-button,
.related-compounds-section .product-thumbnail__media:has(.controlled-substance-image-badge) .related-compare-button {
    top: 52px;
}

.most-demand-products .home-compare-button,
.wishlist-card .wishlist-compare-button {
    position: absolute;
    z-index: 4;
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #dce6f1;
    border-radius: 999px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 2px 8px rgba(20, 47, 78, .08);
    color: #0E50BD;
    font: 700 12px/1 "Noto Sans", sans-serif;
    cursor: pointer;
}

.most-demand-products .home-compare-button {
    top: 10px;
    left: 10px;
}

.most-demand-products .product-thumbnail__media:has(.controlled-substance-image-badge) .home-compare-button {
    top: 52px;
}

.wishlist-card .wishlist-compare-button {
    bottom: 12px;
    left: 14px;
}

.compare-page {
    min-height: 58vh;
    padding: clamp(22px, 3vw, 42px) 0 clamp(56px, 6vw, 88px);
    overflow-x: clip;
    background: #fff;
    color: #000;
}

.compare-page__container {
    /* width: min(1440px, 100%); */
    margin-inline: auto;
    padding-inline: clamp(16px, 3vw, 48px);
    box-sizing: border-box;
}

.compare-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-bottom: 22px;
    color: #000;
    font-size: 14px;
}

.compare-breadcrumb a {
    color: #000;
    text-decoration: none;
}

.compare-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 24px;
}

.compare-header > div {
    min-width: 0;
}

.compare-header h1 {
    margin: 0 0 8px;
    color: #000;
    font-size: clamp(30px, 4vw, 46px);
}

.compare-header h1 span {
    color: #000;
    font-size: .55em;
}

.compare-header p {
    margin: 0;
    color: #000;
    font-size: 16px;
}

.compare-button {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: 9px;
    font: 700 13px/1 "Noto Sans", sans-serif;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.compare-button:focus-visible,
.compare-product__remove:focus-visible,
.compare-mobile-card__remove:focus-visible,
.compare-product__link:focus-visible,
.compare-mobile-card__identity a:focus-visible {
    outline: 3px solid rgba(14, 80, 189, .28);
    outline-offset: 3px;
}

.compare-button:disabled {
    cursor: not-allowed;
    opacity: .5;
}

.compare-button--primary {
    background: #0E50BD;
    color: #fff;
}

.compare-button--secondary {
    border-color: #cbd8e7;
    background: #fff;
    color: #000;
}

.compare-button:is(:hover, :focus-visible) {
    border-color: #CA0505;
    background: #CA0505;
    color: #fff;
}

.compare-empty {
    display: grid;
    justify-items: center;
    padding: 70px 24px;
    border: 1px solid #dce6f1;
    border-radius: 16px;
    background: #fff;
    text-align: center;
}

.compare-empty__icon {
    display: grid;
    width: 68px;
    height: 68px;
    margin-bottom: 18px;
    place-items: center;
    border-radius: 50%;
    background: #eaf2ff;
    color: #000;
    font-size: 26px;
}

.compare-empty h2 {
    margin: 0 0 8px;
    color: #000;
}

.compare-empty p {
    margin: 0 0 22px;
    color: #000;
}

.compare-notice {
    margin-bottom: 16px;
    padding: 12px 16px;
    border: 1px solid #cfe0f8;
    border-radius: 10px;
    background: #eaf3ff;
    color: #000;
}

.compare-table-wrap {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: #7b8da3 #edf1f6;
    scrollbar-width: thin;
    border: 1px solid #dce6f1;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 30px rgba(20, 47, 78, .07);
}

.compare-table-wrap:focus-visible {
    outline: 3px solid rgba(14, 80, 189, .22);
    outline-offset: 3px;
}

.compare-table-wrap::-webkit-scrollbar {
    height: 11px;
}

.compare-table-wrap::-webkit-scrollbar-track {
    background: #edf1f6;
}

.compare-table-wrap::-webkit-scrollbar-thumb {
    border: 3px solid #edf1f6;
    border-radius: 999px;
    background: #7b8da3;
}

.compare-table {
    width: 100%;
    min-width: 560px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    color: #000;
}

.compare-table[data-columns="2"] {
    min-width: 760px;
}

.compare-table[data-columns="3"] {
    min-width: 960px;
}

.compare-table[data-columns="4"] {
    min-width: 1160px;
}

.compare-table th,
.compare-table td {
    width: 215px;
    padding: 15px 18px;
    border-right: 1px solid #e4ebf3;
    border-bottom: 1px solid #e4ebf3;
    vertical-align: top;
    overflow-wrap: anywhere;
}

.compare-table tr > :last-child {
    border-right: 0;
}

.compare-table tbody tr:last-child > * {
    border-bottom: 0;
}

.compare-table__label,
.compare-table tbody th {
    position: sticky;
    left: 0;
    z-index: 2;
    width: 190px;
    background: #f1f6fc;
    color: #000;
    font-weight: 700;
}

.compare-table__label {
    z-index: 3;
}

.compare-table tbody tr:nth-child(even) td {
    background: #fbfdff;
}

.compare-product {
    position: relative;
    display: flex;
    min-height: 335px;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
}

.compare-product__remove {
    position: absolute;
    top: -6px;
    right: -7px;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 0;
    border-radius: 50%;
    background: #eff4fa !important;
    color: #000 !important;
    cursor: pointer;
}

.compare-product__remove:hover,
.compare-product__remove:focus-visible {
    background: #CA0505 !important;
    color: #fff !important;
}

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

.compare-product h2 {
    margin: 0;
    color: #000;
    font-size: 18px;
    line-height: 1.35;
}

.compare-product__link {
    color: #000;
    font-size: 13px;
    font-weight: 700;
}

.compare-product .compare-button {
    width: 100%;
    margin-top: auto;
}

.compare-table__stock[data-stock="Instock"] {
    color: #16812c;
    font-weight: 700;
}

.compare-add-more {
    display: flex;
    justify-content: center;
    margin-top: 22px;
}

.compare-scroll-hint,
.compare-mobile-list {
    display: none;
}

.compare-scroll-hint {
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    color: #000;
    font-size: 13px;
}

@media (min-width: 768px) and (max-width: 1199px) {
    .compare-scroll-hint {
        display: flex;
    }

    .compare-product {
        min-height: 315px;
    }

    .compare-product img {
        height: 135px;
    }

    .compare-table[data-columns="2"] {
        min-width: 700px;
    }

    .compare-table[data-columns="3"] {
        min-width: 880px;
    }

    .compare-table[data-columns="4"] {
        min-width: 1060px;
    }

    .compare-table th,
    .compare-table td {
        width: 220px;
        padding: 14px 15px;
    }

    .compare-table__label,
    .compare-table tbody th {
        width: 165px;
    }
}

@media (max-width: 767px) {
    .compare-page {
        padding-top: 18px;
        padding-bottom: calc(82px + env(safe-area-inset-bottom));
    }

    .compare-page__container {
        padding-inline: 16px;
    }

    .compare-dock {
        right: 12px;
        bottom: calc(78px + env(safe-area-inset-bottom));
        left: 12px;
        flex-wrap: wrap;
        justify-content: space-between;
        max-width: none;
    }

    body:has(.catalog-selection:not([hidden])) .compare-dock {
        bottom: calc(142px + env(safe-area-inset-bottom));
    }

    .compare-dock__copy {
        width: 100%;
    }

    .compare-dock__actions {
        width: 100%;
    }

    .compare-dock__link {
        flex: 1;
    }

    .compare-header {
        flex-direction: column;
        gap: 18px;
        margin-bottom: 20px;
    }

    .compare-header h1 {
        font-size: clamp(28px, 9vw, 38px);
        line-height: 1.08;
        overflow-wrap: anywhere;
    }

    .compare-header p {
        font-size: 15px;
        line-height: 1.55;
    }

    .compare-header > .compare-button {
        width: 100%;
        min-height: 46px;
    }

    .compare-breadcrumb {
        margin-bottom: 16px;
        font-size: 13px;
    }

    .compare-notice {
        font-size: 14px;
        line-height: 1.5;
    }

    .compare-table-wrap,
    .compare-scroll-hint {
        display: none;
    }

    .compare-mobile-list {
        display: grid;
        gap: 18px;
        min-width: 0;
    }

    .compare-mobile-card {
        min-width: 0;
        overflow: hidden;
        border: 1px solid #dce3ec;
        border-radius: 14px;
        background: #fff;
        box-shadow: 0 8px 24px rgba(20, 47, 78, .07);
    }

    .compare-mobile-card__header {
        display: flex;
        min-height: 48px;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 8px 12px 8px 16px;
        border-bottom: 1px solid #e4e9ef;
        background: #f7f8fa;
    }

    .compare-mobile-card__header > span {
        font-size: 12px;
        font-weight: 700;
        letter-spacing: .04em;
        text-transform: uppercase;
    }

    .compare-mobile-card__remove {
        display: inline-flex;
        min-height: 40px;
        align-items: center;
        justify-content: center;
        gap: 6px;
        padding: 0 12px;
        border: 0;
        border-radius: 8px;
        font: 700 12px/1 "Noto Sans", sans-serif;
        cursor: pointer;
    }

    .compare-mobile-card__image {
        display: block;
        width: calc(100% - 32px);
        height: clamp(150px, 46vw, 205px);
        margin: 16px;
        object-fit: contain;
    }

    .compare-mobile-card__identity {
        padding: 0 16px 16px;
    }

    .compare-mobile-card__identity h2 {
        margin: 0 0 10px;
        color: #000;
        font-size: clamp(20px, 6vw, 25px);
        line-height: 1.3;
        overflow-wrap: anywhere;
    }

    .compare-mobile-card__identity a {
        display: inline-flex;
        min-height: 36px;
        align-items: center;
        gap: 8px;
        color: #000;
        font-size: 13px;
        font-weight: 700;
        text-underline-offset: 3px;
    }

    .compare-mobile-card__specifications {
        margin: 0;
        border-top: 1px solid #e4e9ef;
    }

    .compare-mobile-card__specifications > div {
        display: grid;
        grid-template-columns: minmax(105px, 42%) minmax(0, 58%);
        gap: 12px;
        padding: 12px 16px;
        border-bottom: 1px solid #e4e9ef;
    }

    .compare-mobile-card__specifications > div:nth-child(even) {
        background: #fafafa;
    }

    .compare-mobile-card__specifications dt,
    .compare-mobile-card__specifications dd {
        margin: 0;
        color: #000;
        font-size: 13px;
        line-height: 1.45;
        overflow-wrap: anywhere;
    }

    .compare-mobile-card__specifications dt {
        font-weight: 700;
    }

    .compare-mobile-card__specifications dd {
        font-weight: 500;
    }

    .compare-mobile-card__cart {
        box-sizing: border-box;
        width: calc(100% - 32px);
        min-height: 48px;
        margin: 16px;
    }

    .compare-add-more {
        margin-top: 18px;
    }

    .compare-add-more .compare-button {
        width: 100%;
        min-height: 48px;
    }

    .compare-empty {
        padding: 48px 18px;
    }

    .compare-empty p {
        max-width: 340px;
        line-height: 1.55;
    }
}

@media (max-width: 420px) {
    .compare-page__container {
        padding-inline: 12px;
    }

    .compare-mobile-card__specifications > div {
        grid-template-columns: minmax(92px, 40%) minmax(0, 60%);
        gap: 9px;
        padding-inline: 13px;
    }

    .compare-mobile-card__header {
        padding-left: 13px;
    }

    .compare-mobile-card__remove {
        padding-inline: 10px;
    }

    .compare-header h1 span {
        display: block;
        margin-top: 6px;
        font-size: .48em;
    }

    .compare-empty {
        padding: 38px 15px;
    }

    .compare-empty .compare-button {
        width: 100%;
        min-height: 46px;
    }
}

@media (max-width: 359.98px) {
    .compare-page__container {
        padding-inline: 8px;
    }

    .compare-mobile-card__header {
        align-items: flex-start;
        flex-direction: column;
        padding: 12px;
    }

    .compare-mobile-card__remove {
        width: 100%;
        min-height: 42px;
    }

    .compare-mobile-card__specifications > div {
        grid-template-columns: minmax(0, 1fr);
        gap: 5px;
        padding: 11px 12px;
    }

    .compare-mobile-card__specifications dd {
        padding-left: 10px;
        border-left: 3px solid #dce6f1;
    }
}

@media (min-width: 1200px) {
    .compare-table-wrap {
        overflow-x: auto;
    }

    .compare-table[data-columns="1"],
    .compare-table[data-columns="2"],
    .compare-table[data-columns="3"] {
        min-width: 100%;
    }
}
