/* Mapa público de lotes (visor oscuro con acentos dorados). */
:root { --aman-gold: #bfa47d; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body.plan-body { background: #111; color: #f0ede6; font-family: 'Lato', system-ui, sans-serif; min-height: 100vh; }

.plan-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 200; display: flex; justify-content: space-between; align-items: center;
  padding: 18px 36px; background: linear-gradient(to bottom, rgba(14,12,10,.92), rgba(14,12,10,0)); }
.plan-brand { font-family: 'Cinzel', serif; color: #fff; font-size: 1.3rem; letter-spacing: 3px; text-decoration: none; }
.plan-nav-link { font-size: .7rem; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.55); text-decoration: none; transition: color .3s; }
.plan-nav-link:hover { color: var(--aman-gold); }

.map-page-hero { padding: 120px 0 60px; background: #111; text-align: center; position: relative; }
.map-page-hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(ellipse at center top, rgba(191,164,125,.1) 0%, transparent 65%); }
.hero-inner { position: relative; z-index: 1; }
.hero-line { width: 1px; height: 70px; background: linear-gradient(to bottom, transparent, var(--aman-gold)); margin: 0 auto 20px; }
.hero-kicker { color: var(--aman-gold); font-size: .7rem; text-transform: uppercase; letter-spacing: 2px; margin: 0 0 10px; }
.map-page-hero h1 { color: #fff; font-size: 2.8rem; font-family: 'Cinzel', serif; font-weight: 400; letter-spacing: 2px; margin: 0; }
.hero-sub { color: rgba(255,255,255,.35); font-size: .8rem; margin: 7px 0 0; letter-spacing: 1px; }
.plan-select { margin-top: 18px; background: transparent; color: var(--aman-gold); border: 1px solid rgba(191,164,125,.4); padding: 8px 16px;
  font-family: 'Lato', sans-serif; font-size: .75rem; text-transform: uppercase; letter-spacing: 2px; cursor: pointer; }
.plan-select option { background: #111; color: #f0ede6; }

.map-legend { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding: 15px 36px; background: rgba(14,12,10,.97);
  border-bottom: 1px solid rgba(191,164,125,.15); position: sticky; top: 0; z-index: 100; backdrop-filter: blur(10px); }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: .7rem; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.5); }
.legend-item[hidden] { display: none; }
.legend-dot { width: 12px; height: 12px; border-radius: 2px; flex-shrink: 0; }
.dot-disponible { background: rgba(80,200,120,.9); }
.dot-vendido { background: rgba(210,70,70,.9); }
.dot-apartado { background: rgba(240,185,50,.9); }
.dot-bloqueado { background: rgba(140,140,140,.9); }
.filter-pills { display: flex; gap: 6px; margin-left: auto; }
.pill { padding: 5px 15px; border: 1px solid rgba(191,164,125,.28); background: transparent; color: rgba(255,255,255,.42); font-family: 'Lato', sans-serif;
  font-size: .67rem; text-transform: uppercase; letter-spacing: 1.5px; cursor: pointer; transition: all .3s; }
.pill.active, .pill:hover { border-color: var(--aman-gold); color: var(--aman-gold); background: rgba(191,164,125,.07); }

@media (max-width: 768px) {
  .plan-nav { padding: 14px 18px; }
  .map-page-hero h1 { font-size: 2rem; }
  .map-legend { justify-content: center; padding: 15px; }
  .filter-pills { width: 100%; flex-wrap: wrap; margin-left: 0; margin-top: 15px; gap: 8px; }
  .pill { flex: 1 1 calc(50% - 8px); text-align: center; }
}

