.cubes-compare-page {
    --cubes-yellow: #ffe600;
    --cubes-black: #111111;
    --cubes-gray: #e3e3e3;
    --cubes-light: #f7f7f7;
    --cubes-border: #eeeeee;
    width: 100%;
    max-width: 100%;
    font-family: inherit;
}

.cubes-compare-toolbar {
    min-height: 82px;
    margin-bottom: 34px;
    padding: 18px 28px;
    background: var(--cubes-yellow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.cubes-compare-toolbar h1 {
    margin: 0;
    color: var(--cubes-black);
    font-size: clamp(22px, 3vw, 34px);
    font-weight: 900;
    line-height: 1.1;
    text-transform: uppercase;
}

.cubes-compare-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin: 0;
}

.cubes-compare-action,
.woocommerce .cubes-compare-action,
.cubes-clear-compare,
.cubes-highlight-differences {
    border: 0;
    border-radius: 999px;
    background: var(--cubes-black);
    color: #ffffff;
    cursor: pointer;
    min-height: 36px;
    padding: 9px 18px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    transition: opacity .2s ease, transform .2s ease;
}

.cubes-compare-action:hover,
.cubes-compare-action:focus {
    color: #ffffff;
    opacity: .86;
    transform: translateY(-1px);
}

.cubes-compare-empty {
    padding: 24px;
    background: var(--cubes-light);
    border: 1px solid var(--cubes-border);
}

.cubes-compare-table-wrap {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 8px;
}

.cubes-compare-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.cubes-compare-table th,
.cubes-compare-table td {
    border: 4px solid #ffffff;
    padding: 16px 22px;
    vertical-align: middle;
}

.cubes-compare-products-row .cubes-compare-label-cell {
    background: transparent;
    border: 0;
    width: 170px;
}

.cubes-compare-product-cell {
    position: relative;
    background: #ffffff;
    text-align: center;
    font-weight: 700;
}

.cubes-compare-product-link {
    display: flex;
    min-height: 205px;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    color: var(--cubes-black);
    text-decoration: none;
}

.cubes-compare-product-image {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 145px;
}

.cubes-compare-product-image img,
.cubes-compare-table img {
    max-width: 170px;
    max-height: 150px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.cubes-compare-product-title {
    display: block;
    min-height: 34px;
    font-size: 15px;
    line-height: 1.2;
}

.cubes-remove-compare {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    border: 0;
    background: transparent;
    color: var(--cubes-black);
    width: 28px;
    height: 28px;
    padding: 0;
    cursor: pointer;
    font-size: 24px;
    line-height: 26px;
}

.cubes-compare-label-cell {
    width: 170px;
    background: var(--cubes-gray);
    color: var(--cubes-black);
    text-align: left;
    font-size: 14px;
    font-weight: 900;
    line-height: 1.2;
}

.cubes-compare-value {
    background: var(--cubes-light);
    color: var(--cubes-black);
    text-align: left;
    font-size: 14px;
    line-height: 1.35;
}

.cubes-compare-row.has-difference .cubes-compare-label-cell,
.cubes-compare-row.has-difference .cubes-compare-value {
    background: var(--cubes-yellow);
}

.cubes-add-compare.is-added {
    opacity: 0.8;
}

.cubes-compare-message {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 99999;
    display: none;
    padding: 12px 16px;
    border-radius: 4px;
    color: #fff;
    background: #111;
    box-shadow: 0 4px 20px rgba(0,0,0,0.18);
}

.cubes-compare-message.is-error {
    background: #b00020;
}

.cubes-compare-message.is-success {
    background: #111;
}

@media (max-width: 1024px) {
    .cubes-compare-toolbar {
        margin-bottom: 22px;
    }

    .cubes-compare-table {
        min-width: 700px;
    }

    .cubes-compare-products-row .cubes-compare-label-cell,
    .cubes-compare-label-cell {
        width: 150px;
    }
}

@media (max-width: 768px) {
    .cubes-compare-toolbar {
        min-height: 72px;
        padding: 14px 12px;
        flex-direction: column;
        justify-content: center;
        gap: 10px;
        text-align: center;
    }

    .cubes-compare-toolbar h1 {
        font-size: 20px;
    }

    .cubes-compare-actions {
        width: 100%;
        justify-content: center;
        gap: 8px;
    }

    .cubes-compare-action,
    .woocommerce .cubes-compare-action,
    .cubes-clear-compare,
    .cubes-highlight-differences {
        min-height: 30px;
        padding: 8px 12px;
        font-size: 10px;
    }

    .cubes-compare-table-wrap {
        margin-left: -12px;
        margin-right: -12px;
        width: calc(100% + 24px);
        padding-left: 12px;
    }

    .cubes-compare-table {
        min-width: 620px;
    }

    .cubes-compare-table th,
    .cubes-compare-table td {
        border-width: 3px;
        padding: 10px 12px;
    }

    .cubes-compare-products-row .cubes-compare-label-cell,
    .cubes-compare-label-cell {
        position: sticky;
        left: 0;
        z-index: 3;
        width: 120px;
        min-width: 120px;
        font-size: 11px;
    }

    .cubes-compare-products-row .cubes-compare-label-cell {
        background: #ffffff;
    }

    .cubes-compare-product-cell {
        width: 145px;
        min-width: 145px;
    }

    .cubes-compare-product-link {
        min-height: 135px;
        gap: 7px;
    }

    .cubes-compare-product-image {
        min-height: 88px;
    }

    .cubes-compare-product-image img,
    .cubes-compare-table img {
        max-width: 95px;
        max-height: 85px;
    }

    .cubes-compare-product-title {
        min-height: 30px;
        font-size: 11px;
        line-height: 1.15;
    }

    .cubes-remove-compare {
        top: 3px;
        right: 4px;
        width: 22px;
        height: 22px;
        font-size: 18px;
        line-height: 20px;
    }

    .cubes-compare-value {
        font-size: 11px;
        text-align: center;
    }
}

@media (max-width: 420px) {
    .cubes-compare-toolbar h1 {
        font-size: 18px;
    }

    .cubes-compare-table {
        min-width: 560px;
    }

    .cubes-compare-products-row .cubes-compare-label-cell,
    .cubes-compare-label-cell {
        width: 105px;
        min-width: 105px;
    }

    .cubes-compare-product-cell {
        width: 130px;
        min-width: 130px;
    }
}
