/* Evita gestos del navegador iOS (pull-to-refresh, edge-swipe forward/back) site-wide,
   por si el dedo del usuario arranca fuera de .agt-media (en el borde de pantalla). */
body { overscroll-behavior: contain; }
/* Fix ficha movil (2026-05-30): el widget shortcode que aloja el video va4 colapsa su
   alto (~40px) y el video 16/9 desborda sobre el titulo en EN/NL/NO. Forzamos que el
   widget reserve el alto real del video (responsive, cubre los 4 idiomas). */
.elementor-widget-shortcode:has(.va4-wrap){ aspect-ratio: 16 / 9; width: 100%; }
.alv2 {
    --agt-primary: #1976a4;
    --agt-primary-dark: #125e84;
    --agt-accent: #f59e0b;
    --agt-red: #dc2626;
    --agt-muted: #6b7280;
    --agt-border: #e5e7eb;
    --agt-drop: #e0533d;
}
.alv2 .agt-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 24px;
    padding: 8px 0;
}
.alv2 .agt-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,.06), 0 4px 14px rgba(0,0,0,.06);
    transition: transform .25s, box-shadow .25s;
    display: flex;
    flex-direction: column;
}
.alv2 .agt-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0,0,0,.08), 0 14px 28px rgba(0,0,0,.1);
}
.alv2 .agt-media {
    position: relative;
    aspect-ratio: 4/3;
    /* Igual que la web de referencia: pan-y permite el scroll vertical de la pagina
       desde dentro del slider y bloquea horizontal (Swiper). El edge-swipe del navegador
       queda neutralizado por body{overscroll-behavior:contain}. */
    touch-action: pan-y;
    /* Placeholder branded mientras la foto carga: logo blanco centrado sobre el azul oscuro
       de marca. Cuando la <img> se carga, cubre este fondo. */
    background:
        url('https://albirconfort.com/wp-content/uploads/2025/01/Logo1_blanco_1024px-300x107.png')
        center / 150px auto no-repeat
        #0e3a66; /* mismo azul que el fondo del footer del sitio */
    overflow: hidden;
}
.alv2 .agt-media .swiper { width: 100%; height: 100%; position: relative; z-index: 1; }
/* Spinner blanco centrado sobre el placeholder (logo+azul). Queda DETRAS de las
   slides; la imagen lo cubre al cargar. Cuando una slide aun no tiene la foto
   descargada, su area es transparente y se ve el spinner. */
.alv2 .agt-media::after {
    content: "";
    position: absolute;
    top: 50%; left: 50%;
    margin: -18px 0 0 -18px;
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.28);
    border-top-color: #fff;
    border-radius: 50%;
    animation: alv2-spin 0.9s linear infinite;
    pointer-events: none;
    z-index: 0;
}
@keyframes alv2-spin { to { transform: rotate(360deg); } }
/* Mientras Swiper NO se ha inicializado, solo mostramos la 1a slide.
   Asi evitamos que la inyeccion de la 2a slide por el preloader haga que
   el wrapper flex muestre ambas slides compartiendo el ancho (lo que se veria
   como la 1a foto recortada a la mitad). Al inicializar Swiper, se anade
   la clase .agt-init y todas las slides se muestran (Swiper las controla). */
.alv2 .agt-swiper:not(.agt-init) .swiper-slide:not(:first-child) { display: none; }
.alv2 .agt-media .swiper-slide {
    display: flex; align-items: center; justify-content: center;
    background: transparent;
}
/* Pausa el spinner cuando Swiper se ha inicializado (la foto activa ya esta a la vista),
   reduciendo capas GPU activas en iOS para evitar crashes de renderizador. */
.alv2 .agt-card .agt-swiper.agt-init ~ .agt-media::after,
.alv2 .agt-media:has(.agt-swiper.agt-init)::after { display: none; }
.alv2 .agt-media img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
}
/* Cada slide envuelve su <img> en un <a> que abre la ficha. Swiper distingue
   tap vs drag (preventClicks), asi el arrastre no abre la ficha. */
