/* ============================================================
   ARRIENDO — Property Search UI (ARX)
   - Estilos scoped al buscador #arx-ps
   - Incluye: filtros, sugerencias, panel, cards, mapa, CTAs
   ============================================================ */

/* ============================================================
   TOKENS / VARIABLES
   ============================================================ */
:root{
  --arx-brand:#EE2624;
  --arx-ink:#4c5154;
  --arx-muted:#6b7280;
  --arx-radius:14px;
  --arx-shadow:0 8px 24px rgba(15,23,42,.08);

  /* Sticky map: offset desde el top (ajusta si header fijo/admin bar) */
  --arx-sticky-top:96px;
}

/* ============================================================
   BREADCRUMB + TÍTULO - EN LÍNEA CON ORDENAR POR
   ============================================================ */
.arx-breadcrumb{
  max-width:1200px;
  margin:0 auto 2px;
  padding:0 24px;
  font-size:13px;
  color:var(--arx-muted);
}
.arx-breadcrumb__label{ font-weight:600; margin-right:4px; }
.arx-breadcrumb a{ color:var(--arx-ink); text-decoration:none; }
.arx-breadcrumb a:hover{ text-decoration:underline; }
.arx-breadcrumb__sep{ margin:0 4px; color:#d1d5db; }

.arx-heading{
  max-width:1200px;
  margin:0 auto 6px;
  padding:0 24px;
  font-size:20px;
  font-weight:600;
  color:#111827;
}

/* ============================================================
   FILA UNIFICADA: TÍTULO + BREADCRUMB + ORDENAR POR - 1400px
   Alineado con el buscador
   ============================================================ */
.arx-title-row{
  max-width:1400px;
  margin:0 auto 10px;
  padding:0 16px;
  display:flex;
  flex-wrap:nowrap;
  align-items:flex-end;
  justify-content:space-between;
  gap:4px 20px;
}

.arx-title-row__left{
  flex:1 1 0;
  min-width:0;
  max-width:calc(100% - 200px);
  display:flex;
  flex-direction:column;
  gap:2px;
  overflow:hidden;
}

.arx-title-row__right{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  margin-left:auto;
}

.arx-title-row .arx-heading{
  max-width:100%;
  margin:0;
  padding:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.arx-title-row .arx-breadcrumb{
  max-width:none;
  margin:0;
  padding:0;
}

/* Ocultar el ordenar por original dentro de los filtros */
.arx-filters__order-row{
  display:none !important;
}

@media (max-width:768px){
  .arx-heading{ font-size:18px; padding:0 12px; }
  .arx-breadcrumb{ padding:0 12px; font-size:12px; }
  .arx-title-row{ 
    padding:0 12px; 
    flex-direction:column;
    flex-wrap:wrap;
    align-items:flex-start;
    gap:8px;
  }
  .arx-title-row__left{
    max-width:100% !important;
    width:100% !important;
    overflow:hidden !important;
    flex:none !important;
  }
  .arx-title-row .arx-heading{
    white-space:nowrap !important;
    overflow:hidden !important;
    text-overflow:ellipsis !important;
    display:block !important;
    max-width:100% !important;
    width:100% !important;
    min-height:1.2em !important;
    font-size:18px !important;
  }
  .arx-title-row__right{
    width:100%;
    justify-content:flex-start;
  }
}

/* ============================================================
   MODAL DE LEADS
   ============================================================ */
   #arx-lead-modal .arx-lead-h1{
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.12;
  font-weight: 800;
  margin: 2px 0 10px;
}

.arx-lead-modal{
  position:fixed;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  z-index:10000;
}
.arx-lead-modal.is-open{ display:flex; }

.arx-lead-modal__backdrop{
  position:absolute;
  inset:0;
  background:rgba(15,23,42,.55);
  backdrop-filter:blur(2px);
}
.arx-lead-modal__dialog{
  position:relative;
  z-index:1;
  background:#ffffff;
  border-radius:18px;
  max-width:420px;
  width:100%;
  margin:0 16px;
  padding:18px 18px 16px;
  box-shadow:0 18px 48px rgba(15,23,42,.25);
  display:flex;
  flex-direction:column;
  gap:10px;
  font-size:14px;
}
.arx-lead-modal__title{
  margin:0;
  font-size:17px;
  font-weight:600;
  color:#111827;
}
.arx-lead-modal__subtitle{
  margin:0;
  font-size:13px;
  color:var(--arx-muted);
}
.arx-lead-modal__close{
  position:absolute;
  top:10px;
  right:12px;
  width:28px;
  height:28px;
  border-radius:999px;
  border:none;
  background:#f3f4f6;
  cursor:pointer;
  font-size:18px;
  line-height:1;
  display:flex;
  align-items:center;
  justify-content:center;
  color:#4b5563;
}
.arx-lead-modal__close:hover{ background:#e5e7eb; }

.arx-lead-form{
  margin-top:4px;
  display:flex;
  flex-direction:column;
  gap:8px;
}
.arx-lead-field{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.arx-lead-field label{ font-size:12px; color:var(--arx-muted); }
.arx-lead-field input,
.arx-lead-field textarea{
  border-radius:10px;
  border:1px solid #d1d5db;
  padding:7px 10px;
  font-size:13px;
  width:100%;
}
.arx-lead-field textarea{
  resize:vertical;
  min-height:70px;
}
.arx-lead-actions{
  margin-top:6px;
  display:flex;
  justify-content:flex-end;
}

/* ============================================================
   WRAPPER GENERAL DEL SHORTCODE (TIPOGRAFÍA FORZADA)
   ============================================================ */
#arx-ps{
  font-family: Arial, Helvetica, sans-serif !important;
  color: var(--arx-ink);
  background: transparent !important;
  padding: 24px 0 48px;
}

/* Forzar tipografía dentro del buscador (tema/Elementor suele meter Roboto) */
#arx-ps,
#arx-ps *:not(i):not(.fa):not([class^="fa-"]):not([class*=" fa-"]){
  font-family: Arial, Helvetica, sans-serif !important;
}
#arx-ps *{ box-sizing:border-box; }

/* ============================================================
   FILTROS SUPERIORES - 1400px
   ============================================================ */
.arx-filters{
  max-width:1400px;
  margin:0 auto 10px;
  padding:0 16px;
  display:flex;
  flex-direction:column;
  gap:8px;
  position:relative;
  z-index:100;
}
/* Asegurar que el formulario y sus elementos sean interactivos */
#arx-ps-form,
#arx-ps-form *{
  pointer-events:auto;
}

/* Fila: buscador + (desktop) botones de vista */
.arx-filters__top{
  display:flex;
  align-items:center;
  gap:10px;
  width:100%;
}

/* Buscador principal */
.arx-filters__search{
  flex:1 1 auto;
  display:flex;
  align-items:center;
  gap:8px;
  background:#fff;
  border-radius:999px;
  padding:6px 10px;
  border:1px solid #e5e7eb;
  box-shadow:var(--arx-shadow);
  position:relative;
  z-index:101 !important; /* Mayor que .arx-pill-wrap (100) para que el input sea clickeable */
  isolation:isolate; /* Crear nuevo stacking context */
}
.arx-filters__search input{
  border:none !important;
  background:transparent !important;
  outline:none !important;
  font-size:14px;
  width:100% !important;
  position:relative !important;
  z-index:2 !important;
  cursor:text !important;
  height:28px;
  line-height:28px;
  -webkit-appearance:none;
  appearance:none;
  pointer-events:auto !important; /* Asegurar que reciba clics */
}
/* Asegurar que el input sea el elemento más alto en el contenedor */
.arx-filters__search input:focus{
  outline:none;
}
/* Selector de alta especificidad para el input de búsqueda */
#arx-ps .arx-filters__search input[name="q"],
#arx-ps-form .arx-filters__search input[name="q"],
.arx-filters__search input[type="text"]{
  pointer-events:auto !important;
  cursor:text !important;
  user-select:text !important;
  -webkit-user-select:text !important;
}
.arx-search-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  border:none;
  background:transparent;
  padding:0;
  cursor:pointer;
  position:relative;
  z-index:1;
}

/* ============================================================
   SUGERENCIAS - DISEÑO IGUAL AL HOME
   ============================================================ */
#arx-ps .arx-suggest{
  position:absolute;
  left:0;
  right:0;
  top:calc(100% + 4px);
  background:#fff;
  border-radius:12px;
  box-shadow:0 10px 40px rgba(0,0,0,0.15);
  z-index:9999;
  display:none;
  max-height:400px;
  overflow:hidden;
  border:none;
  padding:0;
  pointer-events:none; /* Evitar que bloquee clics cuando está oculto */
}
#arx-ps .arx-suggest.is-open{
  display:flex;
  flex-direction:column;
  pointer-events:auto; /* Habilitar clics cuando está visible */
}
#arx-ps .arx-suggest:empty{ display:none !important; }

/* Lista scrolleable */
#arx-ps .arx-suggest__list,
#arx-ps .arx-suggest__grid{
  flex:1 1 auto;
  min-height:0;
  overflow-y:auto;
  padding:0;
  display:block;
}

/* Scrollbar personalizado */
#arx-ps .arx-suggest__list::-webkit-scrollbar,
#arx-ps .arx-suggest__grid::-webkit-scrollbar{ width:6px; }
#arx-ps .arx-suggest__list::-webkit-scrollbar-track,
#arx-ps .arx-suggest__grid::-webkit-scrollbar-track{ background:transparent; }
#arx-ps .arx-suggest__list::-webkit-scrollbar-thumb,
#arx-ps .arx-suggest__grid::-webkit-scrollbar-thumb{ 
  background:#d1d5db; 
  border-radius:3px;
}

.arx-suggest__col{ padding:0; display:block; }
.arx-suggest__title{ display:none !important; }

/* Item de sugerencia - Igual al Home */
.arx-suggest-item{
  display:flex;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  cursor:pointer;
  border:none;
  background:transparent;
  width:100%;
  text-align:left;
  font-size:14px;
  color:#374151;
  transition:background 0.15s ease;
  border-bottom:1px solid #f3f4f6;
  border-radius:0;
}
.arx-suggest-item:last-child{
  border-bottom:none;
}
.arx-suggest-item:hover{ 
  background:#fef2f2; 
}

