/* ===== Pagina di ricerca ===== */
.ncs-page { --a: #a67c2e; --ad: #876322; --ink: #2b2f3a; --mut: #6b7280; --line: #d9dce1; background: #f4f5f7; padding: 22px 0 70px; color: var(--ink); }
.ncs-page * { box-sizing: border-box; }
.ncs-wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

.ncs-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding-bottom: 6px; }
.ncs-pill { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; background: #fff; font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.ncs-pill:hover { border-color: #b9bec6; }
.ncs-pill.is-on { border-color: var(--a); background: #fbf6ea; }
.ncs-pill b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
.ncs-all { font-weight: 600; background: #eef4fb; border-color: #cfe0f3; color: #0b4a87; }
.ncs-all svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; }
.ncs-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--a); color: #fff; font-size: 12px; font-weight: 700; }
.ncs-clear { margin-left: auto; font-size: 14px; font-weight: 600; color: var(--ad); text-decoration: none; padding: 0 6px; }

.ncs-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin: 22px 0 16px; flex-wrap: wrap; }
.ncs-head h1 { margin: 0; font-size: 26px; font-weight: 700; color: var(--ink); line-height: 1.2; }
.ncs-head p { margin: 4px 0 0; color: var(--mut); font-size: 15px; }
.ncs-sort { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--mut); }
.ncs-sort select { height: 40px; border: 1px solid var(--line); border-radius: 8px; padding: 0 10px; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }

.ncs-list { display: flex; flex-direction: column; gap: 18px; }
.ncs-card { display: grid; grid-template-columns: 340px 1fr; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.1); transition: box-shadow .2s; }
.ncs-card:hover { box-shadow: 0 8px 22px rgba(0,0,0,.13); }
.ncs-img { position: relative; display: block; min-height: 240px; background: #e8e9ec; overflow: hidden; }
.ncs-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.ncs-new { position: absolute; top: 12px; left: 12px; background: #0b6bcb; color: #fff; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 4px 10px; border-radius: 6px; z-index: 1; }
.ncs-body { padding: 18px 22px 18px; display: flex; flex-direction: column; min-width: 0; }
.ncs-price { font-size: 26px; font-weight: 700; margin-bottom: 4px; }
.ncs-title { font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--ink); text-decoration: none; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ncs-title:hover { color: var(--ad); }
.ncs-meta { margin-top: 12px; gap: 6px 22px; font-size: 14px; }
.ncs-text { margin: 12px 0 0; font-size: 14px; line-height: 1.55; color: var(--mut); }
.ncs-cta { margin-top: auto; padding-top: 14px; }
.ncs-btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 26px; border: 2px solid var(--a); border-radius: 10px; background: var(--a); color: #fff; font: inherit; font-size: 15px; font-weight: 700; text-decoration: none; cursor: pointer; }
.ncs-btn:hover { background: var(--ad); border-color: var(--ad); color: #fff; }
.ncs-btn.ghost { background: #fff; color: var(--ink); border-color: var(--line); }
.ncs-btn.ghost:hover { background: #fff; border-color: #b9bec6; color: var(--ink); }

.ncs-empty { background: #fff; border-radius: 16px; padding: 56px 20px; text-align: center; }
.ncs-empty h2 { font-size: 22px; margin: 0 0 8px; }
.ncs-empty p { color: var(--mut); margin: 0 0 20px; }
.ncs-pager { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.ncs-pager a { min-width: 40px; height: 40px; padding: 0 10px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: #fff; border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 500; }
.ncs-pager a.is-on { background: var(--ink); color: #fff; border-color: var(--ink); }

/* ----- Popup filtri ----- */
.ncs-modal[hidden] { display: none; }
.ncs-modal { position: fixed; inset: 0; z-index: 99999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.ncs-backdrop { position: absolute; inset: 0; background: rgba(20,22,28,.55); }
.ncs-dialog { position: relative; width: min(640px, 100%); max-height: 90vh; display: flex; flex-direction: column; background: #fff; border-radius: 14px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.ncs-dhead { display: flex; justify-content: space-between; align-items: center; padding: 16px 22px; background: #f4f5f7; border-radius: 14px 14px 0 0; border-bottom: 1px solid var(--line); }
.ncs-dhead h2 { margin: 0; font-size: 18px; font-weight: 600; }
.ncs-x { border: 0; background: transparent; font-size: 20px; cursor: pointer; color: var(--ink); width: 36px; height: 36px; }
.ncs-dbody { padding: 20px 22px; overflow-y: auto; flex: 1; }
.ncs-dbody section { padding: 16px 0; border-bottom: 1px solid #eceef1; scroll-margin-top: 8px; transition: background .4s; }
.ncs-dbody section:first-child { padding-top: 0; }
.ncs-dbody section:last-child { border-bottom: 0; }
.ncs-dbody section.is-hl { background: #fbf6ea; border-radius: 10px; }
.ncs-lbl { display: block; font-size: 15px; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.ncs-unit { font-weight: 400; color: var(--mut); font-size: 13px; }
.ncs-lbl input[type=text], .ncs-lbl select, .ncs-two select { width: 100%; height: 46px; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
.ncs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.ncs-two select { margin-top: 0; width: 100%; height: 46px; border: 1px solid var(--line); border-radius: 10px; padding: 0 12px; font: inherit; font-size: 15px; background: #fff; color: var(--ink); }
.ncs-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--line); border-radius: 10px; overflow: hidden; }
.ncs-tabs label { margin: 0; cursor: pointer; }
.ncs-tabs input { position: absolute; opacity: 0; pointer-events: none; }
.ncs-tabs span { display: block; text-align: center; padding: 12px; font-weight: 600; font-size: 15px; }
.ncs-tabs label + label span { border-left: 2px solid var(--line); }
.ncs-tabs input:checked + span { background: var(--a); color: #fff; }
.ncs-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.ncs-chips label { margin: 0; cursor: pointer; }
.ncs-chips input { position: absolute; opacity: 0; pointer-events: none; }
.ncs-chips span { display: inline-block; padding: 8px 16px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: #fff; }
.ncs-chips input:checked + span { border-color: var(--a); background: #fbf6ea; color: var(--ad); font-weight: 600; }
.ncs-chips input:focus-visible + span { outline: 2px solid var(--a); }
.ncs-dfoot { display: flex; justify-content: flex-end; gap: 12px; padding: 14px 22px; border-top: 1px solid var(--line); background: #fff; border-radius: 0 0 14px 14px; }
.ncs-dfoot .ncs-btn { height: 46px; }
.ncs-dfoot .ncs-btn[disabled] { opacity: .55; }

@media (max-width: 800px) {
	.ncs-card { grid-template-columns: 1fr; }
	.ncs-img { min-height: 0; aspect-ratio: 4 / 3; }
	.ncs-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 10px; scrollbar-width: none; }
	.ncs-bar::-webkit-scrollbar { display: none; }
	.ncs-clear { margin-left: 4px; white-space: nowrap; }
	.ncs-head h1 { font-size: 22px; }
	.ncs-modal { padding: 0; align-items: flex-end; }
	.ncs-dialog { max-height: 100vh; height: 100%; border-radius: 0; width: 100%; }
	.ncs-dhead, .ncs-dfoot { border-radius: 0; }
}


/* ===== Filtri a tendina sopra gli annunci (desktop) ===== */
.ncs-dd { position: relative; flex: none; }
.ncs-pop {
	position: absolute; top: calc(100% + 8px); left: 0; z-index: 60; min-width: 270px; max-width: 340px;
	background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 14px 40px rgba(20, 22, 28, .18); padding: 10px;
}
.ncs-pop[hidden] { display: none; }
.ncs-pop-list { display: flex; flex-direction: column; max-height: 340px; overflow-y: auto; }
.ncs-pop-list button, .ncs-pop-list a {
	display: block; width: 100%; text-align: left; padding: 11px 14px; border: 0; border-radius: 9px; background: transparent;
	font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; text-decoration: none;
}
.ncs-pop-list button:hover, .ncs-pop-list a:hover { background: #f6efe0; color: var(--ad); }
.ncs-pop-list .is-cur { font-weight: 700; color: var(--ad); background: #fbf6ea; }
.ncs-pop-list .is-sub { padding-left: 30px; font-size: 14px; color: #4b5260; }
.ncs-pop-list small { color: var(--mut); font-weight: 400; }
.ncs-pop-empty { margin: 8px 6px; font-size: 14px; color: var(--mut); }
.ncs-pop .ncs-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ncs-pop .ncs-two select { height: 44px; margin: 0; }
.ncs-pop .ncs-chips { padding: 4px 2px 2px; }
.ncs-apply { width: 100%; margin-top: 12px; height: 44px; border: 0; border-radius: 10px; background: var(--a); color: #fff; font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; }
.ncs-apply:hover { background: var(--ad); }
@media (max-width: 800px) { .ncs-pop { display: none !important; } }