.alv2 .agt-media .agt-slide-link {
    display: block; width: 100%; height: 100%;
    text-decoration: none; color: inherit;
}
.alv2 .agt-no-photo {
    display: flex; align-items: center; justify-content: center;
    width: 100%; height: 100%;
    color: #94a3b8; font-size: 14px;
}
.alv2 .agt-center-link {
    position: absolute;
    top: 0; left: 22%; right: 22%; bottom: 36px;
    z-index: 4;
    cursor: pointer; text-decoration: none; display: block;
}
.alv2 .agt-media .swiper-button-prev,
.alv2 .agt-media .swiper-button-next {
    color: #fff;
    background: rgba(15,23,42,.5);
    width: 34px; height: 34px;
    border-radius: 50%;
    backdrop-filter: blur(2px);
    opacity: .9;
    transition: background .2s, opacity .2s;
    z-index: 6;
}
.alv2 .agt-media .swiper-button-prev:hover,
.alv2 .agt-media .swiper-button-next:hover {
    background: rgba(15,23,42,.78);
    opacity: 1;
}
.alv2 .agt-media .swiper-button-prev::after,
.alv2 .agt-media .swiper-button-next::after {
    font-size: 15px; font-weight: 700;
}
.alv2 .agt-media .swiper-pagination { bottom: 8px; z-index: 6; }
.alv2 .agt-media .swiper-pagination-bullet {
    background: #fff; opacity: .6;
    width: 7px; height: 7px;
}
.alv2 .agt-media .swiper-pagination-bullet-active {
    opacity: 1; background: #fff;
    width: 9px; height: 9px;
}
.alv2 .agt-badges {
    position: absolute; top: 10px; left: 10px;
    display: flex; flex-direction: column; gap: 6px;
    z-index: 7;
    align-items: flex-start;
    pointer-events: none;
}
.alv2 .agt-badge {
    background: var(--agt-primary); color: #fff;
    font-size: 11px; font-weight: 700; letter-spacing: .04em;
    /* 2026-09-30: League Spartan reserva 0,22em bajo la linea base y las mayusculas llenan
       casi todo el ascendente, asi que el texto quedaba ~0,19em alto. Se baja 0,096em pasando
       relleno de abajo a arriba (misma altura). Medido por pixeles en Chromium y WebKit. */
    padding: calc(4px + .096em) 9px calc(4px - .096em); border-radius: 6px;
    text-transform: uppercase;
    box-shadow: 0 1px 2px rgba(0,0,0,.18);
    line-height: 1.2;
}
.alv2 .agt-badge--accent { background: var(--agt-accent); }
.alv2 .agt-badge--red    { background: var(--agt-red); }
.alv2 .agt-badge--drop  { background: var(--agt-drop); }
.alv2 .agt-video-btn { position: absolute; bottom: 12px; left: 12px; z-index: 5; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: #ffffff; color: #0c3f6f; text-decoration: none; box-shadow: 0 2px 6px rgba(0,0,0,.25); transition: transform .15s ease, background .15s ease, color .15s ease; cursor: pointer; }
.alv2 .agt-video-btn:hover { background: #0c3f6f; color: #ffffff; transform: scale(1.08); }
.alv2 .agt-video-btn svg { display: block; }
.alv2 .agt-counter {
    position: absolute; top: 10px; right: 10px;
    display: inline-flex; align-items: center; gap: 3px;
    background: rgba(15,23,42,.6); color: #fff;
    font-size: 11.5px; font-weight: 700;
    padding: 4px 10px; border-radius: 14px;
    z-index: 7;
    font-variant-numeric: tabular-nums; line-height: 1.2;
    pointer-events: none;
}
.alv2 .agt-counter-sep   { opacity: .55; font-weight: 500; margin: 0 1px; }
.alv2 .agt-counter-total { opacity: .85; }
.alv2 .agt-price {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(255,255,255,.96); color: #0f172a;
    font-weight: 700; font-size: 15px;
    padding: 6px 12px; border-radius: 8px;
    z-index: 7;
    box-shadow: 0 2px 6px rgba(0,0,0,.18); line-height: 1.1;
    pointer-events: none;
}
.alv2 .agt-price small {
    font-weight: 500; font-size: 11px;
    color: var(--agt-muted); margin-left: 2px;
}
.alv2 .agt-price .agt-price-old { display:block; font-size:11px; font-weight:500; color:var(--agt-muted); text-decoration:line-through; text-decoration-color:var(--agt-drop); line-height:1.05; margin-bottom:1px; letter-spacing:0; }
.alv2 .agt-price .agt-price-now { display:block; }
.alv2 .agt-body {
    padding: 16px;
    display: flex; flex-direction: column; flex: 1;
    color: inherit; cursor: pointer;
    transition: background .2s;
    background: linear-gradient(rgb(249,250,252) 0%, #fff 60%);
    position: relative;
    text-decoration: none !important;
}
.alv2 .agt-body::before {
    content: "";
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--agt-primary) 0%, var(--agt-primary-dark) 70%, transparent 100%);
    opacity: .85;
}
.alv2 .agt-body:hover               { background: rgba(25,118,164,.04); }
.alv2 .agt-body:hover .agt-title    { color: var(--agt-primary); }
.alv2 .agt-body,
.alv2 .agt-body * { text-decoration: none !important; }
.alv2 .agt-title {
    font-size: 22px; font-weight: 800; color: #0f172a;
    margin: 0 0 6px;
    line-height: 1.15; letter-spacing: -.02em;
}
.alv2 .agt-sub {
    display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px;
    font-size: 15px; color: #475569;
    margin-bottom: 14px;
    font-weight: 500; line-height: 1.2;
}
.alv2 .agt-sub-loc {
    display: inline-flex; align-items: center; gap: 5px;
    color: #334155; font-weight: 600;
    /* Fix 2026-05-23: el municipio se partia en dos lineas ("Alfaz del / Pi")
       en cards estrechas. Con flex:1 1 auto + min-width:0 toma todo el ancho
       disponible y permite ser encogido por el flex padre; la regla siguiente
       aplica nowrap+ellipsis al texto para que nunca se rompa en dos lineas. */
    flex: 1 1 auto;
    min-width: 0;
}
.alv2 .agt-sub-loc > span:last-child {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
}
.alv2 .agt-sub-loc .agt-ic {
    width: 15px; height: 15px; flex: 0 0 15px;
    color: var(--agt-primary); stroke-width: 2.2;
}
.alv2 .agt-sub-sep { display: none; }
.alv2 .agt-sub-ref {
    display: inline-flex; align-items: center;
    font-size: 11.5px; color: var(--agt-primary); font-weight: 700;
    letter-spacing: .05em;
    background: rgba(25,118,164,.1);
    padding: 3px 10px; border-radius: 999px;
    line-height: 1.2;
    /* Fix 2026-05-23: que el badge nunca se encoja ni "empuje" al municipio. */
    flex: 0 0 auto;
    white-space: nowrap;
}
.alv2 .agt-hero {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    background: linear-gradient(135deg, rgba(25,118,164,.06) 0%, rgba(25,118,164,.14) 100%);
    border: 1px solid rgba(25,118,164,.12);
    box-shadow: 0 1px 3px rgba(25,118,164,.07);
    border-radius: 10px;
    padding: 7px 4px;
    margin: 0 0 12px;
}
.alv2 .agt-hero-item {
    flex: 1;
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 2px;
    padding: 0 4px;
    border-left: 1px solid rgba(25,118,164,.18);
    text-align: center;
    min-width: 0;
}
.alv2 .agt-hero-item:first-child { border-left: none; }
.alv2 .agt-hero-top {
    display: inline-flex; align-items: center; gap: 6px; line-height: 1;
}
.alv2 .agt-hero-top .agt-ic {
    width: 26px; height: 26px; flex: 0 0 26px;
    color: var(--agt-primary); stroke-width: 2;
}
.alv2 .agt-hero-num {
    font-size: 17px; font-weight: 700; color: #0f172a;
    line-height: 1; letter-spacing: -.01em;
}
.alv2 .agt-hero-num small {
    font-size: 11px; font-weight: 600;
    color: var(--agt-muted); margin-left: 2px;
}
.alv2 .agt-hero-label {
    font-size: 9.5px; color: var(--agt-muted);
    text-transform: uppercase; letter-spacing: .06em; font-weight: 600;
}
.alv2 .agt-hero--compact { padding: 6px 2px; }
.alv2 .agt-hero--compact .agt-hero-item { padding: 0 2px; }
.alv2 .agt-hero--compact .agt-hero-top { gap: 4px; }
.alv2 .agt-hero--compact .agt-hero-top .agt-ic {
    width: 20px; height: 20px; flex: 0 0 20px;
}
.alv2 .agt-hero--compact .agt-hero-num { font-size: 15px; }
.alv2 .agt-hero--compact .agt-hero-num small { font-size: 9px; margin-left: 1px; }
.alv2 .agt-hero--compact .agt-hero-label { font-size: 8.5px; letter-spacing: .04em; }
/* Performance: card baseline */
.alv2 .agt-card {
    /* content-visibility: auto removed - was delaying lazy load activation */
}

/* Fix bug: tarjeta azul aleatoria al pasar fotos (seleccion de imagen del navegador) */
.alv2 .agt-media,
.alv2 .agt-media * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -webkit-touch-callout: none;
}
.alv2 .agt-media a,
.alv2 .agt-media button {
    -webkit-tap-highlight-color: transparent;
}
.alv2 .agt-center-link:focus,
.alv2 .agt-center-link:focus-visible,
.alv2 .agt-media .swiper-button-prev:focus,
.alv2 .agt-media .swiper-button-next:focus,
.alv2 .agt-media .swiper-button-prev:focus-visible,
.alv2 .agt-media .swiper-button-next:focus-visible {
    outline: none;
}
.alv2 .agt-media img {
    pointer-events: none;
    -webkit-user-drag: none;
}
.alv2 .agt-extras {
    display: flex; flex-wrap: wrap; gap: 7px 9px;
    padding: 12px 0 2px;
    border-top: 1px solid var(--agt-border);
    min-height: 40px;
    align-items: center;
}
/* Cinturon 2026-05-23: si por algun camino el contenedor llega vacio, ocultarlo */
.alv2 .agt-extras:empty { display: none; }
.alv2 .agt-extra {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 5px 11px;
    background: rgba(25,118,164,.08);
    border-radius: 16px;
    font-size: 13px; color: #1e3a52; font-weight: 600; line-height: 1.1;
}
.alv2 .agt-extra .agt-ic {
    width: 17px; height: 17px; flex: 0 0 17px;
    color: var(--agt-primary); stroke-width: 2;
}
.alv2 .agt-ic { display: inline-block; vertical-align: middle; line-height: 0; }
.alv2 .agt-ic svg { width: 100%; height: 100%; display: block; }
.alv2 .agt-pagination {
    margin: 40px 0 20px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.alv2 .agt-pagination .agt-page-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    color: #94a3b8;
    font-weight: 600;
    user-select: none;
}
.alv2 .agt-page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 10px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    color: var(--agt-primary, #1976a4);
    font-weight: 600;
    font-size: 15px;
    text-decoration: none !important;
    box-shadow: 0 1px 2px rgba(0,0,0,.05);
    transition: background .15s, color .15s, border-color .15s, transform .15s, box-shadow .15s;
    line-height: 1;
}
.alv2 .agt-page-link:hover {
    background: var(--agt-primary, #1976a4);
    color: #fff;
    border-color: var(--agt-primary, #1976a4);
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(25,118,164,.25);
}
.alv2 .agt-page-link.active {
    background: var(--agt-primary-dark, #0e3a66);
    color: #fff;
    border-color: var(--agt-primary-dark, #0e3a66);
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(14,58,102,.3);
    cursor: default;
    pointer-events: none;
}
@media (max-width: 600px) {
    .alv2 .agt-grid { grid-template-columns: 1fr; gap: 18px; }
    /* Cuerpo con más respiro en movil */
    .alv2 .agt-body { padding: 18px; }
    /* Tipo/ciudad/ref mas grandes en movil (peticion cliente 2026-05-23). */
    .alv2 .agt-title { font-size: 28px; margin: 0 0 8px; }
    .alv2 .agt-sub { font-size: 19px; margin-bottom: 16px; }
    /* Municipio aun mas grande en movil (peticion cliente 2026-05-23). */
    .alv2 .agt-sub-loc { font-size: 22px; }
    .alv2 .agt-sub-loc .agt-ic { width: 22px; height: 22px; flex: 0 0 22px; }
    .alv2 .agt-sub-ref { font-size: 16px; padding: 6px 14px; letter-spacing: .04em; }
    /* Etiquetas sobre la foto (EXCLUSIVO, OFERTA...) mas grandes y pill-shape. */
    .alv2 .agt-badge { font-size: 13.5px; padding: calc(6px + .096em) 12px calc(6px - .096em); border-radius: 999px; letter-spacing: .05em; }
    .alv2 .agt-badges { gap: 8px; }
    /* Precio: lo mas importante, mucho mas visible */
    .alv2 .agt-price { font-size: 23px; padding: 9px 18px; }
    .alv2 .agt-price small { font-size: 15px; }
    .alv2 .agt-price .agt-price-old { font-size: 13px; }
    /* Hero standard (3 items) */
    .alv2 .agt-hero-num { font-size: 22px; }
    .alv2 .agt-hero-num small { font-size: 13px; }
    .alv2 .agt-hero-label { font-size: 12px; }
    .alv2 .agt-hero-top .agt-ic { width: 30px; height: 30px; flex: 0 0 30px; }
    /* Hero compacto (4 items con parcela) */
    .alv2 .agt-hero--compact .agt-hero-num { font-size: 19px; }
    .alv2 .agt-hero--compact .agt-hero-num small { font-size: 12px; }
    .alv2 .agt-hero--compact .agt-hero-label { font-size: 11px; }
    .alv2 .agt-hero--compact .agt-hero-top .agt-ic { width: 25px; height: 25px; flex: 0 0 25px; }
    /* Tags (extras): garage, piscina, etc */
    .alv2 .agt-extra { font-size: 15.5px; padding: 7px 14px; }
    .alv2 .agt-extra .agt-ic { width: 21px; height: 21px; flex: 0 0 21px; }
    /* Contador y flechas un poco mas grandes para touch */
    .alv2 .agt-counter { font-size: 14.5px; padding: 6px 13px; }
}
/* Fix buscador i18n 2026-05-24: en EN/HL/NO el CSS del template Elementor
   (post-3617110, 5376, 5387) define .divprincipal-XX .selectstyle-XX { width:49% }
   despues del media query, ganando por orden. Eso pone Tipo+Localidad en una sola
   linea (50%+50%), distinto al diseño espanol donde cada selector ocupa una linea.
   Forzamos 100% con mayor especificidad (id del form) para equiparar al ES. */
/* Fix 2026-05-26: forzar .selectstyle-XX (Tipo/Localidad/Precio min/max) a
   width 100% en EN/HL/NO para igualar al diseño ES (cada selector ocupa una
   fila propia; las cards mas estrechas cortaban "No minimum" -> "No minimur"
   y "Select..." se salia del wrapper visualmente). Excluimos .select2style-XX
   (Habitaciones/Banos) que conservan su 49% del sub-row de 2 columnas. */
@media (max-width: 992px) {
    html body #filtro-propiedades-form-en .divprincipal-en > .selectstyle-en,
    html body #filtro-propiedades-form-hl .divprincipal-hl > .selectstyle-hl,
    html body #filtro-propiedades-form-no .divprincipal-no > .selectstyle-no {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* Igualar ancho de .select2style (Habitaciones/Banos) con .selectstyle
   (Tipo/Localidad/Precios) para que ocupen el mismo 49% en el sub-row de
   2 columnas. Sin esto, los .select2style salen estrechos por su ancho
   intrinseco mas pequeno. El .divprincipal usa flex-wrap+gap:4px. En EN/HL/NO
   las clases tienen sufijo de idioma (.select2style-en, etc.). */
#filtro-propiedades-form .divprincipal > .select2style,
#filtro-propiedades-form-en .divprincipal-en > .select2style-en,
#filtro-propiedades-form-hl .divprincipal-hl > .select2style-hl,
#filtro-propiedades-form-no .divprincipal-no > .select2style-no {
    width: 49% !important;
    flex: 0 1 49% !important;
    box-sizing: border-box !important;
}
/* Y el select nativo dentro debe ocupar el 100% del wrapper */
#filtro-propiedades-form .select2style > select,
#filtro-propiedades-form-en .select2style-en > select,
#filtro-propiedades-form-hl .select2style-hl > select,
#filtro-propiedades-form-no .select2style-no > select {
    width: 100% !important;
    box-sizing: border-box !important;
}

/* === Rediseno botones buscador 2026-05-24 ===
   Damos mas relevancia visual al boton BUSCAR/SEARCH (mas grande, color
   corporativo, icono de lupa) y bajamos visualmente a LIMPIAR/RESET
   (estilo ghost). Sobrescribe el CSS de los formularios (en astra-child)
   con mayor especificidad gracias al #id del form. */
#filtro-propiedades-form button[type="submit"],
#filtro-propiedades-form-en button[type="submit"],
#filtro-propiedades-form-hl button[type="submit"],
#filtro-propiedades-form-no button[type="submit"] {
    background: #0e3a66 !important;
    color: #fff !important;
    padding: 11px 20px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    border: none !important;
    border-radius: 8px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    margin-right: 8px !important;
    box-shadow: 0 2px 6px rgba(14,58,102,0.25) !important;
    cursor: pointer !important;
    transition: background .2s, transform .15s, box-shadow .2s !important;
    min-width: 130px !important;
    text-transform: uppercase;
    vertical-align: middle !important;
}
#filtro-propiedades-form button[type="submit"]:hover,
#filtro-propiedades-form-en button[type="submit"]:hover,
#filtro-propiedades-form-hl button[type="submit"]:hover,
#filtro-propiedades-form-no button[type="submit"]:hover {
    background: #1976a4 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 14px rgba(14,58,102,0.4) !important;
}
/* Icono lupa SVG inline via ::before */
#filtro-propiedades-form button[type="submit"]::before,
#filtro-propiedades-form-en button[type="submit"]::before,
#filtro-propiedades-form-hl button[type="submit"]::before,
#filtro-propiedades-form-no button[type="submit"]::before {
    content: '';
    display: inline-block;
    width: 18px; height: 18px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><path d='m21 21-3.5-3.5'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
}
/* Boton LIMPIAR/RESET: estilo ghost secundario */
#filtro-propiedades-form button[type="reset"],
#filtro-propiedades-form-en button[type="reset"],
#filtro-propiedades-form-hl button[type="reset"],
#filtro-propiedades-form-no button[type="reset"] {
    background: transparent !important;
    color: #0c3f6f !important;
    padding: 11px 16px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    border: none !important;
    border-radius: 0 !important;
    cursor: pointer !important;
    transition: color .15s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    vertical-align: middle !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}
#filtro-propiedades-form button[type="reset"]:hover,
#filtro-propiedades-form-en button[type="reset"]:hover,
#filtro-propiedades-form-hl button[type="reset"]:hover,
#filtro-propiedades-form-no button[type="reset"]:hover {
    background: transparent !important;
    color: #0a2a4c !important;
}

/* Mas Opciones como link 2026-05-24: dejar #btn-mas-filtros como texto
   subrayado (estilo enlace), no como boton. Aplica a los 4 idiomas. */
