:root {
    --nep-primary: #efb91f;
    --nep-text: #111827;
    --nep-muted: #6b7280;
    --nep-border: #dedbd3;
    --nep-soft: #f7f7f5;
    --nep-white: #ffffff;
    --nep-radius: 8px;
    --nep-shadow: 0 1px 3px rgba(15, 23, 42, .08);
}

.nep-listing, .nep-single { color: var(--nep-text-color, #4b5563); font-family: var(--nep-font-family, inherit); font-size: var(--nep-body-size, 15px); }
.nep-card-title { color: var(--nep-title-color, #111827); font-size: var(--nep-card-title-size, 28px); }
.nep-card-price { color: var(--nep-price-color, var(--nep-primary)); font-size: var(--nep-price-size, 22px); }

.nep-listing,
.nep-single {
    color: var(--nep-text);
    font-family: inherit;
    line-height: 1.5;
}

.nep-listing *,
.nep-single * {
    box-sizing: border-box;
}

.nep-listing svg,
.nep-single svg {
    width: 1em;
    height: 1em;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.nep-page-header {
    margin: 0 0 24px;
}

.nep-page-header h1 {
    margin: 0 0 8px;
    color: var(--nep-text);
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.15;
}

.nep-result-count {
    margin: 0;
    color: var(--nep-muted);
    font-size: 17px;
}

.nep-result-count--standalone {
    margin-bottom: 18px;
}

.nep-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;
    margin: 0 0 22px;
    padding: 20px;
    border: 1px solid var(--nep-border);
    border-radius: var(--nep-radius);
    background: var(--nep-white);
    box-shadow: var(--nep-shadow);
}

.nep-filter-field {
    min-width: 0;
}

.nep-filter-field label {
    display: block;
    margin: 0 0 6px;
    color: #111;
    font-size: 13px;
    font-weight: 600;
}

.nep-filter-field input,
.nep-filter-field select,
.nep-reset-button {
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 0 12px;
    border: 1px solid #d9d6ce;
    border-radius: 5px;
    outline: none;
    background: #fafaf9;
    color: #111827;
    font: inherit;
    font-size: 14px;
    box-shadow: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.nep-filter-field input:focus,
.nep-filter-field select:focus,
.nep-reset-button:focus-visible {
    border-color: #a9a59a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(239, 185, 31, .18);
}

.nep-filter-field select {
    cursor: pointer;
}

.nep-input-affix {
    position: relative;
}

.nep-input-affix > span {
    position: absolute;
    top: 50%;
    left: 12px;
    z-index: 1;
    transform: translateY(-50%);
    color: #64748b;
    font-size: 13px;
    pointer-events: none;
}

.nep-input-affix input {
    padding-left: 34px;
}

.nep-filter-reset-wrap {
    display: flex;
    align-items: flex-end;
}

.nep-reset-button {
    cursor: pointer;
    background: #fbfbfa;
    font-weight: 500;
}

.nep-reset-button:hover {
    background: #f1f0ed;
}

.nep-view-tabs {
    display: inline-flex;
    gap: 2px;
    margin: 0 0 28px;
    padding: 4px;
    border-radius: 7px;
    background: #efeeeb;
}

.nep-view-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 32px;
    padding: 5px 12px;
    border: 0;
    border-radius: 5px;
    background: transparent;
    color: #64748b;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.nep-view-tab.is-active {
    background: #fff;
    color: #111827;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.nep-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    margin-bottom: 15px;
    color: var(--nep-muted);
}

.nep-loading[hidden] {
    display: none;
}

.nep-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #ddd;
    border-top-color: var(--nep-primary);
    border-radius: 50%;
    animation: nep-spin .7s linear infinite;
}

@keyframes nep-spin { to { transform: rotate(360deg); } }

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

.nep-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid #deddd8;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(15, 23, 42, .05);
    transition: transform .25s ease, box-shadow .25s ease;
}

.nep-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(15, 23, 42, .12);
}

.nep-card-image {
    position: relative;
    display: block;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #ecece8;
}

.nep-card-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.nep-card:hover .nep-card-image img {
    transform: scale(1.035);
}

.nep-card-badges {
    position: absolute;
    top: 10px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
}

.nep-card-badges--left {
    left: 11px;
}

.nep-badge {
    display: inline-flex;
    align-items: center;
    min-height: 21px;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fff;
    color: #111827;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .08);
}

.nep-badge--primary {
    background: var(--nep-primary);
}

.nep-badge--status {
    background: #1f2937;
    color: #fff;
}

.nep-badge--soft {
    background: #f2f1ed;
}

.nep-badge--dpe {
    position: absolute;
    top: 10px;
    right: 11px;
    background: rgba(255, 255, 255, .92);
}

.nep-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 16px 15px 14px;
}

