/* -------------------------------------------------------------
   CONTENEDORES PRINCIPALES
   ------------------------------------------------------------- */
#cerca-mi {
    margin: 30px 0 40px 0;
}

.cerca-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  position: relative;
}

/* -------------------------------------------------------------
   PANEL IZQUIERDO (RESULTADOS)
   ------------------------------------------------------------- */
.cerca-left {
  display: flex;
  flex-direction: column;
}
/* -------------------------------------------------------------
   CONTENEDOR FILTROS
   ------------------------------------------------------------- */
.cerca-actions-container {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    flex-direction: row;
    margin-top: 15px;
    border: 1px solid #ddd;
}
#open-filters, #open-sort {
    background-color: #ffffff;
    width: 100%;
    height: 43px;
    color: #1e293b;
    border-radius: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    font-size: 16.3px;
}
#open-filters:hover, #open-sort:hover, #toggle-map:hover {
    background-color: #f0f5fa;
}
button#open-sort {
    border-right: 1px solid #ddd !important;
}
span.button-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 3px;
}
/* No mostrar botón en desktop */
#toggle-map {
    display: none;
}
/* -------------------------------------------------------------
   CONTADOR + BORRAR TODOS LOS FILTROS
   ------------------------------------------------------------- */
#cerca-results-counter {
    font-size: 16.5px;
    font-weight: bold;
    color: #333;
    margin: 15px 0 20px 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
#results-count {
    line-height: 1.2;
}

button#clear-all-filters {
    background: none;
    color: #4a4a4a;
    box-shadow: none;
    padding: 0;
    text-decoration: underline;
    font-size: 15px;
    margin: 3px 0 5px 0;
}
button#clear-all-filters:hover {
    color: #cc3530;
}

.empty-results {
  text-align: center;
  padding: 2rem 1rem;
}
.empty-results-icon {
  display: block;
  margin: 0 auto 1rem;
  fill: #4b5563;
  opacity: 0.7;
}
.empty-results-text {
    margin: 0;
    color: #4b5563;
    line-height: 1.5;
    font-weight: 300;
    font-size: 19px;
    margin-top: 3px;
}

/* -------------------------------------------------------------
   CONTENEDOR DE RESULTADOS (cerca-item)
   ------------------------------------------------------------- */
.cerca-results {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 0px 5px;
    flex: 1 1 auto;
    overflow-y: auto;
}

.cerca-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 1px 3px 0 #1111111a, 0 0 1px 0 #e1e1e1;
    margin-bottom: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    min-height: 170px;
    max-height: 170px;
}
.cerca-item:hover {
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
}