/* Checkbox cuadrado rojo */
.arx-suggest-item__check{
  width:20px;
  height:20px;
  min-width:20px;
  border:2px solid #E53935;
  border-radius:4px;
  flex-shrink:0;
  position:relative;
  transition:all 0.15s ease;
  background:#fff;
}
.arx-suggest-item__check::after{
  content:'';
  position:absolute;
  top:50%;
  left:50%;
  transform:translate(-50%, -50%) scale(0);
  width:10px;
  height:10px;
  background:#E53935;
  border-radius:2px;
  transition:transform 0.15s ease;
}

/* Estado seleccionado */
.arx-suggest-item.is-selected{
  background:#fef2f2;
}
.arx-suggest-item.is-selected .arx-suggest-item__check{
  border-color:#E53935;
  background:#E53935;
}
.arx-suggest-item.is-selected .arx-suggest-item__check::after{
  transform:translate(-50%, -50%) scale(1);
  background:#fff;
}
.arx-suggest-item.is-selected .arx-suggest-item__label{
  color:#E53935;
  font-weight:500;
}

/* Contenido del item */
.arx-suggest-item__content{
  display:flex;
  align-items:center;
  gap:8px;
  flex:1;
  min-width:0;
}

/* Icono de ubicación */
.arx-suggest-item__icon{
  font-size:16px;
  color:#E53935;
  flex-shrink:0;
  width:16px;
  height:16px;
}
.arx-suggest-item__icon::before{
  content:'';
  display:block;
  width:16px;
  height:16px;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23E53935'%3E%3Cpath d='M12 2C8.13 2 5 5.13 5 9c0 5.25 7 13 7 13s7-7.75 7-13c0-3.87-3.13-7-7-7zm0 9.5c-1.38 0-2.5-1.12-2.5-2.5s1.12-2.5 2.5-2.5 2.5 1.12 2.5 2.5-1.12 2.5-2.5 2.5z'/%3E%3C/svg%3E");
  background-size:contain;
  background-repeat:no-repeat;
}

/* Texto */
.arx-suggest-item__label{
  font-size:14px;
  color:#374151;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.arx-suggest-item__sub{ display:none !important; }

/* Footer con botón Aplicar */
#arx-ps .arx-suggest__footer{
  flex:0 0 auto;
  padding:12px 16px;
  border-top:1px solid #e5e7eb;
  background:#fff;
  border-radius:0 0 12px 12px;
}
#arx-ps .arx-suggest__footer .arx-btn{
  width:100%;
  padding:12px 24px;
  font-size:14px;
  font-weight:600;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
}
#arx-ps .arx-suggest__footer .arx-btn--primary{
  background:#E53935;
  color:#fff;
  border:none;
}
#arx-ps .arx-suggest__footer .arx-btn--primary:hover{
  background:#C62828;
}
#arx-ps .arx-suggest__footer .arx-btn:not(.arx-btn--primary){ display:none !important; }
#arx-ps .arx-suggest__footer:only-child{ display:none !important; }
/* Chips contenedor */
.arx-suggest-chips{
  display:none;
  position:relative;
  width:100%;
  margin-top:6px;
  background:#fff;
  border:1px dashed #e5e7eb;
  border-radius:12px;
  padding:6px;
  gap:6px;
  flex-wrap:wrap;
}
.arx-suggest-chips.is-open{ display:flex; }

.arx-chip-sel{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:#f3f4f6;
  color:#111827;
  border:1px solid #e5e7eb;
  border-radius:999px;
  padding:6px 10px;
  font-size:12px;
}
.arx-chip-sel__x{
  background:transparent;
  border:none;
  cursor:pointer;
  font-size:14px;
  line-height:1;
  color:#6b7280;
}
.arx-chip-actions{
  margin-left:auto;
  display:inline-flex;
  gap:6px;
}
.arx-chip-actions .arx-btn{ padding:6px 12px; font-size:12px; }
.arx-chip-actions .arx-btn:not(.arx-btn--primary){ display:none !important; }

/* Icono sugerencia (compat) */
#arx-ps .arx-suggest-main{
  display:flex;
  align-items:center;
  gap:8px;
}
#arx-ps .arx-suggest-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#f3f4f6;
  color:#EE2624;
  flex-shrink:0;
}
#arx-ps .arx-suggest-text{ white-space:nowrap; }

/* ============================================================
   PILLS / FILTROS + DROPDOWNS
   ============================================================ */
.arx-filters__pills{
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:nowrap;
}
.arx-filters__order-row{
  display:flex;
  justify-content:flex-end;
  padding:0 4px;
}

.arx-pill-wrap{ position:relative; flex:0 0 auto; z-index:100; }
.arx-pill{
  position:relative;
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  padding:6px 26px 6px 14px;
  font-size:14px;
  cursor:pointer;
  white-space:nowrap;
  transition:background .15s,border-color .15s,color .15s;
  display:inline-flex;
  align-items:center;
  gap:6px;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
}
.arx-pill:hover{
  border-color:#cbd5e1;
  background:#f9fafb;
}
.arx-pill--outline{
  border-color:var(--arx-brand);
  color:var(--arx-brand);
  background:#fff;
}
.arx-pill__caret{
  position:absolute;
  right:10px;
  width:0;
  height:0;
  border-left:4px solid transparent;
  border-right:4px solid transparent;
  border-top:5px solid #6b7280;
  transition:transform .15s;
}
.arx-pill.is-open .arx-pill__caret{ transform:rotate(180deg); }
.arx-pill__badge{
  min-width:18px;
  height:18px;
  border-radius:999px;
  background:#111827;
  color:#fff;
  font-size:11px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}

.arx-dd{
  position:absolute;
  top:calc(100% + 6px);
  left:0;
  background:#fff;
  border-radius:16px;
  box-shadow:var(--arx-shadow);
  padding:12px 16px;
  min-width:230px;
  z-index:9000;
  display:none;
}
.arx-dd--wide{ min-width:360px; }
.arx-dd.is-open{ display:block; }

.arx-dd__grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:6px 10px;
  margin-top:8px;
}
.arx-dd__footer{
  margin-top:10px;
  text-align:right;
}

/* Checkbox / campos precio / habs */
.arx-check{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:14px;
  cursor:pointer;
}
.arx-check input{ accent-color:var(--arx-brand); }

.arx-field{
  display:flex;
  flex-direction:column;
  gap:4px;
  font-size:13px;
  margin-bottom:8px;
}
.arx-field input{
  border-radius:10px;
  border:1px solid #d1d5db;
  padding:6px 10px;
  font-size:14px;
}

.arx-rooms-group{ margin-bottom:10px; }
.arx-rooms-group--baths{ margin-top:8px; }

.arx-rooms-label{
  font-size:13px;
  color:var(--arx-muted);
  margin-bottom:4px;
  display:block;
}
.arx-rooms-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.arx-chip{
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  padding:6px 12px;
  font-size:13px;
  cursor:pointer;
}
.arx-chip.is-active{
  background:#0f172a;
  border-color:#0f172a;
  color:#fff;
}
.arx-exact-row{
  margin-top:8px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  font-size:12px;
  color:var(--arx-muted);
}

/* Switch exacto */
.arx-switch{ position:relative; width:38px; height:20px; display:inline-block; }
.arx-switch input{ opacity:0; width:0; height:0; }
.arx-switch__slider{
  position:absolute;
  cursor:pointer;
  inset:0;
  background:#e5e7eb;
  border-radius:999px;
  transition:.2s;
}
.arx-switch__slider:before{
  position:absolute;
  content:"";
  height:14px;
  width:14px;
  left:3px;
  top:3px;
  background:white;
  border-radius:999px;
  transition:.2s;
  box-shadow:0 1px 3px rgba(15,23,42,.25);
}
.arx-switch input:checked + .arx-switch__slider{ background:var(--arx-brand); }
.arx-switch input:checked + .arx-switch__slider:before{ transform:translateX(16px); }

/* Ordenar por */
.arx-order{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:13px;
  color:var(--arx-muted);
}
.arx-order-dot{
  width:6px;
  height:6px;
  border-radius:999px;
  background:#d1d5db;
  display:inline-block;
}
.arx-order select{
  border-radius:999px;
  border:1px solid #e5e7eb;
  padding:6px 12px;
  font-size:13px;
  background:#fff;
  outline:none;
}

/* ============================================================
   PANEL "MÁS FILTROS"
   ============================================================ */
.arx-panel{
  position:fixed;
  inset:0;
  background:rgba(15,23,42,.45);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
  padding:16px;
}
.arx-panel[aria-hidden="false"]{ display:flex; }

.arx-panel__inner{
  background:#fff;
  border-radius:18px;
  max-width:520px;
  width:100%;
  box-shadow:var(--arx-shadow);
  display:flex;
  flex-direction:column;
  max-height:90vh;
}
.arx-panel__inner--xl{ max-width:900px; }
.arx-panel--full .arx-panel__inner{ width:100%; }

.arx-panel__header{
  padding:14px 18px;
  border-bottom:1px solid #e5e7eb;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.arx-panel__header h3{
  margin:0;
  font-size:16px;
  font-weight:600;
}
.arx-panel__close{
  border:none;
  background:transparent;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.arx-panel__body{
  padding:16px 18px;
  overflow:auto;
}
.arx-panel__body--scroll{ max-height:60vh; }

.arx-panel__footer{
  padding:12px 18px 16px;
  border-top:1px solid #e5e7eb;
  display:flex;
  justify-content:flex-end;
  gap:8px;
}

.arx-panel__grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(150px,1fr));
  gap:8px 12px;
  margin-top:8px;
}

.arx-panel__tabs{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-bottom:10px;
}
.arx-tab{
  border-radius:999px;
  border:1px solid #e5e7eb;
  background:#fff;
  padding:6px 12px;
  font-size:13px;
  cursor:pointer;
}
.arx-tab.is-active{
  background:var(--arx-brand);
  border-color:var(--arx-brand);
  color:#fff;
}
.arx-panel__search{ margin-bottom:12px; }
.arx-panel__search input{
  width:100%;
  border-radius:999px;
  border:1px solid #d1d5db;
  padding:6px 12px;
  font-size:14px;
}