.nep-card-title {
    display: -webkit-box;
    min-height: 51px;
    margin: 0 0 8px;
    overflow: hidden;
    color: #111827;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.38;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.nep-card-title a {
    color: inherit;
    text-decoration: none;
}

.nep-card-location {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0 0 12px;
    color: #687385;
    font-size: 13px;
}

.nep-card-location svg {
    width: 16px;
    height: 16px;
}

.nep-card-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 15px;
    margin: 0 0 16px;
    padding: 8px;
    border-radius: 6px;
    background: #f7f7f5;
    font-size: 13px;
}

.nep-card-features > span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-weight: 600;
}

.nep-card-features svg {
    width: 15px;
    height: 15px;
}

.nep-card-features .nep-land {
    color: #12a14a;
}

.nep-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
}

.nep-card-price {
    color: var(--nep-primary);
    font-size: 20px;
    line-height: 1.2;
}

.nep-detail-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 13px;
    border-radius: 6px;
    background: var(--nep-primary);
    color: #111 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    white-space: nowrap;
    transition: filter .2s, transform .2s;
}

.nep-detail-button:hover {
    filter: brightness(.95);
    transform: translateY(-1px);
}

.nep-no-results {
    grid-column: 1 / -1;
    display: flex;
    min-height: 180px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 30px;
    border: 1px dashed #d6d3ca;
    border-radius: 8px;
    background: #fafaf8;
    color: var(--nep-muted);
    text-align: center;
}

.nep-no-results strong {
    color: var(--nep-text);
    font-size: 18px;
}

.nep-pagination {
    margin-top: 28px;
    text-align: center;
}

.nep-pagination nav {
    display: inline-flex;
    gap: 6px;
}

.nep-page-button {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border: 1px solid #d9d6cf;
    border-radius: 6px;
    background: #fff;
    color: #111827;
    cursor: pointer;
}

.nep-page-button.is-current,
.nep-page-button:hover {
    border-color: var(--nep-primary);
    background: var(--nep-primary);
}

.nep-map {
    width: 100%;
    height: min(70vh, 650px);
    min-height: 480px;
    border: 1px solid #deddd8;
    border-radius: 8px;
    overflow: hidden;
}

.nep-map-popup {
    display: grid;
    min-width: 200px;
    gap: 4px;
}

.nep-map-popup-image {
    width: 100%;
    height: 110px;
    margin-bottom: 5px;
    border-radius: 4px;
    object-fit: cover;
}

.nep-map-popup strong {
    font-size: 14px;
}

.nep-map-popup span {
    color: #6b7280;
}

.nep-map-popup b {
    color: #b88700;
    font-size: 15px;
}

.nep-map-popup a {
    margin-top: 4px;
    color: #111827;
    font-weight: 700;
}

/* Single property */
.nep-single {
    padding: 55px 20px 90px;
    background: #fafaf8;
}

.nep-single-container {
    width: min(1180px, 100%);
    margin: 0 auto;
}

.nep-back-link {
    display: inline-block;
    margin-bottom: 25px;
    color: #596273;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}

.nep-single-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.nep-single-header h1 {
    max-width: 850px;
    margin: 10px 0 8px;
    color: #111827;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.1;
}

.nep-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.nep-single-location {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    color: #687385;
}

.nep-single-price {
    flex: 0 0 auto;
    color: #c79400;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    white-space: nowrap;
}

.nep-gallery {
    position: relative;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 10px;
    height: min(62vw, 610px);
    max-height: 610px;
    margin-bottom: 34px;
    overflow: hidden;
    border-radius: 12px;
}

.nep-gallery button {
    overflow: hidden;
    padding: 0;
    border: 0;
    background: #e8e8e4;
    cursor: zoom-in;
}

.nep-gallery img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s ease;
}

.nep-gallery button:hover img {
    transform: scale(1.025);
}

.nep-gallery-thumbs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 10px;
}

.nep-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
    gap: 32px;
}

.nep-key-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1px;
    overflow: hidden;
    margin-bottom: 28px;
    border: 1px solid #e0ddd5;
    border-radius: 10px;
    background: #e0ddd5;
}

.nep-key-features > div {
    display: grid;
    grid-template-columns: 30px 1fr;
    grid-template-rows: auto auto;
    padding: 18px;
    background: #fff;
}

.nep-key-features svg {
    grid-row: 1 / 3;
    align-self: center;
    width: 23px;
    height: 23px;
    color: #8b720e;
}

.nep-key-features strong {
    font-size: 18px;
}

.nep-key-features span {
    color: #737b88;
    font-size: 12px;
}

.nep-content-section {
    margin-bottom: 28px;
    padding: 28px;
    border: 1px solid #e0ddd5;
    border-radius: 10px;
    background: #fff;
}

