/* ==========================================================================
   Yates México Marketplace 2.4.0 · /marketplace/ como app de búsqueda
   HEADER (tema) → TOOLBAR → [ MAP | RESULTS PANEL (scroll propio) ]
   Depende de marketplace.css (tokens :root, fuentes, .ymx-btn, .ymx-fbar).
   Sin librerías de mapa. Solo patrones de UX; nada copiado de terceros.
   ========================================================================== */

.ymx-app { --hdr: var(--ymx-hdr, 77px); --tb: 64px; --panel: clamp(580px, 38vw, 750px); --gap: 16px; --r: 14px;
  position: relative; display: flex; flex-direction: column; width: 100%; min-height: 480px; height: var(--ymx-shell, calc(100dvh - var(--hdr)));
  background: var(--paper); color: var(--ink); font-family: 'Gabarito', sans-serif; overflow: hidden; }
.ymx-app, .ymx-app * { box-sizing: border-box; }
.ymx-app [hidden] { display: none !important; }
.ymx-app svg { width: 1em; height: 1em; flex: none; }
.ymx-app .ymx-mono { font-family: 'JetBrains Mono', monospace; font-size: .78em; letter-spacing: .02em; }
.ymx-app .ymx-notice { margin: 8px 16px 0; }

/* ---------- Toolbar ---------- */
.ymx-app__toolbar { position: relative; z-index: 30; display: grid; grid-template-columns: minmax(260px, 380px) 1fr auto; align-items: center; gap: 10px; min-height: var(--tb); padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line); }
.ymx-app__search { position: relative; display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 12px 0 14px; background: var(--cream); border: 1.5px solid transparent; border-radius: 12px; transition: border-color .2s, background .2s; }
.ymx-app__search:focus-within { background: #fff; border-color: var(--navy-2); }
.ymx-app__search > svg { font-size: 18px; color: var(--ink-2); }
.ymx-app__search input[type=text] { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; font: 500 15px 'Gabarito', sans-serif; color: var(--ink); outline: 0; box-shadow: none; padding: 0; }
.ymx-app__search input::placeholder { color: var(--ink-3); }
:root .ymx-app button.ymx-app__search-clear { display: inline-flex; width: 26px; height: 26px; align-items: center; justify-content: center; border: 0 !important; border-radius: 50% !important; background: rgba(21,38,55,.08) !important; color: var(--ink-2) !important; padding: 0 !important; cursor: pointer; font-size: 12px; box-shadow: none !important; }
.ymx-app__suggest { position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 40; margin: 0; padding: 6px; list-style: none; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 24px 60px -24px rgba(12,26,38,.45); max-height: 360px; overflow: auto; }
.ymx-app__suggest li { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.ymx-app__suggest li:hover, .ymx-app__suggest li[aria-selected=true] { background: var(--cream); }
.ymx-app__suggest li svg { font-size: 16px; color: var(--ink-3); }
.ymx-app__suggest li b { font-weight: 600; color: var(--ink); }
.ymx-app__suggest li small { color: var(--ink-3); font-size: 12px; }
.ymx-app__suggest li .ymx-mono { margin-left: auto; color: var(--ink-3); }
.ymx-app__suggest li.ymx-app__suggest-h { padding: 8px 12px 4px; font: 700 11px 'Gabarito', sans-serif; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); cursor: default; }
.ymx-app__suggest li.ymx-app__suggest-h:hover { background: none; }

.ymx-app__filters { display: flex; align-items: center; gap: 8px; min-width: 0; overflow: visible; }
:root .ymx-app button.ymx-app__fbtn { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px !important; background: #fff !important; background-image: none !important; border: 1.5px solid rgba(21,38,55,.16) !important; border-radius: 12px !important; color: var(--ink) !important; font: 600 14px 'Gabarito', sans-serif !important; letter-spacing: 0 !important; text-transform: none !important; box-shadow: none !important; cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s; }
:root .ymx-app button.ymx-app__fbtn:hover { border-color: var(--navy-2) !important; }
:root .ymx-app button.ymx-app__fbtn[aria-expanded=true] { border-color: var(--navy) !important; background: var(--cream) !important; }
:root .ymx-app button.ymx-app__fbtn.is-active { background: var(--navy) !important; border-color: var(--navy) !important; color: var(--paper) !important; }
.ymx-app__fbtn > svg { font-size: 14px; opacity: .7; }
.ymx-app__fbtn[aria-expanded=true] > svg:last-child { transform: rotate(180deg); }
.ymx-app__fbtn span { max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.ymx-app__fcount { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--amber); color: var(--navy); font: 700 11.5px 'JetBrains Mono', monospace; }
:root .ymx-app button.ymx-app__fbtn--all { display: none; }

.ymx-app__sort { display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 12px; border: 1.5px solid rgba(21,38,55,.16); border-radius: 12px; color: var(--ink); font: 600 14px 'Gabarito', sans-serif; margin: 0; }
.ymx-app__sort > svg { font-size: 15px; opacity: .7; }
.ymx-app__sort-l { color: var(--ink-2); font-weight: 500; }
.ymx-app .ymx-sel { position: relative; display: inline-flex; align-items: center; }
.ymx-app .ymx-sel select { appearance: none; -webkit-appearance: none; height: 40px; padding: 0 28px 0 8px; border: 0; background: transparent; font: 600 14px 'Gabarito', sans-serif; color: var(--ink); cursor: pointer; outline: 0; box-shadow: none; }
.ymx-app .ymx-sel > svg { position: absolute; right: 8px; pointer-events: none; font-size: 14px; color: var(--ink-2); }

/* ---------- Popovers ---------- */
.ymx-pops { position: absolute; top: 100%; left: 0; right: 0; height: 0; }
.ymx-pop { position: absolute; top: 6px; left: var(--pop-x, 16px); z-index: 60; width: 340px; max-width: calc(100vw - 32px); padding: 18px 18px 0; background: #fff; border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 30px 70px -28px rgba(12,26,38,.5), 0 2px 8px rgba(12,26,38,.06); animation: ymxPop .18s var(--ease); }
.ymx-pop--wide { width: 460px; }
@keyframes ymxPop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.ymx-pop__title { margin: 0 0 12px; font: 700 15px 'Gabarito', sans-serif; color: var(--navy); display: flex; align-items: baseline; gap: 8px; }
.ymx-pop__title + .ymx-pop__title { margin-top: 18px; }
.ymx-pop__title small { color: var(--ink-3); }
.ymx-pop__search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; margin-bottom: 10px; background: var(--cream); border-radius: 10px; }
.ymx-pop__search svg { font-size: 15px; color: var(--ink-3); }
.ymx-pop__search input { flex: 1; border: 0; background: transparent; font: 500 14px 'Gabarito', sans-serif; outline: 0; box-shadow: none; padding: 0; min-width: 0; }
.ymx-pop__list { display: grid; grid-template-columns: 1fr; gap: 2px; max-height: 320px; overflow: auto; scrollbar-width: thin; margin: 0 -6px; padding: 0 6px; }
.ymx-pop--wide .ymx-pop__list { grid-template-columns: 1fr 1fr; }
.ymx-pop__opt { display: flex; align-items: center; gap: 10px; padding: 8px 8px; border-radius: 10px; cursor: pointer; font: 500 14px 'Gabarito', sans-serif; color: var(--ink); user-select: none; }
.ymx-pop__opt:hover { background: var(--cream); }
.ymx-pop__opt input { position: absolute; opacity: 0; width: 0; height: 0; margin: 0; }
.ymx-pop__opt i { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; flex: none; border: 1.5px solid rgba(21,38,55,.3); border-radius: 6px; color: transparent; font-size: 13px; transition: background .15s, border-color .15s; }
.ymx-pop__opt.is-on i, .ymx-pop__opt input:checked + i { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.ymx-pop__opt input:focus-visible + i { outline: 2px solid var(--amber); outline-offset: 2px; }
.ymx-pop__opt span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ymx-pop__opt small { color: var(--ink-3); }
.ymx-pop__range { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 10px; }
.ymx-pop__range label { display: flex; flex-direction: column; gap: 6px; font: 600 11px 'Gabarito', sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); min-width: 0; }
.ymx-pop__range .ymx-sel { width: 100%; border: 1.5px solid rgba(21,38,55,.16); border-radius: 10px; background: #fff; }
.ymx-pop__range .ymx-sel select { width: 100%; height: 42px; padding-left: 12px; }
.ymx-pop__dash { padding-bottom: 12px; color: var(--ink-3); }
.ymx-pop__hint { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
.ymx-pop__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 14px -18px 0; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--paper); border-radius: 0 0 16px 16px; }
:root .ymx-app button.ymx-pop__clear { background: none !important; border: 0 !important; padding: 0 !important; color: var(--ink-2) !important; font: 600 14px 'Gabarito', sans-serif !important; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; box-shadow: none !important; text-transform: none !important; letter-spacing: 0 !important; }
:root .ymx-app button.ymx-pop__apply { min-height: 42px; padding: 0 22px !important; }

/* ---------- Chips (móvil) ---------- */
.ymx-app__chips { display: none; align-items: center; gap: 8px; padding: 8px 12px; overflow-x: auto; scrollbar-width: none; background: #fff; border-bottom: 1px solid var(--line); }
.ymx-app__chiplist { display: flex; gap: 8px; }
.ymx-app__chips::-webkit-scrollbar { display: none; }
:root .ymx-app button.ymx-chip { flex: none; }

/* ---------- Split ---------- */
.ymx-app__split { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--panel); flex: 1; min-height: 0; }
.ymx-app__map { position: relative; min-width: 0; min-height: 0; background: var(--navy); color: var(--paper); overflow: hidden; }
.ymx-app__panel { position: relative; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; background: var(--paper); border-left: 1px solid var(--line); }
.ymx-app__phead { position: sticky; top: 0; z-index: 5; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 20px 10px; background: rgba(248,245,238,.92); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.ymx-app__h1 { margin: 0; font: 600 18px/1.2 'Fraunces', serif; color: var(--navy); letter-spacing: -.01em; }
.ymx-app__count { margin: 0; font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.ymx-app__count b { color: var(--navy); font-weight: 700; }
.ymx-app__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap); padding: 16px 20px 8px; }
.ymx-app__grid[aria-busy=true] { opacity: .55; pointer-events: none; transition: opacity .2s; }
.ymx-app__empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 60px 24px; text-align: center; }
.ymx-app__empty svg { font-size: 34px; color: var(--ink-3); }
.ymx-app__empty h2 { margin: 6px 0 0; font: 600 20px 'Fraunces', serif; color: var(--navy); }
.ymx-app__empty p { margin: 0 0 12px; color: var(--ink-2); }

/* Skeleton */
.ymx-yc--sk { pointer-events: none; }
.ymx-yc--sk .ymx-yc__media, .ymx-yc--sk i { background: linear-gradient(90deg, var(--cream-2) 25%, #fff 50%, var(--cream-2) 75%); background-size: 200% 100%; animation: ymxSk 1.2s linear infinite; }
.ymx-yc--sk i { display: block; height: 14px; border-radius: 6px; margin: 8px 0; }
@keyframes ymxSk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- YachtCard ---------- */
.ymx-yc { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .2s; }
.ymx-yc:hover, .ymx-yc.is-hover { transform: translateY(-2px); box-shadow: 0 22px 44px -26px rgba(12,26,38,.45); border-color: rgba(21,38,55,.22); }
.ymx-yc.is-selected { border-color: var(--navy); box-shadow: 0 0 0 2px var(--navy), 0 22px 44px -26px rgba(12,26,38,.45); }
.ymx-yc.is-sold { opacity: .72; }
.ymx-yc__media { position: relative; display: block; aspect-ratio: 3 / 2; background: var(--cream-2); overflow: hidden; }
.ymx-yc__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.ymx-yc:hover .ymx-yc__media img { transform: scale(1.04); }
.ymx-yc__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: rgba(21,38,55,.25); }
.ymx-yc__ph svg { width: 48%; height: auto; }
.ymx-yc__badge { position: absolute; top: 10px; left: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 5px 9px; border-radius: 999px; background: rgba(248,245,238,.94); color: var(--navy); font: 700 11px 'Gabarito', sans-serif; letter-spacing: .06em; text-transform: uppercase; backdrop-filter: blur(6px); }
.ymx-yc__badge--pro { background: var(--navy); color: var(--paper); }
.ymx-yc__badge--star { background: var(--amber); color: var(--navy); }
.ymx-yc__badge--star svg { fill: currentColor; stroke: none; font-size: 12px; }
.ymx-yc__badge--sold { background: #b23b3b; color: #fff; }
.ymx-yc__n { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 999px; background: rgba(12,26,38,.62); color: #fff; font: 600 11.5px 'JetBrains Mono', monospace; backdrop-filter: blur(6px); }
.ymx-yc__body { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 12px; }
.ymx-yc__price { margin: 0; font: 700 19px/1.1 'Gabarito', sans-serif; color: var(--navy); letter-spacing: -.01em; }
.ymx-yc__price small, .ymx-yc__price .ymx-cur { font-size: .62em; font-weight: 600; color: var(--ink-3); margin-left: 4px; letter-spacing: .04em; }
.ymx-yc__ask { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.ymx-yc__name { margin: 0; font: 500 15.5px/1.25 'Gabarito', sans-serif; }
.ymx-yc__name a { color: var(--ink); text-decoration: none; }
.ymx-yc__name a::after { content: ''; position: absolute; inset: 0; }
.ymx-yc__name a:hover { color: var(--navy); }
.ymx-yc__year { color: var(--ink-2); font-weight: 600; }
.ymx-yc__loc { display: flex; align-items: center; gap: 5px; margin: 0; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ymx-yc__loc svg { font-size: 13px; color: var(--ink-3); }
.ymx-yc__specs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 4px 0 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--ink-2); }
.ymx-yc__specs li { display: inline-flex; align-items: center; gap: 5px; }
.ymx-yc__specs svg { font-size: 14px; color: var(--ink-3); }
.ymx-yc__specs b { font-weight: 700; color: var(--ink); }
.ymx-yc__specs small { color: var(--ink-3); }
.ymx-yc__seller { display: flex; align-items: center; gap: 6px; margin: 6px 0 0; padding-top: 8px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ymx-yc__seller svg { font-size: 13px; }

/* ---------- Paginación + pie del panel ---------- */
.ymx-app__pages { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 14px 20px 6px; }
.ymx-app__page { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 38px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink); font: 600 13.5px 'Gabarito', sans-serif; text-decoration: none; }
.ymx-app__page:hover { border-color: var(--navy-2); color: var(--navy); }
.ymx-app__page.is-on { background: var(--navy); border-color: var(--navy); color: var(--paper); }
.ymx-app__page[aria-disabled=true] { opacity: .35; pointer-events: none; }
.ymx-app__page--prev svg { transform: rotate(180deg); }
.ymx-app__dots { color: var(--ink-3); padding: 0 4px; }
.ymx-app__pfoot { display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin: 12px 20px 24px; padding: 18px 20px; border-radius: var(--r); background: var(--cream-2); }
.ymx-app__pfoot p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--ink-2); }
:root .ymx-app .ymx-app__pfoot a.ymx-btn { min-height: 42px; padding: 0 18px !important; font-size: 14px !important; }

/* ---------- Map placeholder ---------- */
.ymx-map__ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; background: radial-gradient(120% 90% at 30% 20%, #1d3349 0%, var(--navy) 60%, #08131c 100%); }
.ymx-map__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(248,245,238,.06) 1px, transparent 1px), linear-gradient(90deg, rgba(248,245,238,.06) 1px, transparent 1px); background-size: 64px 64px; mask-image: radial-gradient(70% 70% at 50% 50%, #000 40%, transparent 100%); -webkit-mask-image: radial-gradient(70% 70% at 50% 50%, #000 40%, transparent 100%); }
.ymx-map__in { position: relative; z-index: 1; max-width: 460px; padding: 24px; text-align: center; }
.ymx-map__eyebrow { display: inline-block; padding: 6px 12px; border-radius: 999px; border: 1px solid rgba(232,171,54,.5); color: var(--amber); font: 700 11px 'Gabarito', sans-serif; letter-spacing: .14em; text-transform: uppercase; }
.ymx-map__title { margin: 16px 0 10px; font: 500 clamp(30px, 3.4vw, 44px)/1.05 'Fraunces', serif; color: var(--paper); letter-spacing: -.02em; }
.ymx-map__title em { font-style: italic; color: var(--amber); }
.ymx-map__sub { margin: 0; font-size: 14.5px; line-height: 1.55; color: rgba(248,245,238,.7); }
.ymx-map__pins { position: absolute; inset: 0; pointer-events: none; }
.ymx-map__pins span { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); padding: 5px 10px; border-radius: 999px; background: var(--paper); color: var(--navy); font: 700 12px 'JetBrains Mono', monospace; box-shadow: 0 8px 18px -8px rgba(0,0,0,.6); opacity: .55; }
.ymx-map__pins span::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; background: var(--paper); transform: translateX(-50%) rotate(45deg); }
.ymx-map__focus { position: absolute; left: 20px; bottom: 20px; z-index: 2; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 12px; background: rgba(248,245,238,.96); color: var(--navy); box-shadow: 0 16px 40px -18px rgba(0,0,0,.6); animation: ymxPop .18s var(--ease); max-width: min(320px, calc(100% - 40px)); }
.ymx-map__focus-price { font: 700 15px 'JetBrains Mono', monospace; }
.ymx-map__focus-title { font: 500 13px 'Gabarito', sans-serif; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root .ymx-app button.ymx-app__mapclose { position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3; }

/* ---------- FAB móvil ---------- */
:root .ymx-app button.ymx-app__fab, :root .ymx-app button.ymx-app__mapclose { display: none; align-items: center; gap: 8px; height: 48px; padding: 0 20px !important; border-radius: 999px !important; background: var(--navy) !important; background-image: none !important; color: var(--paper) !important; border: 1.5px solid rgba(248,245,238,.2) !important; font: 700 14px 'Gabarito', sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; box-shadow: 0 16px 34px -14px rgba(12,26,38,.7) !important; cursor: pointer; }
:root .ymx-app button.ymx-app__fab svg, :root .ymx-app button.ymx-app__mapclose svg { font-size: 16px; }

/* ---------- Drawer móvil (reutiliza .ymx-fbar de 2.2.0) ---------- */
.ymx-app .ymx-fbar--app { display: none; }

/* ---------- Header del tema fijo: medimos en JS ---------- */
body.ymx-app-page { overflow-x: hidden; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1279px) { .ymx-app { --panel: clamp(560px, 46vw, 650px); } .ymx-app__fbtn span { max-width: 120px; } }
@media (max-width: 1100px) { .ymx-app__toolbar { grid-template-columns: minmax(220px, 300px) 1fr auto; } .ymx-app__sort-l { display: none; } }

/* Tablet: mapa a la izquierda más chico, panel 1 columna cómoda */
@media (max-width: 1023px) and (min-width: 900px) { .ymx-app { --panel: 420px; } .ymx-app__grid { grid-template-columns: 1fr; } }

/* Móvil / tablet vertical: NO split. Lista + FAB Mapa. */
@media (max-width: 899px) {
  .ymx-app { height: auto !important; min-height: calc(100dvh - var(--hdr)); overflow: visible; }
  .ymx-app__toolbar { position: sticky; top: var(--hdr); z-index: 30; grid-template-columns: 1fr auto; gap: 8px; padding: 10px 12px; }
  .ymx-app__search { height: 44px; }
  .ymx-app__filters { display: none; }
  .ymx-app__sort { padding: 0 6px; border: 0; }
  .ymx-app__sort > svg { font-size: 18px; }
  .ymx-app__sort .ymx-sel select { max-width: 130px; padding-left: 4px; font-size: 13px; }
  .ymx-app__chips { display: flex; position: sticky; top: calc(var(--hdr) + 64px); z-index: 29; }
  :root .ymx-app button.ymx-app__fbtn--all { display: inline-flex; flex: none; height: 34px; padding: 0 12px !important; font-size: 13px !important; border-radius: 999px !important; }
  .ymx-app__split { display: block; }
  .ymx-app__map { position: fixed; inset: 0; top: var(--hdr); z-index: 9400; display: none; }
  .ymx-app.is-map .ymx-app__map { display: block; }
  .ymx-app.is-map .ymx-app__panel { display: none; }
  :root .ymx-app.is-map button.ymx-app__mapclose { display: inline-flex; }
  .ymx-app__panel { overflow: visible; border-left: 0; }
  .ymx-app__phead { position: static; background: transparent; backdrop-filter: none; flex-direction: column; align-items: flex-start; gap: 2px; padding: 14px 16px 6px; }
  .ymx-app__grid { grid-template-columns: 1fr; gap: 14px; padding: 8px 16px; }
  .ymx-app__pages { padding: 12px 16px 4px; }
  .ymx-app__pfoot { margin: 12px 16px 96px; }
  /* 2.9.0 · el «Mapa» va abajo a la derecha, donde el tema ponía su botón flotante «Publica tu embarcación» (oculto aquí). */
  :root .ymx-app button.ymx-app__fab { position: fixed; left: auto; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); transform: none; z-index: 9300; display: inline-flex; }
  :root body.ymx-app-page a.fab, :root body.ymx-app-page .shell a.fab, :root body.ymx-app-page .fab[href*="publicar"] { display: none !important; }
  :root .ymx-app.is-map button.ymx-app__fab { display: none; }
  .ymx-pops { position: static; height: auto; }
  /* Popovers dentro del drawer: bloques apilados, sin flotar */
  .ymx-fbar--app .ymx-pop { position: static; width: auto; max-width: none; padding: 16px 0 0; border: 0; border-top: 1px solid var(--line); border-radius: 0; box-shadow: none; animation: none; }
  .ymx-fbar--app .ymx-pop__foot { display: none; }
  .ymx-fbar--app .ymx-pop__list { max-height: none; overflow: visible; }
  .ymx-fbar--app .ymx-pop--wide .ymx-pop__list { grid-template-columns: 1fr; }
  .ymx-app .ymx-fbar--app { display: flex; flex-direction: column; gap: 0; padding: 18px 20px 0; width: min(420px, 94vw); }
  .ymx-app .ymx-fbar--app[aria-hidden=true] { visibility: hidden; }
  .ymx-app .ymx-fbar--app.is-open { visibility: visible; }
  .ymx-fbar--app .ymx-fbar__body { flex: 1; overflow: auto; padding-bottom: 16px; }
  .ymx-fbar--app .ymx-fbar__foot { position: sticky; bottom: 0; margin: 0 -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); }
  :root .ymx-app .ymx-fbar__foot button.ymx-btn { width: 100%; min-height: 48px; }
  .ymx-map__in { padding: 16px; }
  .ymx-map__pins span:nth-child(n+3) { display: none; }
}
@media (max-width: 899px) and (min-width: 600px) { .ymx-app__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; padding: 8px 20px; } .ymx-app__sort .ymx-sel select { max-width: 220px; } }
@media (max-width: 480px) { .ymx-app__h1 { font-size: 17px; } .ymx-app__sort .ymx-sel select { max-width: 110px; } }
@media (prefers-reduced-motion: reduce) { .ymx-app *, .ymx-app *::before, .ymx-app *::after { animation: none !important; transition: none !important; } }

