/* Property gallery only; publisher, header and contact bar are unchanged. */
.property-detail-page .detail-gallery { gap: 0; padding: 0; border: 0; background: transparent; box-shadow: none; min-width: 0; }
.property-detail-page .detail-gallery-media { aspect-ratio: 4 / 3; border-radius: 16px; overflow: hidden; background: #e9e7e1; }
.property-detail-page .detail-gallery-media::after { content: none; }
.property-detail-page .detail-gallery-track .detail-gallery-image { width: 100%; height: 100%; object-fit: cover; object-position: center; cursor: zoom-in; }
.property-detail-page .detail-gallery-track { scroll-behavior: smooth; }
.property-detail-page .detail-photo-actions { top: 12px; left: 12px; right: 68px; gap: 6px; }
.property-detail-page .detail-photo-actions :is(button,.property-save-link) { box-shadow: 0 2px 7px #00000014; font-size: .78rem; }
.gallery-expand, .property-detail-page .detail-gallery-counter { position: absolute; z-index: 2; display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 6px 12px; border: 0; border-radius: 9px; background: #15231ed1; color: #fff; font: inherit; font-size: .85rem; }
.gallery-expand { top: 12px; right: 12px; width: 44px; cursor: pointer; }
.property-detail-page .detail-gallery-counter { left: auto; right: 12px; bottom: 12px; transform: none; pointer-events: none; }
.property-detail-page .detail-gallery-control { width: 36px; height: 44px; font-size: 1.5rem; border-radius: 8px; }
.gallery-thumbnails { position: relative; display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px; margin-top: 10px; scrollbar-width: thin; }
.gallery-thumbnails button { flex: 0 0 80px; height: 64px; padding: 2px; border: 2px solid transparent; border-radius: 10px; background: transparent; cursor: pointer; overflow: hidden; }
.gallery-thumbnails button[aria-current=true] { border-color: var(--green); }
.gallery-thumbnails img { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.detail-gallery-image.is-failed { visibility: hidden; }
.property-photo-viewer { position: fixed; inset: 0; margin: 0; padding: 0; width: 100%; max-width: none; height: 100dvh; max-height: none; border: 0; border-radius: 0; background: #101512; color: white; z-index: 1000; overflow: hidden; }
.property-photo-viewer::backdrop { background: #101512; }
.property-photo-viewer[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; }
.viewer-toolbar { display: flex; align-items: center; justify-content: space-between; direction: ltr; padding: calc(8px + env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 8px max(12px, env(safe-area-inset-left, 0px)); z-index: 2; }
.property-photo-viewer button { min-width: 44px; min-height: 44px; border: 1px solid #ffffff50; border-radius: 8px; background: #20372bd9; color: #fff; font: inherit; cursor: pointer; }
.property-photo-viewer button:disabled { opacity: .35; cursor: default; }
.viewer-stage { position: relative; overflow: hidden; touch-action: none; display: grid; place-items: center; }
.viewer-image { width: 100%; height: 100%; object-fit: contain; user-select: none; transform-origin: center; }
.viewer-error { position: absolute; padding: 16px; }
.viewer-previous, .viewer-next { position: absolute; top: 50%; z-index: 2; font-size: 1.6rem !important; }
.viewer-previous { left: max(8px, env(safe-area-inset-left, 0px)); }
.viewer-next { right: max(8px, env(safe-area-inset-right, 0px)); }
.viewer-help { margin: 0; padding: 8px 16px calc(12px + env(safe-area-inset-bottom, 0px)); text-align: center; font-size: .8rem; color: #d8e6dc; }
.property-photo-viewer :focus-visible { outline: 3px solid #9ee4b8; outline-offset: 2px; }
html.photo-viewer-open { overflow: hidden; }
@media (max-width: 767px) {
 .property-detail-page .detail-gallery-control { display: none; }
 .property-detail-page .detail-gallery { margin: 12px -4px 0; }
 .property-detail-page .detail-gallery-media { max-height: none; }
 .gallery-thumbnails button { flex-basis: 70px; height: 58px; }
 .property-detail-page .detail-photo-actions :is(button,.property-save-link) { padding: 6px 8px; font-size: .72rem; gap: 4px; }
}
@media (max-width: 380px) {
 .property-detail-page .detail-photo-actions { top: 8px; left: 8px; right: 56px; }
 .property-detail-page .detail-photo-actions :is(button,.property-save-link) { max-width: 148px; }
 .gallery-expand { top: 8px; right: 8px; }
}
@media (prefers-reduced-motion: reduce) { .property-detail-page .detail-gallery-track { scroll-behavior: auto; } }

.property-detail-page .detail-gallery-track:focus-visible { outline-offset: -4px; }

/* Decorative action row must not intercept swipes or image taps between buttons. */
.property-detail-page .detail-photo-actions { pointer-events: none; }
.property-detail-page .detail-photo-actions :is(button,a) { pointer-events: auto; }

.property-detail-page .detail-gallery-video-only {
  aspect-ratio: auto;
  min-height: 64px;
  background: transparent;
}
.detail-gallery-video { margin-block-start: 10px; }
.detail-gallery-video summary {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  width: fit-content;
  padding: 8px 14px;
  border: 1px solid var(--green);
  border-radius: 9px;
  color: var(--green);
  font-weight: 600;
  cursor: pointer;
}
.detail-gallery-video video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin-block-start: 8px;
  border-radius: 12px;
  background: #101512;
  object-fit: contain;
}
