/* Mapa de todas las propiedades (assets/js/mapa-propiedades.js) */
.pm-sec { position: relative; z-index: 1; padding: clamp(64px, 8vw, 120px) 0 clamp(20px, 3vw, 40px); }
.pm-sec .pm-intro { max-width: 1180px; margin: 0 auto 22px; padding: 0 clamp(20px, 4vw, 48px); display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; }
.pm-sec .pm-intro { position: relative; }
.pm-sec h2 { margin: 0; font-family: var(--font-display); font-weight: 500; font-size: clamp(30px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -.03em; color: var(--tinta); }
.pm-sec .pm-intro p { margin: 0; max-width: 34em; font-size: 15px; line-height: 1.6; color: var(--piedra); }
.pmap { position: relative; max-width: 1180px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

.pm-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px; margin-bottom: 14px; }
.pm-lines { display: flex; flex-wrap: wrap; gap: 8px; }
.pm-line {
  display: inline-flex; align-items: center; gap: 9px; margin: 0; padding: 9px 15px 8px;
  border: 1px solid #E6E6E6; border-radius: 999px; background: #fff; cursor: pointer;
  font-family: var(--font-display); font-size: 15px; color: var(--tinta);
  transition: background-color .2s, border-color .2s, color .2s;
}
.pm-line i { width: 18px; height: 5px; border-radius: 3px; background: var(--c); }
.pm-line span { font-family: var(--font); font-size: 12px; color: #767773; }
.pm-line[aria-pressed="true"] { border-color: var(--c); background: var(--c); color: #fff; }
.pm-line[aria-pressed="true"] i { background: #fff; }
.pm-line[aria-pressed="true"] span { color: rgba(255, 255, 255, .8); }
.pm-legend { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: #767773; }
.pm-dot { width: 10px; height: 10px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px #cfcfcf; }
.pm-dot.is-live { background: var(--encina); margin-left: 4px; }
.pm-dot.is-off { background: #b9b9b6; margin-left: 10px; }

/* El mapa, como una tarjeta más: sombra profunda y sombra de suelo debajo, quieto (sin vaivén).
   Va dentro de la misma sección que los productos (mismo fondo y mismas lámparas). */
.pm-float { position: relative; }
.pm-float::after {                         /* sombra en el "suelo" */
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -46px; height: 36px; z-index: -1;
  border-radius: 50%; background: radial-gradient(closest-side, rgba(40, 30, 20, .28), transparent);
  filter: blur(6px);
}
.pm-map {
  height: clamp(420px, 58vh, 600px); border-radius: 26px; overflow: hidden; background: #eceae6;
  border: 6px solid #fff;
  box-shadow: 0 2px 6px rgba(40, 30, 20, .08), 0 50px 90px -34px rgba(40, 30, 20, .45), 0 0 0 1px rgba(40, 30, 20, .06);
}
/* bordes del mapa fundidos hacia dentro, para que no parezca un recorte */
.pm-map::after { content: ""; position: absolute; inset: 0; z-index: 400; pointer-events: none; border-radius: 20px; box-shadow: inset 0 0 40px rgba(246, 244, 240, .75); }
.pm-all { display: inline-flex; align-items: center; gap: 8px; position: absolute; z-index: 500; right: 20px; bottom: 20px; padding: 9px 14px 8px; border: 1px solid #E6E6E6; border-radius: 999px; background: #fff; font-family: var(--font-display); font-size: 14px; color: var(--tinta); cursor: pointer; box-shadow: 0 6px 16px rgba(0, 0, 0, .08); }
.pm-all:hover { background: #f4f4f4; }

/* Paradas: punto con aro blanco; las disponibles laten despacio */
.pm-stop { background: none; border: 0; }
.pm-stop span { position: absolute; inset: 0; display: grid; place-items: center; }
.pm-stop i { position: relative; z-index: 1; width: 14px; height: 14px; border-radius: 50%; background: var(--c); border: 3px solid #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); transition: transform .2s; }
.pm-stop:hover i { transform: scale(1.18); }
.pm-stop.is-live span::before {
  content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%;
  background: var(--c); opacity: .45; animation: pm-pulse 2.6s ease-out infinite;
}
@keyframes pm-pulse { 0% { transform: scale(1); opacity: .5; } 70% { transform: scale(2.8); opacity: 0; } 100% { transform: scale(2.8); opacity: 0; } }
.pm-stop.is-live i { animation: pm-blink 2.6s ease-in-out infinite; }
@keyframes pm-blink { 0%, 100% { filter: none; } 50% { filter: brightness(1.35); } }
.pm-stop.is-off i { background: #b9b9b6; }
.pm-stop.is-dim { opacity: .55; }
.pm-stop.is-dim span::before { animation-duration: 3.6s; }

/* Etiqueta al pasar el ratón */
.leaflet-tooltip.pm-tip { padding: 6px 10px; border: 0; border-radius: 8px; background: var(--tinta); color: #fff; font-family: var(--font-display); font-size: 13px; box-shadow: 0 6px 16px rgba(0, 0, 0, .2); }
.leaflet-tooltip.pm-tip::before { border-top-color: var(--tinta); }

/* Mini ficha */
.pm-popup .leaflet-popup-content-wrapper { padding: 0; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 50px -16px rgba(0, 0, 0, .35); }
.pm-popup .leaflet-popup-content { margin: 0; width: 260px !important; }
.pm-popup .leaflet-popup-close-button { top: 8px !important; right: 8px !important; width: 26px !important; height: 26px !important; border-radius: 50%; background: rgba(255, 255, 255, .92) !important; color: var(--tinta) !important; font-size: 18px !important; line-height: 24px !important; z-index: 2; }
.pm-card__media { position: relative; display: block; height: 140px; background: #e9e7e3; }
.pm-card__img { position: absolute; inset: 0; background-size: cover; background-position: center; }
.pm-chip { position: absolute; left: 10px; bottom: 10px; padding: 6px 11px 5px; border-radius: 999px; background: rgba(20, 21, 20, .82); color: #fff; font-family: var(--font-display); font-size: 14px; display: inline-flex; align-items: center; gap: 7px; }
.pm-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c, #3fa36b); filter: brightness(1.6); }
.pm-chip.is-closed { background: rgba(255, 255, 255, .92); color: var(--tinta); }
.pm-chip.is-closed::before { background: #b9b9b6; filter: none; }
.pm-card__body { padding: 12px 14px 14px; }
.pm-card__kind { margin: 0 0 3px; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #767773; }
.pm-card__title { display: block; font-family: var(--font-display); font-size: 17px; line-height: 1.2; color: var(--tinta) !important; text-decoration: none; }
.pm-card__loc { margin: 4px 0 12px !important; font-size: 13px; color: var(--piedra); }
.pm-card__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.pm-btn { display: inline-flex; align-items: center; padding: 9px 14px 8px; border-radius: 999px; background: var(--tinta); color: #fff !important; font-family: var(--font-display); font-size: 14px; text-decoration: none; }
.pm-btn:hover { background: #000; }
.pm-more { font-family: var(--font-display); font-size: 14px; color: var(--tinta) !important; text-decoration: underline; text-underline-offset: 3px; }

@media (max-width: 640px) {
  .pm-map { height: 440px; border-radius: 16px; }
  .pm-legend { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .pm-stop.is-live span::before, .pm-stop.is-live i { animation: none; }
}

/* Tren que recorre cada línea (como el del metro del ejemplo) */
.pm-car { background: none; border: 0; }
.pm-car span { display: block; width: 30px; height: 14px; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .3)); transform-origin: 50% 50%; }
.pm-car span svg { display: block; }
.pm-car.is-dim { opacity: .45; }
.pm-car.is-dim span { transform: scale(.8); }

.pm-all svg { width: 15px; height: 15px; }

/* Mapa a pantalla completa ("Ver todo el mapa"); la X o Esc lo devuelven a su tamaño */
.pm-close, .pm-full-title { display: none; }
html.pm-lock, html.pm-lock body { overflow: hidden; }
.pm-float.is-full { position: fixed; inset: 0; z-index: 100000; background: #f6f4f0; animation: pm-full-in .35s cubic-bezier(.16, 1, .3, 1); }
.pm-float.is-full::after { display: none; }
.pm-float.is-full .pm-map { height: 100%; border: 0; border-radius: 0; box-shadow: none; }
.pm-float.is-full .pm-map::after { border-radius: 0; }
.pm-float.is-full .pm-all { display: none; }
.pm-float.is-full .pm-close {
  display: grid; place-items: center; position: absolute; top: 18px; right: 18px; z-index: 1000;
  width: 50px; height: 50px; padding: 0; border: 0; border-radius: 50%; background: #fff; color: var(--tinta); cursor: pointer;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .18); transition: transform .2s, background-color .2s;
}
.pm-float.is-full .pm-close:hover { background: #f1f1f1; transform: rotate(90deg); }
.pm-float.is-full .pm-close svg { width: 22px; height: 22px; }
.pm-float.is-full .pm-full-title {
  display: block; position: absolute; top: 22px; left: 50%; z-index: 1000; transform: translateX(-50%); margin: 0;
  padding: 10px 18px 9px; border-radius: 999px; background: rgba(255, 255, 255, .94); box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  font-family: var(--font-display); font-size: 16px; color: var(--tinta); white-space: nowrap;
}
.pm-float.is-full .leaflet-top.leaflet-left { top: 8px; left: 8px; }
@keyframes pm-full-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .pm-float.is-full .pm-full-title { top: 80px; font-size: 14px; }
  .pm-float.is-full .pm-close { top: 14px; right: 14px; }
}
@media (prefers-reduced-motion: reduce) { .pm-float.is-full { animation: none; } }
