.owv-results-wrapper {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 20px;
  width: 100%;
  height: 100%;
  font-family: "Gilroy", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.owv-map-wrapper {
  width: 55%;
  margin: 0 auto; /* centra el mapa si quieres */
  position: relative;
}

#owv-map {
  width: 100%;
  height: 600px;
  border-radius: 20px;
  display: block;
}

.actual-dates {
  padding: 0 15px 15px;
  font-size: 20px;
}

.owv-resultados {
  width: 100%;
  height: 85vh;
  overflow-y: scroll;
}

.owv-results-container {
  display: flex;
  gap: 20px;
}

.owv-filters {
  display: flex;
  flex-direction: column;
  gap: 20px;
  width: 100%;
}

.button-wrapper {
  display: flex;
  gap: 10px;
}

.button-wrapper button {
  border-radius: 20px;
  background: #000;
  color: #fff;
  border: none;
}

.owv-filters select {
  margin-top: 5px;
  border-radius: 20px;
  background: #2d4851;
  color: #fff;
}

.owv-full-wrapper {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  gap: 2rem;
  padding: 20px 120px;
  margin-top: 120px;
}

.owv-price {
  margin-top: 20px;
  font-size: 24px;
  font-weight: 600;
}

.owv-item {
  margin-bottom: 2rem;
}

.owv-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
}

.owv-gallery-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  position: absolute;
  width: 100%;
  height: 100%;
  align-items: center;
  padding: 0 20px;
  z-index: 2;
}
.owv-gallery-controls .owv-gallery-control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  padding: 10px;
  border-radius: 50%;
  cursor: pointer !important;
  border: none;
  transition: background-color 0.3s;
}
.owv-gallery-controls .owv-gallery-control:hover {
  background-color: rgba(0, 0, 0, 0.7);
}
.owv-gallery-controls .owv-gallery-control.owv-gallery-prev {
  padding: 10px 13px 10px 10px;
}
.owv-gallery-controls .owv-gallery-control.owv-gallery-next {
  padding: 10px 10px 10px 13px;
}
.owv-gallery-controls .owv-gallery-control .owv-controll-icon {
  height: 20px;
  -o-object-fit: contain;
     object-fit: contain;
}

.owv-icons-list-item {
  display: flex;
  align-items: center;
  gap: 5px;
}
.owv-icons-list-item .owv-icons-img {
  filter: invert(1);
  height: 15px;
}

.owv-link {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  background-color: #CBAE70;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  transition: all 0.25s;
}

.owv-link:hover {
  background-color: #9a814c;
  color: white;
}

.owv-item {
  display: flex;
  flex-direction: row-reverse;
  justify-content: space-between;
  gap: 20px;
  padding: 10px;
  border-radius: 20px;
  background: #395B64;
  color: #fff;
  transition: all 0.2s;
}

.owv-resultados-wrap {
  width: 45%;
}

.owv-icons-list {
  list-style: none;
  flex-wrap: wrap;
  padding: 0;
  display: flex;
  gap: 20px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.3137254902);
  font-weight: 500;
}

.owv-content {
  width: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.owv-location {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6509803922);
}

.owv-gallery {
  width: 450px;
  overflow: hidden;
  border-radius: 12px;
}

.owv-gallery-wrapper {
  width: 100%;
  display: flex;
  transition: all 0.3s ease-in-out;
}

.owv-gallery-wrapper img {
  width: 100%;
  max-width: 100% !important;
  height: 300px;
  -o-object-fit: cover;
  object-fit: cover;
  margin: 0px !important;
}

@media (max-width: 1920px) {
  .owv-resultados {
    width: -moz-fit-content;
    width: fit-content;
  }
  .owv-resultados-wrap {
    width: -moz-fit-content !important;
    width: fit-content !important;
  }
  .owv-map-wrapper {
    width: 50%;
  }
}
@media (max-width: 1024px) {
  .owv-full-wrapper {
    padding: 20px 40px;
    margin-top: 100px;
  }

  /* Replicar estructura móvil en tablet */
  .owv-results-container {
    display: flex;
    flex-direction: column;
  }

  .owv-results-wrapper {
    flex-direction: column;
    gap: 20px;
    height: auto !important;
    display: flex;
  }

  .owv-map-wrapper {
    width: 100%;
    height: auto;
    order: -1;
    margin-bottom: 20px;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
  }

  #owv-map {
    height: 100%;
  }

  .owv-resultados-wrap {
    width: 100% !important;
  }

  .owv-resultados {
    height: auto;
    overflow-y: visible;
  }

  /* Mantener diseño horizontal de tarjeta en tablet pero con más espacio */
  .owv-item {
    flex-direction: row-reverse; /* Mantener imagen a la derecha o izquierda según diseño original */
    width: 100%;
    gap: 20px;
  }
  
  .owv-gallery {
    width: 50%; /* Imagen ocupa mitad */
  }
  
  .owv-content {
    width: 50%; /* Contenido ocupa mitad */
  }
  
  .owv-gallery-wrapper {
      max-height: 400px;
  }

  .owv-gallery-wrapper img {
    height: 100%
  }

  /* Filtros en tablet: mantener a la derecha o arriba? 
     El usuario dijo "filtros a la derecha y resto a la izq", pero si el mapa está arriba...
     Asumiré que quiere el mapa arriba del todo, y debajo los resultados ocupando todo el ancho.
     Los filtros ya están en una columna lateral en desktop.
     Si ponemos flex-direction column al wrapper principal, los filtros quedarán arriba o abajo.
  */
}

@media (max-width: 767px) {
  .owv-results-container {
    display: flex;
    flex-direction: column;
  }

  .owv-full-wrapper {
    padding: 15px;
    margin-top: 80px;
  }

  .owv-results-wrapper {
    flex-direction: column;
    gap: 20px;
    height: auto !important; /* Importante: permitir que crezca verticalmente */
    display: flex; /* Asegurar flex */
  }

  .owv-map-wrapper {
    width: 100%;
    height: auto;
    order: -1; /* Mapa arriba */
    margin-bottom: 20px; /* Espacio extra de seguridad */
    flex-shrink: 0; /* Evitar que se aplaste */
    position: relative;
    z-index: 10; /* Asegurar que el mapa esté en su capa */
  }

  #owv-map {
    height: 100%;
  }

  .owv-resultados-wrap {
    width: 100% !important;
  }

  .owv-resultados {
    height: auto;
    overflow-y: visible;
  }

  .owv-item {
    flex-direction: column-reverse;
    width: 100%;
    gap: 15px;
  }

  .owv-gallery {
    width: 100%;
    border-radius: 12px 12px 0 0;
  }

  .owv-content {
    width: 100%;
    padding: 0 5px;
  }

  .owv-gallery-wrapper img {
    height: 220px;
  }

  .button-wrapper {
    flex-wrap: wrap;
  }

  .button-wrapper button {
    flex: 1;
    font-size: 14px;
    padding: 10px;
  }
  
  .owv-filters select {
    width: 100%;
    padding: 10px;
  }
}