/* ============================================================
   NTT Compare
   File: wp-content/themes/basel-child/assets/css/ntt-compare.css
   ============================================================ */

/* 1. Ukryj oryginalną tabelę Basel */
.site-content .basel-compare-table {
    display: none !important;
}

/* 2. Wyzeruj padding WPBakery który zostawia pustą przestrzeń */
body.ntt-compare-page .vc_column-inner,
body.ntt-compare-page .wpb_wrapper,
body.ntt-compare-page .wpb_column,
body.ntt-compare-page .vc_column_container {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Wyzeruj padding na wierszach WPBakery */
body.ntt-compare-page .vc_row.wpb_row,
body.ntt-compare-page .vc_row-fluid {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* 3. Wrapper strony */
#ntt-compare-wrap {
    width: 100%;
    max-width: 1170px;
    margin: 0 auto;
    padding: 30px 15px 40px;
    box-sizing: border-box;
    font-family: 'Karla', 'Lato', sans-serif;
    /* Upewnij się że zawartość nie wychodzi poza wrapper */
    overflow: hidden;
}

/* 4. Tytuł */
#ntt-compare-wrap h1.ntt-compare-title {
    font-size: 22px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 30px;
    color: #222;
    border-bottom: 2px solid #0367c9;
    padding-bottom: 10px;
}

/* 5. Wrapper tabeli — kluczowe: display:block żeby nie rozciągał się dalej niż treść */
.ntt-compare-table-wrap {
    display: block;
    overflow-x: auto;
    /* Bez border — border dajemy na tbody */
    width: 100%;
    box-sizing: border-box;
}

/* 6. Tabela — NIE ustawiamy height, pozwalamy żeby była tyle wysoka ile treść */
table.ntt-compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}

table.ntt-compare-table tbody {
    border: 1px solid #e0e0e0;
    display: table-row-group; /* domyślne, ale jawnie ustawione */
}

table.ntt-compare-table th,
table.ntt-compare-table td {
    padding: 12px 16px;
    border-bottom: 1px solid #ebebeb;
    vertical-align: top;
    line-height: 1.5;
    text-align: center;
}

/* Kolumna etykiet */
table.ntt-compare-table th {
    background: #f5f7fa;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: .7px;
    color: #555;
    white-space: nowrap;
    width: 180px;
    min-width: 130px;
    text-align: left;
    border-right: 1px solid #e0e0e0;
}

