.wpbay-compare-page {
    background: #f7f7fa;
}

.wpbay-compare-shell,
.wpbay-compare-shell * {
    box-sizing: border-box;
}

.wpbay-compare-shell {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 34px 0 72px;
    color: #2f2933;
    font-family: "Manrope", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.wpbay-compare-breadcrumbs {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-bottom: 18px;
    color: #77707b;
    font-size: 13px;
}

.wpbay-compare-breadcrumbs a {
    color: #6d2674;
    text-decoration: none;
}

.wpbay-compare-hero {
    position: relative;
    padding: clamp(25px, 3.5vw, 40px);
    overflow: hidden;
    color: #fff;
    background: linear-gradient(120deg, #28103e 0%, #6d1b75 58%, #a23baa 100%);
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(50, 18, 60, 0.18);
}

.wpbay-compare-hero::after {
    position: absolute;
    top: -100px;
    right: -80px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.09);
    border-radius: 50%;
    content: "";
}

.wpbay-compare-hero__eyebrow {
    position: relative;
    z-index: 1;
    display: inline-flex;
    margin-bottom: 8px;
    padding: 5px 9px;
    color: #f9dcfb;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 999px;
}

.wpbay-compare-hero h1 {
    position: relative;
    z-index: 1;
    max-width: 980px;
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 3.6vw, 44px);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

.wpbay-compare-hero p {
    position: relative;
    z-index: 1;
    max-width: 720px;
    margin: 11px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: clamp(14px, 1.5vw, 16px);
    line-height: 1.55;
}

.wpbay-compare-types {
    display: flex;
    gap: 8px;
    margin: 22px 0;
    padding: 5px;
    overflow-x: auto;
    background: #fff;
    border: 1px solid #e8e4ea;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(40, 20, 50, 0.05);
}

.wpbay-compare-types a {
    flex: 1 0 auto;
    padding: 10px 18px;
    color: #655e69;
    font-size: 14px;
    font-weight: 750;
    text-align: center;
    text-decoration: none;
    border-radius: 10px;
}

.wpbay-compare-types a:hover,
.wpbay-compare-types a:focus-visible {
    color: #6f2876;
    background: #faf5fb;
}

.wpbay-compare-types a[aria-current="page"] {
    color: #fff;
    background: #8d3195;
}

.wpbay-compare-notice {
    display: flex;
    gap: 6px 10px;
    margin-bottom: 18px;
    padding: 13px 15px;
    color: #714e11;
    font-size: 13px;
    background: #fff9e9;
    border: 1px solid #f0dda5;
    border-radius: 10px;
}

.wpbay-compare-picker,
.wpbay-compare-results,
.wpbay-compare-guide,
.wpbay-compare-links {
    margin-top: 22px;
    padding: clamp(20px, 3vw, 30px);
    background: #fff;
    border: 1px solid #e8e4ea;
    border-radius: 18px;
    box-shadow: 0 12px 34px rgba(40, 20, 50, 0.06);
}

.wpbay-compare-picker__intro,
.wpbay-compare-results__toolbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}

.wpbay-compare-picker h2,
.wpbay-compare-results h2,
.wpbay-compare-guide h2,
.wpbay-compare-links h2 {
    margin: 0;
    color: #302833;
    font-size: clamp(21px, 3vw, 28px);
    font-weight: 850;
    letter-spacing: -0.025em;
}

.wpbay-compare-picker__intro p,
.wpbay-compare-results__toolbar p {
    margin: 5px 0 0;
    color: #756d79;
    font-size: 13px;
}

.wpbay-compare-picker__count {
    flex: 0 0 auto;
    padding: 8px 11px;
    color: #7b2d83;
    font-size: 12px;
    font-weight: 750;
    background: #fbf5fc;
    border: 1px solid #ead8ed;
    border-radius: 999px;
}

.wpbay-compare-selected {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    min-height: 44px;
    margin-top: 18px;
}

.wpbay-compare-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 280px;
    padding: 5px 7px 5px 5px;
    color: #463e49;
    font-size: 12px;
    font-weight: 750;
    background: #faf8fb;
    border: 1px solid #e3dde5;
    border-radius: 10px;
}

.wpbay-compare-chip img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border-radius: 7px;
}