/* Imagen + Favorito */
.cerca-link-wrap {
  max-width: 30%;
  min-width: 30%;
  display: block;
}
.cerca-img {
    position: relative;
}
.cerca-img img {
    width: 100%;
    height: 170px;
    border-radius: 4px 0 0 4px;
    object-fit: cover;
    transition: opacity .1s linear;
}
.cerca-img img:hover {
  opacity: 0.85;
}
.cerca-img .favorite-button {
    z-index: 2;
    position: absolute;
    top: 7px;
    right: 7px;
    border: none;
    border-radius: 50%;
    background: white;
    cursor: pointer;
    transition: background-color 0.3s;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.cerca-img .favorite-button:hover {
    background-color: #fff;
}
.cerca-img .favorite-icon {
    width: 20px;
    height: 20px;
    transition: fill 0.3s ease, stroke 0.3s ease;
}
.cerca-img .favorite-icon path:hover {
    fill: #ffcccc;
    stroke: #ff0000 !important;
}
.cerca-img .favorite-icon.active:hover {
  filter: brightness(1.3);
}

/* Detalles (título, rating, distancia) */
.cerca-detalles {
    flex: 1;
    padding: 15px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 170px;
    min-width: 70%;
    max-width: 70%;
    gap: 8px;
}
.cerca-item-header {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

/* El enlace que contiene el título pasa a ser el flex‐item que ocupa todo el espacio libre */
.cerca-item-header > a {
  display: flex;
  overflow: hidden;
  text-decoration: none;
}
/* El h3 ahora es hijo directo de un flex container (el <a>) */
.cerca-item-title {
  flex: 1 1 auto;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #1e293b;
  font-size: 19px;
  font-weight: bold;
}
.cerca-item-title a {
  color: inherit;
  text-decoration: none;
}
.cerca-item-title:hover {
  text-decoration: underline;
}
/* Las estrellas nunca encogen ni crecen, y se quedan pegadas a la derecha */
.hotel-stars {
  flex: 0 0 auto;
  white-space: nowrap;
}

.planifica-item-rating {
  font-size: 13.5px;
  color: #666;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
a.planifica-item-rating:hover,
a.planifica-item-rating:focus {
    color: #666;
}
.planifica-item-rating .map-tooltip-rating-number {
    padding: 3.5px 4px 3px 2px;
}
.planifica-item-rating .map-tooltip-rating-opinions,
.planifica-item-rating .map-tooltip-no-rating {
    font-size: 12.5px;
}
.info-line-container {
    font-size: 13px;
    color: #334155;
}
.info-line-container svg {
    width: 16px;
    height: 16px;
    vertical-align: text-bottom;
    margin-right: 2px;
    color: #1e293b;
}
.cerca-distance-container {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
}
.cerca-distance-container:hover {
    text-decoration: underline;
}
svg.distance-icon {
    width: 16px;
    height: 16px;
    margin-right: 2px;
}
.cerca-distance {
    font-size: 13px;
    color: #334155;
    margin: 0;
    display: inline;
}

/* -------------------------------------------------------------
   PANEL DERECHO (MAPA)
   ------------------------------------------------------------- */
.cerca-right {
  position: sticky;
  top: 0;
  height: 100vh;
  max-height: 1400px;
}
#cerca-map {
    width: 100%;
    height: 100%;
    border-radius: 1px;
    user-select: text;
}

/* botón “Actualizar resultados” */
#cerca-refresh {
    position: absolute;
    top: 12px;
    right: 50%;
    transform: translateX(50%);
    z-index: 1050;
    background: #ffffff;
    color: #1e293b;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    font-size: 15px;
    display: inline-flex;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border-radius: 50px;
}
#cerca-refresh:hover {
    background-color: #1e293b;
    color: white;
}

#cerca-refresh svg {
  margin-right: 5px;
  vertical-align: middle;
}

/* ─── Clusters marcadores ─────────────── */
.cluster-icon {       /* contenedor invisible, evita tamaño auto de texto */
  background: transparent;
  border-radius: 50%;
}
.cluster-inner {
  --size: 34px;       /* se sobrescribe por tamaño */
  width:  var(--size);
  height: var(--size);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 600 14px/1 'Inter', sans-serif;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.18);
  transform: scale(.3);
  animation: cluster-pop .25s ease-out forwards;
  line-height: 0;
}

/* escalado al aparecer */
@keyframes cluster-pop {
  60% { transform: scale(1.15); }
  100%{ transform: scale(1);    }
}