.arx-feature-group{ display:none; }
.arx-feature-group.is-active{ display:block; }

/* Botones genéricos */
.arx-btn{
  border-radius:999px;
  border:none;
  padding:8px 18px;
  font-size:14px;
  cursor:pointer;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  gap:6px;
  white-space:nowrap;
}
.arx-btn--primary{ background:var(--arx-brand); color:#fff !important; }

/* ============================================================
   RESUMEN + CHIPS ACTIVOS - 1400px (alineado con buscador)
   ============================================================ */
.arx-summary{
  max-width:1400px;
  padding:0 16px;
  margin:0 auto 8px;
  font-size:13px;
  color:var(--arx-muted);
}
.arx-active{
  max-width:1400px;
  padding:0 16px;
  margin:0 auto 12px;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}
.arx-active-pill{
  border-radius:999px;
  border:1px solid #fecaca;
  background:#fff1f2;
  color:#b91c1c;
  font-size:12px;
  padding:5px 10px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  gap:6px;
  cursor:pointer;
}
.arx-active-pill:hover{
  background:#fee2e2;
  border-color:#f87171;
}
.arx-active-pill__close{ 
  font-size:13px; 
  font-weight:700; 
  line-height:1; 
  cursor:pointer;
  padding:2px 4px;
  margin:-2px -4px -2px 0;
  border-radius:50%;
  transition:background 0.15s;
}
.arx-active-pill__close:hover{
  background:rgba(185,28,28,0.15);
}

.arx-active-pill--reset{
  background:var(--arx-brand);
  border-color:var(--arx-brand);
  color:#fff !important;
}
#arx-ps .arx-active-pill--reset,
#arx-ps .arx-active-pill--reset span{ color:#fff !important; }

/* ============================================================
   LAYOUT RESULTADOS + MAPA (BASE) - 1400px
   ============================================================ */
.arx-layout{
  max-width:1400px;
  margin:16px auto 40px;
  padding:0 16px;
  display:flex;
  align-items:flex-start;
  gap:16px;
}
.arx-results{
  flex:1 1 auto;
  max-width:100%;
  display:flex;
  flex-direction:column;
  gap:16px;
}

/* MAPA (sticky desktop) */
.arx-map{
  flex:0 0 40%;
  max-width:40%;
  border-radius:18px;
  overflow:hidden;
  background:#fff;
  box-shadow:var(--arx-shadow);

  position:sticky;
  top:var(--arx-sticky-top);
  height:calc(100vh - var(--arx-sticky-top));
  min-height:420px;
  
  /* ✅ OCULTO POR DEFECTO - Solo se muestra en vista mapa */
  display:none;
}

/* MAP: asegura 100% en los hijos */
#arx-map,
.es-map{ min-height:420px; height:100%; }

.arx-map iframe,
.arx-map > div,
.arx-map .es-map,
.arx-map .gm-style,
.es-map > div,
.es-map .gm-style{
  width:100%;
  height:100%;
}

/* ============================================================
   VISTA LIST (SOLO RESULTADOS)
   ============================================================ */
#arx-ps[data-view="list"] .arx-layout{ display:block; }
#arx-ps[data-view="list"] .arx-results{ flex:1 1 auto; max-width:100%; }
#arx-ps[data-view="list"] .arx-map{ display:none; }

/* Lista horizontal (desktop) */
#arx-ps[data-view="list"][data-layout="list"] .arx-layout{
  max-width:1000px;
  margin-left:auto;
  margin-right:auto;
}
#arx-ps[data-view="list"][data-layout="list"] .arx-results{
  display:flex;
  flex-direction:column;
  gap:16px;
  max-width:1000px;
  margin-left:auto;
  margin-right:auto;
}

/* Tarjeta horizontal */
#arx-ps[data-view="list"][data-layout="list"] .arx-card{ 
  flex-direction:row !important;
  align-items:stretch !important;
  min-height:160px !important;
  border-radius:16px !important;
  overflow:hidden !important;
}

/* Imagen - proporción correcta */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__media,
#arx-ps[data-view="list"][data-layout="list"] .arx-card__media--slider{
  flex:0 0 260px !important;
  width:260px !important;
  max-width:260px !important;
  min-height:160px !important;
  height:auto !important;
  border-radius:16px 0 0 16px !important;
  overflow:hidden !important;
}

/* Body - columna normal */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__body{ 
  flex:1 1 auto !important;
  display:flex !important;
  flex-direction:column !important;
  padding:12px 16px !important;
  gap:4px !important;
}

/* Tipo - VISIBLE */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__type{
  display:block !important;
  visibility:visible !important;
  font-size:12px !important;
  color:#666 !important;
}

/* Ubicación - VISIBLE */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__location{
  display:flex !important;
  visibility:visible !important;
  font-size:13px !important;
  color:#444 !important;
}

/* Excerpt - VISIBLE */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__excerpt{
  display:-webkit-box !important;
  visibility:visible !important;
  font-size:13px !important;
  color:#666 !important;
  line-height:1.4 !important;
  -webkit-line-clamp:1 !important;
  -webkit-box-orient:vertical !important;
  overflow:hidden !important;
}

/* Precio - VISIBLE */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__price-wrap{
  display:block !important;
  visibility:visible !important;
}
#arx-ps[data-view="list"][data-layout="list"] .arx-card__price-main{
  display:inline !important;
  visibility:visible !important;
  font-size:18px !important;
  font-weight:700 !important;
  color:#111 !important;
}

/* Ocultar divider */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__divider{
  display:none !important;
}

/* Features - VISIBLE */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__features{
  display:flex !important;
  visibility:visible !important;
  flex-wrap:wrap !important;
  gap:10px !important;
  font-size:12px !important;
  color:#555 !important;
  margin-top:auto !important;
}

/* Fila inferior: Features + Botón */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__bottom-row{
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  margin-top:auto !important;
  gap:16px !important;
}

/* Botón - VISIBLE */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__actions{
  display:flex !important;
  visibility:visible !important;
  align-items:center !important;
  justify-content:flex-end !important;
  margin-top:auto !important;
  margin-left:auto !important;
}

/* Botón más compacto */
#arx-ps[data-view="list"][data-layout="list"] .arx-card__actions .arx-cta{
  display:flex !important;
  visibility:visible !important;
  padding:8px 16px !important;
  font-size:12px !important;
}

/* ============================================================
   VISTA MAP (MAPA + RESULTADOS) - SOLO DESKTOP (>768px)
   - Mapa sticky a la izquierda (35%)
   - Resultados 3 columnas x ~3 filas visibles
   - Cards COMPLETAS con toda la información
   ============================================================ */
@media (min-width:769px){
  #arx-ps[data-view="map"] .arx-layout{
    display:flex !important;
    flex-direction:row !important;
    gap:20px !important;
    align-items:flex-start !important;
    position:relative !important;
    max-width:1400px !important;
    padding:0 16px !important;
  }

  /* Mapa sticky a la izquierda - 45% */
  #arx-ps[data-view="map"] .arx-map{
    display:block !important;
    flex:0 0 45% !important;
    width:45% !important;
    max-width:45% !important;
    order:1 !important;
    position:sticky !important;
    top:100px !important;
    height:calc(100vh - 140px) !important;
    min-height:500px !important;
    z-index:10 !important;
  }

  /* Contenedor de resultados - 2 columnas */
  #arx-ps[data-view="map"] .arx-results{
    flex:0 0 calc(55% - 20px) !important;
    width:calc(55% - 20px) !important;
    max-width:calc(55% - 20px) !important;
    order:2 !important;
    display:grid !important;
    grid-template-columns:repeat(2, 1fr) !important;
    gap:14px !important;
    height:calc(100vh - 140px) !important;
    max-height:calc(100vh - 140px) !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-right:8px !important;
    padding-bottom:20px !important;
    align-content:start !important;
  }

  /* Scrollbar personalizado */
  #arx-ps[data-view="map"] .arx-results::-webkit-scrollbar{ width:6px; }
  #arx-ps[data-view="map"] .arx-results::-webkit-scrollbar-track{ background:#f1f1f1; border-radius:3px; }
  #arx-ps[data-view="map"] .arx-results::-webkit-scrollbar-thumb{ background:#ccc; border-radius:3px; }
  #arx-ps[data-view="map"] .arx-results::-webkit-scrollbar-thumb:hover{ background:#aaa; }
}

/* ============================================================
   TARJETAS EN VISTA MAPA - FORZAR VISIBILIDAD COMPLETA
   Selectores ultra específicos para garantizar que se apliquen
   ============================================================ */
#arx-ps[data-view="map"] .arx-results .arx-card,
#arx-ps[data-view="map"] .arx-results > .arx-card,
#arx-ps[data-view="map"] .arx-results > article.arx-card { 
  display:flex !important;
  flex-direction:column !important;
  height:auto !important;
  min-height:280px !important;
  max-height:none !important;
  overflow:hidden !important;
  background:#fff !important;
  border-radius:16px !important;
  box-shadow:0 2px 8px rgba(0,0,0,0.08) !important;
}

/* Imagen - altura fija con border-radius arriba */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__media,
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__media--slider,
#arx-ps[data-view="map"] .arx-results .arx-card > .arx-card__media,
#arx-ps[data-view="map"] .arx-results .arx-card > .arx-card__media--slider { 
  flex:0 0 110px !important; 
  width:100% !important; 
  height:110px !important;
  min-height:110px !important;
  max-height:110px !important;
  border-radius:16px 16px 0 0 !important;
  overflow:hidden !important;
}

/* Body - FORZAR VISIBLE */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__body,
#arx-ps[data-view="map"] .arx-results .arx-card > .arx-card__body {
  display:flex !important;
  flex-direction:column !important;
  padding:10px 12px 12px !important;
  flex:1 1 auto !important;
  visibility:visible !important;
  opacity:1 !important;
  height:auto !important;
  min-height:150px !important;
  overflow:visible !important;
  background:#fff !important;
}

