/* Only the lower Gallery section. The listing's top hero remains native. */
body.single-listing #gallery-section.hosgy-photo-viewer > .block {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center;
    padding: 20px 0; min-width: 0;
}
body.single-listing #gallery-section.hosgy-photo-viewer > .block::before,
body.single-listing #gallery-section.hosgy-photo-viewer > .block::after { display: none !important; content: none !important; }
body.single-listing #gallery-section.hosgy-photo-viewer > .block > .title { display: block !important; grid-column: 1; grid-row: 1; margin: 0 0 16px !important; min-width: 0; }
body.single-listing #gallery-section.hosgy-photo-viewer .hosgy-gallery-native,
body.single-listing #gallery-section.hosgy-photo-viewer .hosgy-gallery-hint { display: none !important; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-toolbar { grid-column: 2; grid-row: 1; display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px 14px; margin-bottom: 16px; font-size: 13px; color: #818795; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-expand { border: 0; background: transparent; color: #59616e; padding: 6px 0; font: inherit; font-weight: 500; cursor: pointer; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-stage { position: relative; grid-column: 1 / -1; width: 100%; min-width: 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 12px; background: #f3f3f4; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-open { display: block; width: 100%; height: 100%; min-width: 0; border: 0; margin: 0; padding: 0; background: transparent; cursor: zoom-in; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-image { display: block; width: 100% !important; height: 100% !important; object-fit: cover; margin: 0; opacity: 1; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-arrow,
.hosgy-gallery-dialog .hosgy-gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; display: inline-flex; justify-content: center; align-items: center; width: 44px; height: 44px; margin: 0; padding: 0 0 3px; border: 1px solid #e5e6e9; border-radius: 50%; background: #fff; color: #292d35; box-shadow: 0 2px 8px #0002; font: 32px/1 Arial,sans-serif; cursor: pointer; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-previous,
.hosgy-gallery-dialog .hosgy-gallery-previous { left: 12px; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-next,
.hosgy-gallery-dialog .hosgy-gallery-next { right: 12px; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-counter { position: absolute; z-index: 2; bottom: 12px; right: 12px; padding: 5px 10px; border-radius: 8px; background: #202329bd; color: #fff; font-size: 12px; line-height: 1.5; pointer-events: none; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-thumbnails { grid-column: 1 / -1; display: flex; gap: 10px; width: 100%; min-width: 0; overflow-x: auto; padding: 4px 2px 8px; margin-top: 10px; scroll-snap-type: x proximity; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-thumbnail { flex: 0 0 calc((100% - 50px) / 6); display: block; min-width: 64px; aspect-ratio: 1.2; border: 2px solid transparent; border-radius: 9px; margin: 0; padding: 0; overflow: hidden; background: #eee; cursor: pointer; scroll-snap-align: start; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-thumbnail img { display: block; width: 100%; height: 100%; object-fit: cover; }
#gallery-section.hosgy-photo-viewer .hosgy-gallery-thumbnail[aria-current="true"] { border-color: #843399; box-shadow: 0 0 0 1px #84339933; }
#gallery-section.hosgy-photo-viewer button:focus-visible,
.hosgy-gallery-dialog button:focus-visible { outline: 3px solid #843399; outline-offset: 3px; }
#gallery-section.hosgy-photo-viewer [hidden],
.hosgy-gallery-dialog [hidden] { display: none !important; }
.hosgy-gallery-dialog { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; z-index: 2147483010; background: #141619f5; color: white; overflow: hidden; }
.hosgy-gallery-dialog:not([open]) { display: none; }
.hosgy-gallery-dialog[open] { display: grid; place-items: center; }
.hosgy-gallery-dialog::backdrop { background: transparent; }
.hosgy-gallery-dialog-frame { position: relative; width: 100%; height: 100%; box-sizing: border-box; padding: 64px 70px 56px; }
.hosgy-gallery-dialog-image { display: block; width: 100%; height: 100%; object-fit: contain; }
.hosgy-gallery-dialog .hosgy-gallery-close { position: absolute; z-index: 3; top: max(12px, env(safe-area-inset-top)); right: max(16px, env(safe-area-inset-right)); width: 44px; height: 44px; border: 1px solid #ffffff66; border-radius: 50%; background: #202329; color: white; font: 30px/1 Arial,sans-serif; cursor: pointer; }
.hosgy-gallery-dialog-counter { position: absolute; bottom: max(16px, env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); color: #fff; font-size: 14px; }
@media (max-width: 767px) {
    #gallery-section.hosgy-photo-viewer .hosgy-gallery-toolbar { gap: 6px 10px; font-size: 12px; }
    #gallery-section.hosgy-photo-viewer .hosgy-gallery-total { display: none; }
    #gallery-section.hosgy-photo-viewer .hosgy-gallery-thumbnails { gap: 8px; }
    #gallery-section.hosgy-photo-viewer .hosgy-gallery-thumbnail { flex-basis: 72px; }
    #gallery-section.hosgy-photo-viewer .hosgy-gallery-previous { left: 8px; }
    #gallery-section.hosgy-photo-viewer .hosgy-gallery-next { right: 8px; }
    .hosgy-gallery-dialog-frame { padding: 64px 12px 56px; }
    .hosgy-gallery-dialog .hosgy-gallery-arrow { top: auto; bottom: 8px; transform: none; }
}