/* Pequeño  1–9 */
.cluster-inner.small  {
  --size: 32px;
  background: radial-gradient(circle at 30% 30%, #38bdf8 0%, #0ea5e9 100%);
}
/* Mediano  10–99 */
.cluster-inner.medium {
  --size: 38px;
  background: radial-gradient(circle at 30% 30%, #4ade80 0%, #22c55e 100%);
}
/* Grande  100+ */
.cluster-inner.large  {
  --size: 46px;
  background: radial-gradient(circle at 30% 30%, #facc15 0%, #eab308 100%);
  font-size: 15px;
}

/* hover ➜ levanta y añade halo */
.leaflet-marker-icon.cluster-icon:hover .cluster-inner {
  box-shadow: 0 6px 14px rgba(0,0,0,.25);
  transform: scale(1.08);
  transition: transform .15s ease, box-shadow .15s ease;
}

/* “pata” del spiderfy un pelín más redondeada */
.leaflet-spider-leg {
  stroke-linecap: round;
}

/* ─── Popup flecha sin borde (opcional estetica) ─── */
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  border-radius: .75rem;
  box-shadow: 0 6px 18px rgba(0,0,0,.2);
}

/* -------------------------------------------------------------
   MODALES (Filtros y Orden)
   ------------------------------------------------------------- */
/* Scroll-lock cuando la modal está abierta */
.modal-open {
  overflow: hidden;
  height: 100%;
}

/* Overlay general */
.filters-modal,
.sort-modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* Overlay clicable */
.filters-modal-overlay,
.sort-modal-overlay {
  position: absolute;
  inset: 0;
}

/* Diálogo */
.filters-modal-dialog,
.sort-modal-dialog {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 512px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

/* Header */
.filters-modal .modal-header,
.sort-modal .modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid #e5e7eb;
    min-height: 60px;
    max-height: 60px;
}
.filters-modal .modal-title,
.sort-modal .modal-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #1e293b;
}
.filters-modal .close-modal,
.sort-modal .close-modal {
    background: none;
    border: none;
    font-size: 18px;
    font-weight: 600;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 5px 8px;
    box-shadow: none;
}
.filters-modal .close-modal:hover,
.sort-modal .close-modal:hover {
  color: #1e293b;
}

/* Subtítulo exclusivo de filtros */
.filters-modal .modal-subtitle {
    margin: 10px 0 14px 0;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
}

/* Body */
.filters-modal .modal-body,
.sort-modal .modal-body {
  padding: 0 20px 16px;
  overflow-y: auto;
  /* Para que el footer siempre se quede abajo */
  flex: 1;
}

#modal-sort-content {
    padding-top: 20px;
}

/* Contenedor botones de filtro */
.filters-modal .cerca-filters-scroll {
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0px 1rem;
    flex-wrap: wrap;
}
.filters-modal .cerca-filter-btn {
    background: #fff;
    font-size: 14px;
    font-weight: 400;
    color: #1e293b;
    transition: background-color 0.2s, border-color 0.2s;
    width: max-content;
    height: 32px;
    line-height: 32px;
    display: flex;
    -webkit-box-align: center;
    align-items: center;
    -webkit-box-pack: center;
    justify-content: center;
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    padding: 1rem;
    border: 1.6px solid #e6ebf1 !important;
}
button.cerca-filter-btn:hover {
    background-color: #f0f5fa;
    color: #1e293b;
    border: 1.6px solid #ddd !important;
}
.filters-modal .cerca-filter-btn.active {
    background: #1e293b;
    color: #fff;
    border-color: #1e293b !important;
    font-weight: 500;
}

/* Orden */
.sort-modal label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #334155;
    font-size: 17px;
    line-height: 25px;
    cursor: pointer;
}
.sort-modal label:hover {
    color: #1e293b;
}
.sort-modal input[type="radio"] {
    accent-color: #247dc9;
    width: 15px;
    height: 15px;
    cursor: pointer;
}

/* Footer */
.filters-modal .modal-footer,
.sort-modal .modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 0 20px;
    border-top: 1px solid #e5e7eb;
    min-height: 60px;
    max-height: 60px;
}
.filters-modal button,
.sort-modal button {
  padding: 10px 18px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: background-color .2s;
}
#clear-filters {
    background: #edf2f7;
    color: #1e293b;
    padding: 12px;
    border-radius: 10px;
    font-size: 15px;
    width: 50%;
}
#clear-filters:hover {
  background: #e2e8f0;
}
#apply-filters,
#apply-sort {
    background: #1e293b;
    color: #fff;
    padding: 12px;
    border: none;
    border-radius: 10px;
    font-size: 15px;
}
#apply-filters:hover,
#apply-sort:hover {
  opacity: .94;
}
#apply-filters {
    width: 50%;
}

#apply-sort {
    width: 100%;
}

/* ESTILOS MAPA INTERACTIVO */
/* Boton de geolocalizacion */
.leaflet-right .leaflet-bar.leaflet-control {
    border: none;
}

