.comparison-carousel {
    width: 100%;
}

.comparison-table-wrap {
    overflow-x: auto;
}

/* ===== Tabela ===== */
.comparison-table {
    width: 100%;
    border-collapse: separate; /* potrzebne do radiusów na kolumnie wyróżnionej */
    border-spacing: 0;
    table-layout: fixed;
}

.comparison-table th,
.comparison-table td {
    padding: 20px;
    vertical-align: top;
    text-align: left;
}

.comparison-table .product-row th,
.comparison-table .product-row td {
    padding-top: 36px;
    text-align: center;
    vertical-align: middle;
}

.comparison-table .is-last-row th,
.comparison-table .is-last-row td {
    padding-bottom: 36px
}

.comparison-table thead th {
    font-weight: 700;
}

.comparison-table .feature-col {
    width: 22%;
    font-weight: 600;
}

.comparison-table .product-col {
    width: auto;
}

/* Border-bottom pomiędzy wierszami cech */
.comparison-table tbody tr:not(.is-last-row) th,
.comparison-table tbody tr:not(.is-last-row) td {
    border-bottom: 1px solid rgba(22, 22, 22, 0.1);
}

/* Główki produktów */
.product-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.product-head:has(img) {
    justify-content: center;
}

.product-logo {
    display: block;
    max-height: 64px;
    width: auto;
    filter: grayscale(1) brightness(0) invert(1);
}

.product-name {
    font-weight: 700;
}

/* Komórka – zawiera h3 z nazwą cechy (wymóg) */
.cell .cell-feature {
    font-size: 14px;
    margin: 0 0 6px;
    line-height: 1.2;
    color: var(--wp--preset--color--grey-600, #4b5563);
    font-weight: 600;
}

.cell .cell-value {
    font-size: 16px;
    line-height: 1.45;
}

/* ===== Wyróżniona kolumna (desktop) ===== */
.comparison-table .is-highlighted {
    background: var(--wp--preset--color--granat);
    color: #fff;
    font-weight: 700;
}

/* Zachowanie koloru tekstu w komórkach wyróżnionych */
.is-highlighted .cell-feature { color: rgba(255,255,255,0.85); }
.is-highlighted .cell-value { color: #fff; }

/* Zaokrąglenia tylko na górze i dole wyróżnionej kolumny */
.product-col--head.is-highlighted {
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}
tbody tr.is-last-row .product-col.is-highlighted {
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
}

/* Wyłączyć obramowanie dolne na skraju zaokrągleń, by nie "przecinało" radiusów */
tbody tr.is-last-row .product-col.is-highlighted {
    border-bottom: none;
}

/* Drobna separacja wizualna kolumn (opcjonalnie) */
.comparison-table th + th,
.comparison-table td + td {
    /* Można dodać border-left w jasnym kolorze, zostawiam domyślnie czysto */
}

/* ===== Mobile slider ===== */
.comparison-carousel .swiper-container.comparison-carousel-swiper {
    width: 100%;
}

.product-slide {
    padding: 12px;
}

.product-slide .product-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.product-slide .product-logo {
    max-height: 64px;
    filter: unset;
}

.product-slide .product-name {
    font-weight: 700;
    font-size: 18px;
}

/* Lista cech w slajdzie */
.product-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
}

.product-feature {
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wp--preset--color--grey-200, #e5e7eb);
}

.product-feature:last-child {
    border-bottom: none;
}

.product-feature .cell-feature {margin: 10px 0;}

.product-feature .cell-value {
    font-size: 16px;
}

.comparison-carousel .swiper-wrapper{
    height: auto;
}

/* Nawigacja i paginacja */
.comparison-carousel .swiper-nav {
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 14px;
}

.comparison-carousel .swiper-pagination-comparison {
    width: auto;
}

.comparison-carousel .swiper-button-prev-comparison,
.comparison-carousel .swiper-button-next-comparison {
    display: flex;
    cursor: pointer;
}

.comparison-carousel .swiper-button-prev-comparison *,
.comparison-carousel .swiper-button-next-comparison * {
    transition: all 0.3s ease;
}

.comparison-carousel .swiper-button-prev-comparison:hover svg path,
.comparison-carousel .swiper-button-next-comparison:hover svg path {
    fill: #fff;
}

.comparison-carousel .swiper-button-prev-comparison svg rect,
.comparison-carousel .swiper-button-next-comparison svg rect {
    fill: transparent;
}

.comparison-carousel .swiper-button-prev-comparison:hover svg rect,
.comparison-carousel .swiper-button-next-comparison:hover svg rect {
    fill: var(--wp--preset--color--czarny);
}

/* Tabela widoczna od 782px wzwyż */
@media (min-width: 782px) {
    .comparison-table-wrap { display: block; }
    .comparison-carousel .comparison-carousel-swiper { display: none; }
}

/* Karuzela widoczna do 781px włącznie */
@media (max-width: 781px) {
    .comparison-table-wrap { 
        display: none; 
    }
    .comparison-carousel .comparison-carousel-swiper { 
        display: block; 
        overflow: hidden;
    }

    .comparison-carousel .bottom-container{
        flex-direction: column;
        align-items: center;
        gap: 48px;
        display: flex;
    }

    .product-slide .product-head {
        justify-content: flex-start;
        min-height: 64px;
    }
}