/* Buscador y resultados de departamentos */

.pagina-deptos-busqueda main {
  max-width: none;
  padding: 0;
}

.deptos-intro {
  max-width: 720px;
  margin: 0 auto;
  padding: 2rem 1.25rem 0.5rem;
  text-align: center;
}

.deptos-intro h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  font-weight: 600;
  color: var(--color-verde-oscuro);
  letter-spacing: -0.02em;
}

.deptos-intro p {
  margin: 0;
  color: var(--color-texto-suave);
  font-size: 1rem;
  line-height: 1.55;
}

.deptos-busqueda-wrap {
  position: relative;
  z-index: 20;
  padding: 0 1rem 0.75rem;
}

.deptos-busqueda {
  max-width: 980px;
  margin: 0 auto;
  padding: 1rem;
  border-radius: calc(var(--radio) + 4px);
  background: #fff;
  border: 1px solid rgba(45, 80, 24, 0.12);
  box-shadow: 0 10px 32px rgba(45, 80, 24, 0.08);
}

.deptos-busqueda-sticky {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.deptos-form {
  display: grid;
  gap: 0.75rem;
}

.deptos-form__campo {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.deptos-form__campo label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-verde-oscuro);
}

.deptos-form__campo input,
.deptos-form__campo select {
  width: 100%;
  padding: 0.78rem 0.85rem;
  border: 1px solid rgba(45, 80, 24, 0.18);
  border-radius: 10px;
  font: inherit;
  color: var(--color-texto);
  background: #fff;
}

.deptos-form__campo input:focus,
.deptos-form__campo select:focus {
  outline: 2px solid rgba(64, 96, 32, 0.25);
  border-color: var(--color-verde);
}

.deptos-form__submit {
  width: 100%;
  padding: 0.9rem 1.2rem;
  font-size: 1rem;
}

.deptos-form__error {
  margin: 0.35rem 0 0;
  min-height: 1.2rem;
  font-size: 0.88rem;
  color: #b42318;
}

.deptos-promo {
  margin: 0.7rem 0 0;
  padding: 0.6rem 0.75rem;
  border-radius: 10px;
  background: rgba(45, 80, 24, 0.06);
  border: 1px solid rgba(45, 80, 24, 0.12);
  font-size: 0.86rem;
  line-height: 1.4;
  color: var(--color-verde-oscuro);
}

.deptos-promo--nudge {
  background: rgba(64, 96, 32, 0.1);
  border-color: rgba(64, 96, 32, 0.22);
}

.deptos-promo--aplicada {
  background: rgba(45, 80, 24, 0.12);
  border-color: rgba(45, 80, 24, 0.28);
  font-weight: 600;
}

.deptos-form__pie {
  margin: 0.15rem 0 0;
  min-height: 0;
  text-align: right;
}

.deptos-form__limpiar {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-verde-oscuro);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.22em;
}

.deptos-form__limpiar:hover {
  color: var(--color-verde);
}

.deptos-resultados-wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem 1rem 5rem;
}

.deptos-resumen {
  margin: 0 0 1rem;
  font-size: 0.92rem;
  color: var(--color-texto-suave);
}

.deptos-resultados {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.depto-card {
  display: grid;
  grid-template-columns: 1fr;
  overflow: hidden;
  border-radius: calc(var(--radio) + 2px);
  background: #fff;
  border: 1px solid rgba(45, 80, 24, 0.1);
  box-shadow: 0 8px 24px rgba(45, 80, 24, 0.06);
}

.depto-card__media {
  position: relative;
  display: block;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  align-self: start;
}

.depto-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  transition: transform 0.25s ease;
}

.depto-card__media:hover img {
  transform: scale(1.03);
}

.depto-card__badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 1;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(45, 80, 24, 0.92);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.depto-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: 1rem 1rem 1.1rem;
}

.depto-card__nombre {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.25;
}

.depto-card__nombre a {
  color: var(--color-verde-oscuro);
  text-decoration: none;
}

.depto-card__nombre a:hover {
  color: var(--color-verde);
}

.depto-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.75rem;
  margin: 0;
  font-size: 0.88rem;
  color: var(--color-texto-suave);
}

.depto-card__servicios,
.depto-detalle__servicios {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
}

.depto-servicio {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--color-texto);
}

.depto-servicio svg {
  flex-shrink: 0;
  color: var(--color-verde);
}

.depto-card__precio {
  margin: 0.15rem 0 0;
}

.depto-card__precio-total,
.depto-card__precio-desde {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-verde-oscuro);
}

.depto-card__precio-antes {
  margin-right: 0.4rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-texto-suave);
  text-decoration: line-through;
}

.depto-card__precio-detalle {
  font-size: 0.85rem;
  color: var(--color-texto-suave);
}

.depto-card__promo-label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-verde);
}

.depto-card__acciones {
  margin-top: 0.25rem;
}

.depto-card__btn {
  width: 100%;
  text-align: center;
}

.depto-card--skeleton .depto-card__media,
.depto-card__line {
  background: linear-gradient(90deg, #ecece4 0%, #f7f7f0 50%, #ecece4 100%);
  background-size: 200% 100%;
  animation: depto-shimmer 1.2s infinite;
}

.depto-card--skeleton .depto-card__media {
  min-height: 0;
  aspect-ratio: 3 / 2;
}

.depto-card__line {
  height: 0.85rem;
  border-radius: 6px;
  margin-bottom: 0.55rem;
}

.depto-card__line--wide {
  width: 70%;
}

.depto-card__line--short {
  width: 45%;
}

@keyframes depto-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.deptos-vacio {
  grid-column: 1 / -1;
  text-align: center;
  padding: 2.5rem 1rem;
  border-radius: calc(var(--radio) + 2px);
  background: #fff;
  border: 1px dashed rgba(45, 80, 24, 0.18);
}

.deptos-vacio h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  color: var(--color-verde-oscuro);
}