#btn-mas-filtros,
#btn-mas-filtros-en,
#btn-mas-filtros-hl,
#btn-mas-filtros-no {
    background: transparent !important;
    color: var(--agt-primary, #1976a4) !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 6px 0 !important;
    margin: 10px 0 0 !important;
    font-size: 14px !important;
    font-weight: 600 !important;
    text-transform: none !important;
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    box-shadow: none !important;
    cursor: pointer !important;
    letter-spacing: normal !important;
    min-width: 0 !important;
    display: inline-block !important;
}
#btn-mas-filtros:hover,
#btn-mas-filtros-en:hover,
#btn-mas-filtros-hl:hover,
#btn-mas-filtros-no:hover {
    background: transparent !important;
    color: #0e3a66 !important;
    text-decoration-thickness: 2px !important;
    transform: none !important;
}

/* Fix placeholder select2 2026-05-24: el CSS del template Elementor
   (post-3617110.css, ingles) tiene una regla con !important que pone
   margin-top: -21px al select2-search__field, descolocando el placeholder
   'Select...' fuera del cuadro. Lo normalizamos para los 4 idiomas. */
#filtro-propiedades-form .select2-container .select2-search--inline .select2-search__field,
#filtro-propiedades-form-en .select2-container .select2-search--inline .select2-search__field,
#filtro-propiedades-form-hl .select2-container .select2-search--inline .select2-search__field,
#filtro-propiedades-form-no .select2-container .select2-search--inline .select2-search__field {
    margin-top: 5px !important;
    margin-bottom: 0 !important;
    margin-left: 5px !important;
}
/* Tambien el rendered ul: en EN tiene un margin-left de 48px que descoloca.
   Lo normalizamos. */
#filtro-propiedades-form .select2-selection__rendered,
#filtro-propiedades-form-en .select2-selection__rendered,
#filtro-propiedades-form-hl .select2-selection__rendered,
#filtro-propiedades-form-no .select2-selection__rendered {
    margin: 0 !important;
    padding: 0 8px !important;
}

/* Igualar alto del select2 (Tipo/Localidad) al de los <select> nativos
   (Habitaciones, Banos, Precio min/max = 50px). select2 multi tiene un
   layout particular: .select2-search--inline es HERMANO de
   .select2-selection__rendered (no hijo). Solucion: flex + align-items en
   el contenedor principal para alinear UL+SPAN+TEXTAREA verticalmente. */
#filtro-propiedades-form .select2-container .select2-selection--multiple,
#filtro-propiedades-form-en .select2-container .select2-selection--multiple,
#filtro-propiedades-form-hl .select2-container .select2-selection--multiple,
#filtro-propiedades-form-no .select2-container .select2-selection--multiple,
#filtro-propiedades-form .select2-container .select2-selection--single,
#filtro-propiedades-form-en .select2-container .select2-selection--single,
#filtro-propiedades-form-hl .select2-container .select2-selection--single,
#filtro-propiedades-form-no .select2-container .select2-selection--single {
    display: flex !important;
    align-items: center !important;
    flex-wrap: wrap !important;
    min-height: 50px !important;
    height: 50px !important;
    padding: 0 8px !important;
    box-sizing: border-box !important;
    line-height: normal !important;
}
#filtro-propiedades-form .select2-container .select2-selection--multiple .select2-selection__rendered,
#filtro-propiedades-form-en .select2-container .select2-selection--multiple .select2-selection__rendered,
#filtro-propiedades-form-hl .select2-container .select2-selection--multiple .select2-selection__rendered,
#filtro-propiedades-form-no .select2-container .select2-selection--multiple .select2-selection__rendered {
    padding: 0 !important;
    margin: 0 !important;
    line-height: normal !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 0 0 auto !important;
}
#filtro-propiedades-form .select2-container .select2-selection--multiple .select2-search--inline,
#filtro-propiedades-form-en .select2-container .select2-selection--multiple .select2-search--inline,
#filtro-propiedades-form-hl .select2-container .select2-selection--multiple .select2-search--inline,
#filtro-propiedades-form-no .select2-container .select2-selection--multiple .select2-search--inline {
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    flex: 1 1 auto !important;
    line-height: normal !important;
}
#filtro-propiedades-form .select2-container .select2-selection--multiple .select2-search__field,
#filtro-propiedades-form-en .select2-container .select2-selection--multiple .select2-search__field,
#filtro-propiedades-form-hl .select2-container .select2-selection--multiple .select2-search__field,
#filtro-propiedades-form-no .select2-container .select2-selection--multiple .select2-search__field {
    margin: 0 !important;
    height: 36px !important;
    line-height: 36px !important;
    padding: 0 !important;
    vertical-align: middle !important;
    width: 100% !important;
    min-width: 0 !important;
}
/* Los choice/chips de select2-multi (cuando hay seleccion) */
#filtro-propiedades-form .select2-container .select2-selection--multiple .select2-selection__choice,
#filtro-propiedades-form-en .select2-container .select2-selection--multiple .select2-selection__choice,
#filtro-propiedades-form-hl .select2-container .select2-selection--multiple .select2-selection__choice,
#filtro-propiedades-form-no .select2-container .select2-selection--multiple .select2-selection__choice {
    margin: 0 4px 0 0 !important;
    vertical-align: middle !important;
}

/* No marcar la primera opcion como "preseleccionada" al abrir el dropdown.
   select2 marca el primer item con aria-selected="true" + highlighted al abrir,
   dando la impresion visual de que ya esta seleccionado (azul de marca). En
   nuestro buscador multi, los items seleccionados se ven como chips ARRIBA,
   asi que el fondo en el dropdown sobra. Solo aplicamos color al hover REAL
   del mouse o al focus por teclado. */
.select2-container .select2-results__option[aria-selected="true"],
.select2-container .select2-results__option--highlighted,
.select2-container .select2-results__option--selectable[aria-selected="true"] {
    background-color: transparent !important;
    color: inherit !important;
    font-weight: normal !important;
}
/* === Toggle group de Operacion (botones segmentados) ===
   Transforma los 2 radios nativos del .styleradio en un toggle group de 3
   botones (Venta/Alquiler/Traspaso). El input radio se oculta visualmente
   pero queda en el form para que el submit envie name="keyacci". */
.alv2-op-toggle {
    display: inline-flex;
    border: 1.5px solid #0c3f6f;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
    width: 100%;
    max-width: 640px;
    box-sizing: border-box;
}
/* En movil: layout 2x2 con flex-wrap (los 4 botones en 2 filas de 2) */
@media (max-width: 600px) {
    .alv2-op-toggle {
        max-width: 100%;
        flex-wrap: wrap;
    }
    .alv2-op-toggle .alv2-op-btn {
        flex: 1 1 50% !important;
        padding: 12px 6px;
        font-size: 13px;
        letter-spacing: 0;
        min-height: 46px;
        border-bottom: 1.5px solid #0c3f6f;
    }
    .alv2-op-toggle .alv2-op-btn:nth-child(2) {
        border-right: none;
    }
    .alv2-op-toggle .alv2-op-btn:nth-child(3),
    .alv2-op-toggle .alv2-op-btn:nth-child(4) {
        border-bottom: none;
    }
}
.alv2-op-toggle .alv2-op-btn {
    flex: 1 1 0 !important;
    padding: 12px 16px 12px 22px !important;
    margin: 0 !important;
    cursor: pointer !important;
    text-align: left !important;
    font-weight: 600 !important;
    font-size: 15px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    color: #0c3f6f;
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease;
    border-right: 1.5px solid #0c3f6f;
    user-select: none !important;
    line-height: 1 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: flex-start !important;
    min-height: 44px !important;
    box-sizing: border-box !important;
    gap: 14px !important;
    flex-direction: row !important;
}
.alv2-op-toggle .alv2-op-btn:last-child {
    border-right: none;
}
.alv2-op-toggle .alv2-op-btn .alv2-op-ico { display: inline-flex !important; align-items: center !important; justify-content: center !important; width: 22px !important; height: 22px !important; flex-shrink: 0 !important; align-self: center !important; line-height: 1 !important; margin: 0 !important; padding: 0 !important; }
.alv2-op-toggle .alv2-op-btn .alv2-op-ico svg { width: 100% !important; height: 100% !important; stroke: currentColor !important; display: block !important; }
.alv2-op-toggle .alv2-op-btn { gap: 14px !important; }
.alv2-op-toggle .alv2-op-btn .alv2-op-txt { display: inline-flex !important; align-items: center !important; align-self: center !important; line-height: 1 !important; margin: 0 !important; padding: 0 !important; height: 22px !important; }
@media (max-width: 600px) {
    .styleradio .alv2-op-toggle .alv2-op-btn,
    .styleradio-en .alv2-op-toggle .alv2-op-btn,
    .styleradio-hl .alv2-op-toggle .alv2-op-btn,
    .styleradio-no .alv2-op-toggle .alv2-op-btn,
    .alv2-op-toggle .alv2-op-btn { flex: 1 1 50% !important; max-width: 50% !important; gap: 12px !important; padding: 10px 8px 10px 14px !important; justify-content: flex-start !important; }
    .alv2-op-toggle .alv2-op-btn .alv2-op-ico { width: 20px !important; height: 20px !important; }
    .alv2-op-toggle .alv2-op-btn .alv2-op-txt { font-size: 12.5px !important; line-height: 1 !important; height: 20px !important; }
}
.alv2-op-toggle .alv2-op-btn input[type="radio"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0 !important;
}
.alv2-op-toggle .alv2-op-btn.is-active {
    background: #0c3f6f;
    color: #ffffff;
}
.alv2-op-toggle .alv2-op-btn:not(.is-active):hover {
    background: rgba(12, 63, 111, 0.08);
}

/* === Formulario VACACIONAL === */
.alv2-vac-form { display: flex; flex-direction: column; gap: 14px; padding: 14px 0 0; }
.alv2-vac-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.alv2-vac-row-main { grid-template-columns: 1fr 1fr 2fr !important; gap: 14px; }
@media (max-width: 768px) {
    .alv2-vac-row-main { grid-template-columns: 1fr 1fr !important; }
    .alv2-vac-row-main .alv2-vac-daterange-field { grid-column: 1 / -1; }
}
.alv2-vac-field { display: flex; flex-direction: column; gap: 6px; margin: 0; }
.alv2-vac-lbl {
    font-weight: 700; font-size: 19px; color: rgba(0,0,0,0.65);
}
.alv2-vac-lbl-dates {
    font-size: 19px; color: rgba(0,0,0,0.65);
}
/* Wrapper del campo con icono DENTRO (estilo del resto del buscador) */
.alv2-vac-input-wrap {
    position: relative;
    display: block;
    width: 100%;
}
.alv2-vac-input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    color: #0c3f6f;
    pointer-events: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.alv2-vac-input-icon svg { width: 100%; height: 100%; }
