/* Meu Site Imobi 16.1.50: somente a página de detalhe do Portal da Rede. */
/* Recupera o mosaico que a regra da 16.1.47 escondeu, mantendo Fancybox. */
body.msi-portal-public.msi-portal-property-v2 .msi-portal-detail__gallery.msi-portal-detail-1647__hero.msi-portal-detail-1650__gallery {
  display:grid!important; grid-template-columns:minmax(0,1.8fr) repeat(2,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
  gap:6px!important; box-sizing:border-box!important;
  height:clamp(330px,40vw,530px)!important; background:#eaf0f5;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery>a[data-fancybox] {
  position:relative!important; inset:auto!important; display:block!important;
  min-width:0!important; min-height:0!important; width:100%!important; height:100%!important;
  grid-area:auto!important; overflow:hidden;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery>a[data-fancybox].is-main {
  grid-area:1 / 1 / 3 / 2!important;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery>a[data-fancybox].is-gallery-hidden {
  display:none!important;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery>a[data-fancybox] img {
  display:block!important;width:100%!important;height:100%!important;object-fit:cover!important;
  transform:none!important;transition:none!important;
}
/* Imóveis com poucas fotos também ocupam todo o mosaico, sem células vazias. */
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-1>a[data-fancybox].is-main {
  grid-area:1 / 1 / 3 / 4!important;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-2>a[data-fancybox].is-main {
  grid-area:1 / 1 / 3 / 3!important;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-2>a[data-fancybox]:nth-of-type(2) {
  grid-area:1 / 3 / 3 / 4!important;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-3>a[data-fancybox]:nth-of-type(2) {
  grid-area:1 / 2 / 2 / 4!important;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-3>a[data-fancybox]:nth-of-type(3) {
  grid-area:2 / 2 / 3 / 4!important;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-4>a[data-fancybox]:nth-of-type(4) {
  grid-area:2 / 2 / 3 / 4!important;
}
/* O título fica sobre a foto principal, sem bloquear cliques nas miniaturas. */
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery .msi-portal-detail-1647__hero-gradient {
  z-index:2; background:linear-gradient(180deg,rgba(0,0,0,.46),transparent 30%,transparent 58%,rgba(0,0,0,.26));
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery .msi-portal-detail-1647__hero-title {
  top:78px; left:24px; max-width:min(550px,calc(50% - 35px));
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery .msi-portal-detail__photo-count {
  bottom:18px!important; left:50%!important; transform:translateX(-50%)!important;
  width:auto!important;max-width:calc(100% - 36px);z-index:5; white-space:nowrap;
}
body.msi-portal-property-v2 .msi-portal-detail-1650__gallery .msi-portal-detail-1647__hero-map {
  left:auto!important;right:18px!important;z-index:5;
}
/* 5 indicadores de dados alinhados, sem quebra da última informação. */
body.msi-portal-property-v2 .msi-portal-detail__features.msi-portal-detail-1650__facts {
  display:grid!important;grid-template-columns:repeat(var(--msi-detail-facts,5),minmax(0,1fr))!important;
  gap:12px!important;width:100%!important;min-width:0!important;
  padding:0!important;margin:18px 0 22px!important;border:0!important;
  background:transparent!important;box-shadow:none!important;
}
body.msi-portal-property-v2 .msi-portal-detail__features.msi-portal-detail-1650__facts>div {
  display:grid!important;align-content:center!important;min-width:0!important;
  width:100%!important;max-width:none!important;flex:initial!important;
  margin:0!important;padding:14px 16px!important;box-sizing:border-box;
  border:0!important;border-radius:16px!important;background:#edf2f8!important;box-shadow:none!important;
}
body.msi-portal-property-v2 .msi-portal-detail__features.msi-portal-detail-1650__facts>div span {
  min-width:0;font-size:13px!important;line-height:1.3!important;
}
body.msi-portal-property-v2 .msi-portal-detail__features.msi-portal-detail-1650__facts>div strong {
  font-size:clamp(18px,1.7vw,23px)!important;line-height:1.1!important;
}
/* Contato sem título e texto de orientação redundantes. */
body.msi-portal-property-v2 .msi-portal-contact-1635 {padding-top:18px!important}
@media(max-width:980px){
  body.msi-portal-property-v2 .msi-portal-detail__features.msi-portal-detail-1650__facts {
    grid-template-columns:repeat(auto-fit,minmax(min(135px,100%),1fr))!important;
  }
}
@media(max-width:650px){
  body.msi-portal-property-v2 .msi-portal-detail__gallery.msi-portal-detail-1647__hero.msi-portal-detail-1650__gallery {
    height:355px!important;display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
    grid-template-rows:minmax(0,1fr) 86px!important;gap:4px!important;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery>a[data-fancybox].is-main,
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-1>a[data-fancybox].is-main,
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-2>a[data-fancybox].is-main {
    grid-area:1 / 1 / 2 / 5!important;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery>a[data-fancybox]:not(.is-main):not(.is-gallery-hidden) {
    display:block!important;grid-area:auto!important;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-2>a[data-fancybox]:nth-of-type(2) {
    grid-area:2 / 1 / 3 / 5!important;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-3>a[data-fancybox]:nth-of-type(2) {
    grid-area:2 / 1 / 3 / 3!important;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-3>a[data-fancybox]:nth-of-type(3) {
    grid-area:2 / 3 / 3 / 5!important;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-4>a[data-fancybox]:nth-of-type(4) {
    grid-area:2 / 3 / 3 / 5!important;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-1 {grid-template-rows:1fr!important}
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-1>a[data-fancybox].is-main {grid-area:1 / 1 / 2 / 5!important}
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery .msi-portal-detail-1647__hero-title {
    top:65px;left:16px;max-width:calc(100% - 36px);
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery .msi-portal-detail-1647__hero-title h2 {font-size:22px!important}
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery .msi-portal-detail__photo-count {
    bottom:96px!important;left:16px!important;transform:none!important;min-height:40px;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery .msi-portal-detail-1647__hero-map {
    bottom:96px!important;right:12px!important;min-height:40px;
  }
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-1 .msi-portal-detail__photo-count {bottom:12px!important}
  body.msi-portal-property-v2 .msi-portal-detail-1650__gallery.is-photo-count-1 .msi-portal-detail-1647__hero-map {bottom:12px!important}
  body.msi-portal-property-v2 .msi-portal-detail__features.msi-portal-detail-1650__facts {
    grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important;
  }
  body.msi-portal-property-v2 .msi-portal-detail__features.msi-portal-detail-1650__facts>div {
    min-width:0!important;padding:12px!important;
  }
}
