/* ─── Wrapper ─────────────────────────────────────────────── */
.ksi-feature-table-wrap {
    width: 100%;
    overflow-x: auto;
    border-radius: 20px;
    border: 1px solid #000;
    /* This clips the table corners visually */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
}

/* ─── Hover states ────────────────────────────────────────── */
td.ksi-product-name:hover,
table.ksi-feature-table th:hover {
    background: #E5CE83 !important;
    text-decoration: underline;
}

table.ksi-feature-table th.ksi-feature-th-name:hover {
    background: transparent !important;
    text-decoration: none;
}

/* ─── Table base ──────────────────────────────────────────── */
.ksi-feature-table {
    width: 100%;
    min-width: 900px;
    font-size: 16px;
    margin: 0;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 20px;
}

/* ─── Borders (replaces border-collapse) ─────────────────── */
.ksi-feature-table th,
.ksi-feature-table td {
    border-right: 1px solid #000;
    border-bottom: 1px solid #000;
    text-align: center;
    vertical-align: middle;
}

.ksi-feature-table th:first-child,
.ksi-feature-table td:first-child {
    border-left: 1px solid #000;
}

.ksi-feature-table thead tr:first-child th {
    border-top: 1px solid #000;
}

/* ─── Rounded corners ────────────────────────────────────── */
.ksi-feature-table thead tr:first-child th:first-child {
    border-top-left-radius: 20px;
}

.ksi-feature-table thead tr:first-child th:last-child {
    border-top-right-radius: 20px;
}

.ksi-feature-table tbody tr:last-child td:first-child {
    border-bottom-left-radius: 20px;
}

.ksi-feature-table tbody tr:last-child td:last-child {
    border-bottom-right-radius: 20px;
}

/* ─── Cell padding & colours ─────────────────────────────── */
.ksi-feature-table th {
    padding: 14px;
}

.ksi-feature-table td {
    padding: 25px 22px;
    background-color: #fff !important;
}

/* ─── Header row ─────────────────────────────────────────── */
.ksi-feature-table thead th {
    font-weight: 600;
    font-size: 16px;
    color: #000;
}

.ksi-feature-th-name {
    /* keep left border via first-child rule above */
}

/* ─── Product name column ────────────────────────────────── */
.ksi-product-name {
    text-align: left !important;
    font-weight: 600;
    color: #000;
    white-space: nowrap;
}

/* ─── Series header rows ──────────────────────────────────── */
table.ksi-feature-table .ksi-series-row td {
    background: #6d1f2c !important;
    color: #fff;
    font-weight: 600;
    text-align: center;
    padding: 12px 16px;
    border: 1px solid #000;
    text-transform: uppercase;
    font-size: 18px;
}

/* ─── Check icon ─────────────────────────────────────────── */
.ksi-check-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ─── Links ──────────────────────────────────────────────── */
.ksi-feature-table th a,
.ksi-product-name a {
    color: inherit;
    text-decoration: none;
}

.ksi-feature-table th a:hover,
.ksi-product-name a:hover {
    color: #000;
    text-decoration: underline;
}

/* ─── 1366px ─────────────────────────────────────────────── */
@media (max-width: 1366px) {
    span.ksi-check-icon svg {
        width: 20px;
        height: 20px;
    }

    .ksi-feature-table th {
        padding: 10px 6px;
    }

    .ksi-feature-table thead th {
        font-size: 14px;
    }

    .ksi-feature-table td {
        padding: 15px 12px;
    }

    table.ksi-feature-table .ksi-series-row td {
        font-size: 16px;
    }
}

/* ─── 1024px ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
    .ksi-feature-table th {
        padding: 12px 16px;
    }
}

/* ─── 880px — sticky column + header fix ─────────────────── */
/*
   KEY FIX: overflow-x:auto on the WRAPPER is what enables horizontal
   scrolling AND allows position:sticky on children to work correctly.
   Do NOT put overflow:hidden on the wrapper — that kills sticky.
   The table itself keeps overflow:hidden only for the border-radius effect,
   but sticky cells escape that context because their stacking is relative
   to the scrolling wrapper, not the table.
*/
@media (max-width: 880px) {
    .ksi-feature-table {
        font-size: 14px;
    }

    .ksi-feature-table td {
        padding: 10px 5px;
    }

    table.ksi-feature-table .ksi-series-row td {
        font-size: 14px;
        text-align: left;
    }

    .ksi-feature-table-wrap {
        position: relative;
        overflow-x: auto; /* keep only this, no overflow:hidden */
        border-radius: 20px;
    }

    /* Sticky first column — product names */
    .ksi-feature-table .ksi-product-name,
    .ksi-feature-table .ksi-feature-th-name {
        position: sticky;
        left: 0;
        z-index: 2;
        background: #fff !important;
        box-shadow: 2px 0 5px rgba(0, 0, 0, 0.12);
    }

    /* Sticky header row */
    .ksi-feature-table thead th {
        position: sticky;
        top: 0;
        z-index: 3;
        background: #fff;
    }

    /* Top-left corner cell beats both sticky axes */
    .ksi-feature-table .ksi-feature-th-name {
        z-index: 4;
        background: #fff !important;
    }

    /* Series rows: make the full band stick to the left edge while swiping */
    .ksi-feature-table .ksi-series-row td {
        position: sticky;
        left: 0;
        z-index: 2;
    }
}