/* Costa Tropical Real Estate — property page layout tweaks on top of Costa Estates 2.0. */

/* Agent: a real portrait, not a 56px thumbnail. */
.cse .cse-agent__id {
  align-items: center;
  gap: 16px;
}

.cse .cse-agent__photo {
  width: 88px;
  border: 3px solid var(--cse-surface, #fff);
  box-shadow: 0 0 0 1px var(--cse-line, #ddd6ca);
}

.cse .cse-agent__name {
  font-size: 18px;
}

.cse .cse-agent__role {
  margin-top: 2px;
}

/* Overview: tiles share each row evenly instead of leaving one orphan per group. */
.cse .cse-facts__grid {
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
}

.cse .cse-fact__value {
  overflow-wrap: anywhere;
}

/* Less dead space between "Similar properties" and the footer. */
.page .site-content > .ast-container,
.page #primary {
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Phones: two tiles per row; a lone last tile spans the row instead of sitting half-empty. */
@media (max-width: 767px) {
  .cse .cse-facts__grid {
    grid-template-columns: 1fr 1fr;
  }

  .cse .cse-facts__grid > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }
}

/* Phones: the top photo fills the screen edge to edge (no "next photo" peek). */
@media (max-width: 767px) {
  .cse-gallery .cse-gallery__track {
    gap: 0;
  }

  .cse-gallery .cse-gallery__slide {
    flex-basis: 100%;
  }

  .cse-gallery .cse-gallery__nav--next {
    right: 12px;
  }

  .cse-gallery .cse-gallery__count {
    right: 12px;
  }
}

/* Keep the map's layers inside the map, so the price / Enquire bar stays on top of it. */
.cse .leaflet-container {
  isolation: isolate;
  z-index: 0;
}
