/* Photo viewing is a separate, image-first space. Controls never cover the filmstrip. */
.listing-detail-premium .detail-photo{isolation:isolate}
.listing-detail-premium .detail-photo-open{position:absolute;z-index:1;inset:0;width:100%;border:0;background:transparent;cursor:zoom-in}
.listing-detail-premium .detail-photo-open:focus-visible{outline:3px solid #fff;outline-offset:-7px}
.listing-detail-premium .detail-photo-count{z-index:2;min-height:42px;padding:9px 13px;cursor:pointer;font:750 12px/1 var(--sans)}
.listing-detail-premium .detail-photo-count:hover{background:#143d32ee}
.listing-detail-premium .detail-preview-label{z-index:2;pointer-events:none}
.listing-detail-premium .detail-thumbs{position:static;max-width:100%;width:100%;gap:9px;padding:12px;background:#fff;backdrop-filter:none;border-top:1px solid #e5ece6;border-radius:0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#b7c9bd transparent}
.listing-detail-premium .detail-thumbs button{flex:0 0 68px;width:68px;height:55px;border:2px solid transparent;border-radius:10px;opacity:1;transition:border-color .18s,transform .18s}
.listing-detail-premium .detail-thumbs button:hover{transform:translateY(-2px)}
.listing-detail-premium .detail-thumbs button.active{border-color:#d96249}
.listing-detail-premium .detail-thumbs button:focus-visible{outline:3px solid #d96249;outline-offset:2px}

.photo-viewer{position:fixed;z-index:2000;inset:0;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;width:100vw;height:100vh;height:100dvh;overflow:hidden;background:#091b18;color:#fff;touch-action:manipulation}
.photo-viewer *{box-sizing:border-box}
.photo-viewer button{display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid #ffffff38;border-radius:12px;background:#ffffff12;color:#fff;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.photo-viewer button:hover{background:#ffffff26}
.photo-viewer button:focus-visible{outline:3px solid #f0aa8c;outline-offset:2px}
.photo-viewer svg{width:21px;height:21px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.photo-viewer-top{display:flex;align-items:center;justify-content:space-between;gap:18px;min-width:0;width:100%;min-height:68px;padding:calc(12px + env(safe-area-inset-top)) max(18px,env(safe-area-inset-right)) 12px max(18px,env(safe-area-inset-left));background:#0d2922;border-bottom:1px solid #ffffff18}
.photo-viewer-title{min-width:0;display:flex;align-items:baseline;gap:16px}
.photo-viewer-title strong{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font:750 15px/1.3 var(--display)}
.photo-viewer-count{flex:none;color:#b8d1c2;font:700 12px/1 var(--sans);letter-spacing:.08em}
.photo-viewer-close{flex:none}
.photo-viewer-stage{position:relative;display:grid;grid-template-columns:minmax(0,1fr);place-items:center;min-width:0;width:100%;min-height:0;overflow:hidden;background:radial-gradient(circle at 50% 45%,#18352d,#0a1815 72%);touch-action:none;user-select:none;-webkit-user-select:none}
.photo-viewer-backdrop{position:absolute;inset:-12%;width:124%;height:124%;object-fit:cover;filter:blur(30px) brightness(.38);opacity:.56;pointer-events:none}
.photo-viewer-image-wrap{position:relative;z-index:1;display:grid;place-items:center;width:100%;height:100%;min-width:0;min-height:0;transform-origin:center;will-change:transform}
.photo-viewer-image{display:block;max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;pointer-events:none;user-select:none;-webkit-user-drag:none}
.photo-viewer.is-zoomed .photo-viewer-stage{cursor:grab}
.photo-viewer-previous,.photo-viewer-next{position:absolute;z-index:2;top:50%;transform:translateY(-50%);width:48px;height:48px;background:#0c211bc9!important;backdrop-filter:blur(8px)}
.photo-viewer-previous{left:16px}.photo-viewer-next{right:16px}
.photo-viewer-bottom{min-width:0;width:100%;background:#0d2922;border-top:1px solid #ffffff18;padding:9px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
.photo-viewer-tools{display:flex;align-items:center;justify-content:center;gap:8px;min-height:46px}
.photo-viewer-tools button{width:44px;height:44px}
.photo-viewer-tools .photo-viewer-fit{width:70px;font:750 12px/1 var(--sans)}
.photo-viewer-hint{margin-left:15px;color:#bad0c2;font:500 12px/1.4 var(--sans)}
.photo-viewer-thumbs{display:flex;justify-content:safe center;gap:7px;max-width:100%;overflow-x:auto;margin-top:8px;padding:4px 2px;scrollbar-width:thin;scrollbar-color:#749184 transparent}
.photo-viewer-thumbs button{flex:0 0 60px;width:60px;height:52px;min-width:60px;min-height:52px;padding:2px;border:2px solid transparent;border-radius:9px;background:#ffffff12;opacity:.65}
.photo-viewer-thumbs button.is-active{border-color:#f0aa8c;opacity:1}
.photo-viewer-thumbs img{width:100%;height:100%;border-radius:5px;object-fit:cover}
@media(max-width:720px){
  .listing-detail-premium .detail-thumbs{right:auto;bottom:auto;max-width:100%;gap:7px;padding:9px 12px}
  .listing-detail-premium .detail-thumbs button{flex-basis:58px;width:58px;height:49px}
  .photo-viewer-top{min-height:58px;padding-top:calc(8px + env(safe-area-inset-top));padding-bottom:8px}
  .photo-viewer-title strong{font-size:13px}
  .photo-viewer-previous,.photo-viewer-next{width:42px;height:42px;min-width:42px;min-height:42px;background:#0c211ba8!important}
  .photo-viewer-previous{left:8px}.photo-viewer-next{right:8px}
  .photo-viewer-tools{justify-content:center;flex-wrap:wrap}
  .photo-viewer-hint{order:2;display:block;width:100%;margin:1px 0 0;color:#a8c5b3;font-size:10px;text-align:center}
  .photo-viewer-thumbs{justify-content:safe start}
}
@media(max-height:690px){.photo-viewer-hint{display:none}}
@media(max-height:540px){.photo-viewer-thumbs{display:none}.photo-viewer-bottom{padding-top:5px;padding-bottom:calc(5px + env(safe-area-inset-bottom))}}
@media(prefers-reduced-motion:reduce){.listing-detail-premium .detail-thumbs button{transition:none}}
