.nst {
    --brown: #261408;
    --text: #261408;
    --soft: #ede3d8;
    --line: #D1C1B4;
    width: 100%;
    color: var(--text);
    font-family: inherit;
}

.nst *,
.nst *::before,
.nst *::after {
    box-sizing: border-box;
}

.nst__filters {
    display: flex;
    align-items: flex-start;
    gap: 32px;
    margin-bottom: 32px;
}

.nst-filter__title {
    margin: 0 0 11px;
    font-size: 20px;
}

.nst-filter__cards {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.nst-filter-card,
.nst-room-card {
    appearance: none;
    border: 0;
    background: var(--soft);
    color: var(--text);
    cursor: pointer;
    border-radius: 16px;
}

.nst-filter-card {
    width: 180px;
    min-height: 90px;
    padding: 10px 15px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.nst-filter-card img {
    width: 30px;
    height: 30px;
    display: block;
}

.nst-filter-card span,
.nst-room-card span {
    display: block;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.15;
    font-family: Bricolage Grotesque;
    letter-spacing: -0.02em;
}

.nst-room-card {
    width: 96px;
    min-height: 90px;
    padding: 10px;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-start;
}

.nst-room-card strong {
    display: block;
    font-size: 32px;
    font-weight: 400;
    line-height: 1;
    margin-bottom: 10px;
    font-family: Bricolage Grotesque;
}

.nst-filter-card.is-active,
.nst-room-card.is-active {
    background: var(--brown);
    color: #fff;
}

.nst-filter-card.is-active img {
    filter: brightness(0) invert(1);
}

/*
 * Desktop: tabuľka sa vždy prispôsobí šírke rodiča.
 * Overflow povoľujeme až pod 1000 px.
 */
.nst__table-wrap {
    width: 100%;
    overflow-x: visible;
}

body:not(.woocommerce-cart) .main-content .nst__table {
    width: 100%;
    min-width: 1000px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    background: transparent !important;
    border: none !important;
}

/* Pomer stĺpcov podľa dodaného dizajnu. */
/*.nst__table th:nth-child(1), .nst__table td:nth-child(1) { width: 10%; }
.nst__table th:nth-child(2), .nst__table td:nth-child(2) { width: 10%; }
.nst__table th:nth-child(3), .nst__table td:nth-child(3) { width: 8%; }
.nst__table th:nth-child(4), .nst__table td:nth-child(4) { width: 9%; }
.nst__table th:nth-child(5), .nst__table td:nth-child(5) { width: 9%; }
.nst__table th:nth-child(6), .nst__table td:nth-child(6) { width: 10%; }
.nst__table th:nth-child(7), .nst__table td:nth-child(7) { width: 9%; }
.nst__table th:nth-child(8), .nst__table td:nth-child(8) { width: 12%; }
.nst__table th:nth-child(9), .nst__table td:nth-child(9) { width: 15%; }
.nst__table th:nth-child(10), .nst__table td:nth-child(10) { width: 8%; }
*/

body:not(.woocommerce-cart) .main-content .nst__table th:nth-child(9), 
body:not(.woocommerce-cart) .main-content .nst__table td:nth-child(9) { 
    width: 135px !important; 
}

body:not(.woocommerce-cart) .main-content .nst__table th:nth-child(3), 
body:not(.woocommerce-cart) .main-content .nst__table td:nth-child(3),
body:not(.woocommerce-cart) .main-content .nst__table th:nth-child(4), 
body:not(.woocommerce-cart) .main-content .nst__table td:nth-child(4) { 
    width: 115px !important; 
}

body:not(.woocommerce-cart) .main-content .nst__table th:nth-child(10), 
body:not(.woocommerce-cart) .main-content .nst__table td:nth-child(10) { 
    width: 160px !important; 
}

.nst__table thead, .nst__table thead tr {
    background: #23150a !important;
}

body:not(.woocommerce-cart) .main-content .nst__table thead th {
    height: 60px;
    padding: 0 10px;
    border: 0 !important;
    background: var(--brown) !important;
    color: #fff;
    font-size: 14px;
    line-height: 1;
    font-weight: 400;
    /* white-space: nowrap; */
    overflow: hidden;
    text-overflow: clip;
    text-align: center;
    vertical-align: middle
}

body:not(.woocommerce-cart) .main-content .nst__table thead th:first-child {
    border-radius: 16px 0 0 16px;
}

body:not(.woocommerce-cart) .nst__table thead th:last-child {
    border-radius: 0 16px 16px 0;
}

.nst__table tbody,
.nst__table tbody tr,
.nst__table tbody tr:nth-child(odd),
.nst__table tbody tr:nth-child(even),
.nst__table tbody td,
.nst__table tbody tr:hover td {
    background: transparent !important;
    background-color: transparent !important;
}

.nst__table tbody tr:hover {
    background: rgb(237 227 216 / 60%) !important;
}

.nst__table tbody tr {
    cursor: pointer;
}

body:not(.woocommerce-cart) .main-content .nst__table tbody td {
    height: 90px;
    padding: 0 10px;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    color: var(--text);
    font-size: 16px;
    line-height: 1.1;
    vertical-align: middle;
    white-space: nowrap;
    text-align: center;
}

body:not(.woocommerce-cart) .main-content .nst__table th:nth-child(1), 
body:not(.woocommerce-cart) .main-content .nst__table td:nth-child(1),
body:not(.woocommerce-cart) .main-content .nst__table th:nth-child(6), 
body:not(.woocommerce-cart) .main-content .nst__table td:nth-child(6) {
    text-align: left;
}

.nst__table tbody tr[hidden] {
    display: none;
}

.nst-exterior {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.nst-exterior img {
    width: 30px !important;
    height: 30px !important;
    flex: 0 0 auto;
    object-fit: contain;
    margin-bottom: 0 !important;
}

.nst-price-old {
    text-decoration: line-through;
    text-decoration-thickness: 1px;
}

.nst-status {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    min-height: 40px;
    padding: 0 10px;
    border-radius: 5px;
    font-size: inherit;
    font-size: 15px;
}

.nst-status__dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 3px;
}

.nst-status--free { background: #DBEECE !important; }
.nst-status--free .nst-status__dot { background: #4CAC0880; }
.nst-status--reserved { background: #E9E3D9 !important; }
.nst-status--reserved .nst-status__dot { background: #D1C1B4; }
.nst-status--sold { background: #FBD9D2 !important; }
.nst-status--sold .nst-status__dot { background: #EB575C; }
.nst-status--unknown { background: #eee !important; }
.nst-status--unknown .nst-status__dot { background: #aaa; }

.nst__no-results,
.nst-empty {
    padding: 26px 0;
    font-size: 14px;
}


/*triedenie*/
table.nst__table th {
    position: relative;
    cursor: pointer;
}

table.nst__table th::before{
    content: "";
    position: absolute;
    top: calc(50% - 6px);
    right: 3px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-bottom: 5px solid currentColor;
    opacity: 0.3;
}

table.nst__table th::after {
    content: "";
    position: absolute;
    top: calc(50% + 1px);
    right: 3px;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid currentColor;
    opacity: 0.3;
}

table.nst__table th[aria-sort="ascending"]::before {
    opacity: 1;
}

table.nst__table th[aria-sort="descending"]::after {
    opacity: 1;
}


/* Kompaktnejší menší desktop – stále bez horizontálneho overflow. */
@media (max-width: 1250px) and (min-width: 1000px) {
    .nst__table thead th {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 9.5px;
    }

    .nst__table tbody td {
        padding-left: 6px;
        padding-right: 6px;
        font-size: 10.5px;
    }

    .nst-status {
        padding-left: 6px;
        padding-right: 6px;
        gap: 5px;
    }
}

@media (max-width: 980px) {
    .nst__filters {
        flex-direction: column;
        gap: 22px;
    }
}

/* Až pod 1000 px môže tabuľka scrollovať. */
@media (max-width: 999px) {
    .nst__table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nst__table {
        min-width: 1200px !important;
		table-layout: auto !important;
    }

.nst-filter__cards {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.nst-filter-card {
    width: auto;
    padding: 10px;
}

.nst-filter-card span, .nst-room-card span {
    font-size: 10px;
}

.nst-filter__title {
    font-size: 18px;
}

body:not(.woocommerce-cart) .main-content .nst__table thead th {
    font-size: 13px;
}

.nst-status {
    gap: 6px;
    min-height: 32px;
    font-size: 13px;
}

body:not(.woocommerce-cart) .main-content .nst__table tbody td {
    height: 70px;
    font-size: 15px;
}
}