.leaflet-right .leaflet-control button {
    border: none;
    background-color: white;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.leaflet-right .leaflet-control button svg {
    width: 24px;
    height: 24px;
}

.leaflet-right .leaflet-control button:hover {
    background-color: #f4f4f4;
    outline: none;
}

/* Estilos para el Tooltip */
.leaflet-popup-content-wrapper {
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    padding: 0 !important;
    min-width: 260px;
    max-width: 260px;
}

.leaflet-container a {
    color: #1e293b !important;
}

.map-tooltip {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    font-family: Arial, sans-serif;
    color: #1e293b;
}

.map-tooltip-thumbnail-container {
    position: relative;
    width: 100%;
    height: 140px;
    overflow: hidden;
}

.map-tooltip-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-tooltip-thumbnail-container button.favorite-button {
    position: absolute;
    top: 7px;
    right: 7px;
    border: none;
    border-radius: 50%;
    padding: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s;
    background: white;
}

.map-tooltip-thumbnail-container button.favorite-button svg {
    fill: #fff;
    width: 18px;
    height: 18px;
}

.map-tooltip-thumbnail-container button.favorite-button .favorite-icon path:hover {
    fill: #ffcccc;
    stroke: #ff0000 !important;
}

.map-tooltip-title {
    margin: 10px 12px !important;
    font-size: 17.5px;
    font-weight: bold;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    width: calc(100% - 5%);
}

.map-tooltip-title:hover {
    text-decoration: underline;
    text-decoration-color: #045cb4;
}

.map-tooltip-rating {
    font-size: 0.9em;
    color: #666;
    margin: -3px 0 10px 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 5px;
    padding: 0 12px;
    white-space: nowrap;
}

.map-tooltip-rating-number {
    font-weight: 500;
    color: #fff;
    background-color: #1e293b;
    padding: 7.5px 4px 7px 2px;
    font-size: 12.5px;
    text-align: center;
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    border-radius: calc(32px / 5.5) calc(32px / 5.5) calc(32px / 5.5) 0;
    margin-top: -2px;
}

.map-tooltip-rating-number::before {
    content: "★";
    color: rgb(255, 193, 7);
    margin-right: 0.5px;
    font-size: 13.5px;
}

.map-tooltip-rating-desc {
    margin: 0;
    font-size: 13.2px;
    text-align: left;
    font-weight: 600;
    color: #1e293b;
}

.map-tooltip-rating-separator {
    margin: 2px -1px 0 0;
    font-size: 13.5px;
}

.map-tooltip-rating-opinions, .map-tooltip-no-rating {
    font-size: 12.2px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-tooltip-rating-opinions:hover, .map-tooltip-no-rating:hover {
    text-decoration: underline;
}

.map-tooltip-buttons {
    display: flex;
    margin: 10px 12px;
    gap: 10px;
    flex-direction: row-reverse;
}

.map-tooltip-buttons a {
    color: white !important;
}

/* Botón que redirige al proveedor (Ver oferta) */
.map-tooltip-action-button.action-button-provider {
    background: #046bd2;
    color: #fff;
    box-shadow: 1px 1px 3px rgba(0, 80, 166, 0.24);
}

.map-tooltip-action-button.action-button-provider:hover {
    background: #0056b3;
}

/* Botón que redirige al post (Ver más) */
.map-tooltip-action-button.action-button-post {
    background: #ccc;
    color: #1e293b !important;
    box-shadow: 1px 1px 3px #6d6d6d4a;
}

.map-tooltip-action-button.action-button-post:hover {
    background: #b3b3b3;
}

/* Botón que redirige a google maps (Cómo llegar) */
.map-tooltip-directions {
    background: #ff9800;
    box-shadow: 1px 1px 3px #b05c013d;
}

.map-tooltip-directions:hover {
    background: #e68900;
}

.map-tooltip-action-button,
.map-tooltip-directions {
    flex: 1;
    text-align: center;
    font-size: 13.2px;
    font-weight: 600;
    border-radius: 4px;
    padding: 9px;
    transition: background-color 0.3s;
}

.map-tooltip-address {
    border-top: 1px solid #ddd;
    margin: 10px 12px;
    padding-top: 8px;
    font-size: 12px;
    color: #6b7280;
    word-wrap: break-word;
}

/* Estilos base para los marcadores */
.destino-marker img {
    transition: transform 0.2s ease, filter 0.1s linear;
}

.destino-marker img:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* highlight sobre marcador Leaflet */
.leaflet-marker-icon.highlighted-marker {
  transform: scale(1.13);
  border-radius: 4px;
  transition: transform 0.1s ease;
  z-index: 1000 !important;
  filter: brightness(1.1) saturate(1.5) drop-shadow(0 0 5px rgba(0,0,0,0.5));
}

/* highlight fugaz en listado */
.cerca-item.item-highlight {
  background-color: #fffae6;
  transition: background-color 0.5s ease;
}

/* Atribución LEAFLET y OSM */
.leaflet-bottom.leaflet-right {
}

.leaflet-bottom.leaflet-right .leaflet-control-info {
    position: absolute !important;
    bottom: 0;
    right: 0;
    float: none !important;
    z-index: 1000;
    padding: 3px 10px;
    margin: 0;
    cursor: pointer;
    border: none;
}

.leaflet-bottom.leaflet-right .leaflet-control-info:hover {
    opacity: .9;
    filter: brightness(1.25);
}

.leaflet-bottom.leaflet-right .leaflet-control-attribution {
    display: none;
    position: absolute;
    bottom: 0.45rem;
    right: calc(0.5rem + 20px + 0.25rem);
    float: none !important;
    background: rgba(255, 255, 255, 0.9);
    padding: 0.25rem 0.5rem;
    border-radius: 50px;
    font-size: 0.65rem;
    color: #4b5563;
    line-height: 1.2;
    white-space: nowrap;
}

.leaflet-bottom.leaflet-right .leaflet-control-attribution.show {
  display: block;
}

/* ------------------------------------------------
   SKELETON LOADERS – sección Cerca
   ------------------------------------------------*/
@keyframes skeleton-loading {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* bloque contenedor: hereda dimensiones del item real */
.cerca-skel-item{
  display:flex;justify-content:space-between;align-items:flex-start;
  background:#fff;border:1px solid #ddd;border-radius:8px;
  margin-bottom:12px;overflow:hidden;min-height:170px;max-height:170px;
}

/* miniatura */
.cerca-skel-img{
  width:30%;min-width:30%;height:170px;
}
.cerca-skel-img::before{
  content:"";display:block;width:100%;height:100%;
  background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);
  background-size:200% 100%;animation:skeleton-loading 1.4s linear infinite;
}

/* zona de texto */
.cerca-skel-body{
  flex:1;padding:23px 18px 16px 20px;display:flex;flex-direction:column;gap:22px;
}
.cerca-skel-line{
  height:14px;border-radius:4px;
  background:linear-gradient(90deg,#f0f0f0 25%,#e0e0e0 50%,#f0f0f0 75%);
  background-size:200% 100%;animation:skeleton-loading 1.4s linear infinite;
}
.cerca-skel-line.short  {width:65%;}
.cerca-skel-line.medium {width:75%;}
.cerca-skel-line.long   {width:90%;}
.cerca-skel-line.last   {width:80%;}

/* -------------------------------------
   MENSAJE DE GEOLOCALIZACIÓN
   ------------------------------------*/
#cerca-geo-msg {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background-color: #EFF8FF;
  border: 1px solid #B6E0FE;
  border-radius: 6px;
  color: #1e293b;
  font-size: 15px;
  padding: 12px 16px;
  margin: 16px 0;
}

/* El botón interno */
#cerca-geo-msg .geo-retry {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    background-color: #2563EB;
    color: #FFF;
    border: none;
    border-radius: 4px;
    padding: 12px 14px;
    font-size: 14.5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

#cerca-geo-msg .geo-retry:hover {
  background-color: #1D4ED8;
}

/* -------------------------------------------------------------
   RESPONSIVE GENERAL (mobile + tablet)
   ------------------------------------------------------------- */
@media (max-width: 992px) {
    #cerca-mi h2 {
        margin: 0 15px;
    }
    .cerca-wrapper {
        grid-template-columns: 1fr;
    }
    .cerca-left {
        height: auto;
    }
    .cerca-right {
        position: relative;
        height: 400px;
        margin-top: 24px;
    }
    #toggle-map {
        background-color: #ffffff;
        width: 100%;
        height: 43px;
        color: #1e293b;
        border-radius: 0;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 2px;
        font-size: 16.3px;
        border-left: 1px solid #ddd !important;
    }
    #cerca-results-counter {
        margin: 17px 0 20px 15px;
    }
    .cerca-results {
        padding: 0 15px;
    }
    .cerca-item {
        flex-direction: column;
        max-height: 100%;
        max-width: 100%;
    }
    .cerca-link-wrap {
        max-width: 100%;
        min-width: 100%;
    }
    .cerca-img {
        width: 100%;
        flex: none;
    }
    .cerca-img img {
        height: 185px;
        border-radius: 4px 4px 0 0;
    }
    .cerca-detalles {
        border: none;
        padding: 12px 15px;
        min-width: 100%;
        max-width: 100%;
    }
    .map-tooltip-rating-description,
    .map-tooltip-rating-opinions,
    .map-tooltip-no-rating {
        font-size: 12.5px;
    }

    /* 1) Column-reverse solo en mobile  */
    .cerca-wrapper.mobile-flex {
        display: flex;
        flex-direction: column-reverse;
    }
    /* 2) mapa oculto inicialmente */
    .cerca-right.mobile-hidden {
        display: none;
        overflow: hidden;
    }
    /* 3) animaciones “abrir / cerrar” */
    @keyframes slideDown {
        from { transform: translateY(-4%); opacity: 0; }
        to   { transform: translateY(0);   opacity: 1; }
    }
    @keyframes slideUp {
        from { transform: translateY(0);   opacity: 1; }
        to   { transform: translateY(-4%); opacity: 0; }
    }
    .cerca-right.mobile-animate-in   { animation: slideDown .35s ease-out forwards; }
    .cerca-right.mobile-animate-out  { animation: slideUp   .25s ease-in  forwards; }

    /* SKELETON LOADERS – ADAPTACIÓN MOBILE */
    .cerca-skel-item {
        flex-direction: column;
        min-height: auto;
        max-height: none;
    }
    .cerca-skel-img {
        width: 100%;
        min-width: 100%;
        height: 185px;
    }
    .cerca-skel-img::before {
        border-radius: 4px 4px 0 0;
    }
    .cerca-skel-body {
        flex: none;
        width: 100%;
        padding: 20px 18px 20px 20px;
    }
    .cerca-skel-line {
        height: 14px;
        border-radius: 4px;
    }
    #cerca-geo-msg {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        font-size: 14px;
        margin: 12px 15px;
        padding: 10px 12px;
    }
    #cerca-geo-msg .geo-retry {
        width: 100%;
        text-align: center;
    }
}

