.nek-search,
.nek-search *,
.nek-search-results,
.nek-search-results * {
    box-sizing: border-box;
}

.nek-search,
.nek-search-results {
    --nek-border: #d8d2c6;
    --nek-ink: #242424;
    --nek-muted: #706b63;
    --nek-surface: #ffffff;
    --nek-soft: #f8f6f2;
    --nek-accent: #a78f6d;
    --nek-accent-dark: #7e684c;
    --nek-navy: #10264b;
    color: var(--nek-ink);
    font-family: inherit;
}

.nek-search--home,
.nek-search-shell,
.nek-search-results {
    width: min(100%, 1240px);
    margin-inline: auto;
}

.nek-search--home {
    display: grid;
    gap: 12px;
    margin-top: clamp(18px, 2.6vw, 34px);
    margin-bottom: 14px;
}

.nek-search__purpose {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    padding: 2px;
    background: #fff;
    border: 1px solid var(--nek-border);
}

.nek-search__segment {
    cursor: pointer;
}

.nek-search__segment input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.nek-search__segment span {
    display: block;
    min-width: 104px;
    padding: 8px 15px;
    color: var(--nek-muted);
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0;
    text-transform: uppercase;
}

.nek-search__segment input:checked + span {
    background: var(--nek-accent);
    color: #fff;
}

.nek-search__row {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(150px, 0.8fr) minmax(150px, 0.8fr) auto;
    gap: 10px;
    align-items: end;
}

.nek-search--home .nek-search__row {
    grid-template-columns: minmax(260px, 1.35fr) minmax(180px, 0.9fr) minmax(160px, 0.78fr) minmax(190px, 0.82fr) minmax(128px, auto);
    gap: 14px;
}

.nek-search--home .nek-search__submit {
    margin-left: 4px;
}

.nek-search__row--primary {
    grid-template-columns: minmax(250px, 1.4fr) repeat(5, minmax(128px, 1fr));
}

.nek-search__row--advanced {
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 12px 14px;
    margin-top: 18px;
}

.nek-search__field {
    position: relative;
    display: grid;
    gap: 4px;
    min-width: 0;
}

.nek-search__field span {
    color: var(--nek-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
}

.nek-search__field input,
.nek-search__field select {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--nek-border);
    border-radius: 0;
    background: var(--nek-surface);
    color: var(--nek-ink);
    font: inherit;
    font-size: 14px;
    outline: none;
}

