.section-custom-space {
    padding-bottom: calc(20px + 10 * (100vw - 320px) / 1600);
}

/* Compare block: category thumbnails (image + link) merged with product-type copy */
.cbl-compare {
    text-align: left;
}

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

.cbl-compare-arrow {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 1px solid var(--cbl-border, #E6EAF0);
    background: #FFF;
    color: var(--cbl-ink, #1C2430);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    cursor: pointer;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .08);
    transition: background .2s ease, color .2s ease, border-color .2s ease, opacity .2s ease;
}

.cbl-compare-arrow:hover:not(:disabled) {
    background: var(--theme-color, #0BAF9A);
    border-color: var(--theme-color, #0BAF9A);
    color: #FFF;
}

.cbl-compare-arrow:disabled {
    opacity: .3;
    cursor: default;
    box-shadow: none;
}

.cbl-compare-nav.is-static .cbl-compare-arrow {
    display: none;
}

.cbl-compare-tabs {
    /* --cbl-tab-base is the natural tab width; JS stretches it into --cbl-tab-width so a
       whole number of tabs fills the strip and no tab is ever cut in half */
    --cbl-tab-base: 118px;
    position: relative;
    flex: 1;
    min-width: 0;
    display: flex;
    gap: 12px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding: 4px 2px 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

/* centre only while the row fits - centring an overflowing row clips the first tabs */
.cbl-compare-tabs.is-centered {
    justify-content: center;
}

.cbl-compare-tabs::-webkit-scrollbar {
    display: none;
}

.cbl-compare-tab {
    flex: 0 0 auto;
    width: 210px;
    padding: 0 0 10px;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    cursor: pointer;
    transition: border-color .2s ease;
}

.cbl-compare-tab:focus-visible {
    outline: 2px solid var(--theme-color, #0BAF9A);
    outline-offset: 3px;
    border-radius: 12px;
}

.cbl-compare-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    border-radius: 10px;
    overflow: hidden;
    background: var(--cbl-surface, #F3F6FB);
    border: 1px solid var(--cbl-border, #E6EAF0);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.cbl-compare-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.cbl-compare-tab:hover .cbl-compare-thumb {
    transform: translateY(-3px);
    box-shadow: 0 10px 22px rgba(15, 23, 42, .12)
}

.cbl-compare-tab-label {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-top: 9px;
    font-size: 15px;
    line-height: 1.5;
    text-align: center;
    /* color: var(--cbl-muted, #64748B); */
    transition: color .2s ease;
}

.cbl-compare-tab.is-active {
    border-bottom-color: var(--theme-color, #0BAF9A);
}

.cbl-compare-tab.is-active .cbl-compare-thumb {
    border-color: var(--theme-color, #0BAF9A);
}

.cbl-compare-tab.is-active .cbl-compare-tab-label {
    color: var(--cbl-ink, #1C2430);
    font-weight: 700;
}

.cbl-compare-scrollbar {
    position: relative;
    height: 6px;
    margin: 14px 46px 0;
    border-radius: 999px;
    background: #E9EDF3;
    cursor: pointer;
}

.cbl-compare-scrollbar.is-hidden {
    display: none;
}

.cbl-compare-scrollbar-thumb {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    min-width: 40px;
    border-radius: 999px;
    background: #B8C2CE;
    transition: background .2s ease;
}

.cbl-compare-scrollbar:hover .cbl-compare-scrollbar-thumb {
    background: #94A1B2;
}

.cbl-cat-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #B7C0CB;
    font-size: 32px;
    background: var(--cbl-surface, #F3F6FB);
}

@media (max-width: 575px) {
    .cbl-compare-nav {
        gap: 6px;
    }

    .cbl-compare-arrow {
        width: 32px;
        height: 32px;
        font-size: 11px;
    }

    .cbl-compare-tabs {
        --cbl-tab-base: 96px;
    }

    .cbl-compare-tab-label {
        font-size: 12.5px;
    }

    .cbl-compare-scrollbar {
        margin: 12px 38px 0;
    }
}
