.product-compare-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 16px;
    margin-top: 12px;
}

.compare-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    max-width: 100%;
    padding: 8px 14px;
    border: 1px solid #78492e;
    border-radius: 8px;
    background: #fff;
    color: #492c1e;
    font: inherit;
    font-size: .875rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.compare-outline:hover {
    background: #f5eee8;
    color: #492c1e;
}

.product-compare-actions > a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #78492e;
    text-decoration: underline;
}

.compare-outline:focus-visible,
.compare-table-scroll:focus-visible,
.product-compare-actions > a:focus-visible {
    outline: 2px solid #78492e;
    outline-offset: 2px;
}

.product-comparison {
    padding-block: 22px 48px;
}

@media (max-width: 767px) {
    .product-comparison.pad20 {
        padding: 11px 10px 24px;
    }
}

.product-comparison h1 {
    color: #492c1e;
    margin: 16px 0;
    font-size: clamp(1.5rem, 4vw, 2.125rem);
}

.compare-table-scroll {
    max-width: 100%;
    overflow-x: auto;
    border: 1px solid #e6d9ce;
    border-radius: 12px;
    background: #fff;
}

.compare-table-scroll:has(.product_header):not(:has(.product_header ~ .product_header)) {
    max-width: 36rem;
}

.compare-table-scroll:has(.product_header):not(:has(.product_header ~ .product_header)) .tbl_compare tr > th:first-child {
    width: 36%;
}

.compare-table-scroll:has(.product_header):not(:has(.product_header ~ .product_header)) .compare-product-name img {
    height: clamp(95px, 32vw, 155px);
    object-position: left center;
}

.compare-table-scroll:has(.product_header:nth-child(4)) .tbl_compare {
    min-width: 440px;
}

.product-comparison .tbl_compare {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    color: #281d17;
    background: #fff;
}

.product-comparison .tbl_compare th,
.product-comparison .tbl_compare td {
    display: table-cell;
    padding: 12px 16px;
    border-bottom: 1px solid #e6d9ce;
    vertical-align: middle;
    text-align: left;
    overflow-wrap: anywhere;
}

.product-comparison .tbl_compare td {
    border-left: 1px solid #e6d9ce;
}

.product-comparison .tbl_compare tr > th:first-child {
    width: 24%;
}

.product-comparison .tbl_compare tr:nth-child(even) {
    background: #f5eee8;
}

.product-comparison .tbl_compare .product_header {
    vertical-align: top;
}

.compare-product-name {
    display: grid;
    gap: 8px;
    color: #492c1e;
    font-weight: 700;
}

.compare-product-name img {
    width: 100%;
    height: clamp(95px, 17vw, 215px);
    object-fit: contain;
}

.compare-price {
    color: #492c1e;
    margin: 8px 0;
}

.compare-price strong,
.compare-price del {
    display: inline-block;
    white-space: nowrap;
}

.compare-column-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.compare-empty {
    padding: 16px;
    border: 1px solid #e6d9ce;
    border-radius: 8px;
    background: #fff;
}

.compare-table-scroll:has(.product_header) + .compare-empty,
.compare-table-scroll:not(:has(.product_header)) {
    display: none;
}

.compare-scroll-hint {
    display: none;
    margin: 0 0 8px;
    color: #6b412a;
    font-size: .875rem;
}

@media (max-width: 639px) {
    .product-comparison:has(.product_header:nth-child(4)) .compare-scroll-hint {
        display: block;
    }

    .compare-table-scroll:has(.product_header:nth-child(4)) {
        overscroll-behavior-inline: contain;
        scrollbar-width: thin;
        scrollbar-color: #78492e #f5eee8;
    }

    .compare-table-scroll:has(.product_header:nth-child(4)) .tbl_compare {
        min-width: 640px;
    }

    .compare-table-scroll:has(.product_header:nth-child(4)) .tbl_compare tr > th:first-child {
        position: sticky;
        inset-inline-start: 0;
        width: 7.25rem;
        z-index: 1;
        background: #fff;
        box-shadow: 1px 0 #e6d9ce;
    }

    .compare-table-scroll:has(.product_header:nth-child(4)) .tbl_compare tr:nth-child(even) > th:first-child {
        background: #f5eee8;
    }
}

@media (max-width: 575px) {
    .product-comparison .tbl_compare th,
    .product-comparison .tbl_compare td {
        padding: 8px 6px;
        font-size: .8125rem;
    }

    .product-comparison .tbl_compare tr > th:first-child {
        width: 28%;
    }

    .compare-column-actions .compare-outline {
        padding-inline: 5px;
        font-size: .75rem;
    }
}
