.detail-grid > div { min-width: 0; }
.apartment-gallery { min-width: 0; max-width: 100%; }
.gallery-stage { position: relative; border-radius: 20px; overflow: hidden; background: #e7e9ec; height: 610px; }
.gallery-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: transparent; }
.gallery-open > img { width: 100%; height: 100%; object-fit: contain; }
.gallery-expand { position: absolute; left: 20px; bottom: 20px; padding: 10px 15px; border-radius: 8px; background: #fffef3ed; color: var(--ink); font-size: 12px; font-weight: 700; }
.gallery-arrow { display: flex; align-items: center; justify-content: center; position: absolute; top: calc(50% - 24px); width: 48px; height: 48px; border: 1px solid #fff8; border-radius: 50%; font-size: 32px; line-height: 1; color: #19243a; background: #fffffff2; box-shadow: 0 2px 15px #0002; }
.gallery-arrow:hover { background: var(--lime); }
.gallery-prev { left: 16px; }.gallery-next { right: 16px; }
.gallery-counter { position: absolute; right: 20px; bottom: 20px; padding: 8px 13px; border-radius: 8px; background: #172138ce; color: white; font-size: 12px; pointer-events: none; }
.gallery-caption { display: flex; justify-content: space-between; gap: 12px; margin: 15px 0 12px; font-size: 13px; font-weight: 700; }
.gallery-caption > span:last-child { color: var(--muted); font-size: 11px; font-weight: 400; }
.gallery-thumbs { display: flex; position: relative; gap: 9px; overflow-x: auto; overscroll-behavior-inline: contain; max-width: 100%; padding: 3px 3px 12px; scrollbar-width: thin; scrollbar-color: #b3c6ff transparent; }
.gallery-thumb { display: block; flex: 0 0 82px; position: relative; border: 3px solid transparent; border-radius: 11px; overflow: hidden; background: white; }
.gallery-thumb img { width: 100%; height: 96px; object-fit: cover; }
.gallery-thumb span { position: absolute; bottom: 4px; right: 4px; padding: 0 5px; border-radius: 4px; background: #15233bd4; color: white; font-size: 10px; }
.gallery-thumb[aria-current] { border-color: var(--blue); }
.gallery-thumb:focus-visible { outline-offset: 0; }
.gallery-dialog { width: 96vw; height: 95dvh; max-width: 1600px; max-height: 96dvh; margin: auto; padding: 0; border: 1px solid #fff3; border-radius: 15px; color: white; background: #101621; }
.gallery-dialog::backdrop { background: #050b16e8; }
.gallery-dialog[open] { display: flex; flex-direction: column; }
.gallery-dialog-top,.gallery-dialog-bottom { display: flex; align-items: center; justify-content: space-between; gap: 15px; flex: 0 0 auto; padding: 14px 22px; font-size: 14px; }
.gallery-dialog-bottom { color: #e1e7f1; font-size: 12px; }
.gallery-dialog-bottom > span:last-child { font-size: 10px; color: #9ba8bf; }
.gallery-close { border: 1px solid #ffffff4d; background: transparent; color: white; border-radius: 8px; padding: 9px 13px; min-height: 44px; }
.gallery-dialog-stage { position: relative; min-height: 0; flex: 1; }
.gallery-dialog-stage > img { width: 100%; height: 100%; object-fit: contain; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media(max-width:800px) { .gallery-stage { height: 610px; } }
@media(max-width:560px) {
 .gallery-stage { height: 450px; border-radius: 14px; }
 .gallery-arrow { width: 42px; height: 42px; top: calc(50% - 21px); font-size: 27px; }
 .gallery-prev { left: 9px; }.gallery-next { right: 9px; }
 .gallery-expand { left: 12px; bottom: 12px; font-size: 10px; padding: 8px 10px; }
 .gallery-counter { right: 12px; bottom: 12px; font-size: 10px; }
 .gallery-thumb { flex-basis: 70px; }.gallery-thumb img { height: 84px; }
 .gallery-caption { font-size: 12px; }.gallery-caption > span:last-child { font-size: 10px; }
 .gallery-dialog { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; border: 0; border-radius: 0; }
 .gallery-dialog-top,.gallery-dialog-bottom { padding: 12px; font-size: 12px; }
 .gallery-dialog-bottom > span:last-child { font-size: 9px; }
}
