/* ==========================================================================
   DHOME — portale, scheda immobile, segreteria (stile "Capsule")
   ========================================================================== */
.glass { background: rgba(255, 255, 255, .72); -webkit-backdrop-filter: blur(20px) saturate(1.6); backdrop-filter: blur(20px) saturate(1.6); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .85), var(--shadow); }

/* ---------------- layout portale ---------------- */
body.portal { height: 100vh; height: 100svh; overflow: hidden; }
.pt { position: fixed; inset: 0; display: flex; flex-direction: column; padding-top: 86px; }
.pt-bar { display: flex; align-items: center; gap: 8px; padding: 4px var(--pad) 10px; position: relative; z-index: 30; }
.seg2 { position: relative; display: flex; padding: 5px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); flex: none; }
.seg2 button { position: relative; z-index: 1; height: 42px; padding: 0 20px; border-radius: 999px; font-size: 14px; font-weight: 500; transition: color .35s; }
.seg2 button.is-on { color: #fff; }
.seg2-thumb { position: absolute; z-index: 0; top: 5px; bottom: 5px; left: 5px; border-radius: 999px; background: var(--ink); box-shadow: 0 10px 20px -10px rgba(11, 11, 12, .6); }
.pt-search { position: relative; flex: 1; min-width: 180px; display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 18px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); transition: box-shadow .3s; }
.pt-search:focus-within { box-shadow: inset 0 0 0 2px var(--gold), 0 0 0 6px rgba(200, 159, 102, .1); }
.pt-search > svg { width: 17px; height: 17px; color: var(--gold-d); flex: none; }
.pt-search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font-size: 15px; }
.pt-search input::placeholder { color: #9a9aa8; }
.pt-suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); padding: 6px; border-radius: 26px; background: #fff; box-shadow: var(--shadow-lg); }
.pt-suggest button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 18px; text-align: left; font-size: 14px; }
.pt-suggest button:hover, .pt-suggest button.is-on { background: var(--gold-l); }
.pt-suggest svg { width: 16px; height: 16px; color: var(--gold); flex: none; }
.pt-suggest span { flex: 1; display: flex; flex-direction: column; }
.pt-suggest small { color: var(--mute); font-size: 12px; }
.pt-suggest em { font-style: normal; font-family: var(--mono); font-size: 11px; color: var(--gold-d); }
.pt-suggest .txt { color: var(--gold-d); }