.wpbay-compare-chip span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpbay-compare-chip button {
    flex: 0 0 auto;
    width: 25px;
    height: 25px;
    padding: 0;
    color: #756c79;
    font-size: 19px;
    line-height: 1;
    background: transparent;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.wpbay-compare-chip button:hover,
.wpbay-compare-chip button:focus-visible {
    color: #fff;
    background: #8d3195;
}

.wpbay-compare-search {
    position: relative;
    max-width: 680px;
    margin-top: 16px;
}

.wpbay-compare-search > label {
    display: block;
    margin-bottom: 7px;
    color: #433a47;
    font-size: 13px;
    font-weight: 800;
}

.wpbay-compare-search__control {
    position: relative;
}

.wpbay-compare-search input {
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 10px 45px 10px 14px;
    color: #352e38;
    font: inherit;
    font-size: 14px;
    background: #fff;
    border: 1px solid #d9d2dc;
    border-radius: 11px;
}

.wpbay-compare-search input:focus {
    border-color: #96379e;
    outline: 3px solid rgba(150, 55, 158, 0.13);
}

.wpbay-compare-search input:disabled {
    color: #8e8791;
    background: #f4f2f5;
}

.wpbay-compare-search__spinner {
    position: absolute;
    top: 16px;
    right: 15px;
    width: 16px;
    height: 16px;
    border: 2px solid #e4dce6;
    border-top-color: #913398;
    border-radius: 50%;
    animation: wpbay-compare-spin 0.7s linear infinite;
}

@keyframes wpbay-compare-spin {
    to { transform: rotate(360deg); }
}

.wpbay-compare-suggestions {
    position: absolute;
    z-index: 50;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: 330px;
    padding: 6px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #ded7e1;
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(48, 22, 55, 0.18);
}

.wpbay-compare-suggestion {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 8px;
    color: #38303c;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
}

.wpbay-compare-suggestion:hover,
.wpbay-compare-suggestion:focus-visible,
.wpbay-compare-suggestion.is-active {
    background: #f8f2f9;
    outline: none;
}

.wpbay-compare-suggestion:disabled {
    opacity: 0.5;
    cursor: default;
}

.wpbay-compare-suggestion img {
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
}

.wpbay-compare-suggestion span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.wpbay-compare-suggestion strong {
    overflow: hidden;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpbay-compare-suggestion small,
.wpbay-compare-suggestions__empty {
    color: #7d7580;
    font-size: 11px;
}

.wpbay-compare-suggestions__empty {
    margin: 0;
    padding: 12px;
}

.wpbay-compare-picker__actions {
    display: flex;
    align-items: center;
    gap: 13px;
    margin-top: 14px;
}

.wpbay-compare-primary {
    min-height: 44px;
    padding: 9px 18px;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    background: #92359a;
    border: 1px solid #92359a;
    border-radius: 10px;
    cursor: pointer;
}

.wpbay-compare-primary:hover,
.wpbay-compare-primary:focus-visible {
    background: #76277e;
    border-color: #76277e;
}

.wpbay-compare-primary:disabled {
    color: #979099;
    background: #eeebef;
    border-color: #e3dfe5;
    cursor: not-allowed;
}

.wpbay-compare-picker__actions p {
    margin: 0;
    color: #77707a;
    font-size: 12px;
}

.wpbay-compare-popular {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #eee9ef;
}

.wpbay-compare-popular h3 {
    margin: 0 0 10px;
    color: #453d48;
    font-size: 14px;
    font-weight: 850;
}

.wpbay-compare-popular__items {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.wpbay-compare-popular__item {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 7px;
    color: #443b47;
    text-align: left;
    background: #fff;
    border: 1px solid #e6e0e8;
    border-radius: 9px;
    cursor: pointer;
}

.wpbay-compare-popular__item:hover,
.wpbay-compare-popular__item:focus-visible {
    border-color: #ba87bf;
    background: #fbf7fc;
}

.wpbay-compare-popular__item:disabled {
    opacity: 0.55;
    cursor: default;
}

.wpbay-compare-popular__item img {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    object-fit: cover;
    border-radius: 7px;
}

.wpbay-compare-popular__item span {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    font-size: 11px;
    font-weight: 750;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpbay-compare-popular__item strong {
    flex: 0 0 auto;
    color: #8a3292;
    font-size: 10px;
}

.wpbay-compare-differences {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #514955;
    font-size: 12px;
    font-weight: 750;
    cursor: pointer;
}

.wpbay-compare-table-wrap {
    margin-top: 18px;
    overflow-x: auto;
    border: 1px solid #e6e0e8;
    border-radius: 13px;
    scrollbar-color: #c4a0c8 #f1edf2;
}

.wpbay-compare-table-wrap:focus-visible {
    outline: 3px solid rgba(150, 55, 158, 0.13);
}

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

.wpbay-compare-table--2 {
    --wpbay-compare-product-count: 2;
}

.wpbay-compare-table--3 {
    --wpbay-compare-product-count: 3;
}

.wpbay-compare-table--4 {
    --wpbay-compare-product-count: 4;
}

.wpbay-compare-table th,
.wpbay-compare-table td {
    min-width: 210px;
    padding: 15px;
    color: #4b434f;
    font-size: 12px;
    line-height: 1.55;
    text-align: left;
    vertical-align: top;
    background: #fff;
    border-right: 1px solid #ece7ed;
    border-bottom: 1px solid #ece7ed;
}

.wpbay-compare-table tr:last-child th,
.wpbay-compare-table tr:last-child td {
    border-bottom: 0;
}

.wpbay-compare-table th:last-child,
.wpbay-compare-table td:last-child {
    border-right: 0;
}

.wpbay-compare-table thead th {
    padding: 12px;
    background: #fbfafc;
}

.wpbay-compare-table th:first-child {
    position: sticky;
    z-index: 3;
    left: 0;
    width: 165px;
    min-width: 165px;
    color: #352d38;
    font-weight: 850;
    background: #faf8fb;
    box-shadow: 1px 0 0 #ece7ed;
}

.wpbay-compare-table thead th:first-child {
    z-index: 5;
}

.wpbay-compare-product {
    display: grid;
    gap: 8px;
}

.wpbay-compare-product__image {
    display: block;
    overflow: hidden;
    aspect-ratio: 16 / 10;
    background: #eeeaf0;
    border-radius: 9px;
}

.wpbay-compare-product__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
}

.wpbay-compare-product h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 850;
    line-height: 1.35;
}

.wpbay-compare-product h3 a {
    color: #332b36;
    text-decoration: none;
}

.wpbay-compare-product__price {
    min-height: 22px;
    color: #7f2e87;
    font-size: 13px;
    font-weight: 850;
}

.wpbay-compare-product__view,
.wpbay-compare-product__remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 6px 10px;
    font-size: 11px;
    font-weight: 800;
    text-decoration: none;
    border-radius: 8px;
}

.wpbay-compare-product__view {
    color: #fff;
    background: #913599;
    transition: color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.wpbay-compare-product a.wpbay-compare-product__view,
.wpbay-compare-product a.wpbay-compare-product__view:visited {
    color: #fff;
}

.wpbay-compare-product a.wpbay-compare-product__view:hover,
.wpbay-compare-product a.wpbay-compare-product__view:focus-visible {
    color: #fff;
    background: #76277e;
    box-shadow: 0 4px 12px rgba(78, 23, 84, 0.2);
}

.wpbay-compare-product a.wpbay-compare-product__view:focus-visible {
    outline: 3px solid rgba(145, 53, 153, 0.22);
    outline-offset: 2px;
}

.wpbay-compare-product__remove {
    color: #756c78;
    background: transparent;
    border: 1px solid #ddd7df;
    cursor: pointer;
}

.wpbay-compare-values {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.wpbay-compare-values li {
    padding: 3px 7px;
    background: #f3f0f4;
    border-radius: 999px;
}

.wpbay-compare-values li.is-shared {
    color: #23643c;
    background: #eaf7ee;
}

.wpbay-compare-rating {
    color: #443b47;
    font-weight: 800;
}

.wpbay-compare-rating > span {
    color: #f0ad22;
}

.wpbay-compare-rating small,
.wpbay-compare-muted {
    color: #857d88;
    font-weight: 500;
}

.wpbay-compare-guide > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 18px;
}

.wpbay-compare-guide article {
    padding: 17px;
    background: #faf8fb;
    border: 1px solid #eee8ef;
    border-radius: 12px;
}

.wpbay-compare-guide h3 {
    margin: 0 0 6px;
    color: #413744;
    font-size: 14px;
    font-weight: 850;
}

.wpbay-compare-guide p {
    margin: 0;
    color: #756d78;
    font-size: 12px;
    line-height: 1.65;
}

.wpbay-compare-links > div {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.wpbay-compare-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 14px;
    color: #5f2865;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    background: #fbf7fc;
    border: 1px solid #eaddec;
    border-radius: 10px;
}

.wpbay-compare-links a:hover,
.wpbay-compare-links a:focus-visible {
    color: #fff;
    background: #8f3397;
    border-color: #8f3397;
}

@media (max-width: 760px) {
    .wpbay-compare-shell {
        width: min(100% - 24px, 1180px);
        padding-top: 22px;
    }

    .wpbay-compare-hero {
        padding: 25px 20px;
        border-radius: 17px;
    }

    .wpbay-compare-types {
        justify-content: flex-start;
    }

    .wpbay-compare-types a {
        flex: 0 0 auto;
        min-width: 105px;
    }

    .wpbay-compare-picker,
    .wpbay-compare-results,
    .wpbay-compare-guide,
    .wpbay-compare-links {
        padding: 18px;
        border-radius: 14px;
    }

    .wpbay-compare-picker__intro,
    .wpbay-compare-results__toolbar,
    .wpbay-compare-picker__actions {
        align-items: flex-start;
        flex-direction: column;
    }

    .wpbay-compare-primary {
        width: 100%;
    }

    .wpbay-compare-selected {
        display: grid;
        grid-template-columns: minmax(0, 1fr);
    }

    .wpbay-compare-chip {
        width: 100%;
        max-width: 100%;
    }

    .wpbay-compare-popular__items,
    .wpbay-compare-guide > div,
    .wpbay-compare-links > div {
        grid-template-columns: 1fr;
    }

    .wpbay-compare-table-wrap {
        overflow-x: auto;
        border: 0;
        border-radius: 0;
        scrollbar-width: thin;
    }

    .wpbay-compare-table {
        display: block;
        width: max(100%, calc(var(--wpbay-compare-product-count) * 112px));
        min-width: max(100%, calc(var(--wpbay-compare-product-count) * 112px));
        table-layout: auto;
    }

    .wpbay-compare-table thead,
    .wpbay-compare-table tbody {
        display: block;
    }

    .wpbay-compare-table thead {
        margin-bottom: 10px;
        overflow: hidden;
        border: 1px solid #e8e1ea;
        border-radius: 12px;
        box-shadow: 0 7px 20px rgba(50, 30, 55, 0.05);
    }

    .wpbay-compare-table tbody {
        display: grid;
        gap: 10px;
    }

    .wpbay-compare-table tr {
        display: grid;
        grid-template-columns: repeat(var(--wpbay-compare-product-count), minmax(0, 1fr));
    }

    .wpbay-compare-table tr[hidden] {
        display: none;
    }

    .wpbay-compare-table tbody tr {
        overflow: hidden;
        border: 1px solid #e8e1ea;
        border-radius: 12px;
        box-shadow: 0 5px 16px rgba(50, 30, 55, 0.035);
    }

    .wpbay-compare-table th,
    .wpbay-compare-table td {
        width: auto;
        min-width: 0;
        padding: 10px;
        border-bottom: 0;
    }

    .wpbay-compare-table thead th {
        padding: 9px;
        background: #fff;
    }

    .wpbay-compare-table thead th:first-child {
        display: none;
    }

    .wpbay-compare-table tbody th:first-child {
        position: static;
        grid-column: 1 / -1;
        width: auto;
        min-width: 0;
        padding: 9px 11px;
        color: #5d3562;
        font-size: 11px;
        letter-spacing: 0.015em;
        background: #faf6fb;
        border-right: 0;
        border-bottom: 1px solid #ece5ee;
        box-shadow: none;
    }

    .wpbay-compare-table tbody td {
        background: #fff;
        border-right: 1px solid #eee8ef;
    }

    .wpbay-compare-table tbody td:last-child {
        border-right: 0;
    }

    .wpbay-compare-product {
        gap: 6px;
    }

    .wpbay-compare-product__image {
        border-radius: 7px;
    }

    .wpbay-compare-product h3 {
        display: -webkit-box !important;
        min-height: 48px;
        max-height: 48px;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.32;
        -webkit-box-orient: vertical !important;
        -webkit-line-clamp: 3 !important;
    }

    .wpbay-compare-product__price {
        min-height: 19px;
        font-size: 12px;
    }

    .wpbay-compare-product__view,
    .wpbay-compare-product__remove {
        min-height: 31px;
        padding: 5px 6px;
        font-size: 10px;
        border-radius: 7px;
    }

    .wpbay-compare-values {
        gap: 4px;
    }

    .wpbay-compare-values li {
        padding: 4px 6px;
        font-size: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .wpbay-compare-search__spinner {
        animation-duration: 1.5s;
    }
}