/* Tipo - FORZAR VISIBLE */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__type,
#arx-ps[data-view="map"] .arx-results .arx-card__body .arx-card__type {
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  font-size:11px !important;
  color:#666 !important;
  margin-bottom:4px !important;
  height:auto !important;
}

/* Ubicación - FORZAR VISIBLE */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__location,
#arx-ps[data-view="map"] .arx-results .arx-card__body .arx-card__location {
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  align-items:center !important;
  font-size:11px !important;
  color:#444 !important;
  margin-bottom:6px !important;
  height:auto !important;
  min-height:16px !important;
}

/* Precio - FORZAR VISIBLE (usa price-wrap > price-row > price-main) */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__price-wrap,
#arx-ps[data-view="map"] .arx-results .arx-card__body .arx-card__price-wrap {
  display:block !important;
  visibility:visible !important;
  opacity:1 !important;
  margin-bottom:6px !important;
}
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__price-main,
#arx-ps[data-view="map"] .arx-results .arx-card__body .arx-card__price-main {
  display:inline !important;
  visibility:visible !important;
  opacity:1 !important;
  font-size:16px !important;
  font-weight:700 !important;
  color:#111 !important;
}

/* Features (habitaciones, baños, m²) - FORZAR VISIBLE */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__features,
#arx-ps[data-view="map"] .arx-results .arx-card__body .arx-card__features {
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  flex-wrap:wrap !important;
  gap:8px !important;
  font-size:11px !important;
  color:#666 !important;
  margin-bottom:10px !important;
  height:auto !important;
  list-style:none !important;
  padding:0 !important;
}
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__feature {
  display:flex !important;
  align-items:center !important;
  gap:4px !important;
}

/* Acciones - FORZAR VISIBLE */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__actions,
#arx-ps[data-view="map"] .arx-results .arx-card__body .arx-card__actions {
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  padding:0 !important;
  margin-top:auto !important;
  height:auto !important;
}

/* Botón contactar - FORZAR VISIBLE */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-cta,
#arx-ps[data-view="map"] .arx-results .arx-card__actions .arx-cta {
  display:flex !important;
  visibility:visible !important;
  opacity:1 !important;
  width:100% !important;
  padding:8px 12px !important;
  font-size:12px !important;
  text-align:center !important;
  justify-content:center !important;
  align-items:center !important;
}

/* Ocultar título, excerpt y divider */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__title,
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__excerpt,
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__divider {
  display:none !important;
  height:0 !important;
  overflow:hidden !important;
}

/* Ocultar precio admin en vista mapa */
#arx-ps[data-view="map"] .arx-results .arx-card .arx-card__price-admin {
  display:none !important;
}

/* Paginación en vista mapa */
#arx-ps[data-view="map"] .arx-pagination{
  grid-column:1 / -1;
  padding:16px 0;
}

/* ============================================================
   TARJETAS
   ============================================================ */
.arx-card{
  background:#fff;
  border-radius:18px;
  box-shadow:var(--arx-shadow);
  overflow:hidden;
  transition:transform .18s ease, box-shadow .18s ease;
  display:flex;
  flex-direction:column;
  min-height:0;
}

/* Interacciones por vista */
#arx-ps .arx-card[data-url]{ cursor:default; }
#arx-ps[data-view="list"][data-layout="list"] .arx-card[data-url]{ cursor:pointer; }
#arx-ps[data-view="list"][data-layout="list"] .arx-card[data-url]:hover .arx-card__title{ text-decoration:underline; }
#arx-ps[data-view="list"][data-layout="list"] .arx-card[data-url] a{
  color:inherit;
  text-decoration:none;
}

/* En caso de envolver todo el card en un <a> */
.arx-card__link{
  display:flex;
  flex-direction:column;
  height:100%;
  text-decoration:none;
  color:inherit;
}

/* Imagen base / slider */
.arx-card__media,
.arx-card__media--slider{
  position:relative;
  aspect-ratio:4/3;
  background:#e5e7eb;
  overflow:hidden;
}

/* Carrusel: imágenes en COVER (llena todo el espacio, puede recortar) */
#arx-ps .arx-card__media img,
#arx-ps .arx-card__slide img{
  width:100%;
  height:100%;
  object-fit:cover;
  object-position:center;
  display:block;
  transform:none !important;
  transition:none;
}

/* Slides carrusel */
.arx-card__slide{
  position:absolute;
  inset:0;
  opacity:0;
  pointer-events:none;
  transition:opacity .25s ease;
}
.arx-card__slide.is-active{
  opacity:1;
  pointer-events:auto;
}

/* Flechas carrusel (base, luego override "modern arrows") */
.arx-card__slider-nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:28px;
  height:28px;
  border-radius:999px;
  border:none;
  background:rgba(255,255,255,0.9);
  box-shadow:0 1px 4px rgba(15,23,42,.25);
  display:flex;
  align-items:center;
  justify-content:center;
  cursor:pointer;
  z-index:2;
  color:#4b5563;
}
.arx-card__slider-nav--prev{ left:8px; }
.arx-card__slider-nav--next{ right:8px; }
.arx-card__slider-nav:hover{ background:#ffffff; }

/* Dots carrusel – ocultos */
.arx-card__slider-dots{ display:none !important; }

/* Badge simple */
.arx-card__badge{
  position:absolute;
  top:8px;
  left:8px;
  background:#111827;
  color:#fff;
  padding:4px 10px;
  border-radius:999px;
  font-size:11px;
}

/* Etiquetas tipo "Destacado" */
.arx-card__labels{
  position:absolute;
  top:10px;
  left:10px;
  display:flex;
  gap:6px;
}
.arx-card__label{
  padding:3px 9px;
  border-radius:999px;
  font-size:11px;
  font-weight:700;
  color:#ffffff;
  text-transform:uppercase;
  letter-spacing:.03em;
}
.arx-card__label--primary{ background:var(--arx-brand); }
.arx-card__label--secondary{ background:#f97316; }

/* Cuerpo del card */
.arx-card__body{
  padding:10px 14px 14px;
  display:flex;
  flex-direction:column;
}

/* Header de texto */
.arx-card__header{
  display:flex;
  flex-direction:column;
  gap:2px;
  margin-bottom:4px;
}

/* Tipo de inmueble */
.arx-card__type{
  font-size:11px;
  font-weight:500;
  color:#373737;
}

/* Ubicación (1 línea con "…" para evitar romper tarjetas) */
.arx-card__location{
  display:flex;
  align-items:center;
  gap:4px;
  font-size:14px;
  font-weight:500;
  color:var(--arx-ink);
  min-width:0;
  max-width:100%;
  flex-wrap:nowrap;
  overflow:hidden;
  white-space:nowrap;

  min-height:22px;
}

.arx-card__location.is-empty{ visibility:hidden; }


/* Pin ubicación */
.arx-card__loc-dot{
  display:inline-block !important;
  width:16px !important;
  height:16px !important;
  flex:0 0 16px !important;
  background:no-repeat center / contain
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24'%3E%3Cpath fill='%23EE2624' d='M12 2c-3.86 0-7 3.14-7 7 0 5.25 7 13 7 13s7-7.75 7-13c0-3.86-3.14-7-7-7zm0 9.5A2.5 2.5 0 1 1 12 6a2.5 2.5 0 0 1 0 5.5z'/%3E%3C/svg%3E") !important;
  border-radius:0 !important;
}

/* Texto ubicación (truncado) */
#arx-ps .arx-card__location > :is(span,a,div,p,small,strong):not(.arx-card__loc-dot){
  min-width:0 !important;
  flex:1 1 auto !important;
  overflow:hidden !important;
  text-overflow:ellipsis !important;
  white-space:nowrap !important;
}

/* Precio */
.arx-card__price-label{
  margin-top:6px;
  font-size:10px;
  text-transform:uppercase;
  color:var(--arx-muted);
}
.arx-card__price-main{
  font-size:22px;
  font-weight:600;
  color:var(--arx-ink);
  margin-top:2px;
}
.arx-card__price-admin{
  font-size:12px;
  color:var(--arx-muted);
  margin-left:4px;
}

/* Divider */
.arx-card__divider{
  margin:8px 0 10px;
  width:100%;
  height:1px;
  background:#75757537;
  border-radius:999px;
  display:block;
}

/* Features */
.arx-card__features{
  display:flex;
  flex-wrap:wrap;
  gap:6px 14px;
  margin-bottom:6px;
}
.arx-card__feature{
  display:inline-flex;
  align-items:center;
  gap:4px;
  font-size:11px;
  color:#374151;
  font-weight:450;
  white-space:nowrap;
}

/* Iconos features */
.arx-card__feature-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 auto;
  line-height:1;
}
#arx-ps .arx-card__feature-icon .es-icon{
  font-size:18px;
  width:auto;
  height:auto;
  display:inline-block;
  line-height:1;
  color:var(--arx-brand) !important;
}
#arx-ps .arx-card__feature-icon svg,
#arx-ps .arx-card__feature-icon svg *{
  width:18px;
  height:18px;
  display:block;
  fill:none !important;
  stroke:var(--arx-brand) !important;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* Título / excerpt */
.arx-card__title{
  margin:2px 0 0;
  font-size:14px;
  font-weight:600;
}
.arx-card__title a{ color:var(--arx-ink); text-decoration:none; }

