/* =========================================================================
   EasyREMS — Scheda immobile · Design premium editoriale
   ========================================================================= */

.erms-single { padding: 36px 0 100px; }

.erms-back2 { display: inline-flex; align-items: center; gap: 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: .14em; color: var(--sub); text-decoration: none; margin-bottom: 26px; transition: color .2s; }
.erms-back2:hover { color: var(--ink); }

/* Tab Caratteristiche / Ambienti / Dotazioni */
.erms-infotabs__nav { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.erms-tab2 { border: 0 !important; background: none !important; padding: 15px 0 !important; margin: 0 32px 0 0 !important; font-size: .72rem !important; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; color: var(--sub) !important; cursor: pointer; border-bottom: 2px solid transparent !important; margin-bottom: -1px !important; border-radius: 0 !important; box-shadow: none !important; outline: none !important; transition: color .2s, border-color .2s; }
.erms-tab2:hover { color: var(--ink) !important; background: none !important; }
.erms-tab2.is-active { color: var(--ink) !important; border-bottom-color: var(--ink) !important; }
.erms-pane2 { display: none; }
.erms-pane2.is-active { display: block; animation: ermsfade .3s ease; }
@keyframes ermsfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.erms-single__grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 60px; align-items: start; }

/* ---------- Gallery (lightGallery, angoli netti) ---------- */
.erms-gallery { margin-bottom: 44px; }
.erms-gallery__grid { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 1fr; gap: 6px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--soft); }
.erms-gitem { position: relative; overflow: hidden; display: block; cursor: zoom-in; }
.erms-gitem img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s cubic-bezier(.2,.7,.2,1); }
.erms-gitem:hover img { transform: scale(1.05); }
.erms-gitem.is-main { grid-column: span 2; grid-row: span 2; }
.erms-gmore { position: absolute; inset: 0; background: rgba(20,24,31,.55); color: #fff; display: grid; place-items: center; font-size: .8rem; text-transform: uppercase; letter-spacing: .12em; }

/* ---------- Intestazione ---------- */
.erms-single__head { margin-bottom: 28px; }
.erms-single__eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--sub); display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.erms-single__eyebrow .dot { width: 4px; height: 4px; background: var(--sub); border-radius: 50%; }
.erms-single__title { font-size: 1.45rem !important; font-weight: 600; letter-spacing: -.015em; line-height: 1.25; margin: 0; }
.erms-single__loc { margin: 10px 0 0; color: var(--sub); font-size: .98rem; }
.erms-single__price { display: none; } /* il prezzo vive nella sidebar */

.erms-single__specs { list-style: none; display: flex; flex-wrap: wrap; gap: 32px; padding: 18px 0 0; margin: 18px 0 0; border-top: 1px solid var(--line); }
.erms-single__specs .erms-spec { font-size: .98rem; font-weight: 500; }
.erms-single__specs .erms-spec span { color: var(--sub); font-weight: 400; font-size: .9rem; }