/* Alternujące wiersze */
table.ntt-compare-table tbody tr:nth-child(even) td { background: #f9f9f9; }
table.ntt-compare-table tbody tr:nth-child(odd)  td { background: #fff; }

/* Ostatni wiersz — brak border */
table.ntt-compare-table tbody tr:last-child th,
table.ntt-compare-table tbody tr:last-child td {
    border-bottom: none !important;
}

/* Różniące się wartości */
table.ntt-compare-table td.ntt-compare-diff {
    font-weight: 700;
    color: #0367c9;
}

/* Stock labels */
table.ntt-compare-table .stock.in-stock     { color: #2e7d32; font-weight: 700; }
table.ntt-compare-table .stock.out-of-stock { color: #c62828; font-weight: 700; }

/* Wyrównanie lewo: wiersz Product i Description */
tr.ntt-row-product     td,
tr.ntt-row-description td {
    text-align: left;
}

/* ══════════════════════════════════════════════════════════
   Komórka produktu
   ══════════════════════════════════════════════════════════ */
td.ntt-product-cell {
    text-align: left;
    vertical-align: top;
    /* padding 0 wszędzie — spacing robimy wewnątrz elementów */
    padding: 0;
    overflow: hidden;
}

/* Slider — bg transparent, rozciągnięty do krawędzi komórki */
.ntt-compare-slider {
    position: relative;
    width: 100%;
    background: transparent;   /* ← BEZ szarego tła na containerze */
    overflow: hidden;
    margin: 0;                  /* zero marginesów — dotyka krawędzi */
}

.ntt-compare-slider-track {
    display: flex;
    transition: transform .32s ease;
}

.ntt-compare-slide {
    flex: 0 0 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 220px;
    background: #f4f4f4;       /* tylko sam slide ma tło, nie container */
}

.ntt-compare-slide img {
    width: 100%;
    height: 220px;
    object-fit: contain;
    display: block;
    padding: 0;
    box-sizing: border-box;
}

/* Strzałki — wewnątrz slide */
.ntt-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0,0,0,.40);
    color: #fff;
    border: none;
    width: 32px;
    height: 32px;
    cursor: pointer;
    font-size: 22px;
    line-height: 30px;
    text-align: center;
    z-index: 10;
    transition: background .18s;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
}
.ntt-slider-btn:hover { background: #0367c9; }
.ntt-slider-btn.prev  { left: 0; }
.ntt-slider-btn.next  { right: 0; }

/* Dots */
.ntt-slider-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 8px 0;
    background: transparent;   /* ← też transparent */
}
.ntt-slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #ccc;
    cursor: pointer;
    transition: background .18s;
    border: none;
    padding: 0;
}
.ntt-slider-dot.active { background: #0367c9; }

/* ── Spacing wewnątrz komórki produktu ── */
.ntt-product-cell h3 {
    font-size: 13px;
    font-weight: 700;
    margin: 16px 0 6px;        /* ↑ więcej miejsca nad tytułem */
    line-height: 1.4;
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 0 16px;
}
.ntt-product-cell h3 a      { color: #222; text-decoration: none; }
.ntt-product-cell h3 a:hover { color: #0367c9; }

.ntt-product-cell .ntt-card-sku {
    font-size: 11px;
    color: #aaa;
    margin: 0 0 16px;          /* ↑ więcej miejsca pod SKU */
    padding: 0 16px;
}

/* Przycisk "View product" */
.ntt-product-cell .ntt-compare-btn {
    display: inline-block;
    margin: 0 16px 12px;       /* ↑ więcej odstępu */
    padding: 9px 20px;
    background: #0367c9;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    transition: background .18s;
    border: none;
    cursor: pointer;
    border-radius: 0;
    box-shadow: none;
}
.ntt-product-cell .ntt-compare-btn:hover { background: #0254a8 !important; }

/* Link "Remove from comparison" */
a.ntt-compare-remove,
a.ntt-compare-remove:link,
a.ntt-compare-remove:visited {
    display: block !important;
    margin: 0 16px 20px !important;   /* ↑ więcej miejsca na dole */
    padding: 0 !important;
    background: none !important;
    background-color: transparent !important;
    color: #bbb !important;
    text-decoration: underline !important;
    font-size: 11px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    border: none !important;
    box-shadow: none !important;
    cursor: pointer !important;
    line-height: 1.4 !important;
    border-radius: 0 !important;
    width: auto !important;
    height: auto !important;
    transition: color .18s !important;
}
a.ntt-compare-remove:hover,
a.ntt-compare-remove:focus {
    background: none !important;
    background-color: transparent !important;
    color: #c00 !important;
    text-decoration: underline !important;
}
a.ntt-compare-remove .remove-loader { display: none !important; }

/* 7. Sidebar wyłączony */
body.page-id-54189 .sidebar-container,
body.ntt-compare-page  .sidebar-container { display: none !important; }

body.page-id-54189  .site-content,
body.ntt-compare-page .site-content,
body.page-id-54189  .col-sm-9,
body.ntt-compare-page .col-sm-9 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* 8. Responsive */
@media (max-width: 768px) {
    table.ntt-compare-table th { width: 90px; min-width: 80px; font-size: 10px; padding: 10px 8px; }
    table.ntt-compare-table td { padding: 10px 8px; }
    .ntt-compare-slide,
    .ntt-compare-slide img { min-height: 140px; height: 140px; }
}