/* Nexus Prime v1.3: mobile overflow repair and accessible real photo navigation.
   Loaded AFTER the unchanged original Nexus theme to preserve brand and spacing. */
.nx13-gallery-arrow{position:absolute;z-index:4;top:50%;transform:translateY(-50%);width:39px;height:39px;border:1px solid rgba(255,255,255,.45);border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(15,23,42,.85);color:#fff!important;cursor:pointer;box-shadow:0 4px 16px rgba(0,0,0,.25);opacity:1!important;visibility:visible!important;pointer-events:auto!important;transition:background .18s ease,transform .18s ease}
.nx13-gallery-arrow span{font-size:29px;font-weight:700;line-height:1;transform:translateY(-1px)}
.nx13-gallery-arrow:hover,.nx13-gallery-arrow:focus-visible{background:var(--accent-primary,#ea580c);outline:2px solid rgba(255,255,255,.7);outline-offset:2px}
.nx13-gallery-arrow:active{transform:translateY(-50%) scale(.92)}
.nx13-gallery-arrow[disabled]{opacity:.35!important;cursor:not-allowed;border-color:rgba(255,255,255,.16)}
.nx13-gallery-prev{left:12px}.nx13-gallery-next{right:12px}
.nx13-card-gallery{touch-action:pan-y;user-select:none;-webkit-user-select:none}
.nx13-card-gallery>img{pointer-events:auto;-webkit-user-drag:none}
.nx13-card-count{display:inline-block;color:#fff;font-size:10px;font-weight:800;line-height:1;white-space:nowrap;margin-right:3px}
.nx13-modal-photo-count{position:absolute;z-index:5;left:50%;bottom:12px;transform:translateX(-50%);border-radius:30px;padding:5px 10px;font-size:12px;font-weight:800;color:#fff;background:rgba(15,23,42,.82);pointer-events:none}
.nx13-modal-thumb.is-active{border-color:var(--accent-primary,#ea580c)!important;box-shadow:0 0 0 1px var(--accent-primary,#ea580c)}
#modalThumbRow{display:flex!important;gap:8px!important;overflow-x:auto;overscroll-behavior-inline:contain;padding:3px 3px 10px;scrollbar-width:thin}
#modalThumbRow>button{flex:0 0 75px;min-width:75px;max-width:75px}
.premium-gallery-main{touch-action:pan-y}
.premium-gallery-count{z-index:5;right:12px;bottom:12px;font-size:11px}
.premium-gallery-thumbs button:focus-visible{outline:2px solid var(--accent-primary,#ea580c);outline-offset:2px}
.nexus-fx-inner .nx13-fx-loan,.nexus-fx-inner .nx13-fx-rates{display:contents}
@media(max-width:640px){
  html,body{max-width:100%;overflow-x:clip}
  .nexus-topbar,.nexus-header,.nexus-fx-ticker{max-width:100%;min-width:0}
  .nexus-fx-inner{box-sizing:border-box;width:calc(100% - 24px)!important;max-width:100%;display:grid!important;grid-template-columns:minmax(0,1fr);gap:5px!important;align-items:stretch;overflow:hidden;padding:5px 0 7px!important}
  .nexus-fx-inner .nx13-fx-loan{display:flex!important;gap:6px;min-width:0;overflow:hidden}
  .nexus-fx-inner .nx13-fx-loan .nexus-fx-item{min-width:0;max-width:100%;font-size:10px;white-space:nowrap}
  .nexus-fx-inner .nx13-fx-loan .nexus-fx-item span{overflow:hidden;text-overflow:ellipsis}
  .nexus-fx-inner .nx13-fx-rates{display:flex!important;min-width:0;max-width:100%;align-items:center;gap:0!important;overflow-x:auto;overflow-y:hidden;scrollbar-width:thin;overscroll-behavior-x:contain;-webkit-overflow-scrolling:touch;scroll-snap-type:x proximity;padding-bottom:3px}
  .nx13-fx-rates .nexus-fx-item{scroll-snap-align:start;flex:0 0 auto;margin-right:10px;padding-left:10px!important;border-left:1px solid var(--border-color,#e2e8f0)!important;font-size:10px}
  .nx13-fx-rates .nexus-fx-item:first-child{border-left:0!important;padding-left:0!important}
  .nexus-topbar-inner{width:100%;box-sizing:border-box;min-width:0;overflow:hidden;padding-right:12px!important;padding-left:12px!important}
  .nexus-topbar-credit{display:flex;max-width:100%;min-width:0;width:100%;align-items:center;overflow:hidden;white-space:nowrap}
  .nexus-topbar-credit>.theme-text-muted{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .nexus-topbar-credit .nexus-credit-term{display:block;flex:0 1 auto;min-width:0;max-width:60%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .nexus-topbar-actions{width:100%;max-width:100%;min-width:0;gap:5px!important}
  .nexus-theme-box{flex:1 1 0;overflow:hidden;min-width:0;max-width:100%}
  .nexus-theme-btn{min-width:0;padding:5px 3px!important;white-space:normal!important;font-size:10px;word-break:normal}
  .nexus-quick-actions{flex:0 0 auto;gap:3px!important}
  .nexus-icon-btn{min-width:29px!important;width:31px!important;height:30px!important;padding:3px!important}
  .nexus-header-inner{width:100%;max-width:100%;min-width:0}
  .nexus-brand{min-width:0;max-width:calc(100% - 55px)}
  .nexus-brand-copy{min-width:0}.nexus-brand-line{min-width:0}.nexus-brand-subtitle{max-width:100%}
  #propertyGridContainer{grid-template-columns:minmax(0,1fr)!important;gap:16px!important}
  #propertyGridContainer article{width:100%;max-width:100%;min-width:0}
  #propertyGridContainer article>.px-5,#propertyGridContainer article .p-5{padding-left:15px!important;padding-right:15px!important}
  #propertyGridContainer .grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))!important;min-width:0;gap:2px!important}
  #propertyGridContainer .grid-cols-4>div{min-width:0;overflow:hidden}
  #propertyGridContainer .grid-cols-4 strong{max-width:100%;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  #propertyGridContainer .grid-cols-4 span{font-size:10px;white-space:nowrap}
  #propertyGridContainer .grid-cols-12{gap:5px!important}
  #propertyGridContainer .grid-cols-12 button{min-width:0;max-width:100%;font-size:11px!important;padding:9px 4px!important;line-height:1.3;white-space:nowrap;overflow:hidden}
  #propertyGridContainer .grid-cols-12 button .fa-solid,#propertyGridContainer .grid-cols-12 button .fa-brands{flex-shrink:0}
  #propertyGridContainer .nx13-card-gallery .nx13-gallery-arrow{width:38px;height:38px}
  #propertyGridContainer .nx13-card-dots{gap:3px;padding:5px 8px;max-width:48%;overflow:hidden}
  #propertyGridContainer .nx13-card-dots span:not(.nx13-card-count){width:5px!important;max-width:5px!important;min-width:5px!important;height:5px!important}
  .premium-detail-layout,.premium-detail-main,.premium-detail-aside,.premium-gallery{max-width:100%;min-width:0}
  #propertyDetailModal .nx13-gallery-arrow{width:36px;height:36px}
  #modalThumbRow{max-width:100%}
  .nexus-ai-widget{right:10px!important;bottom:12px!important;max-width:calc(100vw - 20px)}
  .nexus-ai-trigger{width:54px;height:54px;min-width:54px;padding:7px!important;justify-content:center;gap:0;border-radius:50%;box-shadow:0 5px 18px #0004}
  .nexus-ai-trigger>.nexus-ai-robot{flex:0 0 36px}
  .nexus-ai-trigger>span:not(.nexus-ai-robot){position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap;border:0}
  .nexus-ai-panel{right:0;max-width:calc(100vw - 20px);bottom:64px;height:min(520px,calc(100dvh - 90px))}
}
@media(max-width:360px){.nexus-theme-btn{font-size:9px!important}.nexus-brand-line strong{font-size:15px}.nexus-fx-inner .nx13-fx-loan .nexus-fx-item{font-size:9px}}
@media(prefers-reduced-motion:reduce){.nx13-gallery-arrow{transition:none}}