/* ---------- Blocchi ---------- */
.erms-block { margin: 58px 0; }
.erms-block + .erms-block { margin-top: 58px; }
.erms-block__title { font-size: 1rem !important; text-transform: uppercase; letter-spacing: .1em; color: var(--ink) !important; font-weight: 700; margin: 0 0 26px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.erms-desc { line-height: 1.8; font-size: 1rem; color: #2b313b; max-width: 70ch; }
.erms-desc p { margin: 0 0 1.1em; }
.erms-desc--clamp { position: relative; max-height: 240px; overflow: hidden; }
.erms-desc--clamp::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 84px; background: linear-gradient(transparent, var(--paper)); pointer-events: none; }
.erms-desc.is-open { max-height: none; }
.erms-desc.is-open::after { display: none; }
.erms-desc__more { margin-top: 14px; background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; cursor: pointer; }
.erms-desc__more:hover { text-decoration: underline; }

/* Caratteristiche: definizioni con hairline */
.erms-specs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 0 48px; margin: 0; }
.erms-specrow { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.erms-specrow dt { color: var(--sub); font-size: .95rem; margin: 0; }
.erms-specrow dd { margin: 0; font-weight: 500; text-align: right; }

/* Chips → tag sobri con trattino/segno */
.erms-chips { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px 28px; padding: 0; margin: 0; }
.erms-chip { font-size: .98rem; color: var(--ink); }

/* Planimetrie / Video / Mappa */
.erms-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.erms-plan { display: block; border: 1px solid var(--line); background: #fff; }
.erms-plan img { width: 100%; height: auto; display: block; }
.erms-video { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #000; }
.erms-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.erms-map { height: 420px; border: 1px solid var(--line); z-index: 0; }

/* ---------- Sidebar ---------- */
.erms-single__side { position: sticky; top: 28px; }
.erms-sidecard { background: #fff; border: 1px solid var(--line); padding: 30px; }
.erms-sidecard__price { font-size: 1.5rem !important; font-weight: 600; letter-spacing: -.015em; line-height: 1.2; }
.erms-sidecard__code { color: var(--sub); font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }
.erms-sidecard__code strong { color: var(--ink); }

.erms-agent { margin: 24px 0; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; }
.erms-agent__label { font-size: .68rem; text-transform: uppercase; letter-spacing: .14em; color: var(--sub); }
.erms-agent__name { font-weight: 600; }
.erms-agent__tel { color: var(--accent); text-decoration: none; font-weight: 500; }

.erms-refs { margin: 24px 0; padding-top: 22px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; }
.erms-ref { display: flex; flex-direction: column; gap: 3px; }
.erms-ref--agent { flex-direction: row; gap: 12px; align-items: center; }
.erms-ref__foto { width: 50px; height: 50px; border-radius: 50%; object-fit: cover; background: var(--soft); flex: 0 0 auto; display: block; }
.erms-ref__info { display: flex; flex-direction: column; gap: 2px; }
.erms-ref__label { font-size: .64rem; text-transform: uppercase; letter-spacing: .14em; color: var(--sub); }
.erms-ref__name { font-weight: 600; }
.erms-ref__meta { color: var(--sub); font-size: .9rem; }
.erms-ref__tel { color: var(--accent); text-decoration: none; font-weight: 500; font-size: .95rem; }

.erms-lead { margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 16px; }
.erms-lead__title { font-size: .74rem; text-transform: uppercase; letter-spacing: .16em; color: var(--sub); margin: 0; }
.erms-lead input, .erms-lead textarea { width: 100%; padding: 10px 2px; border: 0; border-bottom: 1px solid #cfcfca; background: transparent; font-size: .95rem; font-family: inherit; border-radius: 0; }
.erms-lead input:focus, .erms-lead textarea:focus { outline: none; border-bottom-color: var(--ink); }
.erms-lead textarea { resize: vertical; min-height: 90px; }
.erms-lead__privacy { display: flex; gap: 9px; align-items: flex-start; font-size: .8rem; color: var(--sub); }
.erms-lead__privacy input { width: auto; }
.erms-lead__privacy a { color: var(--accent); }
.erms-lead__submit { width: 100%; margin-top: 4px; }
.erms-lead__msg { margin: 0; font-size: .85rem; }
.erms-lead__msg.is-ok { color: #14724e; }
.erms-lead__msg.is-err { color: #b23c4a; }

/* ---------- lightGallery counter tweak ---------- */
.lg-toolbar .lg-icon { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
	.erms-single__grid { grid-template-columns: 1fr; gap: 40px; }
	.erms-single__side { position: static; }
	.erms-gallery__grid { grid-template-columns: repeat(2, 1fr); aspect-ratio: 4 / 3; }
	.erms-gitem.is-main { grid-column: 1 / -1; grid-row: span 1; }
	.erms-gitem:not(.is-main):nth-child(n+4) { display: none !important; }
}