/* ==========================================================================
   2.5.0 · Mapa real (MapLibre) — pins, clusters, mini card, controles
   ========================================================================== */
.ymx-app .ymx-map__canvas, .ymx-app .ymx-map__canvas.maplibregl-map { position: absolute !important; inset: 0; width: 100%; height: 100%; z-index: 1; background: #e9eef2; }
.ymx-app__map[data-state="loading"] .ymx-map__canvas, .ymx-app__map[data-state="placeholder"] .ymx-map__canvas { opacity: 0; }
.ymx-app__map[data-state="ready"] .ymx-map__ph { display: none; }
.ymx-app__map[data-state="loading"] .ymx-map__pins, .ymx-app__map[data-state="placeholder"] .ymx-map__pins { display: none; }
.ymx-map__canvas .maplibregl-canvas { outline: 0; }
.ymx-map__canvas .maplibregl-ctrl-bottom-right { bottom: 16px; right: 16px; }
.ymx-map__canvas .maplibregl-ctrl-group { border-radius: 12px; box-shadow: 0 10px 24px -12px rgba(12,26,38,.5); border: 1px solid var(--line); overflow: hidden; }
.ymx-map__canvas .maplibregl-ctrl-group button { width: 38px; height: 38px; }
.ymx-map__canvas .maplibregl-ctrl-attrib { font: 10.5px 'Gabarito', sans-serif; background: rgba(248,245,238,.85); border-radius: 8px; }
.ymx-map__canvas .maplibregl-ctrl-bottom-left { bottom: 10px; left: 10px; }
.ymx-app__map[data-state="ready"] { background: #e9eef2; }

/* Controles arriba del mapa */
.ymx-map__top { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 5; display: flex; align-items: center; gap: 10px; pointer-events: none; }
.ymx-map__top > * { pointer-events: auto; }
.ymx-map__move { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border-radius: 999px; background: rgba(248,245,238,.94); backdrop-filter: blur(8px); border: 1px solid var(--line); color: var(--navy); font: 600 13px 'Gabarito', sans-serif; cursor: pointer; margin: 0; box-shadow: 0 10px 24px -14px rgba(12,26,38,.5); }
.ymx-map__move input { position: absolute; opacity: 0; width: 0; height: 0; }
.ymx-map__move i { width: 30px; height: 18px; border-radius: 999px; background: rgba(21,38,55,.18); position: relative; transition: background .2s; flex: none; }
.ymx-map__move i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.ymx-map__move input:checked + i { background: var(--navy); }
.ymx-map__move input:checked + i::after { transform: translateX(12px); }
:root .ymx-app button.ymx-map__here { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 16px !important; border-radius: 999px !important; background: var(--navy) !important; background-image: none !important; color: var(--paper) !important; border: 0 !important; font: 700 13px 'Gabarito', sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; box-shadow: 0 12px 26px -12px rgba(12,26,38,.7) !important; cursor: pointer; }
.ymx-map__n { margin-left: auto; padding: 8px 12px; border-radius: 999px; background: rgba(12,26,38,.78); color: var(--paper); font: 600 12px 'JetBrains Mono', monospace; backdrop-filter: blur(6px); }
.ymx-map__n:empty { display: none; }

/* Pins */
.ymx-app .maplibregl-marker { cursor: pointer; }
:root .ymx-app button.ymx-pin { position: relative; display: inline-flex; align-items: center; justify-content: center; height: 28px; padding: 0 10px !important; border-radius: 999px !important; background: #fff !important; background-image: none !important; color: var(--navy) !important; border: 1.5px solid rgba(21,38,55,.22) !important; font: 700 12px 'JetBrains Mono', monospace !important; letter-spacing: 0 !important; text-transform: none !important; box-shadow: 0 6px 16px -8px rgba(12,26,38,.55) !important; cursor: pointer; white-space: nowrap; transition: transform .15s var(--ease), background .15s, color .15s; transform-origin: 50% 100%; }
:root .ymx-app button.ymx-pin::after { content: ''; position: absolute; left: 50%; bottom: -5px; width: 8px; height: 8px; background: inherit; border-right: 1.5px solid rgba(21,38,55,.22); border-bottom: 1.5px solid rgba(21,38,55,.22); transform: translateX(-50%) rotate(45deg); }
:root .ymx-app button.ymx-pin.is-featured { background: var(--amber) !important; border-color: var(--amber-deep) !important; }
:root .ymx-app button.ymx-pin.is-featured::after { border-color: var(--amber-deep); }
:root .ymx-app button.ymx-pin.is-hover, :root .ymx-app button.ymx-pin:hover { transform: scale(1.12); z-index: 5; background: var(--navy) !important; color: var(--paper) !important; border-color: var(--navy) !important; }
:root .ymx-app button.ymx-pin.is-hover::after, :root .ymx-app button.ymx-pin:hover::after { border-color: var(--navy); }
:root .ymx-app button.ymx-pin.is-selected { background: var(--navy) !important; color: var(--amber) !important; border-color: var(--navy) !important; transform: scale(1.15); z-index: 6; }
:root .ymx-app button.ymx-pin.is-selected::after { border-color: var(--navy); }
:root .ymx-app button.ymx-pin--cluster { width: 40px; height: 40px; padding: 0 !important; border-radius: 50% !important; background: var(--navy) !important; color: var(--paper) !important; border: 3px solid rgba(248,245,238,.9) !important; font-size: 13px !important; box-shadow: 0 0 0 6px rgba(12,26,38,.15), 0 10px 20px -10px rgba(12,26,38,.7) !important; transform-origin: 50% 50%; }
:root .ymx-app button.ymx-pin--cluster::after { display: none; }
:root .ymx-app button.ymx-pin--cluster:hover { transform: scale(1.08); background: var(--navy-2) !important; color: var(--paper) !important; }
.ymx-app .maplibregl-marker:has(.ymx-pin.is-selected), .ymx-app .maplibregl-marker:has(.ymx-pin.is-hover) { z-index: 10; }
.ymx-pinwrap { display: block; line-height: 0; }

/* Mini card sobre el mapa */
.ymx-map__pop { position: absolute; left: 14px; bottom: 14px; z-index: 6; display: flex; flex-direction: column; width: min(300px, calc(100% - 28px)); background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 24px 60px -24px rgba(12,26,38,.6), 0 2px 8px rgba(12,26,38,.08); border: 1px solid var(--line); animation: ymxPop .18s var(--ease); }
.ymx-map__pop-img { display: block; aspect-ratio: 16 / 10; background: var(--cream-2); }
.ymx-map__pop-img img { display: block; width: 100%; height: 100%; object-fit: cover; }
.ymx-map__pop-b { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px 12px; min-width: 0; }
.ymx-map__pop-b > b { font-size: 15px; color: var(--navy); }
.ymx-map__pop-t { font: 600 14px/1.25 'Gabarito', sans-serif; color: var(--navy) !important; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ymx-map__pop-t:hover { color: var(--navy); text-decoration: underline; }
.ymx-map__pop-b > span { font-size: 12px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
:root .ymx-app button.ymx-map__pop-x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 28px; height: 28px; padding: 0 !important; border-radius: 50% !important; border: 0 !important; background: rgba(248,245,238,.92) !important; color: var(--navy) !important; font-size: 16px; line-height: 1; cursor: pointer; box-shadow: none !important; }
.ymx-map__focus { display: none !important; } /* sustituido por la mini card real */

/* Panel: pie siempre alcanzable */
.ymx-app__panel { padding-bottom: 8px; }
.ymx-app__pfoot { margin-bottom: 28px; }
/* 2.9.0 · cierre de resultados: dos caminos (marketplace / brokerage), mismo lenguaje que el menú «Vender». */
.ymx-app .ymx-app__pfoot--v2 { display: block; padding: 0; background: transparent; border-radius: 0; }
.ymx-pfoot__cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; }
.ymx-pfoot__card { position: relative; overflow: hidden; border-radius: 22px; padding: 30px 30px 28px; color: var(--paper); background: var(--navy); border: 1px solid rgba(248,245,238,.1); }
.ymx-pfoot__card--mp { background: linear-gradient(135deg, #2a3d4c 0%, #1c2c3a 55%, #142331 100%); }
.ymx-pfoot__card--bk { background: linear-gradient(135deg, #16283a 0%, #0f1f2c 100%); }
.ymx-pfoot__card::after { content: ""; position: absolute; right: -60px; bottom: -80px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(233,178,74,.16), transparent 70%); pointer-events: none; }
.ymx-pfoot__k { display: block; font-family: 'Gabarito', sans-serif; font-size: 10.5px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--amber); margin-bottom: 14px; }
.ymx-app .ymx-pfoot__h { margin: 0 0 12px; font-family: 'Fraunces', Georgia, serif; font-weight: 400; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.05; letter-spacing: -.02em; color: var(--paper); text-transform: none; }
.ymx-app .ymx-pfoot__h em { font-style: italic; color: var(--amber); }
.ymx-app .ymx-pfoot__card p { margin: 0 0 22px; font-size: 14.5px; line-height: 1.6; color: rgba(248,245,238,.78); max-width: 46ch; }
.ymx-pfoot__cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ymx-pfoot__cta > span { font-size: 13px; color: rgba(248,245,238,.55); }
:root .ymx-app .ymx-app__pfoot--v2 a.ymx-btn { min-height: 46px; padding: 0 22px !important; font-size: 14.5px !important; }
:root .ymx-app .ymx-pfoot__card a.ymx-btn--light, :root .ymx-app .ymx-pfoot__card a.ymx-btn--light:hover { background: var(--paper) !important; color: var(--navy) !important; border-color: var(--paper) !important; }
.ymx-app .ymx-pfoot__legal { margin: 14px 4px 0; font-size: 12px; line-height: 1.55; color: var(--ink-3); }
@media (max-width: 700px) { .ymx-pfoot__card { padding: 24px 22px; border-radius: 18px; } }

@media (max-width: 899px) {
  .ymx-map__top { top: 12px; left: 12px; right: 12px; }
  .ymx-map__move span { display: none; }
  .ymx-map__pop { left: 12px; right: 12px; bottom: 84px; width: auto; flex-direction: row; }
  .ymx-map__pop-img { width: 44%; aspect-ratio: auto; min-height: 110px; flex: none; }
  .ymx-map__pop-b { flex: 1; padding-right: 36px; }
  .ymx-map__canvas .maplibregl-ctrl-bottom-right { bottom: 84px; }
  .ymx-map__canvas .maplibregl-ctrl-bottom-left { bottom: 78px; }
}

/* ==========================================================================
   2.6.0 · Mini preview con carrusel + YachtDetailModal
   ========================================================================== */
.ymx-map__pop { cursor: pointer; }
.ymx-map__pop-img { position: relative; overflow: hidden; }
.ymx-map__pop-img img { user-select: none; -webkit-user-drag: none; }
:root .ymx-app button.ymx-map__pop-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; padding: 0 !important; border-radius: 50% !important; border: 0 !important; background: rgba(248,245,238,.92) !important; background-image: none !important; color: var(--navy) !important; box-shadow: 0 6px 14px -6px rgba(12,26,38,.6) !important; cursor: pointer; font-size: 14px; display: inline-flex; align-items: center; justify-content: center; opacity: .95; }
:root .ymx-app button.ymx-map__pop-nav:hover { background: #fff !important; }
.ymx-map__pop-nav--prev { left: 8px; } .ymx-map__pop-nav--next { right: 8px; }
.ymx-map__pop-cnt { position: absolute; right: 8px; bottom: 8px; padding: 3px 7px; border-radius: 999px; background: rgba(12,26,38,.7); color: #fff; font-size: 10.5px !important; }
.ymx-map__pop-hint { margin-top: 2px; font-size: 11px !important; color: var(--amber-deep) !important; font-weight: 700; }

/* Bloqueo de scroll con el modal abierto (el marketplace sigue vivo detrás) */
html.ymx-dm-open, body.ymx-dm-open { overflow: hidden !important; }
body.ymx-dm-open .ymx-app__panel { overflow: hidden; }

.ymx-dm { position: fixed; inset: 0; z-index: 99000; display: flex; align-items: flex-start; justify-content: center; padding: 16px 40px; }
.ymx-dm__backdrop { position: absolute; inset: 0; background: rgba(12,26,38,.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: ymxFade .2s ease-out; }
@keyframes ymxFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ymxRise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.ymx-dm__win { position: relative; display: flex; flex-direction: column; width: min(1280px, calc(100vw - 80px)); height: calc(100vh - 32px); height: calc(100dvh - 32px); background: #fff; border-radius: 18px; box-shadow: 0 40px 100px -30px rgba(12,26,38,.7), 0 0 0 1px rgba(255,255,255,.4); overflow: hidden; outline: 0; animation: ymxRise .22s var(--ease); }
.ymx-dm__bar { position: relative; z-index: 2; flex: none; display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 12px 0 10px; background: #fff; border-bottom: 1px solid var(--line); }
:root .ymx-app button.ymx-dm__back { display: inline-flex; align-items: center; gap: 8px; height: 38px; padding: 0 14px 0 10px !important; border-radius: 999px !important; border: 1.5px solid rgba(21,38,55,.16) !important; background: #fff !important; background-image: none !important; color: var(--navy) !important; font: 700 14px 'Gabarito', sans-serif !important; text-transform: none !important; letter-spacing: 0 !important; box-shadow: none !important; cursor: pointer; }
:root .ymx-app button.ymx-dm__back:hover { border-color: var(--navy) !important; background: var(--cream) !important; }
.ymx-dm__back svg { transform: rotate(180deg); font-size: 15px; }
.ymx-dm__title { flex: 1; min-width: 0; font: 600 15px 'Gabarito', sans-serif; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; }
.ymx-dm__open { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; color: var(--ink-2); font-size: 17px; text-decoration: none; }
.ymx-dm__open:hover { background: var(--cream); color: var(--navy); }
:root .ymx-app button.ymx-dm__x { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; padding: 0 !important; border-radius: 50% !important; border: 0 !important; background: rgba(21,38,55,.06) !important; background-image: none !important; color: var(--navy) !important; font-size: 17px; box-shadow: none !important; cursor: pointer; }
:root .ymx-app button.ymx-dm__x:hover { background: rgba(21,38,55,.12) !important; }
.ymx-dm__body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; scrollbar-width: thin; background: var(--paper); }
/* La ficha dentro del modal: mismo diseño, sin bleeds a 100vw */
.ymx-dm__body .ymx-single__inner { padding-top: 16px; padding-bottom: 40px; }
.ymx-dm__body .ymx-tabs { top: 0; }
.ymx-dm__body .ymx-anchor { scroll-margin-top: 64px; }
.ymx-dm__body .ymx-comps__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ymx-dm__body .ymx-bleed, .ymx-dm__body .ymx-bleed--full { width: auto !important; margin-left: 0 !important; margin-right: 0 !important; max-width: none !important; }
.ymx-dm__body .ymx-lfoot { margin-bottom: -40px !important; margin-left: calc(-1 * clamp(20px, 4.5vw, 56px)) !important; margin-right: calc(-1 * clamp(20px, 4.5vw, 56px)) !important; width: auto !important; } /* 2.7.1 · en el modal: a todo lo ancho del cuerpo y la ilustración toca el borde inferior */
.ymx-dm__body .ymx-lfoot__in { padding-left: clamp(20px, 4.5vw, 56px); padding-right: clamp(20px, 4.5vw, 56px); }
.ymx-dm__body .ymx-gal { height: min(520px, 52vh); }
.ymx-dm__body .ymx-gal__back { display: none; }
.ymx-dm__body .ymx-single__side { position: sticky; top: 16px; }
.ymx-lightbox--dm { z-index: 99999; }

/* Skeleton del modal */
.ymx-dm__sk { padding: 16px clamp(20px, 4.5vw, 56px) 40px; max-width: 1320px; margin: 0 auto; }
.ymx-dm__sk i { display: block; height: 16px; border-radius: 8px; margin: 10px 0; background: linear-gradient(90deg, var(--cream-2) 25%, #fff 50%, var(--cream-2) 75%); background-size: 200% 100%; animation: ymxSk 1.2s linear infinite; }
.ymx-dm__sk-gal { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 8px; height: min(520px, 52vh); border-radius: 20px; overflow: hidden; }
.ymx-dm__sk-gal i { height: 100%; margin: 0; border-radius: 0; }
.ymx-dm__sk-grid { display: grid; grid-template-columns: 1fr 380px; gap: 44px; margin-top: 30px; }

@media (max-width: 899px) {
  .ymx-dm { padding: 0; align-items: stretch; }
  .ymx-dm__win { width: calc(100vw - var(--ymx-sbw, 0px)); height: 100vh; height: 100dvh; border-radius: 0; animation: ymxRise .22s var(--ease); }
  .ymx-dm__bar { height: 52px; padding-top: env(safe-area-inset-top); }
  .ymx-dm__title { display: none; }
  .ymx-dm__body .ymx-gal { height: 52vw; min-height: 240px; border-radius: 0; }
  .ymx-dm__body .ymx-single__inner { padding-top: 0; }
  .ymx-dm__body .ymx-single__side { position: static; }
  /* 2.9.2 · comparables dentro del modal: como en la página (1 columna en móvil), no 3 tarjetas diminutas. */
  .ymx-dm__body .ymx-comps__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ymx-dm__sk-gal { grid-template-columns: 1fr; height: 52vw; }
  .ymx-dm__sk-grid { grid-template-columns: 1fr; }
  .ymx-map__pop { cursor: pointer; }
}
@media (max-width: 700px) {
  .ymx-dm__body .ymx-comps__grid { grid-template-columns: 1fr; }
}