.nek-search__field select {
    appearance: none;
    padding-right: 32px;
    background-image: linear-gradient(45deg, transparent 50%, #4d4d4d 50%), linear-gradient(135deg, #4d4d4d 50%, transparent 50%);
    background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px;
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
}

.nek-search__field small {
    color: #8a8379;
    font-size: 11px;
    line-height: 1.25;
}

.nek-search__row--advanced .nek-search__field {
    padding-bottom: 16px;
}

.nek-search__row--advanced .nek-search__field small {
    position: absolute;
    left: 0;
    bottom: 0;
    white-space: nowrap;
}

.nek-search__field input:focus,
.nek-search__field select:focus {
    border-color: var(--nek-accent);
    box-shadow: 0 0 0 2px rgba(167, 143, 109, 0.18);
}

.nek-search__submit,
.nek-search-toolbar__filters {
    min-height: 44px;
    padding: 0 22px;
    border: 1px solid var(--nek-accent);
    background: var(--nek-accent);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
}

.nek-search__submit:hover,
.nek-search__submit:focus,
.nek-search__submit:active,
.nek-search-toolbar__filters:hover,
.nek-search-toolbar__filters:focus,
.nek-search-toolbar__filters:active {
    background: var(--nek-accent-dark);
    border-color: var(--nek-accent-dark);
    color: #fff;
    outline: none;
}

.nek-search__submit:focus-visible,
.nek-search-toolbar__filters:focus-visible {
    box-shadow: 0 0 0 3px rgba(167, 143, 109, 0.28);
}

.nek-search-shell {
    position: relative;
    margin-top: 14px;
    margin-bottom: 28px;
    padding-top: 16px;
}

.nek-search-shell__clear {
    position: absolute;
    top: -4px;
    right: 0;
    color: var(--nek-muted);
    font-size: 12px;
    font-weight: 700;
    text-decoration: underline;
}

.nek-search-toolbar {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.nek-search-toolbar__chips {
    display: flex;
    flex: 1;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.nek-search--filters {
    padding: 18px;
    border: 1px solid var(--nek-border);
    background: var(--nek-soft);
}

.nek-search__panel-head {
    display: none;
}

.nek-search__advanced {
    margin-top: 20px;
    padding-top: 4px;
    border: 0;
}

.nek-search__advanced summary {
    width: fit-content;
    cursor: pointer;
    color: var(--nek-accent-dark);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.nek-search__quick-checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}

.nek-search__quick-checks label,
.nek-search__checks label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 32px;
    padding: 5px 9px;
    border: 1px solid var(--nek-border);
    background: #fff;
    color: var(--nek-ink);
    font-size: 13px;
    cursor: pointer;
}

.nek-search__quick-checks input,
.nek-search__checks input {
    width: 15px;
    height: 15px;
    accent-color: var(--nek-accent);
}

.nek-search__amenities {
    margin: 16px 0 0;
    padding: 0;
    border: 0;
}

.nek-search__amenities legend {
    margin-bottom: 8px;
    color: var(--nek-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.nek-search__checks {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.nek-search__footer {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid #e4ded3;
}

.nek-search__sort {
    width: min(100%, 190px);
}

.nek-search__sort .nek-search__field span {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

.nek-search__sort .nek-search__field select {
    min-height: 38px;
    font-size: 13px;
    background-position: calc(100% - 16px) 16px, calc(100% - 11px) 16px;
}

.nek-search__actions {
    display: flex;
    align-items: center;
}

.nek-chip {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--nek-border);
    background: #fff;
    color: var(--nek-muted);
    font-size: 12px;
    font-weight: 700;
}

.nek-search-suggestions {
    position: absolute;
    z-index: 20;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    max-height: 320px;
    overflow: auto;
    border: 1px solid var(--nek-border);
    background: #fff;
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.14);
}

.nek-search-suggestions button {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 11px 13px;
    border: 0;
    border-bottom: 1px solid #eee7dd;
    background: #fff;
    color: var(--nek-ink);
    cursor: pointer;
    font: inherit;
    text-align: left;
}

.nek-search-suggestions img,
.nek-search-suggestions__placeholder {
    width: 54px;
    height: 42px;
    display: block;
    background: var(--nek-soft);
    object-fit: cover;
}

.nek-search-suggestions__placeholder {
    border: 1px solid #eee7dd;
}

.nek-search-suggestions__body {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.nek-search-suggestions button:hover,
.nek-search-suggestions button:focus {
    background: var(--nek-soft);
}

.nek-search-suggestions__empty {
    padding: 14px 13px;
    color: var(--nek-muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

.nek-search-suggestions strong {
    display: block;
    min-width: 0;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.28;
    overflow-wrap: anywhere;
    white-space: normal;
}

.nek-search-suggestions span {
    color: var(--nek-muted);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.nek-search-results {
    position: relative;
    margin-bottom: clamp(56px, 7vw, 96px);
}

.nek-search-results__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 16px;
    color: var(--nek-muted);
    font-size: 14px;
    font-weight: 700;
}

.nek-search-results__tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    align-self: center;
}

.nek-search-results.is-loading {
    opacity: 0.62;
    pointer-events: none;
}

.nek-search-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.nek-property-card {
    display: grid;
    min-width: 0;
    border: 1px solid #e5ded3;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.nek-property-card:hover {
    border-color: #d7c8b4;
    box-shadow: 0 16px 28px rgba(16, 38, 75, 0.08);
    transform: translateY(-2px);
}

.nek-property-card__image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    background: #eee8df;
    overflow: hidden;
}

.nek-property-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform 180ms ease;
}

.nek-property-card:hover .nek-property-card__image img {
    transform: scale(1.025);
}

.nek-property-card__body {
    display: grid;
    gap: 9px;
    padding: 17px;
}

.nek-property-card__eyebrow,
.nek-property-card__type {
    color: var(--nek-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-transform: uppercase;
}

.nek-property-card__image .nek-property-card__type {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1;
    max-width: calc(100% - 20px);
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.55);
    color: var(--nek-ink);
    font-size: 10px;
    line-height: 1.2;
    backdrop-filter: blur(6px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.1);
}

.nek-property-card h3 {
    margin: 0;
    color: var(--nek-ink);
    font-size: 18px;
    line-height: 1.25;
}

.nek-property-card h3 a {
    color: inherit;
    text-decoration: none;
}

.nek-property-card h3 a:hover {
    color: var(--nek-accent-dark);
}

.nek-property-card__price {
    color: var(--nek-accent-dark);
    font-size: 16px;
    font-weight: 800;
}

.nek-property-card__facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px 12px;
    margin: 4px 0;
}

.nek-property-card__facts div {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
    border-bottom: 1px solid #eee7dd;
    padding-bottom: 5px;
}

.nek-property-card__facts dt,
.nek-property-card__facts dd {
    margin: 0;
    font-size: 13px;
}

.nek-property-card__facts dt {
    color: var(--nek-muted);
}

.nek-property-card__facts dd {
    color: var(--nek-ink);
    font-weight: 700;
    text-align: right;
}

.nek-search-empty {
    grid-column: 1 / -1;
    padding: 30px;
    border: 1px solid var(--nek-border);
    background: var(--nek-soft);
    color: var(--nek-muted);
    text-align: center;
    font-weight: 700;
}

.nek-search-pagination,
.nek-search-loadmore {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
    margin-bottom: 42px;
}

.nek-search-pagination a,
.nek-search-loadmore button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid var(--nek-border);
    background: #fff;
    color: var(--nek-ink);
    text-decoration: none;
    cursor: pointer;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
}

.nek-search-loadmore span {
    color: var(--nek-muted);
    font-size: 13px;
    font-weight: 700;
}

.nek-search-pagination a.is-active,
.nek-search-pagination a:hover,
.nek-search-loadmore button:hover {
    border-color: var(--nek-accent);
    background: var(--nek-accent);
    color: #fff;
}

.nek-search-loadmore button:disabled {
    cursor: progress;
    opacity: 0.7;
}

.nek-search-pagination__gap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 38px;
    color: var(--nek-muted);
    font-weight: 700;
}

@media (max-width: 1180px) {
    .nek-search__row--primary {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .nek-search--home .nek-search__row {
        grid-template-columns: minmax(220px, 1.25fr) minmax(150px, 0.86fr) minmax(140px, 0.72fr) minmax(160px, 0.8fr) minmax(118px, auto);
        gap: 12px;
    }

    .nek-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nek-search__purpose {
        width: 100%;
    }

    .nek-search__segment {
        flex: 1;
    }

    .nek-search__segment span {
        min-width: 0;
        padding-inline: 10px;
    }

    .nek-search-toolbar {
        display: none !important;
    }

    .nek-search-shell {
        padding-top: 26px;
    }

    .nek-search--filters {
        position: static;
        max-height: none;
        overflow: visible;
        padding: 16px;
        border-width: 1px;
        transform: none;
        transition: none;
        box-shadow: none;
    }

    .nek-search-shell__clear {
        top: 0;
    }

    .nek-search__footer {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
        margin-top: 16px;
        padding-top: 14px;
        border-top: 1px solid #e4dccf;
    }

    .nek-search__actions {
        grid-column: auto;
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .nek-search-results__meta {
        align-items: center;
        gap: 10px;
    }

    .nek-search-results__tools {
        width: auto;
    }

    .nek-search__sort {
        width: 100%;
    }

    .nek-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nek-search-lock {
        overflow: auto;
    }
}

@media (max-width: 980px) {
    .nek-search--home .nek-search__row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nek-search--home .nek-search__field--keyword,
    .nek-search--home .nek-search__submit {
        grid-column: 1 / -1;
    }

    .nek-search--home .nek-search__submit {
        margin-left: 0;
    }

    .nek-search__row--primary,
    .nek-search__row--advanced {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .nek-search__row,
    .nek-search__row--primary,
    .nek-search__row--advanced {
        grid-template-columns: 1fr;
    }

    .nek-search--home {
        padding: 12px;
        background: rgba(255, 255, 255, 0.92);
    }

    .nek-search-results__meta {
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
    }

    .nek-search-results__tools {
        width: auto;
    }

    .nek-search-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}