.dd { position: relative; }
.dd-btn { height: 52px; padding: 0 18px; display: inline-flex; align-items: center; gap: 10px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 14px; font-weight: 500; white-space: nowrap; transition: box-shadow .3s, background .3s, color .3s; }
.dd-btn:hover { box-shadow: inset 0 0 0 1.5px var(--gold), var(--shadow); }
.dd-btn i { width: 7px; height: 7px; border-right: 1.8px solid currentColor; border-bottom: 1.8px solid currentColor; transform: rotate(45deg) translateY(-2px); opacity: .55; transition: transform .3s; }
.dd.is-open .dd-btn i { transform: rotate(225deg) translateY(-2px); }
.dd.has-val .dd-btn { background: var(--ink); color: #fff; }
.dd-btn.more svg { width: 17px; height: 17px; }
.dd-btn .n { min-width: 22px; height: 22px; border-radius: 999px; background: var(--gold); color: var(--ink); font-size: 11px; display: grid; place-items: center; padding: 0 6px; }
.dd-panel { position: absolute; top: calc(100% + 10px); left: 0; width: 350px; padding: 22px; border-radius: 30px; background: #fff; box-shadow: var(--shadow-lg); transform-origin: 20% 0; }
.range { position: relative; height: 34px; }
.range-track { position: absolute; left: 0; right: 0; top: 14px; height: 6px; border-radius: 6px; background: var(--paper-2); }
.range-track i { position: absolute; top: 0; bottom: 0; border-radius: 6px; background: var(--gold); }
.range input { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 34px; margin: 0; background: none; pointer-events: none; -webkit-appearance: none; appearance: none; }
.range input::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 0 0 6px var(--gold) inset, 0 6px 16px rgba(200, 159, 102, .4); cursor: grab; }
.range input::-moz-range-thumb { pointer-events: auto; width: 24px; height: 24px; border: 5px solid var(--gold); border-radius: 50%; background: #fff; cursor: grab; }
.range-vals { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.03em; }
.dd-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }
.dd-presets button, .pills button, .tags button { height: 38px; padding: 0 15px; border-radius: 999px; font-size: 13px; font-weight: 500; background: var(--paper); transition: background .3s, color .3s; }
.dd-presets button:hover, .pills button:hover, .tags button:hover { background: var(--gold-l); color: var(--gold-d); }
.pills { display: flex; gap: 8px; }
.pills button { flex: 1; height: 50px; font-size: 16px; }
.pills button.is-on, .tags button.is-on { background: var(--ink); color: #fff; }

.pt-view { display: flex; padding: 5px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); flex: none; }
.pt-view button { width: 42px; height: 42px; border-radius: 999px; display: grid; place-items: center; color: var(--mute); transition: background .3s, color .3s; }
.pt-view button svg { width: 16px; height: 16px; }
.pt-view button.is-on { background: var(--gold); color: var(--ink); }

.pt-types { display: flex; gap: 8px; padding: 4px var(--pad) 16px; overflow-x: auto; scrollbar-width: none; position: relative; z-index: 10; }
.pt-types::-webkit-scrollbar { display: none; }
.tchip { flex: none; display: inline-flex; align-items: center; gap: 9px; height: 46px; padding: 0 16px 0 6px; border-radius: 999px; font-size: 13.5px; font-weight: 500; background: #fff; box-shadow: 0 8px 20px -14px rgba(45, 34, 16, .5); transition: background .35s, color .35s, opacity .3s, transform .35s var(--ease); }
.tchip svg { width: 34px; height: 34px; padding: 8px; border-radius: 50%; background: var(--gold-l); color: var(--gold-d); transition: background .35s, color .35s; }
.tchip .type-icon { width: 38px; height: 38px; object-fit: contain; flex: none; }
.tchip.all { padding-left: 16px; }
.tchip b { font-weight: 500; font-family: var(--mono); font-size: 10.5px; color: var(--mute); }
.tchip:hover { transform: translateY(-2px); }
.tchip.is-on { background: var(--ink); color: #fff; }
.tchip.is-on svg { background: var(--gold); color: var(--ink); }
.tchip.is-on b { color: rgba(255, 255, 255, .6); }
.tchip.is-zero:not(.is-on) { opacity: .4; }

.pt-main { position: relative; flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); transition: grid-template-columns .7s var(--ease); }
.pt-main[data-view="list"] { grid-template-columns: minmax(0, 1fr) 0fr; }
.pt-main[data-view="map"] { grid-template-columns: 0fr minmax(0, 1fr); }
.pt-list { min-width: 0; overflow-y: auto; overscroll-behavior: contain; padding: 4px var(--pad) 70px; scrollbar-width: thin; scrollbar-color: rgba(11, 11, 12, .15) transparent; }
.pt-main[data-view="map"] .pt-list { padding: 0; overflow: hidden; }
.pt-list-head { display: flex; justify-content: space-between; align-items: end; gap: 20px; padding: 6px 0 14px; }
.pt-count { font-family: var(--display); font-weight: 600; font-size: 30px; line-height: 1; letter-spacing: -.045em; }
.pt-count b { font-weight: 600; color: var(--gold-d); font-variant-numeric: tabular-nums; }
.pt-where { color: var(--mute); margin-top: 8px; }
.sort { display: flex; align-items: center; gap: 10px; }
.sort span { color: var(--mute); }
.sort select { height: 42px; padding: 0 36px 0 16px; border-radius: 999px; border: 0; outline: 0; background: #fff; box-shadow: var(--shadow); font-size: 13px; font-weight: 500; appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%); background-position: calc(100% - 20px) 18px, calc(100% - 15px) 18px; background-size: 5px 5px; background-repeat: no-repeat; }
.pt-active { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.pt-active:empty { display: none; }
.pt-active button { height: 34px; padding: 0 10px 0 14px; display: inline-flex; align-items: center; gap: 8px; border-radius: 999px; background: var(--gold-l); color: var(--gold-d); font-size: 12.5px; font-weight: 500; }
.pt-active button i { font-style: normal; font-size: 10px; }
.pt-active .clear { background: none; color: var(--mute); text-decoration: underline; }
.pt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 18px 16px; }
.pt-main[data-view="list"] .pt-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.pt-empty { padding: 60px 0; text-align: center; }
.pt-empty p { color: var(--mute); max-width: 380px; margin: 14px auto 24px; }
.pt-sentinel { height: 1px; }

/* ---------------- card annuncio ---------------- */
.lc { position: relative; padding: 8px; border-radius: 30px; background: #fff; box-shadow: var(--shadow); transform-style: preserve-3d; will-change: transform; transition: box-shadow .5s; }
.lc:hover { box-shadow: var(--shadow-lg); }
.lc.is-hot { box-shadow: 0 0 0 2.5px var(--gold), var(--shadow-lg); }
.lc-link { position: absolute; inset: 0; z-index: 2; border-radius: inherit; }
.lc-media { position: relative; aspect-ratio: 4 / 3; border-radius: 23px; overflow: hidden; background: var(--paper-2); }
.lc-track img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity .5s, transform 1.2s var(--ease); }
.lc:hover .lc-track img { transform: scale(1.06); }
.lc-noimg { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: var(--gold-d); background: radial-gradient(80% 90% at 30% 20%, #ffffff 0%, #f5ecdc 55%, #e7d4b2 100%); }
.lc-noimg svg { width: 58px; height: 58px; }
.lc-noimg .mono { color: var(--gold-d); opacity: .7; }
.lc-badges { position: absolute; z-index: 3; left: 10px; top: 10px; display: flex; gap: 5px; flex-wrap: wrap; pointer-events: none; }
.lc-badges .b { height: 26px; padding: 0 11px; display: inline-flex; align-items: center; border-radius: 999px; font-size: 11px; font-weight: 600; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lc-badges .new { background: #fff; box-shadow: inset 0 0 0 1.5px var(--gold); }
.lc-badges .down { background: var(--red); color: #fff; }
.lc-badges .aff { background: var(--ink); color: #fff; }
.lc-badges .real { background: var(--gold); color: var(--ink); }
.lc-fav { position: absolute; z-index: 4; right: 10px; top: 10px; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: rgba(255, 255, 255, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.lc-fav svg { width: 17px; height: 17px; fill: transparent; stroke: var(--ink); stroke-width: 1.9; transition: fill .3s, stroke .3s; }
.lc-fav.is-on svg { fill: var(--red); stroke: var(--red); }
.lc-arr { position: absolute; z-index: 4; top: 50%; width: 34px; height: 34px; margin-top: -17px; border-radius: 50%; background: #fff; font-size: 18px; line-height: 1; opacity: 0; transition: opacity .3s, transform .3s; box-shadow: var(--shadow); }
.lc-arr.l { left: 10px; transform: translateX(-6px); }
.lc-arr.r { right: 10px; transform: translateX(6px); }
.lc:hover .lc-arr { opacity: 1; transform: none; }
.lc-dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.lc-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, .6); transition: width .3s, background .3s; }
.lc-dots i.on { width: 18px; border-radius: 4px; background: #fff; }
.lc-glare { position: absolute; inset: 0; z-index: 2; pointer-events: none; mix-blend-mode: overlay; }
.lc-body { padding: 12px 8px 4px; }
.lc-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.lc-price { font-family: var(--display); font-weight: 600; font-size: 21px; line-height: 1.1; letter-spacing: -.045em; }
.lc-type { color: var(--gold-d); white-space: nowrap; font-size: 10px; }
.lc-title { margin-top: 5px; font-size: 14px; line-height: 1.35; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.lc-specs { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 10px; }
.lc-specs span { height: 26px; padding: 0 10px; display: inline-flex; align-items: center; border-radius: 999px; background: var(--paper); font-size: 12px; font-weight: 500; }
.lc-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 12.5px; }
.lc-foot .mono { color: var(--mute); font-size: 10px; }
.lc-ag { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; }
.av-mini { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; background: var(--ink); color: var(--gold); font-family: var(--display); font-weight: 600; font-size: 10px; letter-spacing: -.03em; }
.av-mini img { width: 100%; height: 100%; object-fit: cover; }

/* ---------------- mappa ---------------- */
.pt-map { position: relative; min-width: 0; margin: 0 var(--pad) 16px 0; border-radius: 36px; overflow: hidden; background: #e6e2da; box-shadow: var(--shadow-lg); }
.pt-main[data-view="map"] .pt-map { margin-left: var(--pad); }
.pt-main[data-view="list"] .pt-map { margin: 0; }
#map { position: absolute; inset: 0; }
.map-ui { position: absolute; z-index: 3; right: 14px; top: 14px; display: flex; flex-direction: column; gap: 10px; }
.map-col { display: flex; flex-direction: column; gap: 2px; padding: 5px; border-radius: 26px; background: rgba(255, 255, 255, .8); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); }
.mbtn { width: 44px; height: 40px; border-radius: 999px; font-size: 18px; transition: background .3s, color .3s; }
.mbtn.txt { font-size: 10.5px; font-family: var(--mono); letter-spacing: .05em; text-transform: uppercase; width: 66px; }
.mbtn:hover { background: var(--gold-l); color: var(--ink); }
.mbtn.is-on { background: var(--ink); color: #fff; }
.map-follow { position: absolute; z-index: 3; left: 50%; top: 14px; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 16px 0 8px; border-radius: 999px; font-size: 12.5px; font-weight: 500; white-space: nowrap; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); box-shadow: var(--shadow); cursor: pointer; }
.map-follow input, .switch input { display: none; }
.map-follow span, .switch span { position: relative; width: 38px; height: 24px; border-radius: 999px; background: var(--paper-2); transition: background .3s; flex: none; }
.map-follow span::after, .switch span::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); transition: transform .45s var(--ease); }
.map-follow input:checked + span, .switch input:checked + span { background: var(--gold); }
.map-follow input:checked + span::after, .switch input:checked + span::after { transform: translateX(14px); }
.map-legend { position: absolute; z-index: 3; left: 14px; bottom: 14px; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; background: rgba(255, 255, 255, .82); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); font-size: 9.5px; }
.map-legend .dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; box-shadow: inset 0 0 0 2px var(--ink); margin-left: 6px; }
.map-legend .dot.real { background: var(--gold); box-shadow: none; margin-left: 0; }
.pt-map.no-map::before { content: 'Mappa non disponibile: controlla la connessione'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--mute); font-family: var(--mono); font-size: 11px; }

.pin { display: block; width: max-content; padding: 0; cursor: pointer; filter: drop-shadow(0 8px 14px rgba(30, 22, 10, .35)); }
.pin span { display: block; height: 30px; padding: 0 12px; border-radius: 999px; line-height: 30px; background: #fff; color: var(--ink); font-family: var(--sans); font-weight: 700; font-size: 12.5px; letter-spacing: -.01em; white-space: nowrap; transition: background .25s, color .25s, transform .4s var(--ease); }
.pin::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 10px; height: 10px; margin-left: -5px; background: #fff; transform: rotate(45deg); border-radius: 2px; z-index: -1; transition: background .25s; }
.pin.real span { background: var(--gold); color: var(--ink); }
.pin.real::after { background: var(--gold); }
.pin:hover span, .pin.is-hot span { background: var(--ink); color: var(--gold); transform: scale(1.18) translateY(-4px); }
.pin:hover::after, .pin.is-hot::after { background: var(--ink); }
.ghost { width: 24px; height: 24px; border-radius: 50%; background: var(--gold); border: 3px solid #fff; animation: ping 1.4s infinite; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(200, 159, 102, .6); } 100% { box-shadow: 0 0 0 28px rgba(200, 159, 102, 0); } }
.dh-pop .maplibregl-popup-content { padding: 6px; border-radius: 26px; overflow: hidden; background: #fff; box-shadow: var(--shadow-lg); }
.dh-pop .maplibregl-popup-tip { border-top-color: #fff !important; border-bottom-color: #fff !important; }
.pop { display: block; width: 270px; }
.pop img { width: 100%; height: 150px; object-fit: cover; border-radius: 20px; }
.pop-noimg { height: 90px; display: grid; place-items: center; color: var(--gold-d); background: var(--gold-l); border-radius: 20px; }
.pop-b { padding: 10px 8px 6px; display: flex; flex-direction: column; gap: 3px; }
.pop-b b { font-family: var(--display); font-weight: 600; font-size: 19px; letter-spacing: -.04em; color: var(--ink); }
.pop-b span { font-size: 13.5px; line-height: 1.3; }
.pop-b small { font-size: 12px; color: var(--mute); }
.maplibregl-ctrl-attrib { background: rgba(255, 255, 255, .6) !important; font-size: 10px; }

/* drawer filtri */
.drawer { position: fixed; inset: 0; z-index: 120; background: rgba(11, 11, 12, .25); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); opacity: 0; pointer-events: none; transition: opacity .45s; }
.drawer.is-open { opacity: 1; pointer-events: auto; }
.drawer-in { position: absolute; right: 12px; top: 12px; bottom: 12px; width: min(460px, calc(100vw - 24px)); padding: 28px; border-radius: 36px; overflow-y: auto; background: #fff; box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .8s var(--ease); display: flex; flex-direction: column; }
.drawer.is-open .drawer-in { transform: none; }
.drawer-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.drawer-head h3 { font-family: var(--display); font-weight: 600; font-size: 32px; letter-spacing: -.045em; }
.drawer .x { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); }
.dgroup { padding: 18px 0; border-top: 1px solid var(--line); }
.dgroup > .mono { color: var(--mute); margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
#fClasse button { min-width: 48px; color: #fff; background: hsl(calc(140 - var(--e) * 15) 62% 46%); opacity: .55; }
#fClasse button.is-on { opacity: 1; box-shadow: 0 0 0 3px var(--ink); }
.switch { display: flex; align-items: center; gap: 12px; padding: 8px 0; font-size: 14.5px; cursor: pointer; }
.drawer-foot { margin-top: auto; padding-top: 20px; display: flex; justify-content: space-between; align-items: center; }
.pt-toggle { display: none; position: fixed; z-index: 40; left: 50%; bottom: 22px; transform: translateX(-50%); height: 52px; padding: 0 22px; border-radius: 999px; align-items: center; gap: 10px; background: var(--ink); color: #fff; font-weight: 500; box-shadow: var(--shadow-lg); }
.pt-toggle svg { width: 16px; height: 16px; }
@media (max-width: 1150px) { .dd[data-dd="mq"], .dd[data-dd="locali"] { display: none; } }
@media (max-width: 900px) {
  .pt { padding-top: 80px; }
  .pt-bar { flex-wrap: wrap; }
  .pt-search { order: 5; flex: 1 1 100%; }
  .pt-view { display: none; }
  .dd[data-dd="prezzo"] { flex: 1; }
  .dd[data-dd="prezzo"] .dd-btn { width: 100%; justify-content: space-between; }
  .dd-panel { width: calc(100vw - 2 * var(--pad)); }
  .pt-main, .pt-main[data-view="split"] { grid-template-columns: minmax(0, 1fr) 0fr; }
  .pt-main[data-view="map"] { grid-template-columns: 0fr minmax(0, 1fr); }
  .pt-main[data-view="map"] .pt-map { margin: 0 var(--pad) 14px; }
  .pt-toggle { display: inline-flex; }
  .pt-grid { grid-template-columns: 1fr; }
  .map-follow { display: none; }
}

/* ==========================================================================
   SEGRETERIA — chatbot
   ========================================================================== */
.chat-fab { position: fixed; z-index: 130; right: 22px; bottom: 22px; display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 22px 0 8px; border-radius: 999px; background: var(--ink); color: #fff; box-shadow: 0 24px 50px -16px rgba(11, 11, 12, .6); transition: transform .5s var(--ease); }
.chat-fab:hover { transform: translateY(-4px) scale(1.02); }
.chat-fab .orb { width: 48px; height: 48px; }
.chat-fab b { font-weight: 600; font-size: 14px; display: block; line-height: 1.15; }
.chat-fab small { display: block; font-size: 11.5px; color: rgba(255, 255, 255, .6); }
.chat-fab small::before { content: ''; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-right: 6px; vertical-align: 0; }
body:not(.portal) .chat-fab { right: auto; left: 22px; }
.portal .chat-fab { bottom: 86px; }
@media (min-width: 901px) { .portal .chat-fab { bottom: 64px; right: calc(var(--pad) + 16px); } }
.orb { position: relative; border-radius: 50%; background: radial-gradient(circle at 30% 28%, #fffaf0 0%, #f0d9ae 18%, #c89f66 48%, #8a6630 74%, #3b2a12 100%); box-shadow: 0 0 26px rgba(200, 159, 102, .6), inset -4px -6px 12px rgba(0, 0, 0, .25); animation: orb 6s ease-in-out infinite; }
.orb::after { content: ''; position: absolute; inset: 22% 18% 30% 30%; border-radius: 50%; background: radial-gradient(circle, rgba(240, 214, 170, .9), transparent 70%); filter: blur(3px); animation: orb2 4s ease-in-out infinite alternate; }
@keyframes orb { 0%, 100% { border-radius: 50%; } 33% { border-radius: 44% 56% 52% 48%; } 66% { border-radius: 56% 44% 48% 52%; } }
@keyframes orb2 { to { transform: translate(-20%, 26%) scale(.7); } }
.chat { position: fixed; z-index: 131; right: 18px; bottom: 18px; width: min(410px, calc(100vw - 24px)); height: min(680px, calc(100svh - 36px)); display: flex; flex-direction: column; border-radius: 36px; overflow: hidden; background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: blur(30px) saturate(1.5); backdrop-filter: blur(30px) saturate(1.5); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 60px 120px -30px rgba(45, 34, 16, .55); transform-origin: 90% 100%; opacity: 0; transform: translateY(24px) scale(.9); pointer-events: none; transition: opacity .45s, transform .8s var(--ease); }
.chat.is-open { opacity: 1; transform: none; pointer-events: auto; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 16px; background: var(--ink); color: #fff; }
.chat-head .orb { width: 44px; height: 44px; flex: none; }
.chat-head b { display: block; font-weight: 600; }
.chat-head small { color: rgba(255, 255, 255, .6); font-size: 12px; }
.chat-head .x { margin-left: auto; width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 14px 8px; display: flex; flex-direction: column; gap: 8px; scrollbar-width: thin; }
.msg { max-width: 86%; padding: 11px 15px; border-radius: 22px; font-size: 14.5px; line-height: 1.45; }
.msg.bot { align-self: flex-start; background: #fff; box-shadow: 0 6px 16px -10px rgba(45, 34, 16, .35); border-bottom-left-radius: 8px; }
.msg.me { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 8px; }
.msg b { font-weight: 600; }
.msg.typing { display: flex; gap: 4px; padding: 15px; }
.msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); animation: blink 1.2s infinite; }
.msg.typing i:nth-child(2) { animation-delay: .2s; }
.msg.typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-slots { align-self: stretch; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.chat-slots button { padding: 10px 14px; border-radius: 18px; text-align: left; background: var(--gold-l); color: var(--ink); font-size: 14px; font-weight: 600; transition: background .3s, color .3s, transform .3s; }
.chat-slots button small { display: block; font-weight: 400; font-size: 11.5px; opacity: .75; text-transform: capitalize; }
.chat-slots button:hover { background: var(--ink); color: #fff; transform: translateY(-2px); }
.chat-card { align-self: stretch; display: flex; gap: 12px; padding: 8px; border-radius: 22px; background: #fff; box-shadow: 0 6px 16px -10px rgba(45, 34, 16, .35); }
.chat-card img, .chat-card .ph-sq { width: 66px; height: 66px; border-radius: 16px; object-fit: cover; flex: none; }
.chat-card .ph-sq { display: grid; place-items: center; background: var(--gold); color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 20px; }
.chat-card b { display: block; font-weight: 600; font-size: 14px; }
.chat-card span { display: block; font-size: 12.5px; color: var(--mute); }
.chat-card a { display: inline-block; margin-top: 4px; font-size: 12.5px; font-weight: 600; color: var(--gold-d); }
.chat-quick { display: flex; gap: 6px; padding: 8px 14px; overflow-x: auto; scrollbar-width: none; flex: none; }
.chat-quick button { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 500; background: #fff; box-shadow: inset 0 0 0 1px var(--line); transition: background .3s, color .3s; }
.chat-quick button:hover { background: var(--ink); color: #fff; }
.chat-form { display: flex; gap: 8px; padding: 8px 12px 12px; }
.chat-form input { flex: 1; min-width: 0; height: 52px; padding: 0 18px; border-radius: 999px; border: 0; outline: 0; background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 14.5px; }
.chat-form input:focus { box-shadow: inset 0 0 0 2px var(--gold); }
.chat-form button { width: 52px; height: 52px; flex: none; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; }
.chat-form button svg { width: 16px; height: 16px; }
.chat-note { padding: 0 16px 12px; font-size: 10.5px; color: var(--mute); text-align: center; }

/* ==========================================================================
   SCHEDA IMMOBILE
   ========================================================================== */
.ls { padding: 100px var(--pad) 80px; }
.ls-crumbs { display: flex; gap: 10px; color: var(--mute); margin-bottom: 16px; flex-wrap: wrap; }
.ls-crumbs a:hover { color: var(--gold-d); }
.ls-gal { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 1fr 1fr; gap: 8px; height: min(66vh, 620px); position: relative; }
.ls-gal > * { position: relative; overflow: hidden; border-radius: 30px; background: var(--paper-2); cursor: zoom-in; }
.ls-gal > *:first-child { grid-row: 1 / span 2; border-radius: 40px; }
.ls-gal img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.ls-gal > *:hover img { transform: scale(1.06); }
.ls-gal.n-1 { grid-template-columns: 1fr; }
.ls-gal.n-2 { grid-template-columns: 2fr 1fr; }
.ls-gal.n-2 > *:nth-child(2) { grid-row: 1 / span 2; }
.ls-gal.n-3 { grid-template-columns: 2fr 1fr; }
.ls-gal.n-4 > *:nth-child(2) { grid-column: 2; grid-row: 1; }
.ls-gal.n-4 > *:nth-child(3) { grid-column: 2; grid-row: 2; }
.ls-gal.n-4 > *:nth-child(4) { grid-column: 3; grid-row: 1 / span 2; }
.ls-gal-all { position: absolute; z-index: 3; right: 16px; bottom: 16px; }
.ls-grid { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 50px; margin-top: 40px; align-items: start; }
.ls-title { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 3.8vw, 60px); line-height: 1; letter-spacing: -.05em; }
.ls-where { margin-top: 16px; color: var(--mute); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ls-specs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 30px; }
.ls-specs div { padding: 18px 20px; border-radius: 26px; background: #fff; box-shadow: var(--shadow); }
.ls-specs b { display: block; font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1; letter-spacing: -.04em; }
.ls-specs span { display: block; margin-top: 8px; color: var(--mute); }
.ls-sec { margin-top: 50px; }
.ls-sec h3 { font-family: var(--display); font-weight: 600; font-size: 30px; letter-spacing: -.045em; margin-bottom: 18px; }
.ls-desc { font-size: 18px; line-height: 1.6; color: var(--ink-2); max-width: 720px; }
.ls-feats { display: flex; flex-wrap: wrap; gap: 8px; }
.ls-feats div { display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 18px 0 8px; border-radius: 999px; background: #fff; box-shadow: var(--shadow); font-size: 14px; font-weight: 500; }
.ls-feats div::before { content: '✓'; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--gold); font-size: 13px; }
.ls-energy { display: flex; gap: 4px; margin-top: 10px; }
.ls-energy i { flex: 1; height: 38px; border-radius: 12px; display: grid; place-items: center; font-style: normal; font-size: 12px; font-weight: 700; color: #fff; opacity: .35; transition: transform .4s; }
.ls-energy i.on { opacity: 1; transform: scaleY(1.25); box-shadow: 0 0 0 3px var(--ink); }
.ls-map { position: relative; height: 460px; border-radius: 36px; overflow: hidden; box-shadow: var(--shadow-lg); }
.ls-map > div { position: absolute; inset: 0; }
.ls-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 14px; }
.ls-pricebox { padding: 26px; border-radius: 36px; background: var(--ink); color: #fff; box-shadow: var(--shadow-lg); }
.ls-price { font-family: var(--display); font-weight: 600; font-size: 40px; line-height: 1; letter-spacing: -.05em; }
.ls-price small { font-size: 15px; color: rgba(255, 255, 255, .6); letter-spacing: 0; }
.ls-pricebox .mono { color: var(--gold); }
.ls-agent { display: flex; gap: 14px; align-items: center; margin: 22px 0; padding: 10px; border-radius: 26px; background: rgba(255, 255, 255, .08); }
.ls-agent .pic { width: 66px; height: 66px; border-radius: 20px; overflow: hidden; flex: none; }
.ls-agent b { display: block; font-family: var(--display); font-weight: 600; font-size: 18px; letter-spacing: -.03em; }
.ls-agent span { display: block; color: rgba(255, 255, 255, .6); font-size: 12.5px; }
.ls-agent .next { color: var(--gold); margin-top: 4px; }
.ls-actions { display: grid; gap: 8px; }
.ls-actions .btn { width: 100%; justify-content: space-between; }
.ls-actions .btn-ghost { --bg: rgba(255, 255, 255, .1); --fg: #fff; box-shadow: none; }
.ls-actions .btn-ghost .ico { background: #fff; color: var(--ink); }
.mutuo { padding: 24px; border-radius: 36px; background: #fff; box-shadow: var(--shadow); }
.mutuo h4 { margin: 0 0 12px; font-family: var(--display); font-weight: 600; font-size: 20px; letter-spacing: -.04em; }
.mutuo .rata { font-family: var(--display); font-weight: 600; font-size: 38px; color: var(--ink); line-height: 1; letter-spacing: -.05em; }
.mutuo .rata small { font-size: 14px; color: var(--mute); letter-spacing: 0; }
.mutuo label { display: block; margin-top: 14px; font-size: 12.5px; color: var(--mute); }
.mutuo label b { float: right; color: var(--ink); font-weight: 600; }
.mutuo input[type=range] { width: 100%; accent-color: var(--gold); margin-top: 8px; }
.lightbox { position: fixed; inset: 0; z-index: 160; background: rgba(242, 242, 238, .96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity .4s; }
.lightbox.is-open { opacity: 1; pointer-events: auto; }
.lightbox img { max-width: 86vw; max-height: 80vh; border-radius: 30px; box-shadow: var(--shadow-lg); }
.lightbox button { position: absolute; width: 56px; height: 56px; border-radius: 50%; background: #fff; font-size: 22px; box-shadow: var(--shadow); }
.lightbox .lb-x { top: 22px; right: 22px; }
.lightbox .lb-l { left: 22px; top: 50%; }
.lightbox .lb-r { right: 22px; top: 50%; }
.lightbox .lb-n { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: var(--mute); }
.similar { margin-top: 70px; }
.similar .pt-grid { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) {
  .ls-grid { grid-template-columns: 1fr; }
  .ls-side { position: relative; top: 0; }
  .ls-gal { grid-template-columns: 1fr 1fr; height: 60vh; }
  .ls-gal > *:first-child { grid-column: 1 / span 2; grid-row: auto; }
  .ls-gal > *:nth-child(n+4) { display: none; }
  .ls-specs { grid-template-columns: 1fr 1fr; }
  .similar .pt-grid { grid-template-columns: 1fr 1fr; }
}