.arx-card__meta{
  list-style:none;
  margin:4px 0 0;
  padding:0;
  display:flex;
  gap:12px;
  font-size:12px;
  color:var(--arx-muted);
}
.arx-card__excerpt{
  font-size:13px;
  color:#4b5563;
  margin:4px 0 0;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
#arx-ps[data-view="list"][data-layout="grid"] .arx-card__excerpt,
#arx-ps[data-view="map"] .arx-card__excerpt{ display:none !important; }

/* Inmobiliaria (1 línea con "…" igual que ubicación) */
.arx-card__agency{
  margin-top:4px;
  display:flex;
  align-items:center;
  gap:6px;

  min-width:0;
  max-width:100%;
  flex-wrap:nowrap;
  overflow:hidden;
  white-space:nowrap;

  min-height:20px;
  line-height:20px;
}
.arx-card__agency-label{
  font-weight:600;
  flex:0 0 auto;
  white-space:nowrap;
}
.arx-card__agency-name{
  font-weight:400;
  color:var(--arx-ink);
  min-width:0;
  flex:1 1 auto;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

/* Placeholder: ocupa pero no se ve */
#arx-ps .arx-card__agency.is-empty{
  visibility:hidden;
}

/* Acciones */
.arx-card__actions{
  margin-top:auto;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

/* Hover card */
.arx-card:hover{
  transform:translateY(-3px);
  box-shadow:0 14px 32px rgba(15,23,42,.12);
}
.arx-card:hover .arx-card__media img{ transform:none !important; }

/* Grid desktop (vista LIST grid) */
#arx-ps[data-view="list"][data-layout="grid"] .arx-results{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:16px;
  max-width:1100px;
  margin-left:auto;
  margin-right:auto;
}
#arx-ps[data-view="list"][data-layout="grid"] .arx-card{ flex-direction:column; }
#arx-ps[data-view="list"][data-layout="grid"] .arx-card__media{
  flex:0 0 auto;
  width:100%;
  height:170px;
}

/* Grid responsive - 3 columnas en pantallas medianas */
@media (min-width: 769px) and (max-width: 1199px) {
  #arx-ps[data-view="list"][data-layout="grid"] .arx-results{
    grid-template-columns:repeat(3,minmax(0,1fr));
    max-width:100%;
  }
}

/* Paginación */
.arx-pagination{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}
.arx-page{
  min-width:32px;
  height:32px;
  border-radius:999px;
  border:1px solid #e5e7eb;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-size:13px;
  color:var(--arx-ink);
  background:#fff;
}
.arx-page.is-current{
  background:var(--arx-brand);
  border-color:var(--arx-brand);
  color:#fff;
}
.arx-loadmore-wrap{
  margin-top:16px;
  margin-bottom:8px;
  text-align:center;
}
#arx-load-more[disabled]{ opacity:.7; cursor:default; }

/* ============================================================
   BOTONES DE VISTA (LIST / GRID / MAP)
   ============================================================ */
#arx-ps .arx-view-toggle{
  display:inline-flex;
  align-items:center;
  gap:8px;
  margin-left:6px;
}
#arx-ps .arx-icon-toggle{
  border-radius:999px;
  border:1px solid transparent;
  background:#ffffff;
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:0;
  cursor:pointer;
  flex:0 0 auto;
  color:#6b7280;
  transition:background .15s,border-color .15s,color .15s,transform .15s;
}
#arx-ps .arx-icon-toggle:hover:not(.is-active){
  background:#f3f4f6;
  border-color:#e5e7eb;
  color:#111827;
}
#arx-ps .arx-icon-toggle.is-active{
  background:var(--arx-brand);
  border-color:var(--arx-brand);
  color:#ffffff;
}
#arx-ps .arx-icon-toggle svg rect,
#arx-ps .arx-icon-toggle svg line,
#arx-ps .arx-icon-toggle svg circle,
#arx-ps .arx-icon-toggle svg polygon,
#arx-ps .arx-icon-toggle svg path{
  fill:currentColor !important;
  stroke:currentColor !important;
}
#arx-ps .arx-icon-toggle.is-active svg,
#arx-ps .arx-icon-toggle.is-active svg *{
  color:#ffffff !important;
  fill:#ffffff !important;
  stroke:#ffffff !important;
}

/* ============================================================
   RESPONSIVE GENERAL (DESKTOP → TABLET)
   ============================================================ */
@media (max-width:1200px){
  #arx-ps[data-view="list"][data-layout="grid"] .arx-results{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
  #arx-ps[data-view="map"] .arx-results{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media (max-width:1024px){
  .arx-layout{
    flex-direction:column;
    padding:0 16px;
    margin:12px auto 32px;
  }
  .arx-results{ flex:1 1 auto; max-width:100%; }

  /* ✅ Mapa OCULTO por defecto en tablet */
  .arx-map{
    display:none;
    position:relative;
    top:0;
    width:100%;
    height:520px;
    min-height:520px;
    max-width:100%;
  }

  /* Vista mapa en tablet: mapa arriba, resultados abajo en 2 columnas */
  #arx-ps[data-view="map"] .arx-layout{ 
    flex-direction:column !important; 
    max-width:100% !important;
    padding:0 16px !important;
  }
  #arx-ps[data-view="map"] .arx-map{
    position:relative !important;
    width:100% !important;
    max-width:100% !important;
    flex:0 0 auto !important;
    height:350px !important;
    min-height:350px !important;
    margin-bottom:16px !important;
    display:block !important;
    order:1 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
  }
  #arx-ps[data-view="map"] .arx-results{
    width:100% !important;
    max-width:100% !important;
    max-height:none !important;
    height:auto !important;
    overflow:visible !important;
    order:2 !important;
    display:grid !important;
    grid-template-columns:repeat(2, 1fr) !important;
    gap:14px !important;
    padding-right:0 !important;
  }
  /* Tarjetas completas en tablet */
  #arx-ps[data-view="map"] .arx-results .arx-card{
    min-height:260px !important;
    overflow:visible !important;
  }
  #arx-ps[data-view="map"] .arx-results .arx-card .arx-card__media,
  #arx-ps[data-view="map"] .arx-results .arx-card .arx-card__media--slider{
    height:120px !important;
    min-height:120px !important;
  }
  #arx-ps[data-view="map"] .arx-results .arx-card .arx-card__body{
    display:flex !important;
    min-height:130px !important;
  }
}

/* ============================================================
   MOBILE (≤768px)
   ============================================================ */
@media (max-width:768px){
  .arx-filters{
    max-width:100%;
    padding:0 12px;
    margin:0 auto 12px;
    display:flex;
    flex-direction:column;
    gap:10px;
  }

  .arx-filters__top{
    flex-direction:column;
    align-items:stretch;
    gap:0;
    width:100%;
  }
  .arx-filters__search{ width:100%; padding:6px 10px; }

  /* Carrusel de pills */
  .arx-filters__pills{
    display:flex;
    flex-direction:row;
    align-items:center;
    gap:8px;
    overflow-x:auto;
    overflow-y:hidden;
    scrollbar-width:none;
    padding:4px 0 6px;
    margin:0;
    /* -webkit-overflow-scrolling:touch; -- REMOVIDO: causa problemas de z-index en iOS */
  }
  .arx-filters__pills::-webkit-scrollbar{ display:none; }

  .arx-pill-wrap{ flex-shrink:0; }
  .arx-pill{
    padding:7px 28px 7px 12px;
    font-size:13px;
    white-space:nowrap;
    min-height:36px;
    cursor:pointer; /* Necesario para eventos touch en iOS */
    -webkit-tap-highlight-color:transparent;
  }
  .arx-pill__caret{ right:8px; }

  /* Dropdowns en móvil */
  .arx-dd{
    position:fixed;
    left:16px;
    right:16px;
    top:22%;
    width:auto;
    max-width:none;
    max-height:72vh;
    overflow-y:auto;
    z-index:999999;
    box-shadow:0 20px 50px rgba(0,0,0,0.25);
    -webkit-transform:translateZ(0); /* Forzar GPU en iOS */
    transform:translateZ(0);
  }
  .arx-dd--wide{ max-width:none; }

  /* Ordenar por + botones vista */
  .arx-filters__order-row{
    display:flex;
    flex-direction:column;
    align-items:flex-start;
    gap:6px;
    padding:0;
    margin:4px 0 0;
  }
  .arx-order{
    width:100%;
    display:flex;
    align-items:center;
    gap:6px;
    white-space:nowrap;
    font-size:13px;
  }
  .arx-order select{
    flex:1 1 auto;
    max-width:100%;
    padding:6px 12px;
    font-size:13px;
  }

  #arx-ps .arx-view-toggle{
    display:flex;
    align-items:center;
    gap:6px;
    margin:0;
  }
  #arx-ps .arx-icon-toggle{
    width:36px;
    height:36px;
    border-radius:999px;
    border:1px solid #e5e7eb;
  }

  /* Ocultar LIST en mobile */
  #arx-ps .arx-view-toggle #arx-btn-list{ display:none !important; }

  .arx-summary{ padding:0 12px; font-size:12px; }
  .arx-active{ padding:0 12px; gap:6px; }
  .arx-active-pill{ font-size:11px; padding:4px 8px; }

  .arx-layout{
    padding:0 12px;
    margin:8px auto 32px;
    display:flex;
    flex-direction:column;
    gap:12px;
  }
  .arx-results{ flex:1 1 auto; max-width:100%; gap:14px; }

  /* LIST en móvil */
  #arx-ps[data-view="list"][data-layout="grid"] .arx-results{
    display:flex;
    flex-direction:column;
  }

  /* MAP en móvil - mapa arriba, tarjetas en columna abajo */
  #arx-ps[data-view="map"] .arx-layout{ 
    flex-direction:column !important;
    padding:0 12px !important;
  }
  
  /* Tarjetas en vista mapa móvil */
  #arx-ps[data-view="map"] .arx-results .arx-card{
    min-height:auto !important;
    overflow:visible !important;
  }

  .arx-card{ flex-direction:column; min-height:auto; }
  .arx-card__media,
  .arx-card__media--slider{
    flex:0 0 auto;
    width:100%;
    height:220px;
  }

  .arx-card__body{ padding:12px 14px; }
  .arx-card__price-main{ font-size:22px; }
  .arx-card__title{ font-size:14px; }
  .arx-card__location,
  .arx-card__meta{ font-size:12px; }

  .arx-panel__inner{
    width:calc(100% - 24px);
    max-width:100%;
    max-height:85vh;
  }
  .arx-panel__body{ padding:12px 14px; }
  .arx-panel__footer{ padding:10px 14px; }

  .arx-pagination{ justify-content:center; gap:4px; }
  .arx-page{ min-width:36px; height:36px; font-size:14px; }
}

/* ============================================================
   MAPA — CONTROLES + INFO WINDOW PULIDOS
   ============================================================ */
