/* Cuadrícula "todas las fotos" de las fichas normales (inc/bre-galeria.php). Maqueta: maquetas/galeria-fichas/. */
.bre-gl-ficha .hs-gallery-v5-grid-wrap .img-wrap-3-text { cursor: pointer; }

html.bre-gl-abierta, html.bre-gl-abierta body { overflow: hidden; }
/* La ventana de "Déjanos tus datos" va encima de la cuadrícula y del visor. */
html.bre-gl-abierta .bre-modal { z-index: 100002; }
/* El fondo oscuro del visor va encima de la cuadrícula; si no, en computadora ella se asoma alrededor. */
html.bre-gl-abierta .modal-backdrop { z-index: 100000; }
html.bre-gl-abierta .modal-backdrop.show { opacity: .92; }

.bre-gl[hidden] { display: none !important; }
.bre-gl { position: fixed; inset: 0; z-index: 100000; background: #fff; color: #1D2820; overflow-y: auto; overscroll-behavior: contain; animation: bre-gl-aparece .18s ease-out; }
@keyframes bre-gl-aparece { from { opacity: 0; } to { opacity: 1; } }

.bre-gl-sup { position: sticky; top: 0; z-index: 2; background: #fff; border-bottom: 1px solid #E3DFD2; }
.bre-gl-sup-in { max-width: 1000px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 8px 16px; }
.bre-gl-tit { flex: 1; min-width: 0; }
.bre-gl-tit strong { display: block; font-weight: 600; font-size: 15px; line-height: 1.3; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.bre-gl-tit span { display: block; font-size: 13px; color: #5A665E; }
.bre-gl-x { width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; background: none; color: inherit; cursor: pointer; }
.bre-gl-x:hover { background: #F5F2E8; color: inherit; }

/* Botones de la marca */
.bre-gl-contacto { display: flex; gap: 12px; flex: none; }
.bre-gl-bt, .bre-gl-bt:visited { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 18px; border-radius: 8px; font-weight: 600; font-size: 15px; line-height: 1.2; text-decoration: none !important; white-space: nowrap; box-sizing: border-box; transition: background-color .15s, color .15s; }
.bre-gl-bt svg { flex: none; }
.bre-gl-bt[hidden] { display: none; }
.bre-gl-bt1, .bre-gl-bt1:visited { background: #F7A955; border: 2px solid #F0881A; color: #1D3A28; }
.bre-gl-bt1:hover, .bre-gl-bt1:focus { background: #B4530F; border-color: #B4530F; color: #fff; }
.bre-gl-bt2, .bre-gl-bt2:visited { background: #fff; border: 1px solid #1D3A28; color: #1D3A28; }
.bre-gl-bt2:hover, .bre-gl-bt2:focus { background: #F5F2E8; color: #1D3A28; }

/* Cuadrícula. Serie que se repite: 1 a lo ancho, 2 lado a lado, 1 grande con 2 a un costado. Igual en celular y computadora. */
.bre-gl-rej { max-width: 1000px; margin: 0 auto; padding: 16px 16px 40px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.bre-gl-rej a { display: block; position: relative; padding: 0; background: #F5F2E8; overflow: hidden; cursor: zoom-in; }
.bre-gl-rej a.g-ancha { grid-column: 1 / -1; aspect-ratio: 3 / 2; }
.bre-gl-rej a.g-plano { grid-column: 1 / -1; aspect-ratio: 16 / 9; }
.bre-gl-rej a.g-media { grid-column: span 3; aspect-ratio: 4 / 3; }
.bre-gl-rej a.g-grande { grid-column: span 4; grid-row: span 2; } /* su altura la marcan las 2 chicas */
.bre-gl-rej a.g-chica { grid-column: span 2; aspect-ratio: 4 / 3; }
.bre-gl-rej img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; transition: filter .15s; }
.bre-gl-rej .g-plano img { object-fit: contain; }
.bre-gl-rej a:hover img { filter: brightness(.92); }
.bre-gl-rej a:focus-visible, .bre-gl-x:focus-visible, .bre-gl-bt:focus-visible { outline: 3px solid #F0881A; outline-offset: 2px; }

.bre-gl-barra { display: none; }

/* Visor de Houzez: contador, descripción y contacto. */
#bre-gl-cuenta { color: #fff; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.bre-gl-vis-pie { color: rgba(255, 255, 255, .85); font-size: 14px; line-height: 1.35; text-align: center; padding: 8px 16px; height: 56px; overflow: hidden; background: var(--color-text, #1D2820); box-sizing: border-box; }
.bre-gl-en .bre-gl-vis-pie { display: none; }
.bre-gl-vis-con { background: var(--color-text, #1D2820); border-top: 1px solid rgba(255, 255, 255, .15); padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); box-sizing: border-box; }
.bre-gl-vis-con .bre-gl-contacto { max-width: 560px; margin: 0 auto; }
.bre-gl-vis-con .bre-gl-bt { flex: 1 1 0; min-width: 0; padding: 0 8px; }
/* La foto cede a la descripción (56 px) y al contacto (69 px). */
body.bre-gl-ficha #property-lightbox .lightbox-slider .slick-list { height: calc(100vh - 265px) !important; height: calc(100dvh - 265px) !important; }
body.bre-gl-ficha.bre-gl-en #property-lightbox .lightbox-slider .slick-list { height: calc(100vh - 209px) !important; height: calc(100dvh - 209px) !important; }
/* Celular acostado: no hay espacio, la foto se queda a pantalla completa. */
@media (orientation: landscape) and (max-height: 500px) {
  .bre-gl-vis-pie, .bre-gl-vis-con { display: none; }
  body.bre-gl-ficha #property-lightbox .lightbox-slider .slick-list,
  body.bre-gl-ficha.bre-gl-en #property-lightbox .lightbox-slider .slick-list { height: 100vh !important; height: 100dvh !important; }
}

@media (max-width: 767px) {
  .bre-gl-sup .bre-gl-contacto { display: none; }
  .bre-gl-rej { padding: 12px 12px 112px; }
  .bre-gl-barra { display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 3; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid #E3DFD2; }
  .bre-gl-barra .bre-gl-bt { flex: 1 1 0; min-width: 0; padding: 0 8px; }
}
@media (min-width: 768px) {
  .bre-gl-rej a.g-ancha { aspect-ratio: 16 / 9; }
}
@media (prefers-reduced-motion: reduce) {
  .bre-gl { animation: none; }
  .bre-gl-rej img, .bre-gl-bt { transition: none; }
}