.alv2-vac-input-wrap select,
.alv2-vac-input-wrap input[type="text"] {
    padding-left: 48px !important;
}
.alv2-vac-field select,
.alv2-vac-field input[type="date"],
.alv2-vac-field input[type="text"] {
    height: 50px; padding: 0 12px; background: #f8fafc;
    border: 1px solid #cbd5e1; border-radius: 6px;
    font-size: 19px; color: #0c3f6f; font-family: inherit;
    box-sizing: border-box; width: 100%;
}
.alv2-vac-daterange { cursor: pointer; font-size: 19px !important; font-weight: 500 !important; }
.alv2-vac-daterange-field .alv2-vac-lbl { font-size: 19px; }
.alv2-vac-flexible {
    display: inline-flex; align-items: center; gap: 14px;
    font-size: 17px; font-weight: 600; color: #1f2937; cursor: pointer; user-select: none;
    padding: 10px 0; margin-top: 6px;
}
.alv2-vac-flexible input[type="checkbox"] {
    width: 20px; height: 20px; accent-color: #0c3f6f; margin: 0; flex-shrink: 0;
}
.alv2-vac-flexible > span { margin-left: 6px; }
.alv2-vac-min-noches { font-size: 15px; color: #475569; margin-top: 8px; font-style: italic; font-weight: 500; }
.alv2-vac-noches { display: inline-block; padding: 8px 14px; margin-top: 8px; background: rgba(12, 63, 111, 0.08); color: #0c3f6f; font-size: 15px; font-weight: 600; border-radius: 6px; border-left: 3px solid #0c3f6f; }
.alv2-vac-cta { margin-top: 16px; padding: 14px 18px; background: rgba(14, 165, 233, 0.08); border: 1px solid rgba(14, 165, 233, 0.25); border-radius: 8px; font-size: 14.5px; color: #0c3f6f; line-height: 1.45; text-align: center; display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap; }
.alv2-vac-cta-ico { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; flex-shrink: 0; color: #0ea5e9; }
.alv2-vac-cta-ico svg { width: 100%; height: 100%; stroke: currentColor; }
.alv2-vac-cta a { color: #0ea5e9; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.alv2-vac-cta a:hover { color: #0284c7; text-decoration: none; }
.alv2-vac-error { background: #fee2e2; color: #991b1b; padding: 10px 14px; border-radius: 6px; border-left: 4px solid #dc2626; font-size: 14px; font-weight: 500; }
.alv2-vac-actions { display: flex; gap: 12px; margin-top: 8px; }
.alv2-vac-buscar {
    display: inline-flex !important; align-items: center !important; justify-content: center !important; gap: 8px !important;
    padding: 11px 20px !important; font-size: 15px !important; font-weight: 700 !important;
    text-transform: uppercase !important; letter-spacing: 0.04em !important;
    border-radius: 8px !important; cursor: pointer !important;
    transition: background .2s, transform .15s, box-shadow .2s !important;
    border: none !important; font-family: inherit !important;
    background: #0e3a66 !important; color: #ffffff !important;
    box-shadow: 0 2px 6px rgba(14,58,102,0.25) !important;
    min-width: 130px !important;
}
.alv2-vac-buscar:hover { background: #1976a4 !important; transform: translateY(-1px) !important; box-shadow: 0 4px 14px rgba(14,58,102,0.4) !important; }
.alv2-vac-limpiar {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 11px 16px; font-size: 15px; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.5px;
    border-radius: 0; cursor: pointer;
    transition: color .15s ease; border: none; font-family: inherit;
}
.alv2-vac-limpiar { background: transparent; color: #475569; border-color: #cbd5e1; }
.alv2-vac-limpiar:hover { background: #f1f5f9; border-color: #94a3b8; color: #0f172a; }
.alv2-vac-limpiar:focus, .alv2-vac-limpiar:focus-visible { outline: none !important; background: transparent !important; color: #475569 !important; border-color: #cbd5e1 !important; box-shadow: none !important; }
.alv2-vac-limpiar:active { background: transparent !important; color: #475569 !important; border-color: #cbd5e1 !important; }
@media (max-width: 600px) { .alv2-vac-row { grid-template-columns: 1fr; } }
/* 4o boton del toggle (Vacacional) en azul cyan/sky para distinguirlo del azul de marca */
.alv2-op-toggle .alv2-op-btn-vacacional.is-active {
    background: #0ea5e9 !important;
    color: #ffffff !important;
}

/* === Tipo de propiedad: dropdown agrupado (drill-down) === */
.select2-container--default .select2-results__options.alv2-tipo-drilldown { padding: 4px 0; }
/* Vista groups del drilldown (4 grupos + posible APLICAR): sin max-height para que
   quepa todo sin barra de scroll. */
.select2-results__options.alv2-tipo-drilldown:not(.alv2-tipo-subview),
.select2-container--open .select2-results__options.alv2-tipo-drilldown:not(.alv2-tipo-subview) {
    max-height: none !important;
    overflow-y: visible !important;
}
/* Subview del drilldown (Casas/Apartamentos/Parcelas/Otros): ampliamos el largo
   por encima del default de select2 (200px) para que quepan más subopciones.
   min(60vh, 540px) → 540px en desktop, ~60% del viewport en móvil. */
.select2-results__options.alv2-tipo-drilldown.alv2-tipo-subview,
.select2-container--open .select2-results__options.alv2-tipo-drilldown.alv2-tipo-subview {
    max-height: min(85vh, 700px) !important;
}
/* === SWITCHER POLYLANG — ocultar <a> clonado por SmartMenus en fichas =====
   SmartMenus de Elementor CLONA el <a> del switcher en fichas/contextos, dejando
   un <a href="#"> vacío con sub-arrow + el real <a href="#pll_switcher"> con
   bandera y texto. Resultado visible: caret-down extra. Fix universal a TODOS
   los viewports — IMPORTANTE colocarlo FUERA de cualquier @media. */
.pll-parent-menu-item > a[href$="#"]:not([href*="pll_switcher"]) {
    display: none !important;
}
/* === Ocultar widget mini language-switcher independiente de la ficha ============
   Widget Elementor 'd627777' con shortcode personalizado 'mi-language-switcher'
   (visible en header mobile de la ficha como un <select> con emoji + 'ES'/'EN'...).
   Redundante porque el switcher oficial de Polylang ya está en el menú hamburger. */
.elementor-element-d627777,
.mi-language-switcher-desktop,
.mi-language-switcher-mobile {
    display: none !important;
}
.alv2-tipo-drilldown .alv2-tipo-grupo { display: flex !important; align-items: center !important; justify-content: space-between !important; padding: 14px 18px !important; font-size: 16px !important; font-weight: 700 !important; color: #0c3f6f !important; background: transparent !important; border-bottom: 1px solid rgba(12, 63, 111, 0.08) !important; cursor: pointer !important; text-transform: uppercase !important; letter-spacing: 0.4px !important; }
.alv2-tipo-drilldown .alv2-tipo-grupo:last-child { border-bottom: none !important; }
@media (hover: hover) and (pointer: fine) { .alv2-tipo-drilldown .alv2-tipo-grupo:hover { background: rgba(12, 63, 111, 0.08) !important; } }
.alv2-tipo-drilldown .alv2-tipo-chev { font-size: 22px; color: #0c3f6f; line-height: 1; opacity: 0.6; }
.alv2-tipo-drilldown .alv2-tipo-grupo-right { display: inline-flex; align-items: center; gap: 10px; }
.alv2-tipo-drilldown .alv2-tipo-grupo-cnt { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; background: #0c3f6f; color: #ffffff; border-radius: 12px; font-size: 13px; font-weight: 700; line-height: 1; }
.alv2-tipo-drilldown .alv2-tipo-aplicar { display: flex !important; align-items: center !important; justify-content: center !important; padding: 16px 18px !important; margin: 10px 12px 8px !important; background: #0c3f6f !important; color: #ffffff !important; border-radius: 8px !important; font-size: 16px !important; font-weight: 700 !important; text-transform: uppercase !important; letter-spacing: 0.5px !important; cursor: pointer !important; box-shadow: 0 2px 6px rgba(12, 63, 111, 0.25) !important; transition: background 0.15s ease !important; border-bottom: none !important; }
@media (hover: hover) and (pointer: fine) { .alv2-tipo-drilldown .alv2-tipo-aplicar:hover { background: #0a2a4c !important; } }
.alv2-tipo-drilldown .alv2-tipo-aplicar-label { line-height: 1 !important; }
/* Botón BUSCAR más grande SOLO en desktop (>=993px) — más prominente como CTA principal.
   En móvil mantiene su tamaño compacto actual. Aplica a los 4 idiomas. */
@media (min-width: 993px) {
    #filtro-propiedades-form button[type="submit"],
    #filtro-propiedades-form-en button[type="submit"],
    #filtro-propiedades-form-hl button[type="submit"],
    #filtro-propiedades-form-no button[type="submit"] {
        padding: 16px 36px !important;
        font-size: 18px !important;
        font-weight: 700 !important;
        min-width: 200px !important;
        letter-spacing: 0.6px !important;
        box-shadow: 0 3px 10px rgba(14, 58, 102, 0.3) !important;
    }
    #filtro-propiedades-form button[type="submit"]:hover,
    #filtro-propiedades-form-en button[type="submit"]:hover,
    #filtro-propiedades-form-hl button[type="submit"]:hover,
    #filtro-propiedades-form-no button[type="submit"]:hover {
        box-shadow: 0 5px 18px rgba(14, 58, 102, 0.45) !important;
    }
    /* Tabs COSTA BLANCA / OTROS en desktop: texto más grande pero altura compacta.
       'html body' aumenta specificity para ganar a la regla mobile (declarada después en código). */
    html body .alv2-localidad-open .alv2-loc-tab {
        font-size: 15px !important;
        padding: 10px 12px !important;
        letter-spacing: 0.4px !important;
    }
    /* CTA Vacacional '¿No conoces nuestros apartamentos...?' — más grande en desktop. */
    .alv2-vac-cta,
    .alv2-vac-cta-block,
    .alv2-vac-cta-text {
        font-size: 17px !important;
        line-height: 1.5 !important;
    }
    .alv2-vac-cta-block { padding: 18px 22px !important; }
    .alv2-vac-cta-icon svg, .alv2-vac-cta-palm { width: 28px !important; height: 28px !important; }
        /* Buscar por referencia: wrapper limitado a 1 columna (~49%) + input al 100% del wrapper
       para tener el mismo ancho visual que Tipo/Localidad/Habitaciones/Baños/Precio. */
    #filtro-propiedades-form .alv2-ref-block,
    #filtro-propiedades-form-en .alv2-ref-block,
    #filtro-propiedades-form-hl .alv2-ref-block,
    #filtro-propiedades-form-no .alv2-ref-block {
        max-width: 49% !important;
        width: 49% !important;
        box-sizing: border-box !important;
    }
    #filtro-propiedades-form input[name="referencia"],
    #filtro-propiedades-form-en input[name="referencia"],
    #filtro-propiedades-form-hl input[name="referencia"],
    #filtro-propiedades-form-no input[name="referencia"] {
        width: 100% !important;
        max-width: none !important;
        box-sizing: border-box !important;
    }
}
.alv2-form-buttons-row { display: flex !important; align-items: center !important; gap: 14px !important; flex-wrap: wrap !important; }
.alv2-form-buttons-row[data-alv2-vac-hidden="1"] { display: none !important; }
/* Tabs Costa Blanca / Otros en la parte superior del dropdown Localidad */
.alv2-localidad-open .select2-results__option.alv2-loc-tabs {
    display: flex !important;
    padding: 0 !important;
    text-transform: none !important;
    background: rgba(12, 63, 111, 0.04) !important;
    border-bottom: 1px solid rgba(12, 63, 111, 0.18) !important;
    cursor: default !important;
    color: inherit !important;
}
.alv2-localidad-open .select2-results__option.alv2-loc-tabs:hover,
.alv2-localidad-open .select2-results__option.alv2-loc-tabs.select2-results__option--highlighted {
    background: rgba(12, 63, 111, 0.04) !important;
}
.alv2-localidad-open .select2-results__option.alv2-loc-tabs::before,
.alv2-localidad-open .select2-results__option.alv2-loc-tabs::after {
    display: none !important;
    content: none !important;
}
.alv2-localidad-open .alv2-loc-tab {
    flex: 1 1 50% !important;
    padding: 14px 4px !important;
    text-align: center !important;
    font-size: 12px !important;
    font-weight: 700 !important;
    color: #64748b !important;
    text-transform: uppercase !important;
    letter-spacing: 0 !important;
    cursor: pointer !important;
    border-bottom: 3px solid transparent !important;
    transition: all 0.15s ease !important;
    user-select: none !important;
    -webkit-user-select: none !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
.alv2-localidad-open .alv2-loc-tab.is-active {
    color: #0c3f6f !important;
    border-bottom-color: #0c3f6f !important;
    background: #ffffff !important;
}
@media (hover: hover) and (pointer: fine) { .alv2-localidad-open .alv2-loc-tab:hover:not(.is-active) {
    color: #0c3f6f !important;
    background: rgba(255,255,255,0.5) !important;
} }
.select2-container--open .alv2-localidad-open .select2-results__option,
.alv2-localidad-open .select2-results__option { text-transform: uppercase !important; padding-left: 46px !important; position: relative !important; }
.alv2-localidad-open .select2-results__option::before { content: '' !important; position: absolute !important; left: 14px !important; top: 50% !important; transform: translateY(-50%) !important; width: 20px !important; height: 20px !important; border: 1.5px solid #cbd5e1 !important; border-radius: 4px !important; background: #ffffff !important; box-sizing: border-box !important; }
.alv2-localidad-open .select2-results__option.alv2-loc-checked::before { background: #0c3f6f !important; border-color: #0c3f6f !important; }
.alv2-localidad-open .select2-results__option.alv2-loc-checked::after { content: '✓' !important; position: absolute !important; left: 14px !important; top: 50% !important; transform: translateY(-50%) !important; width: 20px !important; height: 20px !important; display: flex !important; align-items: center !important; justify-content: center !important; color: #ffffff !important; font-size: 14px !important; font-weight: 700 !important; line-height: 1 !important; }
/* Options seleccionadas: bg transparente (se distinguen por el checkbox marcado), no se confunden con hover */
.alv2-localidad-open .select2-results__option.alv2-loc-checked { background: rgba(12, 63, 111, 0.12) !important; color: #0c3f6f !important; font-weight: 600 !important; }
/* Hover: bg gris suave para distinguir del seleccionado */
@media (hover: hover) and (pointer: fine) { .alv2-localidad-open .select2-results__option--highlighted { background: rgba(12, 63, 111, 0.08) !important; color: #0c3f6f !important; } }
@media (hover: hover) and (pointer: fine) { .alv2-localidad-open .select2-results__option.alv2-loc-checked.select2-results__option--highlighted { background: rgba(12, 63, 111, 0.18) !important; } }
/* Localidad: ampliamos el largo para que se vean las 13 localidades (635px) sin
   barra de scroll cuando la pantalla lo permite. min(85vh, 700px). */
.alv2-localidad-open .select2-results__options,
.select2-container--open .alv2-localidad-open .select2-results__options {
    max-height: min(85vh, 700px) !important;
}
.alv2-tipo-drilldown.alv2-tipo-subview { padding: 0; }
/* Sticky: VOLVER y SELECCIONAR TODOS se mantienen pegados arriba al scrollear.
   VOLVER en top:0; SELALL justo debajo (~56px que es la altura aprox del VOLVER). */
html body .alv2-tipo-drilldown .alv2-tipo-back {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
}
html body .alv2-tipo-drilldown .alv2-tipo-selall {
    position: sticky !important;
    top: 56px !important;
    z-index: 9 !important;
}
.alv2-tipo-drilldown .alv2-tipo-back { padding: 16px 18px !important; font-size: 18px !important; font-weight: 700 !important; color: #ffffff !important; background: #0c3f6f !important; cursor: pointer !important; border-bottom: 2px solid #0a2a4c !important; letter-spacing: 0.5px !important; text-transform: uppercase !important; display: flex !important; align-items: center !important; gap: 6px !important; }
@media (hover: hover) and (pointer: fine) { .alv2-tipo-drilldown .alv2-tipo-back:hover { background: #0a2a4c !important; color: #ffffff !important; } }
.alv2-tipo-drilldown .alv2-tipo-selall { padding: 14px 18px !important; font-size: 16px !important; font-weight: 700 !important; color: #0c3f6f !important; background: #eef2f6 !important; border-bottom: 1px dashed rgba(12, 63, 111, 0.18) !important; cursor: pointer !important; text-transform: uppercase !important; letter-spacing: 0.3px !important; display: flex !important; align-items: center !important; gap: 10px !important; }
/* SELALL: blindar el bg sutil contra el :hover global de select2 (mismo caso que VOLVER) */
html body .alv2-tipo-drilldown .alv2-tipo-selall,
html body .alv2-tipo-drilldown .alv2-tipo-selall:hover,
html body .alv2-tipo-drilldown .alv2-tipo-selall.select2-results__option--highlighted,
html body .alv2-tipo-drilldown .alv2-tipo-selall.select2-results__option--highlighted:hover,
html body .alv2-tipo-drilldown .alv2-tipo-selall:active,
html body .alv2-tipo-drilldown .alv2-tipo-selall:focus,
html body .alv2-tipo-drilldown .alv2-tipo-selall:focus-visible {
    background: #eef2f6 !important;
    background-color: #eef2f6 !important;
    color: #0c3f6f !important;
}
.alv2-tipo-drilldown .alv2-tipo-selall-icon { flex-shrink: 0 !important; opacity: 0.85 !important; }
/* .alv2-tipo-selall.is-on: mismo color que sin clase (sin rojo) */
@media (hover: hover) and (pointer: fine) { .alv2-tipo-drilldown .alv2-tipo-selall:hover { background: rgba(12, 63, 111, 0.1) !important; } }
.alv2-tipo-drilldown .alv2-tipo-item { display: flex !important; align-items: center !important; gap: 12px !important; padding: 14px 18px !important; font-size: 17px !important; font-weight: 500 !important; color: #0c3f6f !important; cursor: pointer !important; text-transform: uppercase !important; letter-spacing: 0.3px !important; }
@media (hover: hover) and (pointer: fine) { .alv2-tipo-drilldown .alv2-tipo-item:hover { background: rgba(12, 63, 111, 0.08) !important; } }
.alv2-tipo-drilldown .alv2-tipo-item.is-selected { background: rgba(12, 63, 111, 0.12) !important; font-weight: 600 !important; }
/* Neutralizar el auto-highlight de select2 + cualquier hover-fantasma en TOUCH.
   En táctil iOS/Android, tras un tap el :hover persiste sobre el item que ocupa la
   posición del dedo en la nueva vista. Solución: aplicar hover SOLO si hay puntero
   fino real (ratón en desktop). Items seleccionados (.is-selected) mantienen su bg. */
/* === SPECIFICITY MAXIMA + WebKit/iOS — anular bg fantasma del item tras tap === */
html body .alv2-tipo-drilldown .alv2-tipo-item:not(.is-selected),
html body .alv2-tipo-drilldown .alv2-tipo-item:not(.is-selected):active,
html body .alv2-tipo-drilldown .alv2-tipo-item:not(.is-selected):focus,
html body .alv2-tipo-drilldown .alv2-tipo-item:not(.is-selected):focus-visible,
html body .alv2-tipo-drilldown .alv2-tipo-item:not(.is-selected):focus-within,
html body .alv2-tipo-drilldown .alv2-tipo-grupo,
html body .alv2-tipo-drilldown .alv2-tipo-grupo:active,
html body .alv2-tipo-drilldown .alv2-tipo-grupo:focus,
html body .alv2-tipo-drilldown .alv2-tipo-grupo:focus-visible,
html body .alv2-tipo-drilldown .alv2-tipo-grupo:focus-within {
    background: transparent !important;
    background-color: transparent !important;
    background-image: none !important;
    outline: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}
html body .alv2-tipo-drilldown .alv2-tipo-item.is-selected {
    background: rgba(12, 63, 111, 0.12) !important;
    background-color: rgba(12, 63, 111, 0.12) !important;
}
/* iOS WebKit: tap-highlight transparente + sin user-select para evitar press-state visual */
html body .alv2-tipo-drilldown,
html body .alv2-tipo-drilldown * {
    -webkit-tap-highlight-color: rgba(0,0,0,0) !important;
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}
/* IMPORTANTE: usar transparent (no inherit, que heredaría el bg del padre). */
.alv2-tipo-drilldown .alv2-tipo-item.select2-results__option--highlighted:not(.is-selected),
.alv2-tipo-drilldown .alv2-tipo-grupo.select2-results__option--highlighted {
    background-color: transparent !important;
    background-image: none !important;
}
/* VOLVER mantiene SIEMPRE su fondo azul oscuro, incluso con :hover/--highlighted/etc.
   Imprescindible incluir :hover en la lista: en Chrome iOS algunos hardwares
   externos hacen que (hover: hover) sea TRUE, y el :hover global de select2
   .select2-container--default .select2-results__option:hover { bg rgba(12,63,111,.12) }
   pisaba el azul oscuro de VOLVER porque tiene mayor specificity. */
html body .alv2-tipo-drilldown .alv2-tipo-back,
html body .alv2-tipo-drilldown .alv2-tipo-back:hover,
html body .alv2-tipo-drilldown .alv2-tipo-back.select2-results__option--highlighted,
html body .alv2-tipo-drilldown .alv2-tipo-back.select2-results__option--highlighted:hover,
html body .alv2-tipo-drilldown .alv2-tipo-back:active,
html body .alv2-tipo-drilldown .alv2-tipo-back:focus,
html body .alv2-tipo-drilldown .alv2-tipo-back:focus-visible,
html body .alv2-tipo-drilldown .alv2-tipo-back:focus-within {
    background: #0c3f6f !important;
    background-color: #0c3f6f !important;
    background-image: none !important;
    color: #ffffff !important;
}
/* .alv2-tipo-selall mantiene su bg sutil propio cuando está highlighted */
.alv2-tipo-drilldown .alv2-tipo-selall.select2-results__option--highlighted {
    background-color: rgba(12, 63, 111, 0.04) !important;
    background-image: none !important;
}
/* iOS touch: desactivar el highlight nativo gris/azul que pinta el elemento
   bajo el dedo al hacer tap. */
.alv2-tipo-drilldown .alv2-tipo-grupo,
.alv2-tipo-drilldown .alv2-tipo-item,
.alv2-tipo-drilldown .alv2-tipo-selall,
.alv2-tipo-drilldown .alv2-tipo-back,
.alv2-tipo-drilldown .alv2-tipo-aplicar,
.alv2-localidad-open .select2-results__option,
.alv2-localidad-open .alv2-loc-tab {
    -webkit-tap-highlight-color: transparent !important;
    -webkit-touch-callout: none !important;
}
/* Tabs Costa Blanca / Otros: el highlighted tampoco debe sombrear */
.alv2-localidad-open .select2-results__option--highlighted:not(.alv2-loc-checked):not(.alv2-loc-tabs) {
    background: transparent !important;
}
.alv2-tipo-drilldown .alv2-tipo-chk { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border: 1.5px solid #cbd5e1; border-radius: 4px; background: #fff; flex-shrink: 0; font-size: 14px; color: #fff; font-weight: 700; }
.alv2-tipo-drilldown .alv2-tipo-item.is-selected .alv2-tipo-chk { background: #0c3f6f; border-color: #0c3f6f; }
#filtro-propiedades-form .select2-container .select2-selection--multiple .select2-selection__choice.alv2-chips-summary,
#filtro-propiedades-form-en .select2-container .select2-selection--multiple .select2-selection__choice.alv2-chips-summary,
#filtro-propiedades-form-hl .select2-container .select2-selection--multiple .select2-selection__choice.alv2-chips-summary,
#filtro-propiedades-form-no .select2-container .select2-selection--multiple .select2-selection__choice.alv2-chips-summary,
.select2-selection__choice.alv2-chips-summary { background: #e4e4e4 !important; color: rgba(0, 0, 0, 0.65) !important; border: 0.8px solid #aaaaaa !important; padding: 0 8px 0 8px !important; border-radius: 4px !important; font-size: 19px !important; font-weight: 400 !important; display: inline-flex !important; align-items: center !important; gap: 0 !important; margin: 3px 4px 3px -28px !important; cursor: default !important; line-height: 28px !important; }
.alv2-chips-summary .alv2-summary-remove + .alv2-summary-label { margin-left: 0 !important; }
.alv2-chips-summary .alv2-summary-remove { display: inline-flex !important; align-items: center !important; justify-content: center !important; width: auto !important; height: auto !important; background: transparent !important; cursor: pointer !important; font-size: 20px !important; line-height: 1 !important; font-weight: 400 !important; color: #999 !important; padding-right: 0 !important; }
.alv2-chips-summary .alv2-summary-remove:hover { background: transparent !important; color: #333 !important; }
.alv2-chips-summary .alv2-summary-label { line-height: 1 !important; }
/* Fix: el chip resumen 'N seleccionados' se cortaba con ellipsis porque heredaba
   max-width:100% + overflow:hidden + text-overflow:ellipsis de .select2-selection__choice.
   Anular esos límites para que se vea SIEMPRE completo. */
html body .alv2-chips-summary,
html body .alv2-chips-summary .alv2-summary-label {
    overflow: visible !important;
    text-overflow: clip !important;
    max-width: none !important;
    white-space: nowrap !important;
}

/* === Litepicker (CDN) === */
.litepicker { font-family: inherit !important; }
.litepicker .container__days .day-item.is-locked:not(.is-start-date):not(.is-end-date):not(.is-in-range) { color: #94a3b8 !important; cursor: not-allowed; background: transparent !important; box-shadow: none !important; }
/* Móvil: Litepicker compacto que no se desborda */
@media (max-width: 600px) {
    .litepicker { font-size: 0.9em !important; max-width: 100vw !important; }
    .litepicker .container__months { width: auto !important; max-width: calc(100vw - 24px) !important; }
    .litepicker .container__months .month-item { width: 100% !important; padding: 4px !important; }
    .litepicker { --litepicker-day-width: 38px; }
}
/* Reglas super específicas para start/end/in-range (ganan sobre .day-item global) */
.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date,
.litepicker .container__days .day-item.is-start-date.is-locked,
.litepicker .container__days .day-item.is-end-date.is-locked {
    background: #0c3f6f !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    cursor: pointer !important;
}
.litepicker .container__days .day-item.is-in-range {
    background: rgba(12, 63, 111, 0.15) !important;
    color: #0c3f6f !important;
    cursor: pointer !important;
}
.litepicker .container__days .day-item.is-locked:not(.is-start-date):not(.is-end-date):not(.is-in-range):hover { color: #94a3b8 !important; background: transparent !important; box-shadow: none !important; }
.litepicker .container__months .month-item-header > .month-item-name,
.litepicker .container__months .month-item-header > .month-item-year { font-weight: 700; color: #0c3f6f; }
.litepicker .container__days .day-item.is-start-date,
.litepicker .container__days .day-item.is-end-date,
.litepicker .container__days .day-item.is-start-date.is-end-date { background: #0c3f6f !important; color: #fff !important; }
.litepicker .container__days .day-item.is-in-range { background: rgba(12, 63, 111, 0.12) !important; color: #0c3f6f !important; }
.litepicker .container__days .day-item:hover { background: rgba(12, 63, 111, 0.18) !important; color: #0c3f6f !important; box-shadow: none !important; }
/* Resaltar fechas OPERATIVAS (seleccionables) vs no operativas (locked/pasadas) */
.litepicker .container__days .day-item {
    color: #0c3f6f !important;
    font-weight: 600 !important;
    font-size: 14px !important;
}
.litepicker .container__days .day-item.is-locked:not(.is-start-date):not(.is-end-date):not(.is-in-range),
.litepicker .container__days .day-item.is-locked.is-today:not(.is-start-date):not(.is-end-date):not(.is-in-range),
.litepicker .container__days .day-item[data-disabled]:not(.is-start-date):not(.is-end-date):not(.is-in-range),
.litepicker .container__days .day-item.is-disabled:not(.is-start-date):not(.is-end-date):not(.is-in-range) {
    color: #94a3b8 !important;
    font-weight: 400 !important;
    cursor: not-allowed !important;
    background: transparent !important;
}
.litepicker .container__days .day-item.is-today:not(.is-locked):not(.is-start-date):not(.is-end-date) {
    border: 1.5px solid #0c3f6f !important;
    border-radius: 4px !important;
}
.litepicker .container__days .day-item.is-locked:hover:not(.is-start-date):not(.is-end-date):not(.is-in-range) {
    background: transparent !important;
    cursor: not-allowed !important;
}
/* Espacio entre el label "Operacion:" y el toggle */
#filtro-propiedades-form .styleradio,
#filtro-propiedades-form-en .styleradio,
#filtro-propiedades-form-hl .styleradio,
#filtro-propiedades-form-no .styleradio {
    margin-bottom: 12px;
}

/* === Cards visuales para los checkboxes de "Mas opciones" (extras) ===
   Convierte los <label.extra-item> en cards clicables con icono SVG y
   estado activo en azul de marca. */
/* Por defecto: oculto. Solo visible cuando el boton "MAS OPCIONES" tiene .alv2-mas-open */
#mas-filtros, #mas-filtros-en, #mas-filtros-hl, #mas-filtros-no {
    display: none !important;
}
[id^="btn-mas-filtros"].alv2-mas-open ~ #mas-filtros,
[id^="btn-mas-filtros"].alv2-mas-open ~ #mas-filtros-en,
[id^="btn-mas-filtros"].alv2-mas-open ~ #mas-filtros-hl,
[id^="btn-mas-filtros"].alv2-mas-open ~ #mas-filtros-no {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
    gap: 10px !important;
    margin: 10px 0 16px !important;
}
[class*="extra-item"] {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 12px 14px !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    font-weight: 500 !important;
    font-size: 14.5px !important;
    color: #475569 !important;
    line-height: 1.2 !important;
    user-select: none !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
}
[class*="extra-item"]:hover {
    border-color: #0c3f6f !important;
    color: #0c3f6f !important;
    background: rgba(12, 63, 111, 0.04) !important;
}
[class*="extra-item"] input[type="checkbox"] {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 1px !important; height: 1px !important;
    margin: 0 !important;
}
[class*="extra-item"].alv2-extra-checked {
    border-color: #0c3f6f !important;
    background: rgba(12, 63, 111, 0.08) !important;
    color: #0c3f6f !important;
    font-weight: 600 !important;
}
[class*="extra-item"] .alv2-extra-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    color: #0c3f6f;
    flex: 0 0 auto;
}
[class*="extra-item"] .alv2-extra-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
[class*="extra-item"] .alv2-extra-text {
    flex: 1 1 auto;
    min-width: 0;
}

/* El campo "Sup. minima" (un .selectstyle dentro del grid #mas-filtros)
   se estiliza como UNA CARD MAS del grid, con el mismo aspecto que los .extra-item:
   borde, padding, font-size, font-weight igualados. El input dentro es compacto. */
#mas-filtros > .selectstyle,
#mas-filtros-en > .selectstyle-en,
#mas-filtros-hl > .selectstyle-hl,
#mas-filtros-no > .selectstyle-no {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 12px 14px !important;
    margin: 0 !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 8px !important;
    transition: all 0.15s ease !important;
    width: 100% !important;
    box-sizing: border-box !important;
    min-height: 48px !important;
    box-shadow: none !important;
}
#mas-filtros > .selectstyle:hover,
#mas-filtros-en > .selectstyle-en:hover,
#mas-filtros-hl > .selectstyle-hl:hover,
#mas-filtros-no > .selectstyle-no:hover {
    border-color: #0c3f6f !important;
}
#mas-filtros > .selectstyle > label,
#mas-filtros-en > .selectstyle-en > label,
#mas-filtros-hl > .selectstyle-hl > label,
#mas-filtros-no > .selectstyle-no > label {
    margin: 0 !important;
    white-space: nowrap !important;
    flex: 1 1 auto !important;
    font-weight: 500 !important;
    font-size: 14.5px !important;
    color: #475569 !important;
    line-height: 1.2 !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}
#mas-filtros > .selectstyle > label .alv2-fld-icon-inline,
#mas-filtros-en > .selectstyle-en > label .alv2-fld-icon-inline,
#mas-filtros-hl > .selectstyle-hl > label .alv2-fld-icon-inline,
#mas-filtros-no > .selectstyle-no > label .alv2-fld-icon-inline {
    width: 22px !important;
    height: 22px !important;
    color: #0c3f6f !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}
#mas-filtros > .selectstyle > label .alv2-fld-icon-inline svg,
#mas-filtros-en > .selectstyle-en > label .alv2-fld-icon-inline svg,
#mas-filtros-hl > .selectstyle-hl > label .alv2-fld-icon-inline svg,
#mas-filtros-no > .selectstyle-no > label .alv2-fld-icon-inline svg {
    width: 100% !important;
    height: 100% !important;
}
#mas-filtros > .selectstyle > input,
#mas-filtros-en > .selectstyle-en > input,
#mas-filtros-hl > .selectstyle-hl > input,
#mas-filtros-no > .selectstyle-no > input {
    flex: 0 0 70px !important;
    width: 70px !important;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    margin: 0 !important;
    background: #f8fafc !important;
    background-image: none !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 4px !important;
    font-size: 14px !important;
    text-align: center !important;
    box-sizing: border-box !important;
}
/* SUPER-especifico: forzar quitar el bg-image del input m_cons aunque el JS
   dinamico (alv2-bg-icon) lo reasigne inline. body + name + name aumenta especificidad. */
body input[name="m_cons"],
body input[name="m_cons_min"],
body input[name="m_cons_max"] {
    background-image: none !important;
    background: #f8fafc !important;
    padding-left: 8px !important;
}

/* === Boton X de eliminar seleccion (select2 clear) ===
   Por defecto select2 muestra un cuadrado azul claro brillante muy llamativo.
   Lo cambiamos a un boton circular sutil en azul de marca. */
.select2-container .select2-selection__clear {
    background: #0c3f6f !important;
    color: #ffffff !important;
    border: none !important;
    border-radius: 4px !important;
    width: 24px !important;
    height: 24px !important;
    line-height: 1 !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    text-align: center !important;
    text-indent: 0 !important;
    font-family: Arial, sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    margin: 0 !important;
    cursor: pointer !important;
    transition: all 0.15s ease !important;
    opacity: 1 !important;
    box-shadow: none !important;
    /* Centrar verticalmente respecto al campo */
    position: absolute !important;
    right: 10px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
    float: none !important;
    z-index: 2 !important;
}
/* Reservar espacio a la derecha en el rendered cuando hay clear (allowclear)
   y forzar altura 100% para que align-items:center centre los chips verticalmente. */
.select2-container .select2-selection--multiple .select2-selection__rendered {
    padding-right: 36px !important;
    height: 100% !important;
    min-height: 48px !important;
    align-items: center !important;
}
.select2-container .select2-selection--multiple .select2-selection__choice {
    align-self: center !important;
}
.select2-container .select2-selection__clear:hover {
    background: #0a2f53 !important;
    color: #ffffff !important;
    opacity: 1 !important;
}
.select2-container .select2-selection__clear span,
.select2-container .select2-selection__clear::after,
.select2-container .select2-selection__clear::before {
    color: inherit !important;
    background: transparent !important;
}

/* === Icono en el boton "MAS OPCIONES" del acordeon === */
[id^="btn-mas-filtros"] .alv2-mas-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    color: inherit;
    vertical-align: middle;
}
[id^="btn-mas-filtros"] .alv2-mas-icon svg {
    width: 100%; height: 100%; display: block;
}

/* === Toast temporal "Filtros restablecidos" === */
.alv2-reset-toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #16a34a;
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(22, 163, 74, 0.35);
    z-index: 99999;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    opacity: 0;
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}
.alv2-reset-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.alv2-reset-toast-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    color: #ffffff;
    flex: 0 0 auto;
}
.alv2-reset-toast-icon svg {
    width: 14px; height: 14px;
}


/* Titulo "Listado de Propiedades" / "Resultados de la Busqueda" — refinamiento tipografico
   Aplicado via clase .alv2-listado-h2 anadida por JS para no afectar a otros image-box del sitio. */
h2.elementor-image-box-title.alv2-listado-h2 {
    font-weight: 700 !important;
    color: #0c3f6f !important;
    font-size: 32px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    line-height: 1.2 !important;
}
.alv2-listado-h2 .alv2-listado-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    color: #0c3f6f;
    flex: 0 0 auto;
}
.alv2-listado-h2 .alv2-listado-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}
@media (max-width: 768px) {
    h2.elementor-image-box-title.alv2-listado-h2 {
        font-size: 26px !important;
        gap: 8px !important;
    }
    .alv2-listado-h2 .alv2-listado-icon {
        width: 26px;
        height: 26px;
    }
}

/* Hover real del mouse: si mostrar el azul de marca como feedback */
.select2-container .select2-results__option:hover {
    background-color: rgba(12, 63, 111, 0.10) !important;
    color: rgb(12, 63, 111) !important;
}

/* Icono reset 2026-05-24: flecha circular en el boton LIMPIAR/RESET (los 4 idiomas) */
#filtro-propiedades-form button[type="reset"],
#filtro-propiedades-form-en button[type="reset"],
#filtro-propiedades-form-hl button[type="reset"],
#filtro-propiedades-form-no button[type="reset"] {
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
}
#filtro-propiedades-form button[type="reset"]::before,
#filtro-propiedades-form-en button[type="reset"]::before,
#filtro-propiedades-form-hl button[type="reset"]::before,
#filtro-propiedades-form-no button[type="reset"]::before {
    content: '';
    display: inline-block;
    width: 16px; height: 16px;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230c3f6f' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 12a9 9 0 1 0 3-6.7L3 8'/><path d='M3 3v5h5'/></svg>");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    flex-shrink: 0;
}

/* === Menu movil 2026-05-24 v2: items 22px + logo Elementor con margen ===
   El logo del header es un widget Elementor Image (no .custom-logo-link).
   Por eso hay que apuntar a .elementor-widget-image dentro del header.
   Items del menu off-canvas a 22px (mas legible en movil). */
@media (max-width: 1024px) {
    /* Items del menu off-canvas Elementor */
    .elementor-nav-menu--dropdown .elementor-item,
    .elementor-nav-menu--dropdown a.menu-link,
    .elementor-nav-menu--dropdown li.menu-item > a {
        font-size: 22px !important;
        padding: 12px 24px !important;
        line-height: 1.25 !important;
        font-weight: 500 !important;
    }
    /* Sub-items un poco mas pequeno pero legible */
    .elementor-nav-menu--dropdown .sub-menu .elementor-sub-item,
    .elementor-nav-menu--dropdown .sub-menu a {
        font-size: 18px !important;
        padding: 14px 24px 14px 40px !important;
    }
    /* Logo Elementor en el header/menu mobile: separacion INFERIOR
       respecto a los items del menu desplegable (cliente pidio mas aire). */
    [data-elementor-type="header"] .elementor-widget-image > .elementor-widget-container,
    .elementor-location-header .elementor-widget-image > .elementor-widget-container,
    header .elementor-widget-image > .elementor-widget-container {
        padding-bottom: 16px !important;
    }
    /* Separador entre items para mejor distincion visual */
    .elementor-nav-menu--dropdown li.menu-item {
        border-bottom: 1px solid rgba(0,0,0,0.06) !important;
    }
}

/* === Iconos en items menu movil 2026-05-24 ===
   Cada opcion del menu off-canvas lleva un icono SVG al inicio.
   IDs de items (ES). EN/HL/NO tendran otros IDs (Polylang); para
   aplicar a esos idiomas habria que repetir las reglas con sus IDs. */
@media (max-width: 1024px) {
    /* Padding al enlace para reservar hueco al icono */
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item) > a.menu-link,
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item) > .menu-link {
        position: relative !important;
        padding-left: 44px !important;
    }
    /* Icono SVG absolutamente posicionado a la izquierda del enlace */
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item) > a.menu-link::before,
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item) > .menu-link::before {
        content: '' !important;
        position: absolute !important;
        left: 14px !important;
        top: 50% !important;
        transform: translateY(-50%) !important;
        width: 22px !important;
        height: 22px !important;
        margin: 0 !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        background-size: contain !important;
        opacity: 0.85 !important;
        visibility: visible !important;
        pointer-events: none;
    }
    /* INICIO - casa */
    .elementor-nav-menu--dropdown li.menu-item-345 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5423 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5442 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5437 > a::before {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M3 9l9-7 9 7v11a2 2 0 0 1-2 2h-4v-7H10v7H6a2 2 0 0 1-2-2z'/></svg>");
    }
    /* VENTAS - etiqueta de precio */
    .elementor-nav-menu--dropdown li.menu-item-2785 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5425 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5446 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5436 > a::before {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M20.59 13.41 13.42 20.59a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z'/><line x1='7' y1='7' x2='7.01' y2='7'/></svg>");
    }
    /* ALQUILER - llave */
    .elementor-nav-menu--dropdown li.menu-item-2786 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5424 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5447 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5435 > a::before {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='7' cy='15' r='4'/><path d='m10 12 11-11'/><path d='m18 4 3 3'/><path d='m15 7 3 3'/></svg>");
    }
    /* VALORACION - calculadora */
    .elementor-nav-menu--dropdown li.menu-item-5754 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5956 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5957 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5958 > a::before {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='4' y='2' width='16' height='20' rx='2'/><line x1='8' y1='6' x2='16' y2='6'/><line x1='16' y1='14' x2='16' y2='18'/><path d='M8 14h.01M12 14h.01M8 18h.01M12 18h.01'/></svg>");
    }
    /* VACACIONAL - sol */
    .elementor-nav-menu--dropdown li.menu-item-5967 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5968 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5969 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-3614377 > a::before {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><circle cx='12' cy='12' r='4'/><path d='M12 2v2M12 20v2M4.93 4.93l1.41 1.41M17.66 17.66l1.41 1.41M2 12h2M20 12h2M6.34 17.66l-1.41 1.41M19.07 4.93l-1.41 1.41'/></svg>");
    }
    /* NOSOTROS - personas */
    .elementor-nav-menu--dropdown li.menu-item-2049 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-3627144 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5445 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5440 > a::before {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2'/><circle cx='9' cy='7' r='4'/><path d='M22 21v-2a4 4 0 0 0-3-3.87'/><path d='M16 3.13a4 4 0 0 1 0 7.75'/></svg>");
    }
    /* BLOG - libro abierto */
    .elementor-nav-menu--dropdown li.menu-item-2066 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5427 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-3616233 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-3616231 > a::before {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/><path d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/></svg>");
    }
    /* CONTACTO - sobre */
    .elementor-nav-menu--dropdown li.menu-item-2111 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5428 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5444 > a::before,
    .elementor-nav-menu--dropdown li.menu-item-5439 > a::before {
        background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><rect x='2' y='4' width='20' height='16' rx='2'/><path d='m22 7-10 5L2 7'/></svg>");
    }
    /* El switcher de idioma (Espanol con bandera) ya tiene su propio icono nativo,
       no anadimos ::before para no duplicar */
    .elementor-nav-menu--dropdown li.pll-parent-menu-item > a::before {
        display: none !important;
    }
    /* HOVER / ACTIVE — esquema basado en la paleta de marca:
       sustituimos el gris oscuro plano por un tinte azul muy suave y una
       barra lateral azul de marca como indicador. Texto e iconos heredan
       su color natural en estado normal y pasan a azul cuando activos. */
    .elementor-nav-menu--dropdown li.menu-item > a.menu-link,
    .elementor-nav-menu--dropdown li.menu-item > .menu-link {
        background: transparent !important;
        background-color: transparent !important;
        color: #1f2937 !important;
        border-left: 3px solid transparent !important;
        transition: background-color 0.18s ease, border-left-color 0.18s ease, color 0.18s ease;
    }
    .elementor-nav-menu--dropdown li.menu-item > a.menu-link:hover,
    .elementor-nav-menu--dropdown li.menu-item > a.menu-link:focus,
    .elementor-nav-menu--dropdown li.menu-item.current-menu-item > a.menu-link,
    .elementor-nav-menu--dropdown li.menu-item.current_page_item > a.menu-link,
    .elementor-nav-menu--dropdown li.menu-item.elementor-active > a.menu-link {
        background-color: rgba(12, 63, 111, 0.06) !important;
        border-left-color: var(--agt-primary, #1976a4) !important;
        color: var(--agt-primary-dark, #0c3f6f) !important;
    }
    /* Iconos en hover/active: con fondo claro NO necesitan invertirse a blanco. */
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item) > a.menu-link:hover::before,
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item) > a.menu-link:focus::before,
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item).current-menu-item > a.menu-link::before,
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item).current_page_item > a.menu-link::before,
    .elementor-nav-menu--dropdown li.menu-item:not(.lang-item):not(.pll-parent-menu-item).elementor-active > a.menu-link::before {
        filter: none !important;
        opacity: 1 !important;
    }
    /* MENU OFFCANVAS: scroll vertical para que se vea el ultimo idioma
       (Noruego) al desplegar el submenu. Solo limitamos max-height y
       añadimos overflow; no tocamos 'height' ni 'top' (los gestiona Elementor)
       para no descuadrar el posicionamiento del panel respecto al header.
       El JS de mas abajo reubica el panel justo bajo el header al abrir. */
    nav.elementor-nav-menu--dropdown {
        position: fixed !important;
        top: var(--alv2-header-h, 100px) !important;
        left: 0 !important;
        right: 0 !important;
        width: 100% !important;
        max-height: calc(100vh - var(--alv2-header-h, 100px)) !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    /* Permitir que el UL interior crezca con el sub-menu de idiomas;
       sin esto, Elementor lo mantiene en altura fija y el cuarto idioma
       (Noruego) queda fuera del area scrolleable. */
    nav.elementor-nav-menu--dropdown ul.elementor-nav-menu,
    nav.elementor-nav-menu--dropdown .elementor-nav-menu {
        height: auto !important;
        max-height: none !important;
    }
    /* Switcher de idiomas en mobile: al pulsar "Espanol >" se activa el
       modo lang en el nav (clase .alv2-lang-mode). En ese modo se ocultan
       las opciones normales y se muestran SOLO los 4 idiomas. Asi caben
       todos sin necesidad de scroll. */
    /* FORZAR visibilidad del switcher de idioma en mobile, INCLUIDO en
       fichas individuales que Polylang oculta cuando no tienen traduccion
       a otros idiomas. Sin esto, en /propiedadesno/<slug>/ el parent lang
       tiene height:0 y el usuario no puede cambiar de idioma. */
    nav.elementor-nav-menu--dropdown .pll-parent-menu-item {
        display: list-item !important;
        visibility: visible !important;
        height: auto !important;
        min-height: 52px !important;
    }
    nav.elementor-nav-menu--dropdown .pll-parent-menu-item > a.menu-link {
        display: block !important;
        visibility: visible !important;
        height: auto !important;
        min-height: 52px !important;
    }
    nav.elementor-nav-menu--dropdown .pll-parent-menu-item .lang-item {
        display: list-item !important;
        visibility: visible !important;
        height: auto !important;
    }
    /* Ocultar el chevron NATIVO de Elementor/SmartMenus en el switcher.
       SmartMenus reinyecta su propio <span class="sub-arrow"> con e-fas-caret-down
       despues de nuestro patchSwitcher, dejando DOS flechas visibles. Esta regla
       deja solo nuestro .alv2-switcher-chev. */
    nav.elementor-nav-menu--dropdown .pll-parent-menu-item > a .sub-arrow:not(.alv2-switcher-chev) {
        display: none !important;
    }
    /* Modo NORMAL: sub-menu de idiomas oculto por defecto */
    nav.elementor-nav-menu--dropdown .pll-parent-menu-item > ul.sub-menu {
        display: none !important;
    }
    /* Modo LANG: ocultar TODOS los items del menu principal menos el parent */
    nav.elementor-nav-menu--dropdown.alv2-lang-mode > ul.elementor-nav-menu > li:not(.pll-parent-menu-item) {
        display: none !important;
    }
    /* Modo LANG: mostrar el sub-menu de idiomas en flujo, ocupando ancho completo */
    nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > ul.sub-menu {
        display: block !important;
        position: static !important;
        width: 100% !important;
        box-shadow: none !important;
        background: transparent !important;
        margin: 0 !important;
        padding: 0 !important;
        transform: none !important;
        opacity: 1 !important;
        visibility: visible !important;
        height: auto !important;
        max-height: none !important;
        pointer-events: auto !important;
    }
    /* Item de idioma en modo lang: textos grandes y bien legibles */
    nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > ul.sub-menu > li > a {
        padding: 22px 24px !important;
        font-size: 20px !important;
        font-weight: 500 !important;
        line-height: 1.2 !important;
    }
    /* La imagen de bandera (img.iti__flag o similar) tambien mas grande */
    nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > ul.sub-menu > li > a img,
    nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > ul.sub-menu > li > a .lang-item-flag {
        width: 28px !important;
        height: auto !important;
        margin-right: 12px !important;
        vertical-align: middle !important;
    }
    /* Cuando esta el modo lang activo, parent en azul de marca.
       Forzamos color tambien en TODOS los descendientes (span del label etc)
       y prefijamos con body para superar la especificidad de Elementor. */
    body nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > a,
    body nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > a *,
    body nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > a.menu-link {
        color: var(--agt-primary-dark, #0c3f6f) !important;
        -webkit-text-fill-color: var(--agt-primary-dark, #0c3f6f) !important;
    }
    body nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > a {
        background-color: rgba(12, 63, 111, 0.08) !important;
        border-left-color: var(--agt-primary, #1976a4) !important;
    }
    /* Flecha SVG del toggle: pintar tambien en azul */
    body nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > a .sub-arrow svg,
    body nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > a .sub-arrow {
        color: var(--agt-primary-dark, #0c3f6f) !important;
        fill: var(--agt-primary-dark, #0c3f6f) !important;
    }
    /* Girar la flecha del toggle cuando esta en modo lang */
    nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item > a .sub-arrow,
    nav.elementor-nav-menu--dropdown.alv2-lang-mode .pll-parent-menu-item .elementor-menu-toggle-sub {
        transform: rotate(180deg) !important;
        transition: transform 0.2s;
    }
}

/* === Home V2 destacadas 2026-05-24 ===
   Mobile (<768px): el grid se convierte en carrusel horizontal nativo con
   scroll-snap (sin JS extra). Desktop: grid normal idéntico al listado. */
.alv2-home .agt-grid-home {
    /* desktop hereda el grid base */
}
/* Wrapper relativo para posicionar las flechas de navegacion del carrusel */
.alv2-home { position: relative; }
/* Por defecto (desktop), flechas ocultas: la nav es por grid normal */
.alv2-home-nav { display: none; }

@media (max-width: 767px) {
    .alv2-home .agt-grid-home {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 0 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        scroll-snap-type: x mandatory !important;
        -webkit-overflow-scrolling: touch !important;
        padding: 4px 0 18px !important;
        margin: 0 !important;
        scrollbar-width: none !important;
        grid-template-columns: none !important;
    }
    .alv2-home .agt-grid-home::-webkit-scrollbar { display: none !important; }
    /* Una tarjeta entera por viewport, sin asomar la siguiente */
    .alv2-home .agt-grid-home > .agt-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        scroll-snap-align: center !important;
        scroll-snap-stop: always;
    }
    /* Home V2 movil: sin galeria interna. Ocultar flechas Swiper, paginacion y contador. */
    .alv2-home .agt-card .swiper-button-prev,
    .alv2-home .agt-card .swiper-button-next,
    .alv2-home .agt-card .swiper-pagination,
    .alv2-home .agt-card .agt-counter {
        display: none !important;
    }
    .alv2-home .agt-card { cursor: pointer; }
    /* No dejar que el <a> sobre la foto absorba touch events:
       sin esto, iOS WebKit bloquea el swipe horizontal del carrusel
       cuando el dedo arranca sobre la imagen. El click sigue funcionando
       por delegacion en la card padre (initHomeCards lo gestiona). */
    .alv2-home .agt-card a.agt-slide-link {
        pointer-events: none !important;
    }
    /* En el carrusel de Home, .agt-media trae touch-action:pan-y (heredado del
       listado, donde el swipe sobre la foto debia ir al Swiper interno y NO al
       scroll vertical). En la Home (sin Swiper interno) lo queremos al reves:
       que el dedo pueda hacer pan-x para mover el scroll-snap del carrusel. */
    .alv2-home .agt-card .agt-media,
    .alv2-home .agt-card .agt-media * {
        touch-action: auto !important;
    }
    /* Flechas laterales para navegar entre tarjetas del carrusel */
    .alv2-home-nav {
        display: flex !important;
        position: absolute;
        z-index: 5;
        width: 42px;
        height: 42px;
        align-items: center;
        justify-content: center;
        background: rgba(255,255,255,0.95);
        border: 1px solid rgba(0,0,0,0.08);
        border-radius: 999px;
        box-shadow: 0 3px 10px rgba(0,0,0,0.18);
        color: var(--agt-primary, #1976a4);
        cursor: pointer;
        padding: 0;
        transition: opacity 0.2s;
        /* top calculado por JS para centrar sobre la imagen (no sobre la card entera) */
    }
    .alv2-home-nav svg { width: 22px; height: 22px; }
    .alv2-home-prev { left: 8px; }
    .alv2-home-next { right: 8px; }
    .alv2-home-nav:active { transform: scale(0.95); }
    .alv2-home-nav[disabled] {
        opacity: 0.35;
        pointer-events: none;
    }
    /* En mobile el carrusel ya muestra 20: ocultar el boton "Ver mas". */
    .alv2-home-more-wrap { display: none !important; }
}
/* Cards ocultas por el flujo "Ver mas" (clase añadida via JS). Tanto mobile como desktop. */
.alv2-home .agt-card.alv2-card-hidden { display: none !important; }
/* Boton "Ver mas" (solo desktop). Estilo coherente con la paleta del sitio. */
.alv2-home-more-wrap {
    display: flex;
    justify-content: center;
    margin-top: 28px;
}
.alv2-home-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 28px;
    background: var(--agt-primary, #1976a4);
    color: #fff;
    border: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(25, 118, 164, 0.25);
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
}
.alv2-home-more:hover {
    background: var(--agt-primary-dark, #125e84);
    box-shadow: 0 6px 18px rgba(25, 118, 164, 0.35);
}
.alv2-home-more:active { transform: scale(0.97); }

/* === Hero del archive de Propiedades en mobile ====================
   SOLO afecta al container con background-image inline (el hero).
   Antes habíamos añadido también .e-con-boxed.e-flex.e-child como fallback,
   pero ese matchea al container que envuelve al listado V2 y limitaba su
   altura a 55vh provocando que el siguiente bloque (CONTACTO) se solapase
   visualmente con las cards. */
@media (max-width: 767px) {
    .elementor-location-archive .e-con.e-con-boxed[style*="background-image"] {
        min-height: 320px !important;
        max-height: 55vh !important;
    }
    .elementor-location-archive .e-con.e-con-boxed[style*="background-image"] > .e-con-inner {
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }
}

/* === Mensaje "sin resultados" del listado ============================
   Caja amplia centrada con icono SVG, titulo grande y mensaje legible.
   Acompaña a la paleta de marca (azul) sobre fondo claro suave. */
.alv2-noresults {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background: rgba(12, 63, 111, 0.04);
    border: 1px solid rgba(12, 63, 111, 0.10);
    border-radius: 14px;
    padding: 36px 24px;
    margin: 32px auto;
    max-width: 560px;
}
.alv2-noresults-icon {
    width: 64px;
    height: 64px;
    margin-bottom: 18px;
    color: var(--agt-primary, #1976a4);
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(12, 63, 111, 0.10);
}
.alv2-noresults-icon svg {
    width: 32px;
    height: 32px;
}
.alv2-noresults-title {
    margin: 0 0 8px;
    color: var(--agt-primary-dark, #0c3f6f);
    font-size: 22px;
    font-weight: 600;
    letter-spacing: 0.01em;
}
.alv2-noresults-text {
    margin: 0;
    color: #475569;
    font-size: 17px;
    line-height: 1.45;
    max-width: 440px;
}
@media (max-width: 767px) {
    .alv2-noresults { padding: 28px 18px; margin: 24px 12px; }
    .alv2-noresults-title { font-size: 20px; }
    .alv2-noresults-text  { font-size: 16px; }
}

/* === Contador "N inmuebles encontrados" del listado ================ */
.alv2-results-count {
    margin: 8px 0 18px;
    padding: 8px 14px;
    background: rgba(12, 63, 111, 0.06);
    border-left: 3px solid var(--agt-primary, #1976a4);
    border-radius: 6px;
    color: var(--agt-primary-dark, #0c3f6f);
    font-size: 15px;
    font-weight: 500;
    display: inline-block;
}
@media (max-width: 767px) {
    .alv2-results-count { font-size: 14px; padding: 8px 12px; }
}

/* === Modal: overlay oscuro tras el menu offcanvas =====================
   Cuando body lleva el atributo data-alv2-body-locked, el menu mobile esta
   abierto -> oscurecemos el resto de la pagina con un overlay semitrans.
   El overlay empieza bajo el header (var --alv2-header-h) para que el boton
   X de cerrar siga visible y clicable. */
body[data-alv2-body-locked="1"]::before {
    content: "";
    position: fixed;
    top: var(--alv2-header-h, 100px);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
    /* pointer-events: auto: el overlay BLOQUEA los clicks al contenido detras
       (select2 del buscador). El cierre se gestiona via JS escuchando clicks
       sobre el overlay (pseudo no clicable directamente -> usamos body en
       zona overlay como proxy). */
    pointer-events: auto;
    animation: alv2OverlayFadeIn 0.18s ease-out;
}
@keyframes alv2OverlayFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
/* Asegurar que el nav offcanvas esta por encima del overlay */
nav.elementor-nav-menu--dropdown {
    z-index: 1000 !important;
}

/* === Link "Seguir buscando" en el mensaje sin resultados =============== */
.alv2-keep-searching {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 20px;
    padding: 10px 22px;
    background: var(--agt-primary, #1976a4);
    color: #fff !important;
    border: 0;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none !important;
    transition: background 0.2s, transform 0.15s, box-shadow 0.2s;
    box-shadow: 0 3px 12px rgba(25, 118, 164, 0.25);
    cursor: pointer;
}
.alv2-keep-searching:hover,
.alv2-keep-searching:focus {
    background: var(--agt-primary-dark, #0c3f6f);
    color: #fff !important;
    text-decoration: none !important;
    box-shadow: 0 5px 16px rgba(25, 118, 164, 0.35);
}
.alv2-keep-searching:active { transform: scale(0.97); }
.alv2-keep-searching svg { width: 18px; height: 18px; display: block; }

/* ===== Tamaño móvil del icono vídeo en tarjeta ===== */
@media (max-width: 768px) {
    .alv2 .agt-video-btn { width: 46px; height: 46px; }
    .alv2 .agt-video-btn svg { width: 22px; height: 22px; }
}
/* ===== Justificar descripción en fichas (ES/EN/NL/NO) ===== */
body[class*="single-propiedadesinmo"] .elementor-widget-text-editor,
body[class*="single-propiedadesinmo"] .elementor-widget-text-editor .elementor-widget-container {
    text-align: justify !important;
    hyphens: auto;
    -webkit-hyphens: auto;
}