.deptos-vacio p {
  margin: 0 0 1rem;
  color: var(--color-texto-suave);
}

/* Detalle */

.deptos-busqueda--detalle {
  padding: 0.75rem 1rem;
}

.deptos-form--compacto .deptos-form__campo label {
  font-size: 0.72rem;
}

.deptos-form--compacto .deptos-form__campo input,
.deptos-form--compacto .deptos-form__campo select {
  padding: 0.65rem 0.75rem;
  font-size: 0.92rem;
}

.pagina-depto-detalle .depto-detalle {
  max-width: 920px;
  margin: 0 auto;
  padding: 1.25rem 1rem 6rem;
}

.depto-detalle__articulo {
  display: grid;
  gap: 1.25rem;
}

.depto-detalle__galeria {
  border-radius: calc(var(--radio) + 2px);
  overflow: hidden;
  min-height: 260px;
}

.depto-detalle__contenido h1 {
  margin: 0 0 0.35rem;
  font-size: clamp(1.5rem, 4vw, 2rem);
  color: var(--color-verde-oscuro);
}

.depto-detalle__lead {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  color: var(--color-texto-suave);
}

.depto-detalle__meta {
  margin: 0 0 0.75rem;
  font-size: 0.92rem;
  color: var(--color-texto-suave);
}

.depto-detalle__precio-box {
  margin: 0.5rem 0 1rem;
  padding: 1rem;
  border-radius: calc(var(--radio) + 2px);
  background: rgba(64, 96, 32, 0.06);
  border: 1px solid rgba(45, 80, 24, 0.1);
}

.depto-detalle__precio-total {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--color-verde-oscuro);
}

.depto-detalle__precio-antes {
  margin-right: 0.45rem;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--color-texto-suave);
  text-decoration: line-through;
}

.depto-detalle__precio-detalle,
.depto-detalle__fechas {
  margin: 0.25rem 0 0;
  font-size: 0.9rem;
  color: var(--color-texto-suave);
}

.depto-detalle__promo-label {
  margin: 0.35rem 0 0;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--color-verde);
}

.depto-detalle__wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  text-align: center;
}

.depto-detalle__wa--principal {
  margin-bottom: 1rem;
}

.depto-wa-sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
  background: rgba(248, 248, 240, 0.96);
  border-top: 1px solid rgba(45, 80, 24, 0.12);
  backdrop-filter: blur(8px);
}

.depto-wa-sticky__btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
}

.depto-detalle__contenido p {
  margin: 0 0 0.75rem;
}

.depto-detalle__lista {
  margin: 0;
  padding: 0;
  list-style: none;
}

.depto-detalle__lista li {
  padding-left: 0.85em;
  text-indent: -0.85em;
  margin-bottom: 0.35rem;
}

.depto-detalle__lista li::before {
  content: "•\00a0";
}

@media (min-width: 640px) {
  .deptos-form {
    grid-template-columns: 1fr 1fr auto auto;
    align-items: end;
  }

  .deptos-form__submit {
    width: auto;
    min-width: 11rem;
    white-space: nowrap;
  }

  .deptos-resultados {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .depto-card {
    grid-template-columns: 42% 1fr;
    align-items: start;
  }

  .depto-card__media {
    aspect-ratio: 3 / 2;
    min-height: 0;
    height: auto;
  }

  .depto-card__btn {
    width: auto;
  }

  .depto-detalle__articulo {
    grid-template-columns: 1.05fr 1fr;
    align-items: stretch;
    gap: 0;
    overflow: hidden;
    border-radius: calc(var(--radio) + 2px);
    background: #fff;
    border: 1px solid rgba(45, 80, 24, 0.1);
    box-shadow: 0 8px 24px rgba(45, 80, 24, 0.06);
  }

  .pagina-depto-detalle .depto-detalle {
    max-width: 980px;
    padding-bottom: 2.5rem;
  }

  .depto-detalle__galeria {
    min-height: 380px;
    border-radius: 0;
  }

  .pagina-depto-detalle .depto-detalle__galeria.bloque-depto__galeria {
    max-height: none;
    min-height: 380px;
    height: 100%;
    align-self: stretch;
  }

  .pagina-depto-detalle .depto-detalle__galeria.bloque-depto__galeria img.bloque-depto__img {
    min-height: 100%;
    max-height: none;
    height: 100%;
    position: absolute;
    inset: 0;
  }

  .depto-detalle__contenido {
    padding: 1.25rem 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
  }

  .depto-detalle__wa {
    width: 100%;
    min-width: 0;
  }

  .depto-wa-sticky {
    display: none;
  }
}

@media (min-width: 980px) {
  .deptos-resultados {
    grid-template-columns: 1fr;
  }

  .depto-card {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }

  .depto-card__media {
    width: 320px;
    height: 213px;
    aspect-ratio: auto;
  }

  .depto-card__body {
    padding: 1.1rem 1.25rem;
  }

  .pagina-depto-detalle .depto-detalle {
    max-width: 1040px;
  }

  .depto-detalle__articulo {
    grid-template-columns: 1.15fr 1fr;
  }

  .depto-detalle__galeria,
  .pagina-depto-detalle .depto-detalle__galeria.bloque-depto__galeria {
    min-height: 440px;
  }
}

@media (min-width: 1100px) {
  .deptos-busqueda-sticky {
    padding-top: 1rem;
  }
}