.map-section { padding: 48px 0 88px; background: #111; }
.map-outer { max-width: 1400px; margin: 0 auto; padding: 0 22px; position: relative; }

.map-frame-wrapper { width: 100%; height: 75vh; min-height: 500px; overflow: hidden; border: 1px solid rgba(191,164,125,.12);
  box-shadow: 0 0 80px rgba(0,0,0,.7); background: #0d0d0d; cursor: grab; position: relative; touch-action: none; }
.map-frame-wrapper:active { cursor: grabbing; }
.map-content { width: 100%; transform-origin: 0 0; will-change: transform; }
.map-content svg { display: block; width: 100%; height: auto; pointer-events: none; }
.map-content svg .lot { pointer-events: all; }
.map-empty { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); color: rgba(255,255,255,.4); font-size: .85rem; letter-spacing: 1px; margin: 0; text-align: center; }
.map-empty[hidden] { display: none; }

.map-controls { position: absolute; bottom: 28%; right: 40px; display: flex; flex-direction: column; gap: 10px; z-index: 10; }
.map-controls button { background: rgba(14,12,10,.95); border: 1px solid rgba(191,164,125,.4); color: var(--aman-gold); width: 45px; height: 45px;
  border-radius: 4px; font-size: 1.5rem; cursor: pointer; backdrop-filter: blur(5px); transition: all .3s; display: flex; justify-content: center; align-items: center; }
.map-controls button:hover { background: var(--aman-gold); color: #111; }
@media (max-width: 768px) { .map-controls button { width: 40px; height: 40px; font-size: 1.2rem; } }

/* Lotes */
.lot { cursor: pointer; }
.lot path { stroke-width: var(--sw, 1.2); transition: fill .2s, stroke .2s, filter .2s; fill-rule: evenodd; }
.lot-disponible path { fill: rgba(80,200,120,.27); stroke: rgba(80,200,120,.72); }
.lot-vendido path { fill: rgba(210,70,70,.27); stroke: rgba(210,70,70,.72); }
.lot-apartado path { fill: rgba(240,185,50,.27); stroke: rgba(240,185,50,.72); }
.lot-bloqueado path { fill: rgba(140,140,140,.22); stroke: rgba(140,140,140,.6); }
.lot-disponible:hover path { fill: rgba(80,200,120,.62); stroke: rgba(110,230,145,1); filter: drop-shadow(0 0 7px rgba(80,200,120,.8)); }
.lot-vendido:hover path { fill: rgba(210,70,70,.62); stroke: rgba(240,100,100,1); filter: drop-shadow(0 0 7px rgba(210,70,70,.8)); }
.lot-apartado:hover path { fill: rgba(240,185,50,.62); stroke: rgba(255,210,80,1); filter: drop-shadow(0 0 7px rgba(240,185,50,.8)); }
.lot-bloqueado:hover path { fill: rgba(140,140,140,.5); stroke: rgba(190,190,190,1); }
.lot.filtered-out path { fill: rgba(70,70,70,.07) !important; stroke: rgba(70,70,70,.15) !important; filter: none !important; }
.overlay-site { fill: rgba(191,164,125,.05); stroke: rgba(191,164,125,.25); stroke-width: var(--sw, 1.2); }
.overlay-street { fill: rgba(255,255,255,.07); stroke: none; }
.mzn-label { font-family: 'Cinzel', serif; fill: rgba(191,164,125,.65); letter-spacing: 2px; pointer-events: none; }

/* Tooltip */
#tooltip { position: fixed; pointer-events: none; z-index: 9999; opacity: 0; transition: opacity .18s; transform: translate(14px, -50%); left: 0; top: 0; }
#tooltip.show { opacity: 1; }
.tt-box { background: rgba(12,10,8,.97); border: 1px solid rgba(191,164,125,.32); padding: 14px 19px; min-width: 210px; backdrop-filter: blur(14px); box-shadow: 0 8px 36px rgba(0,0,0,.55); }
.tt-mzn { font-size: .6rem; text-transform: uppercase; letter-spacing: 3px; color: var(--aman-gold); margin-bottom: 2px; }
.tt-name { font-family: 'Cinzel', serif; font-size: .93rem; color: #f0ede6; margin-bottom: 8px; }
.tt-div { height: 1px; background: rgba(191,164,125,.16); margin: 8px 0; }
.tt-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 4px; }
.tt-lbl { font-size: .58rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.35); }
.tt-val { font-size: .8rem; color: rgba(255,255,255,.8); font-weight: 300; text-align: right; }
.tt-badge { display: inline-block; padding: 2px 9px; font-size: .58rem; text-transform: uppercase; letter-spacing: 2px; }
.s-disponible { background: rgba(80,200,120,.13); color: #68d48a; border: 1px solid rgba(80,200,120,.32); }
.s-vendido { background: rgba(210,70,70,.13); color: #f07070; border: 1px solid rgba(210,70,70,.32); }
.s-apartado { background: rgba(240,185,50,.13); color: #f0c040; border: 1px solid rgba(240,185,50,.32); }
.s-bloqueado { background: rgba(140,140,140,.13); color: #b8b8b8; border: 1px solid rgba(140,140,140,.32); }

/* Estadísticas */
.stats-bar { display: flex; border: 1px solid rgba(191,164,125,.1); margin-top: 22px; }
.stat-block { flex: 1; text-align: center; padding: 20px 1px; border-right: 1px solid rgba(191,164,125,.07); }
.stat-block:last-child { border-right: none; }
.stat-block[hidden] { display: none; }
.stat-num { font-family: 'Cinzel', serif; font-size: 1.85rem; color: var(--aman-gold); display: block; }
.stat-lbl { font-size: .6rem; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,.3); margin-top: 2px; display: block; }
.update-note { text-align: center; margin-top: 28px; font-size: .7rem; color: rgba(255,255,255,.18); letter-spacing: 1px; }
.update-note span { color: rgba(191,164,125,.4); }

/* Ficha del lote (al hacer clic en un lote disponible) */
.lot-modal[hidden] { display: none; }
.lot-modal { position: fixed; inset: 0; z-index: 10000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lot-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); }
.lot-modal-card { position: relative; background: rgba(12,10,8,.98); border: 1px solid rgba(191,164,125,.32); padding: 28px 32px; max-width: 460px; width: 100%;
  max-height: 88vh; overflow-y: auto; box-shadow: 0 8px 60px rgba(0,0,0,.7); }
.lot-modal-close { position: absolute; top: 8px; right: 12px; background: none; border: 0; color: var(--aman-gold); font-size: 1.6rem; cursor: pointer; }
.lot-modal-card h2 { font-family: 'Cinzel', serif; font-weight: 400; font-size: 1.3rem; margin: 6px 0 12px; color: #f0ede6; }
.lot-modal-card dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 14px 0 0; }
.lot-modal-card dt { font-size: .6rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,.35); align-self: center; }
.lot-modal-card dd { margin: 0; font-size: .85rem; color: rgba(255,255,255,.85); font-weight: 300; }
.lot-photos { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; margin-top: 16px; }
.lot-photos img { width: 100%; height: 6rem; object-fit: cover; }
