/* Mapa nuevo (19-11-2026). Usa las variables de estilo.css. Móvil vertical primero; desde 900 px, columna a la izquierda. */
.m2-pag { --tinta: #0c0d1b; --cab: 54px; --izq: env(safe-area-inset-left, 0px); --der: env(safe-area-inset-right, 0px); }

/* Cabecera fina */
.m2-cab { height: var(--cab); display: flex; align-items: center; gap: 10px; padding: 0 max(12px, var(--der)) 0 max(14px, var(--izq)); background: var(--fondo); border-bottom: 1px solid var(--borde); position: relative; z-index: 1400; -webkit-tap-highlight-color: transparent; }
.m2-cab .marca { font-size: 16px; margin-right: auto; padding: 12px 0; }
.m2-nav { display: none; }
.m2-menu { position: relative; }
.m2-busca-cab { flex: 1; min-width: 0; height: 40px; margin: 0 2px; padding: 0 16px; text-align: left; font: inherit; font-size: 15px; color: var(--tenue); background: var(--panel); border: 1px solid var(--borde); border-radius: 999px; cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; touch-action: manipulation; }
.m2-cab .marca { margin-right: 0; }
.m2-cab .idiomas { display: none; }
.m2-menu-idi { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0 0; padding: 8px 6px 4px; border-top: 1px solid var(--borde); }
.m2-menu > div .m2-menu-idi a { padding: 8px 10px; font-size: 14px; font-weight: 600; }
.m2-menu-idi a[aria-current] { background: var(--rosa); color: var(--tinta-rosa); }
.m2-arriba .m2-busca { display: none; }
.m2-menu summary, .m2-cab .idiomas summary { cursor: pointer; list-style: none; font-size: 14px; font-weight: 500; background: var(--panel); border: 1px solid var(--borde); border-radius: 999px; padding: 0 14px; height: 40px; display: flex; align-items: center; white-space: nowrap; }
.m2-menu summary::-webkit-details-marker { display: none; }
.m2-menu > div { position: absolute; right: 0; top: calc(100% + 6px); background: var(--panel2); border: 1px solid var(--borde); border-radius: 16px; padding: 6px; display: grid; min-width: 220px; max-height: 70vh; overflow: auto; }
.m2-idc { display: none; }
@media (max-width: 359px) { .m2-cab .m2-idl { display: none; } .m2-cab .m2-idc { display: inline; } }
.m2-menu > div a { padding: 11px 12px; text-decoration: none; border-radius: 10px; }
.m2-menu > div a:hover { background: var(--panel); }

/* Visor */
.m2 { position: relative; height: calc(100vh - var(--cab)); height: calc(100dvh - var(--cab)); height: calc(100lvh - var(--cab)); min-height: 320px; background: var(--mar); overflow: hidden; isolation: isolate; -webkit-tap-highlight-color: transparent; }
.m2-arriba, .m2-ctrl, .m2-hoja, .m2-busq { touch-action: manipulation; }
.m2-arriba, .m2-ctrl, .m2-asa, .m2-res, .m2-cab2, .m2-acc, .m2-g-cab, .m2-t, .m2-rotulo { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.m2-lienzo { position: absolute; inset: 0; background: var(--mar); }
.m2 .leaflet-container { background: var(--mar); font: inherit; outline-offset: -3px; }
.m2 .leaflet-control-attribution { background: rgba(12, 13, 27, .72); color: var(--tenue); font-size: 11px; border-radius: 8px 0 0 0; }
.m2 .leaflet-control-attribution a { color: inherit; }
.m2-rotulo span { position: absolute; transform: translate(-50%, -50%); white-space: nowrap; font-weight: 700; text-transform: uppercase; color: #fff; background: rgba(12, 13, 27, .8); border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 2px 9px 3px; pointer-events: none; }
.m2-rotulo.n0 span { font-size: 11px; letter-spacing: .1em; }
.m2-rotulo.n1 span { font-size: 10px; letter-spacing: .08em; font-weight: 600; background: rgba(12, 13, 27, .62); border-color: transparent; }

.m2-arriba { position: absolute; left: 0; right: 0; top: 0; z-index: 1050; padding-top: 10px; display: grid; gap: 8px; pointer-events: none; }
.m2-busca { pointer-events: auto; margin: 0 max(12px, var(--der)) 0 max(12px, var(--izq)); height: 46px; text-align: left; font: inherit; color: var(--tenue); background: rgba(21, 23, 43, .97); border: 1px solid var(--borde); border-radius: 999px; padding: 0 20px; box-shadow: 0 3px 12px rgba(0, 0, 0, .4); cursor: text; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m2-chips { pointer-events: auto; display: flex; gap: 8px; overflow-x: auto; padding: 0 max(12px, var(--der)) 8px max(12px, var(--izq)); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.m2-chips::-webkit-scrollbar { display: none; }
.m2-chip { flex: none; font: inherit; font-size: 15px; font-weight: 500; color: var(--texto); background: rgba(21, 23, 43, .97); border: 1px solid rgba(255, 255, 255, .34); border-radius: 999px; padding: 0 15px 0 11px; height: 44px; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .32); white-space: nowrap; }
.m2-chip i { width: 13px; height: 13px; border-radius: 50%; flex: none; }
.m2-chip[aria-pressed="false"] { color: var(--tenue); background: rgba(12, 13, 27, .8); border-color: var(--borde); }
.m2-chip[aria-pressed="false"] i, .m2-chip[aria-pressed="false"] .m2-ico { opacity: .32; filter: grayscale(.6); }
.m2-ico.p { width: 24px; height: 24px; border-width: 1.4px; }
.m2-ico.p svg { width: 14px; height: 14px; }
.m2-chip { padding-left: 8px; }

.m2-ctrl { position: absolute; right: max(12px, var(--der)); top: 64px; z-index: 1050; display: grid; gap: 8px; justify-items: end; }
.m2-ctrl button { font: inherit; font-size: 15px; font-weight: 500; color: var(--texto); background: rgba(21, 23, 43, .97); border: 1px solid var(--borde); border-radius: 999px; padding: 0 16px; height: 44px; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .32); }
.m2[data-hoja="media"] .m2-ctrl, .m2[data-hoja="completa"] .m2-ctrl { display: none; }
.m2-ctrl .zoom { display: none; width: 44px; height: 44px; padding: 0; font-size: 22px; line-height: 1; }

/* Hoja inferior */
.m2-hoja { position: absolute; left: 0; right: 0; top: 0; height: 100%; z-index: 1100; display: flex; flex-direction: column; background: var(--panel); border-top: 1px solid var(--borde); border-radius: 22px 22px 0 0; box-shadow: 0 -10px 34px rgba(0, 0, 0, .5); transform: translateY(calc(100% - 96px - env(safe-area-inset-bottom, 0px))); transition: transform .28s cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.m2-hoja.arrastrando { transition: none; }
.m2-asa { flex: none; width: 100%; height: 30px; position: relative; background: none; border: 0; padding: 0; cursor: grab; touch-action: none; display: grid; place-items: center; }
.m2-asa i { width: 44px; height: 5px; border-radius: 3px; background: #4b4f7a; }
.m2-asa::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; bottom: -4px; }
.m2-hoja-cont { overflow-y: auto; overscroll-behavior: contain; padding: 0 16px calc(22px + env(safe-area-inset-bottom)); }
.m2-rotulo span { margin: 0; }
.m2-hoja[data-estado="asomada"] .m2-hoja-cont { overflow: hidden; }
[data-arrastra] { touch-action: none; }

.m2-btn { font: inherit; font-size: 15px; font-weight: 500; color: var(--texto); background: var(--panel2); border: 1px solid var(--borde); border-radius: 999px; padding: 0 17px; min-height: 44px; cursor: pointer; white-space: nowrap; }
.m2-btn.pri { background: var(--rosa); color: var(--tinta-rosa); border-color: var(--rosa); font-weight: 600; }
.m2-btn.hecho { background: transparent; color: var(--rosa); border-color: var(--rosa); font-weight: 600; }
.m2-res { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; padding-bottom: 14px; }
.m2-res-txt b { display: block; font-size: 18px; font-weight: 600; line-height: 1.2; }
.m2-res-txt small { font-size: 14px; }
.m2-acc { display: flex; gap: 8px; margin-bottom: 10px; }
.m2-cien { display: flex; align-items: center; justify-content: center; min-height: 48px; margin: 0 0 12px; padding: 0 16px; border: 1px solid var(--rosa); border-radius: 14px; color: var(--rosa); font-weight: 600; text-decoration: none; }
.m2-op { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--borde); border-bottom: 1px solid var(--borde); cursor: pointer; }
.m2-sw { appearance: none; -webkit-appearance: none; flex: none; width: 46px; height: 28px; margin: 0; border-radius: 14px; background: #3a3e66; position: relative; cursor: pointer; transition: background .15s; }
.m2-sw::before { content: ""; position: absolute; inset: -9px -5px; }
.m2-sw::after { content: ""; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.m2-sw:checked { background: var(--rosa); }
.m2-sw:checked::after { transform: translateX(18px); background: var(--tinta-rosa); }
.m2-g { border-bottom: 1px solid var(--borde); }
.m2-g-cab { display: flex; align-items: center; gap: 10px; }
.m2-g-nom { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; font: inherit; font-size: 17px; font-weight: 600; color: var(--texto); background: none; border: 0; padding: 14px 0; text-align: left; cursor: pointer; }
.m2-g-nom i { width: 14px; height: 14px; border-radius: 50%; flex: none; }
.m2-g-nom span { flex: 1; min-width: 0; }
.m2-g-nom small { font-size: 14px; }
.m2-g-nom::after { content: "+"; color: var(--tenue); font-weight: 400; font-size: 20px; line-height: 1; width: 14px; text-align: center; }
.m2-g-nom[aria-expanded="true"]::after { content: "\2212"; }
.m2-g-tipos { padding-bottom: 10px; }
.m2-g-tipos[hidden] { display: none; }
.m2-t { display: flex; align-items: center; gap: 8px; }
.m2-t-nom { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font: inherit; font-size: 16px; color: var(--texto); background: none; border: 0; padding: 8px 0; min-height: 44px; text-align: left; cursor: pointer; }
.m2-t-nom span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m2-t-nom small { font-size: 14px; }
.m2-solo { font: inherit; font-size: 13px; color: var(--tenue); background: none; border: 1px solid var(--borde); border-radius: 999px; padding: 0 12px; height: 34px; cursor: pointer; position: relative; }
.m2-solo::before { content: ""; position: absolute; inset: -5px -3px; }
.m2-ico { width: 28px; height: 28px; flex: none; display: inline-grid; place-items: center; border-radius: 50%; border: 1.6px solid var(--tinta); }
.m2-ico svg { width: 16px; height: 16px; fill: none; stroke: var(--tinta); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.m2-pie { margin: 16px 0 0; font-size: 15px; }
.m2-pie a { color: var(--tenue); }

.m2-cab2 { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; }
.m2-cab2 > div { display: flex; align-items: center; gap: 10px; min-width: 0; font-size: 15px; color: var(--tenue); }
.m2-cab2 > div b { color: var(--texto); font-weight: 600; }
.m2-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m2-nombre { font-size: 24px; font-weight: 600; line-height: 1.15; margin: 0 0 12px; overflow-wrap: anywhere; }
.m2-marcas { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.m2-marcas span { font-size: 13px; color: var(--melocoton); border: 1px solid var(--melocoton); border-radius: 999px; padding: 2px 10px; }
.m2-botones { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.m2-botones .m2-btn { flex: 0 1 auto; }
.m2-botones .m2-btn:first-child { flex: 1 1 auto; }
.m2-foto { width: 100%; height: auto; border-radius: 14px; margin-bottom: 10px; }
.m2-texto { font-size: 16px; margin: 0 0 8px; }
.m2-enlace { color: var(--rosa); font-weight: 500; text-underline-offset: 3px; }
.m2-real { font-size: 15px; margin: 0 0 12px; }
.m2-real small { display: block; }
.m2-sig { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--borde); border-radius: 16px; padding: 10px 12px 10px 14px; margin: 4px 0 12px; }
.m2-sig > div { min-width: 0; }
.m2-sig small { display: block; font-size: 13px; }
.m2-sig b { font-weight: 500; }
.m2-sig span { color: var(--tenue); font-size: 14px; white-space: nowrap; }
.m2-coords { color: var(--tenue); font-size: 13px; margin: 0; }
.m2-sub { font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .12em; color: var(--tenue); margin: 16px 0 4px; }
.m2-fila { display: flex; align-items: center; gap: 12px; width: 100%; font: inherit; color: var(--texto); background: none; border: 0; border-bottom: 1px solid var(--borde); padding: 11px 2px; min-height: 48px; text-align: left; cursor: pointer; }
.m2-fila span { flex: 1; min-width: 0; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m2-fila small { flex: none; max-width: 46%; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.m2-fila.hallado span { color: var(--tenue); text-decoration: line-through; }
.m2-zonas { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px 0 4px; }
.m2-zona-b { font: inherit; font-size: 15px; font-weight: 500; color: var(--texto); background: var(--panel2); border: 1px solid var(--borde); border-radius: 999px; padding: 0 15px; min-height: 44px; cursor: pointer; }
.m2-zonas.men .m2-zona-b { font-size: 14px; font-weight: 400; padding: 0 12px; min-height: 40px; background: none; }

/* Buscador a pantalla completa */
.m2-busq { position: absolute; inset: 0; z-index: 1200; display: flex; flex-direction: column; background: var(--fondo); }
.m2-busq[hidden] { display: none; }
.m2-busq-cab { display: flex; gap: 8px; padding: 10px max(12px, var(--der)) 10px max(12px, var(--izq)); border-bottom: 1px solid var(--borde); }
.m2-busq-cab input { flex: 1; min-width: 0; font: inherit; font-size: 17px; color: var(--texto); background: var(--panel); border: 1px solid var(--rosa); border-radius: 999px; padding: 0 18px; height: 46px; outline: 0; -webkit-appearance: none; appearance: none; }
.m2-busq-cab input::placeholder { color: var(--tenue); }
.m2-busq-cab button { font: inherit; font-size: 15px; font-weight: 500; color: var(--texto); background: none; border: 0; padding: 0 8px; min-height: 44px; cursor: pointer; }
.m2-busq-res { overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 max(14px, var(--der)) calc(28px + var(--bajo, 0px) + env(safe-area-inset-bottom, 0px)) max(14px, var(--izq)); }
.m2-busq-res .m2-fila { display: grid; grid-template-columns: 28px 1fr; column-gap: 12px; row-gap: 0; }
.m2-busq-res .m2-fila .m2-ico { grid-row: 1 / span 2; }
.m2-busq-res .m2-fila span, .m2-busq-res .m2-fila small { grid-column: 2; max-width: none; }
.m2-vacio { color: var(--tenue); margin: 22px 4px; }
.m2-aviso { position: absolute; left: 50%; top: 74px; transform: translateX(-50%); z-index: 1300; margin: 0; background: var(--rosa); color: var(--tinta-rosa); font-weight: 600; font-size: 15px; padding: 8px 18px; border-radius: 999px; white-space: nowrap; }
.m2-aviso[hidden] { display: none; }

/* Texto bajo el mapa */
.m2-info { padding-top: 14px; }
.m2-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px 26px; margin: 10px 0 30px; }
.m2-cats h3 { margin: 0 0 6px; font-size: 18px; font-weight: 600; }
.m2-cats h3 a { text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.m2-cats h3 i { width: 13px; height: 13px; border-radius: 50%; }
.m2-cats h3 a { gap: 12px; }
.m2-cats li a { display: inline-flex; align-items: center; gap: 10px; }
.m2-cats li { padding: 4px 0; }
.m2-cats ul, .m2-lista { list-style: none; margin: 0; padding: 0; }
.m2-cats li { padding: 3px 0; }
.m2-cats li a { text-underline-offset: 3px; text-decoration-color: var(--borde); }
.m2-lista { columns: 280px; column-gap: 30px; margin-bottom: 20px; }
.m2-lista li { break-inside: avoid; padding: 6px 0; border-bottom: 1px solid var(--borde); }
.m2-lista li a { text-decoration: none; font-weight: 500; }
.m2-lista li a:hover { color: var(--rosa); }
.m2-lista li span { color: var(--tenue); font-size: 14px; }
.m2-zona { font-size: 17px; font-weight: 600; margin: 24px 0 6px; }
.m2-info h2.rotulo { font-size: clamp(18px, 4.4vw, 24px); margin: 30px 0 10px; }
.m2-info h2.rotulo a { text-decoration: none; }

/* Ordenador: filtros en columna fija y mapa al lado */
@media (min-width: 900px), (orientation: landscape) and (min-width: 560px) and (max-height: 520px) {
  .m2-pag { --lado: 384px; }
  .m2-nav { display: flex; flex: 1; min-width: 0; gap: 2px; overflow: hidden; white-space: nowrap; margin: 0 8px; }
  .m2-nav a { text-decoration: none; font-size: 15px; color: var(--tenue); padding: 6px 11px; border-radius: 999px; }
  .m2-nav a:hover { color: var(--texto); background: var(--panel); }
  .m2-cab .marca { margin-right: 0; }
  .m2-lienzo { left: var(--lado); }
  .m2-arriba { right: auto; width: var(--lado); padding-top: 12px; z-index: 1150; }
  .m2-arriba .m2-busca { display: block; }
  .m2-busca-cab, .m2-menu-idi { display: none; }
  .m2-cab .idiomas { display: block; }
  .m2-cab .marca { margin-right: 0; }
  .m2-menu { margin-left: auto; }
  .m2-hoja-cont { padding-bottom: calc(22px + var(--bajo, 0px)); }
  .m2-chips { display: none; }
  .m2-busca { box-shadow: none; background: var(--panel2); }
  .m2-hoja { right: auto; width: var(--lado); padding-top: 70px; border-radius: 0; border-top: 0; border-right: 1px solid var(--borde); box-shadow: none; transform: none !important; transition: none; }
  .m2-asa, [data-a="abre-filtros"] { display: none; }
  .m2-hoja-cont, .m2-hoja[data-estado="asomada"] .m2-hoja-cont { overflow-y: auto; height: auto !important; flex: 1; padding-top: 4px; }
  .m2-ctrl { top: 14px; right: max(14px, var(--der)); }
  .m2[data-hoja] .m2-ctrl { display: grid; }
  .m2-ctrl .zoom { display: block; }
  .m2-busq { right: auto; width: var(--lado); border-right: 1px solid var(--borde); }
  .m2-aviso { left: calc(var(--lado) + (100% - var(--lado)) / 2); top: 16px; }
}
/* Móvil tumbado: columna más estrecha, sin enlaces en la cabecera y dejando libre la muesca. */
@media (orientation: landscape) and (min-width: 560px) and (max-height: 520px) and (max-width: 899px) {
  .m2-pag { --lado: calc(300px + var(--izq)); --cab: 48px; }
  .m2 { min-height: 0; } /* tumbado con las barras de Safari quedan unos 295 px: el mínimo general sacaría el mapa de la pantalla */
  .m2-nav { display: none; }
  .m2-cab .marca { margin-right: auto; }
  .m2-hoja-cont { padding-left: max(16px, var(--izq)); }
  .m2-hoja { padding-top: 66px; }
  .m2-ctrl .zoom { display: none; }
}
@media (prefers-reduced-motion: reduce) { .m2-hoja, .m2-sw, .m2-sw::after { transition: none; } }