.nep-content-section h2,
.nep-contact-card h2 {
    margin: 0 0 17px;
    color: #111827;
    font-size: 24px;
}

.nep-property-description {
    color: #444d5b;
    font-size: 16px;
    line-height: 1.8;
}

.nep-property-description > :first-child { margin-top: 0; }
.nep-property-description > :last-child { margin-bottom: 0; }

.nep-energy-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.nep-energy-cards > div {
    display: grid;
    grid-template-columns: auto auto;
    align-items: center;
    gap: 6px 13px;
    min-width: 220px;
    padding: 16px;
    border-radius: 8px;
    background: #f7f7f5;
}

.nep-energy-cards > div > span {
    font-weight: 700;
}

.nep-energy-cards small {
    grid-column: 1 / -1;
    color: #697282;
}

.nep-energy-letter {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    color: #fff;
    font-size: 20px;
}

.nep-energy-a { background: #168c4d; }
.nep-energy-b { background: #3da94f; }
.nep-energy-c { background: #8abf38; }
.nep-energy-d { background: #e6ca25; color: #222; }
.nep-energy-e { background: #e99a22; }
.nep-energy-f { background: #e4672d; }
.nep-energy-g { background: #c83232; }
.nep-energy-na { background: #8b929c; }

.nep-single-map {
    height: 390px;
    border-radius: 8px;
    overflow: hidden;
}

.nep-contact-card {
    position: sticky;
    top: 30px;
    padding: 25px;
    border: 1px solid #dcd8ce;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, .08);
}

.nep-contact-card p {
    color: #657080;
}

.nep-contact-name {
    color: #111827 !important;
    font-size: 17px;
    font-weight: 700;
}

.nep-contact-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    margin-top: 10px;
    padding: 10px 14px;
    border: 1px solid #d9d5cc;
    border-radius: 7px;
    color: #111827 !important;
    font-weight: 700;
    text-align: center;
    text-decoration: none !important;
}

.nep-contact-action--primary {
    border-color: var(--nep-primary);
    background: var(--nep-primary);
}

.nep-lightbox[hidden] {
    display: none;
}

.nep-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
    background: rgba(0, 0, 0, .93);
}

.nep-lightbox img {
    display: block;
    max-width: 90vw;
    max-height: 88vh;
    object-fit: contain;
}

.nep-lightbox button {
    position: absolute;
    border: 0;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    cursor: pointer;
}

.nep-lightbox-close {
    top: 18px;
    right: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 30px;
}

.nep-lightbox-prev,
.nep-lightbox-next {
    top: 50%;
    width: 50px;
    height: 70px;
    transform: translateY(-50%);
    font-size: 45px;
}

.nep-lightbox-prev { left: 18px; }
.nep-lightbox-next { right: 18px; }
body.nep-lightbox-open { overflow: hidden; }

@media (max-width: 980px) {
    .nep-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nep-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nep-single-layout { grid-template-columns: 1fr; }
    .nep-contact-card { position: static; }
}

@media (max-width: 680px) {
    .nep-filters { grid-template-columns: 1fr; padding: 16px; }
    .nep-grid { grid-template-columns: 1fr; }
    .nep-card-title { min-height: auto; }
    .nep-map { min-height: 420px; }
    .nep-single { padding: 35px 14px 65px; }
    .nep-single-header { align-items: flex-start; flex-direction: column; gap: 12px; }
    .nep-single-price { white-space: normal; }
    .nep-gallery { grid-template-columns: 1fr; height: auto; }
    .nep-gallery-main { aspect-ratio: 4 / 3; }
    .nep-gallery-thumbs { grid-template-columns: repeat(2, 1fr); grid-template-rows: none; }
    .nep-gallery-thumbs button { aspect-ratio: 1 / 1; }
    .nep-content-section { padding: 20px; }
    .nep-key-features { grid-template-columns: repeat(2, 1fr); }
    .nep-lightbox { padding: 55px 15px; }
    .nep-lightbox-prev { left: 5px; }
    .nep-lightbox-next { right: 5px; }
}

@media (prefers-reduced-motion: reduce) {
    .nep-card,
    .nep-card-image img,
    .nep-detail-button,
    .nep-gallery img { transition: none; }
    .nep-spinner { animation-duration: 1.5s; }
}

/* Admin-configurable presentation values (kept last so they override defaults). */
.nep-listing, .nep-single { color: var(--nep-text-color, #4b5563); font-size: var(--nep-body-size, 15px); }
.nep-card .nep-card-title, .nep-card .nep-card-title a { color: var(--nep-title-color, #111827); font-size: var(--nep-card-title-size, 28px); }
.nep-card .nep-card-price { color: var(--nep-price-color, var(--nep-primary)); font-size: var(--nep-price-size, 22px); }