.arx-map .gm-style .gm-fullscreen-control,
.arx-map .gm-style .gm-svpc,
.arx-map .gm-style .gmnoprint > div,
.arx-map .gm-style .gm-control-active,
.arx-map .gm-style .gm-bundled-control .gmnoprint > div{
  border-radius:12px !important;
  background:#ffffff !important;
  box-shadow:0 6px 16px rgba(15,23,42,.15) !important;
  overflow:hidden;
}
.arx-map .gm-style .gm-style-cc,
.arx-map .gm-style .gm-style-cc span,
.arx-map .gm-style .gm-style-cc a{
  border-radius:10px !important;
  background:rgba(255,255,255,.9) !important;
}
.gm-style .gm-style-iw-d{ border-radius:12px !important; }
.gm-style .gm-style-iw-tc::after{ display:none !important; }
.gm-style .gm-style-iw-c{
  border-radius:12px !important;
  box-shadow:0 16px 40px rgba(15,23,42,.25) !important;
}
.gm-style .gm-style-marker-label{
  font-weight:800 !important;
  font-size:13px !important;
  line-height:1 !important;
}

/* OVERRIDES finales para evitar recortes por parents */
.arx-layout,
.arx-results{
  overflow:visible !important;
  transform:none !important;
}

/* ============================================================
   ARROWS modernos SIN círculo (override)
   ============================================================ */
button.arx-card__slider-nav{
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  box-shadow:none !important;
  -webkit-backdrop-filter:none !important;
  backdrop-filter:none !important;

  font-size:0 !important;
  line-height:0 !important;
  color:#fff !important;

  position:relative;
  padding:0 !important;
  cursor:pointer;
  z-index:30 !important;
}
button.arx-card__slider-nav::before{
  content:"";
  display:block;
  width:24px !important;
  height:24px !important;
  border-right:5px solid currentColor !important;
  border-bottom:5px solid currentColor !important;
  transform:rotate(135deg);
  filter:drop-shadow(0 2px 2px rgba(0,0,0,.55));
}
button.arx-card__slider-nav--next::before{ transform:rotate(-45deg); }
button.arx-card__slider-nav::after{
  content:"";
  position:absolute;
  inset:-34px;
}
button.arx-card__slider-nav--prev,
button.arx-card__slider-nav--next{
  position:absolute !important;
  top:50% !important;
  transform:translateY(-50%) !important;
}
button.arx-card__slider-nav--prev{ left:22px !important; }
button.arx-card__slider-nav--next{ right:22px !important; }
button.arx-card__slider-nav:hover{
  color:var(--arx-brand, #EE2624) !important;
  transform:translateY(-50%) scale(1.08) !important;
}
button.arx-card__slider-nav:focus-visible{
  outline:3px solid rgba(238,38,36,.35) !important;
  outline-offset:4px !important;
}
@media (max-width:768px){
  button.arx-card__slider-nav::before{
    width:22px !important;
    height:22px !important;
    border-right-width:4px !important;
    border-bottom-width:4px !important;
  }
  button.arx-card__slider-nav::after{ inset:-30px; }
  button.arx-card__slider-nav--prev{ left:14px !important; }
  button.arx-card__slider-nav--next{ right:14px !important; }
}
/* ============================================================
   FALLBACK UI (FIX alineación + sin fondo + sin punto) - 1400px
   ============================================================ */
#arx-ps .arx-fallback-note{
  /* alineado con el título/buscador */
  max-width:1400px;
  margin: 8px auto 14px;
  padding: 0 16px;

  /* sin caja */
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;

  color: #9ca3af;
  font-size: 13px;
  line-height: 1.35;

  display: block;
  text-align: left;
}

/* si existe el dot, lo matamos */
#arx-ps .arx-fallback-note__dot{ display:none !important; }

/* texto en una sola línea en desktop */
#arx-ps .arx-fallback-note__txt{
  display:block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ✅ ELIMINADO: Chips de fallback suggest (no funcionales) */
#arx-ps .arx-fallback-suggest{
  display: none !important;
}

#arx-ps .arx-fallback-chip{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(148,163,184,.35);
  text-decoration:none;
  color:#111827;
  background:#fff;
}
#arx-ps .arx-fallback-chip:hover{
  border-color:rgba(238,38,36,.6);
}

/* ============================================================
   FALLBACK UI — MÓVIL
   ============================================================ */
@media (max-width: 980px){
  /* en móvil: que no "se pierda" el texto por el nowrap */
  #arx-ps .arx-fallback-note{
    margin: 6px auto 10px;
    padding: 0 14px; /* un pelín menos que desktop */
    font-size: 12.5px;
  }

  #arx-ps .arx-fallback-note__txt{
    white-space: normal;      /* permite 2 líneas si toca */
    overflow: visible;
    text-overflow: clip;
  }

  #arx-ps .arx-fallback-suggest{
    padding: 0 14px;
    gap: 6px;
  }

  #arx-ps .arx-fallback-chip{
    padding: 7px 10px;
    font-size: 12.5px;
  }
}

/* ============================================================
   Modal extras
   ============================================================ */
#arx-panel-extras .arx-extras-block{ margin:0 0 14px; }
#arx-panel-extras .arx-extras-title{ margin:0 0 8px; font-weight:700; }
#arx-panel-extras .arx-estrato-buttons{ gap:8px; flex-wrap:wrap; }
/* ✅ v2.4.0: Parqueaderos en modal extras */
#arx-panel-extras .arx-parking-buttons{ gap:8px; flex-wrap:wrap; }

/* ============================================================
   InfoWindow
   ============================================================ */
#arx-ps .arx-map-infowindow{
  display:flex;
  gap:10px;
  align-items:stretch;
  max-width:280px;
}
#arx-ps .arx-map-infowindow__thumb{
  width:88px;
  flex:0 0 88px;
  border-radius:12px;
  overflow:hidden;
  background:#f3f4f6;
}
#arx-ps .arx-map-infowindow__thumb img{
  width:100%;
  height:88px;
  object-fit:cover;
  display:block;
}
#arx-ps .arx-map-infowindow__body{
  display:flex;
  flex-direction:column;
  gap:4px;
  padding:2px 0;
}
#arx-ps .arx-map-infowindow__title{
  font-size:13px;
  font-weight:800;
  color:#111827;
  line-height:1.2;
}
#arx-ps .arx-map-infowindow__price{
  font-size:13px;
  font-weight:900;
  color:var(--arx-brand, #EE2624);
}
#arx-ps .arx-map-infowindow__loc{
  font-size:12px;
  color:#6b7280;
}
#arx-ps .arx-map-infowindow__link{
  margin-top:6px;
  font-size:12px;
  font-weight:800;
  color:#111827;
  text-decoration:none;
  border:1px solid #e5e7eb;
  border-radius:10px;
  padding:7px 10px;
  width:max-content;
  background:#fff;
}
#arx-ps .arx-map-infowindow__link:hover{ background:#f9fafb; }



/* ============================================================
   CTAs — OUTLINE (borde + texto + icono mismo color)
   - Elimina por completo el esquema anterior "blanco"
   ============================================================ */

/* Base CTA */
#arx-ps .arx-card__actions .arx-cta{
  background:#fff !important;
  border:1.5px solid currentColor !important;
  color:currentColor !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;

  gap:7px !important;
  text-decoration:none !important;
  white-space:nowrap !important;

  height:34px !important;
  padding:0 12px !important;
  border-radius:12px !important;

  line-height:34px !important; /* ✅ centra texto */
}

/* Metodología de colores */
#arx-ps .arx-card__actions .arx-cta--contact{ color:var(--arx-brand) !important; }


/* Texto CTA */
#arx-ps .arx-card__actions .arx-cta__txt{
  color:currentColor !important;
  line-height:1 !important;
  display:inline-flex !important;
  align-items:center !important;
}

/* Icono CTA (SVG y font icons) — FORZADO a currentColor */
#arx-ps .arx-card__actions .arx-cta__ico{
  width:16px !important;
  height:16px !important;
  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  line-height:1 !important;
  color:currentColor !important;
}

/* SVG: cubre stroke y fill (para que NUNCA "desaparezca") */
#arx-ps .arx-card__actions .arx-cta__ico svg,
#arx-ps .arx-card__actions .arx-cta__ico svg *{
  stroke:currentColor !important;
  fill:currentColor !important;
  color:currentColor !important;
}

/* Font icons */
#arx-ps .arx-card__actions .arx-cta__ico i,
#arx-ps .arx-card__actions .arx-cta__ico .es-icon,
#arx-ps .arx-card__actions .arx-cta__ico [class*="fa-"]{
  color:currentColor !important;
}

/* Hover (fallback + color-mix) */
#arx-ps .arx-card__actions .arx-cta:hover{
  background:rgba(0,0,0,.04) !important;
}
@supports (background: color-mix(in srgb, red 10%, white)){
  #arx-ps .arx-card__actions .arx-cta:hover{
    background: color-mix(in srgb, currentColor 12%, #fff) !important;
  }
}

/* Disabled */
#arx-ps .arx-card__actions .arx-cta.is-disabled{
  opacity:.55 !important;
  pointer-events:none !important;
}

/* GRID + MAP: 3 en una línea */
#arx-ps[data-view="list"][data-layout="grid"] .arx-card__actions,
#arx-ps[data-view="map"] .arx-card__actions{
  margin-top:auto;
  display:flex !important;
  flex-wrap:nowrap !important;
  justify-content:space-between !important;
  align-items:center !important;
  gap:8px !important;
}
#arx-ps[data-view="list"][data-layout="grid"] .arx-card__actions .arx-cta,
#arx-ps[data-view="map"] .arx-card__actions .arx-cta{
  flex:1 1 0 !important;
  min-width:0 !important;
  width:auto !important;

  height:34px !important;
  padding:0 10px !important;
  border-radius:12px !important;

  display:inline-flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:7px !important;

  font-size:12px !important;
  line-height:34px !important;
  white-space:nowrap !important;
}

/* Responsive extra */
@media (max-width:480px){
  #arx-ps[data-view="list"][data-layout="grid"] .arx-results{ grid-template-columns:1fr; }
  #arx-ps[data-view="map"] .arx-results{ grid-template-columns:1fr; }
}