/* -------------------------------------------------------------
   SLIDER HORIZONTAL para TABLET (600px – 992px)
   ------------------------------------------------------------- */
@media (min-width: 600px) and (max-width: 992px) {
    .cerca-results {
        flex-direction: row;
        overflow-y: hidden;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-padding-inline-start: 15px;
    }
    .cerca-results::-webkit-scrollbar { display: none; }

    .cerca-item,
    .cerca-skel-item {
        flex: 0 0 calc((100% - 16px) / 2);
        max-width: calc((100% - 16px) / 2);
        min-width: calc((100% - 16px) / 2);
        margin-right: 6px;
        scroll-snap-align: start;
    }
}

/* -------------------------------------------------------------
   SLIDER HORIZONTAL para MÓVIL (< 600px)
   ------------------------------------------------------------- */
@media (max-width: 599px) {
    .cerca-results {
        flex-direction: row;
        overflow-y: hidden;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scroll-padding-inline-start: 15px;
    }
    .cerca-results::-webkit-scrollbar { display: none; }

    .cerca-item,
    .cerca-skel-item {
        flex: 0 0 85%;
        max-width: 85%;
        min-width: 85%;
        margin-right: 6px;
        scroll-snap-align: start;
    }

    /* Si sólo hay un hijo, anulamos el ancho reducido */
    .cerca-results .cerca-item:only-child,
    .cerca-results .cerca-skel-item:only-child {
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    .filters-modal-dialog, .sort-modal-dialog {
        min-height: 100%;
        min-width: 100%;
        border-radius: 0;
    }
}