.unit{grid-template-columns:minmax(0,1fr) minmax(0,1.1fr);align-items:start}
.unit>div{min-width:0}
.photo-gallery{min-width:0}
.gallery-stage{position:relative;display:block;width:100%;padding:0;border:0;border-radius:10px;overflow:hidden;background:#edf1f4;cursor:zoom-in}
.unit .gallery-stage img{height:320px;max-height:none;object-fit:contain;border-radius:0}
.gallery-expand{position:absolute;bottom:10px;right:10px;padding:4px 9px;border-radius:5px;background:#fffffff0;color:var(--ink);font-size:12px}
.gallery-virtual-badge{position:absolute;top:10px;left:10px;padding:4px 9px;border-radius:5px;background:#fffffff2;color:var(--ink);font-size:12px;font-weight:600}
.gallery-controls{display:grid;grid-template-columns:44px 1fr 44px;align-items:center;gap:10px;margin:10px 0}
.gallery-controls button,.viewer-controls button{min-height:44px;background:white;color:var(--blue);border:1px solid #b4d7ef;border-radius:6px;cursor:pointer}
.gallery-controls figcaption{margin:0;font-size:12px;line-height:1.45;text-align:center}
.gallery-thumbnails{display:flex;gap:8px;overflow:auto;padding:5px 4px 10px;scrollbar-width:thin}
.gallery-thumbnails button{flex:0 0 64px;border:2px solid transparent;border-radius:6px;padding:2px;background:white;cursor:pointer}
.gallery-thumbnails button[aria-pressed=true]{border-color:var(--blue)}
.unit .gallery-thumbnails img{height:48px;width:100%;object-fit:cover;border-radius:3px}
.unit .gallery-thumbnails .is-floorplan img{object-fit:contain}
.gallery-stage.is-floorplan,.photo-viewer>img.is-floorplan{background:white}
.unit.rented{grid-template-columns:1fr}
.rented-badge{display:inline-block;margin:0 0 16px;padding:5px 12px;border-radius:5px;background:#edf1f4;color:var(--muted);font-weight:600}
.unit .facts{display:grid;gap:8px;font-size:14px}
.unit .facts span:first-child{font-size:22px;color:var(--blue);font-weight:600}
.unit .description{font-size:15px;color:var(--muted)}
.unit .description p{margin:0 0 14px;line-height:1.65}
.unit .description p:last-child{margin-bottom:0}
.unit .description strong{font-weight:650;color:var(--ink)}
.unit .description{margin:18px 0 22px}
.photo-open{overflow:hidden}
.photo-viewer{width:min(1150px,96vw);max-width:96vw;max-height:94dvh;margin:auto;padding:18px;background:white;border:0;border-radius:12px;color:var(--ink)}
.photo-viewer::backdrop{background:#112233d9}
.photo-viewer>img{height:calc(90dvh - 160px);min-height:140px;object-fit:contain;background:#f4f6f8;border-radius:6px}
.viewer-close{display:block;margin:0 0 12px auto;padding:8px 16px;border:1px solid #b4d7ef;border-radius:6px;background:white;color:var(--blue);min-height:44px;cursor:pointer}
.photo-viewer>p{font-size:13px;text-align:center;margin:12px 0}
.viewer-controls{display:flex;justify-content:center;gap:16px}
.viewer-controls button{padding:8px 16px}
.property-facts{display:flex;flex-wrap:wrap;gap:10px;margin-top:24px}
.property-facts span{padding:8px 13px;background:var(--accent);color:var(--blue);border-radius:6px;font-size:14px}
#standort>.hero img{height:auto;max-height:720px;aspect-ratio:4/3;object-fit:cover;object-position:center}
.gallery.property-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
.property-gallery img{height:260px;object-fit:cover}
@media(max-width:1100px){.unit{grid-template-columns:1fr}.unit .gallery-stage img{height:380px}}
@media(max-width:650px){.unit .gallery-stage img{height:270px}.gallery.property-gallery{grid-template-columns:1fr}.photo-viewer{padding:12px}.photo-viewer>img{height:calc(85dvh - 170px)}#standort>.hero img{height:auto;aspect-ratio:4/3}.unit{padding:18px}}

/* Hide obsolete overlays if a visitor still has the older gallery script cached. */
.gallery-virtual-badge{display:none!important}