/* 1) La card completa ocupa el alto del grid */
.arx-results .arx-card{
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 2) Media con alto estable (evita saltos) */
.arx-results .arx-card__media{
  aspect-ratio: 16/9;   /* o 4/3 si así las tienes */
  overflow: hidden;
}
.arx-results .arx-card__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* 3) El cuerpo se comporta como columna y empuja el botón al fondo */
.arx-results .arx-card__body{
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 4) Reservar alturas para líneas "variables" (título + ubicación) */
.arx-results .arx-card__title{
  min-height: 44px;      /* 2 líneas aprox */
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Ubicación: aunque esté vacía, que reserve espacio */
.arx-results .arx-card__location{
  min-height: 18px;      /* 1 línea */
  line-height: 1.2;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Truco clave: si está vacío, metemos un espacio invisible para mantener el alto */
.arx-results .arx-card__location:empty::before{
  content: "\00a0";
}

/* 5) El bloque de acciones (Contactar) siempre al fondo */
.arx-results .arx-card__cta,
.arx-results .arx-card__actions,
.arx-results .arx-card__footer{
  margin-top: auto;
}
/* ============================================================
   SEPARADOR entre Estrato y Características
   ============================================================ */
#arx-panel-extras .arx-extras-separator {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 18px 0 14px;
}
/**
 * Estilos del Mapa con Clustering
 * Agregar al final de property-search.css
 */

/* ============================================================
   CLUSTERS DE MARCADORES
   ============================================================ */

/* Cluster base */
.arx-map-cluster {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-family: 'Roboto', Arial, sans-serif;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.3);
  box-shadow: 0 3px 10px rgba(0,0,0,0.25);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.arx-map-cluster:hover {
  transform: scale(1.1);
  box-shadow: 0 5px 15px rgba(0,0,0,0.35);
}

/* Cluster pequeño (2-10) */
.arx-cluster-small {
  background: linear-gradient(135deg, #4CAF50 0%, #388E3C 100%);
  width: 40px !important;
  height: 40px !important;
  font-size: 14px;
}

/* Cluster mediano (11-50) */
.arx-cluster-medium {
  background: linear-gradient(135deg, #FF9800 0%, #F57C00 100%);
  width: 50px !important;
  height: 50px !important;
  font-size: 15px;
}

/* Cluster grande (51-100) */
.arx-cluster-large {
  background: linear-gradient(135deg, #E53935 0%, #C62828 100%);
  width: 60px !important;
  height: 60px !important;
  font-size: 16px;
}

/* Cluster muy grande (100+) */
.arx-cluster-xlarge {
  background: linear-gradient(135deg, #9C27B0 0%, #7B1FA2 100%);
  width: 70px !important;
  height: 70px !important;
  font-size: 17px;
}

/* ============================================================
   VENTANA DE INFORMACIÓN (InfoWindow)
   ============================================================ */

.arx-map-infowindow {
  max-width: 280px;
  font-family: 'Roboto', Arial, sans-serif;
}

.arx-map-iw-image {
  width: 100%;
  height: 140px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  margin: -12px -12px 12px -12px;
  width: calc(100% + 24px);
}

.arx-map-iw-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.arx-map-iw-image:hover img {
  transform: scale(1.05);
}

.arx-map-iw-content {
  padding: 0;
}

.arx-map-iw-type {
  display: inline-block;
  background: #f5f5f5;
  color: #666;
  font-size: 11px;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 4px;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.arx-map-iw-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.arx-map-iw-title a {
  color: #333;
  text-decoration: none;
}

.arx-map-iw-title a:hover {
  color: #E53935;
}

.arx-map-iw-address {
  margin: 0 0 8px;
  font-size: 12px;
  color: #666;
  display: flex;
  align-items: flex-start;
  gap: 4px;
}

.arx-map-iw-address i {
  color: #E53935;
  font-size: 14px;
  flex-shrink: 0;
}

.arx-map-iw-price {
  margin: 0 0 10px;
  font-size: 18px;
  font-weight: 700;
  color: #E53935;
}

.arx-map-iw-features {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding-top: 10px;
  border-top: 1px solid #eee;
}

.arx-map-iw-features span {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  color: #555;
}

.arx-map-iw-features i {
  color: #999;
  font-size: 14px;
}

.arx-map-iw-btn {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: #E53935;
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.arx-map-iw-btn:hover {
  background: #C62828;
  color: #fff;
}

/* Estilos para el contenedor del InfoWindow de Google */
.gm-style-iw {
  padding: 12px !important;
  border-radius: 10px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important;
}

.gm-style-iw-d {
  overflow: hidden !important;
}

/* Botón de cerrar */
.gm-style-iw button.gm-ui-hover-effect {
  top: 4px !important;
  right: 4px !important;
  width: 28px !important;
  height: 28px !important;
  opacity: 0.7;
}

.gm-style-iw button.gm-ui-hover-effect:hover {
  opacity: 1;
}

/* ============================================================
   MARCADORES INDIVIDUALES
   ============================================================ */

/* Animación de marcador al aparecer */
@keyframes markerBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.arx-marker-animated {
  animation: markerBounce 0.5s ease;
}

/* ============================================================
   LEYENDA DEL MAPA (Opcional)
   ============================================================ */

.arx-map-legend {
  position: absolute;
  bottom: 24px;
  left: 10px;
  background: #fff;
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.15);
  font-size: 12px;
  z-index: 1;
}

.arx-map-legend-title {
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
}

.arx-map-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.arx-map-legend-item:last-child {
  margin-bottom: 0;
}

.arx-map-legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  flex-shrink: 0;
}

.arx-map-legend-dot.green { background: #4CAF50; }
.arx-map-legend-dot.orange { background: #FF9800; }
.arx-map-legend-dot.red { background: #E53935; }
.arx-map-legend-dot.purple { background: #9C27B0; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
  .arx-map-infowindow {
    max-width: 240px;
  }
  
  .arx-map-iw-image {
    height: 120px;
  }
  
  .arx-map-iw-title {
    font-size: 14px;
  }
  
  .arx-map-iw-price {
    font-size: 16px;
  }
  
  .arx-cluster-small { width: 36px !important; height: 36px !important; font-size: 12px; }
  .arx-cluster-medium { width: 44px !important; height: 44px !important; font-size: 13px; }
  .arx-cluster-large { width: 52px !important; height: 52px !important; font-size: 14px; }
  .arx-cluster-xlarge { width: 60px !important; height: 60px !important; font-size: 15px; }
}

/* ============================================================
   MAPA - POPUP/INFOWINDOW DE GOOGLE MAPS
   ============================================================ */

/* Contenedor principal del InfoWindow */
.gm-style-iw {
  padding: 12px !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 20px rgba(0,0,0,0.2) !important;
  max-width: 290px !important;
}

.gm-style-iw-d {
  overflow: hidden !important;
  max-height: none !important;
}

.gm-style-iw-c {
  padding: 0 !important;
  border-radius: 12px !important;
  max-width: 290px !important;
}

/* Botón cerrar */
.gm-style-iw button.gm-ui-hover-effect {
  top: 4px !important;
  right: 4px !important;
  width: 30px !important;
  height: 30px !important;
  background: rgba(255,255,255,0.9) !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2) !important;
  opacity: 1 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.gm-style-iw button.gm-ui-hover-effect:hover {
  background: #fff !important;
}

.gm-style-iw button.gm-ui-hover-effect > span {
  margin: 0 !important;
}

/* Ocultar flecha del InfoWindow */
.gm-style-iw-tc,
.gm-style-iw-t::after {
  display: none !important;
}

/* ============================================================
   TARJETA RESALTADA - DESACTIVADO
   ============================================================ */

.arx-card--highlighted {
  /* Efecto desactivado */
  box-shadow: inherit;
  transform: none;
  z-index: auto;
  position: relative;
}

.arx-card--highlighted::before {
  display: none;
  content: none;
}

/* ============================================================
   RESPONSIVE - MAPA
   ============================================================ */

@media (max-width: 768px) {
  .arx-map-infowindow {
    max-width: 240px;
  }
  
  .arx-map-infowindow__thumb {
    height: 120px;
  }
  
  .arx-map-infowindow__title {
    font-size: 13px;
  }
  
  .arx-map-infowindow__price {
    font-size: 16px;
  }
}

/* ============================================================
   CLUSTERS - Texto blanco centrado (FORZADO)
   ============================================================ */

/* Clases específicas para nuestros clusters */
.arx-cluster,
.arx-cluster-sm,
.arx-cluster-md,
.arx-cluster-lg,
.arx-cluster-xl {
  color: #fff !important;
  font-weight: bold !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

.arx-cluster div,
.arx-cluster span,
.arx-cluster-sm div,
.arx-cluster-md div,
.arx-cluster-lg div,
.arx-cluster-xl div {
  color: #fff !important;
  font-weight: bold !important;
}

/* Selector para clusters de MarkerClustererPlus */
/* NOTA: Excluir InfoWindow (.gm-style-iw) para no afectar el popup */
.gm-style div[style*="cursor: pointer"] > div:not(.gm-style-iw):not(.gm-style-iw-c):not(.gm-style-iw-d) {
  color: #fff !important;
  font-weight: bold !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

/* InfoWindow - Forzar peso normal en el título */
.gm-style-iw,
.gm-style-iw-c,
.gm-style-iw-d,
.gm-style-iw div,
.gm-style-iw-c div,
.gm-style-iw-d div {
  font-weight: 400 !important;
  color: inherit !important;
  text-shadow: none !important;
}

/* Clusters de Google Maps - múltiples selectores */
.cluster,
.cluster-marker,
[class*="cluster"] {
  color: #fff !important;
}

.cluster div,
.cluster span,
.cluster > div,
.cluster-marker div {
  color: #ffffff !important;
  font-weight: bold !important;
  text-shadow: 0 1px 3px rgba(0,0,0,0.5) !important;
}

/* Forzar en cualquier div con texto centrado dentro del mapa */
#arx-map div[style*="text-align"],
.arx-map div[style*="text-align"] {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5) !important;
}

/* Estilos para el contenedor del cluster */
.gm-style div[title*="inmuebles"],
.gm-style div[title*="Cluster"] {
  color: #fff !important;
}


/* ============================================================
   MÓVIL: MAPA GRANDE - OCUPA CASI TODA LA PANTALLA
   ============================================================ */
@media (max-width: 768px) {
  
  /* Ocultar solo botón de Lista en móvil - mantener Grid y Mapa */
  #arx-ps .arx-view-toggle #arx-btn-list { 
    display: none !important; 
  }
  
  /* ✅ Por defecto: mapa OCULTO en móvil */
  #arx-ps .arx-map {
    display: none !important;
  }
  
  /* ✅ Vista MAPA: mostrar mapa GRANDE (casi toda la pantalla) */
  #arx-ps[data-view="map"] .arx-map {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    /* Altura dinámica: pantalla completa menos header, filtros y espacio para preview de tarjetas */
    height: calc(100vh - 300px) !important;
    height: calc(100dvh - 300px) !important; /* Para móviles con barras dinámicas */
    min-height: 400px !important;
    max-height: 75vh !important;
    margin-bottom: 12px !important;
    order: 1 !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    z-index: 1 !important;
  }
  
  /* ✅ Vista MAPA: layout en columna */
  #arx-ps[data-view="map"] .arx-layout {
    display: flex !important;
    flex-direction: column !important;
  }
  
  /* ✅ Vista MAPA: resultados debajo del mapa */
  #arx-ps[data-view="map"] .arx-results {
    display: flex !important;
    flex-direction: column !important;
    order: 2 !important;
    width: 100% !important;
    gap: 14px !important;
  }
  
  /* ✅ Vista GRID (default): solo resultados en columna */
  #arx-ps[data-view="list"] .arx-layout {
    display: block !important;
  }
  
  #arx-ps[data-view="list"] .arx-results {
    display: flex !important;
    flex-direction: column !important;
    gap: 14px !important;
  }
  
  /* Botón Grid activo cuando está seleccionado */
  #arx-ps[data-view="list"] .arx-view-toggle #arx-btn-grid {
    background: var(--arx-brand) !important;
    border-color: var(--arx-brand) !important;
    color: #fff !important;
  }
  #arx-ps[data-view="list"] .arx-view-toggle #arx-btn-grid svg,
  #arx-ps[data-view="list"] .arx-view-toggle #arx-btn-grid svg * {
    fill: #fff !important;
    stroke: #fff !important;
  }
  
  /* Botón Mapa activo cuando está seleccionado */
  #arx-ps[data-view="map"] .arx-view-toggle #arx-btn-map {
    background: var(--arx-brand) !important;
    border-color: var(--arx-brand) !important;
    color: #fff !important;
  }
  #arx-ps[data-view="map"] .arx-view-toggle #arx-btn-map svg,
  #arx-ps[data-view="map"] .arx-view-toggle #arx-btn-map svg * {
    fill: #fff !important;
    stroke: #fff !important;
  }
  
  /* Tarjeta resaltada en móvil - más pequeña */
  .arx-card--highlighted::before {
    font-size: 10px;
    padding: 3px 8px;
    top: -22px;
  }
  
  /* InfoWindow más pequeño en móvil */
  .gm-style-iw {
    max-width: 200px !important;
    padding: 0 !important;
  }
  
  .gm-style-iw-c {
    max-width: 200px !important;
    padding: 0 !important;
  }
}

/* ============================================================
   PANTALLAS MUY PEQUEÑAS (iPhone SE, etc.)
   ============================================================ */
@media (max-width: 375px) {
  #arx-ps[data-view="map"] .arx-map {
    height: calc(100vh - 280px) !important;
    height: calc(100dvh - 280px) !important;
    min-height: 320px !important;
  }
}

/* ============================================================
   PANTALLAS MÓVILES MÁS GRANDES (iPhone Plus, Android grandes)
   ============================================================ */
@media (min-width: 376px) and (max-width: 768px) {
  #arx-ps[data-view="map"] .arx-map {
    height: calc(100vh - 300px) !important;
    height: calc(100dvh - 300px) !important;
    min-height: 400px !important;
    max-height: 80vh !important;
  }
}

/* ============================================================
   INFOWINDOW - BOTON CERRAR (CORRECCION)
   ============================================================ */

/* Forzar estilos del botón de cerrar en todos los dispositivos */
.gm-style-iw button.gm-ui-hover-effect,
.gm-style-iw-c button.gm-ui-hover-effect,
.gm-style .gm-ui-hover-effect {
  position: absolute !important;
  top: 8px !important;
  right: 8px !important;
  width: 28px !important;
  height: 28px !important;
  background: #fff !important;
  border-radius: 50% !important;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  border: none !important;
  padding: 0 !important;
  z-index: 999 !important;
  opacity: 1 !important;
}

/* Ocultar imagen/icono interno de Google Maps */
.gm-style-iw button.gm-ui-hover-effect img,
.gm-style-iw-c button.gm-ui-hover-effect img,
.gm-style .gm-ui-hover-effect img {
  display: none !important;
}

/* Asegurar que el span con la X sea visible */
.gm-style-iw button.gm-ui-hover-effect span,
.gm-style-iw-c button.gm-ui-hover-effect span,
.gm-style .gm-ui-hover-effect span {
  color: #333 !important;
  font-size: 18px !important;
  font-weight: bold !important;
  line-height: 1 !important;
  display: block !important;
  background: transparent !important;
}
/* ============================================================
   FLECHAS DE GALERÍA - VISIBLES SOLO EN HOVER
   ============================================================ */

/* Desktop: flechas ocultas por defecto, visibles en hover */
@media (hover: hover) and (min-width: 769px) {
  .arx-card__slider-nav {
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease, color 0.2s ease !important;
  }
  
  .arx-card:hover .arx-card__slider-nav,
  .arx-card__media--slider:hover .arx-card__slider-nav {
    opacity: 1;
  }
}

/* Móvil/Touch: flechas siempre visibles */
@media (hover: none), (max-width: 768px) {
  .arx-card__slider-nav {
    opacity: 1 !important;
  }
}
/* Hover del botón cerrar */
.gm-style-iw button.gm-ui-hover-effect:hover,
.gm-style-iw-c button.gm-ui-hover-effect:hover {
  background: #f5f5f5 !important;
}

/* InfoWindow contenedor - sin padding extra */
.gm-style-iw-d {
  overflow: hidden !important;
  padding: 0 !important;
  max-height: none !important;
}

/* Ocultar flecha del InfoWindow */
.gm-style-iw-tc,
.gm-style-iw-t::after {
  display: none !important;
}

/* Móvil - Ajustes específicos para InfoWindow compacto */
@media (max-width: 768px) {
  .gm-style-iw {
    max-width: 155px !important;
    padding: 0 !important;
  }
  
  .gm-style-iw-c {
    max-width: 155px !important;
    padding: 0 !important;
    border-radius: 4px !important;
  }
  
  .gm-style-iw-d {
    overflow: hidden !important;
    padding: 0 !important;
    max-width: 155px !important;
  }
  
  /* Boton cerrar igual que desktop */
  .gm-style-iw button.gm-ui-hover-effect,
  .gm-style-iw-c button.gm-ui-hover-effect,
  .gm-style .gm-ui-hover-effect {
    top: 8px !important;
    right: 8px !important;
    width: 28px !important;
    height: 28px !important;
    background: #fff !important;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3) !important;
  }
  
  .gm-style-iw button.gm-ui-hover-effect span,
  .gm-style-iw-c button.gm-ui-hover-effect span {
    font-size: 18px !important;
  }
}

/* ============================================================
   ANCHOS DE CONTENIDO POR VISTA (Desktop)
   ============================================================ */
@media (min-width: 769px) {
  /* Vista LISTA - 1000px */
  #arx-ps[data-view="list"][data-layout="list"] .arx-layout {
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Vista GRID - 1100px */
  #arx-ps[data-view="list"][data-layout="grid"] .arx-layout {
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Vista MAPA - 1100px */
  #arx-ps[data-view="map"] .arx-layout {
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* ============================================================
   ANCHOS DE FILTROS Y BREADCRUMBS POR VISTA (Desktop)
   ============================================================ */
@media (min-width: 769px) {
  /* Vista LISTA - Filtros, breadcrumbs, chips y mensajes a 1000px */
  #arx-ps[data-view="list"][data-layout="list"] .arx-title-row,
  #arx-ps[data-view="list"][data-layout="list"] .arx-filters,
  #arx-ps[data-view="list"][data-layout="list"] .arx-active,
  #arx-ps[data-view="list"][data-layout="list"] .arx-fallback-note {
    max-width: 1000px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Vista GRID - Filtros, breadcrumbs, chips y mensajes a 1100px */
  #arx-ps[data-view="list"][data-layout="grid"] .arx-title-row,
  #arx-ps[data-view="list"][data-layout="grid"] .arx-filters,
  #arx-ps[data-view="list"][data-layout="grid"] .arx-active,
  #arx-ps[data-view="list"][data-layout="grid"] .arx-fallback-note {
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
  
  /* Vista MAPA - Filtros, breadcrumbs, chips y mensajes a 1100px */
  #arx-ps[data-view="map"] .arx-title-row,
  #arx-ps[data-view="map"] .arx-filters,
  #arx-ps[data-view="map"] .arx-active,
  #arx-ps[data-view="map"] .arx-fallback-note {
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}
/* ============================================================
   INFOWINDOW - Forzar texto normal (sin negrilla)
   ============================================================ */
.gm-style .gm-style-iw-c,
.gm-style .gm-style-iw-d,
.gm-style .gm-style-iw,
.gm-style .gm-style-iw-c *,
.gm-style .gm-style-iw-d *,
.gm-style .gm-style-iw * {
  font-weight: 400 !important;
  text-shadow: none !important;
}

/* Excepción: botón Contactar mantiene font-weight 600 */
.gm-style .gm-style-iw a.js-arx-open-lead,
.gm-style .gm-style-iw-c a.js-arx-open-lead,
.gm-style .gm-style-iw-d a.js-arx-open-lead {
  font-weight: 600 !important;
}