/* =============================================================
   PROPERTY DETAIL MODAL — Unit Layout Sandbox
   Only used on the public homepage (index.html).
============================================================= */

/* Full-screen overlay */
.prop-detail-overlay{
    overscroll-behavior:contain;
    display:none;
    position:fixed;
    inset:0;
    background:rgba(28,17,10,.62);
    backdrop-filter:blur(8px);
    z-index:8000;
    align-items:center;
    justify-content:center;
    padding:20px;
    overflow-y:auto;
}

.prop-detail-overlay.active{
    display:flex;
}

/* Modal card */
.prop-detail-modal{
    background:var(--sg-ivory);
    border:1px solid rgba(217,184,114,.35);
    border-radius:22px;
    width:100%;
    max-width:700px;
    max-height:90vh;
    /* dvh = the height actually visible (browser toolbars). */
    max-height:min(90vh, calc(100dvh - 40px));
    overflow-y:auto;
    overscroll-behavior:contain;
    padding:36px 38px 32px;
    position:relative;
    box-shadow:0 32px 80px rgba(20,12,6,.4);
    animation:pdm-in .25s ease;
}

/* Wider variant for the two-column floor-plan layout */
.prop-detail-modal-lg{
    max-width:1240px;
    display:flex;
    flex-direction:column;
    overflow:hidden;
    padding-top:32px;
    padding-bottom:28px;
}

/* Keep header + legend fixed; only the two-column body scrolls */
.prop-detail-modal-lg .prop-detail-header,
.prop-detail-modal-lg .unit-legend{
    flex-shrink:0;
}

@keyframes pdm-in{
    from{ opacity:0; transform:translateY(16px); }
    to{   opacity:1; transform:translateY(0);    }
}

/* Close button */
.prop-detail-close{
    position:absolute;
    top:18px;
    right:20px;
    width:34px;
    height:34px;
    border:1px solid var(--sg-line);
    background:#fff;
    border-radius:50%;
    font-size:15px;
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:.2s;
    color:var(--sg-text);
    z-index:2;
}

.prop-detail-close:hover{
    background:var(--sg-espresso);
    border-color:var(--sg-espresso);
    color:#fbf6ec;
}

.prop-detail-close:focus-visible{
    outline:2px solid var(--sg-gold);
    outline-offset:2px;
}

/* Header */
.prop-detail-header{
    margin-bottom:20px;
    padding-right:44px;
}

.prop-detail-name{
    font-size:1.8rem;
    font-weight:600;
    line-height:1.2;
    letter-spacing:-.02em;
    color:var(--sg-ink);
    margin:0 0 10px;
    font-family:'Fraunces',Georgia,serif;
}

.prop-detail-meta{
    display:flex;
    flex-wrap:wrap;
    /* One tidy row: type badge first, then the address with its maps
       link inline after it; wraps cleanly on narrow screens. */
    align-items:center;
    gap:8px 14px;
}

.prop-detail-badges{
    order:-1;
}

/* No flex:1 — the address hugs its content so the badge sits right
   after it, forming one aligned header row with the title. */
.prop-detail-address{
    font-size:.86rem;
    color:var(--sg-muted);
    min-width:0;
}

/* The maps link follows the address inline, set apart in the brand
   color so it reads as a link. */
.prop-detail-address a{
    display:inline;
    margin-left:6px;
    color:var(--sg-gold-deep);
    font-weight:600;
    text-decoration:none;
    transition:color .18s ease, text-decoration-color .18s ease;
}

.prop-detail-address a:hover,
.prop-detail-address a:focus-visible{
    color:var(--sg-brand-dark, #5c361f);
    text-decoration:underline;
    text-underline-offset:3px;
}

.prop-detail-address a:focus-visible{
    outline:2px solid rgba(184,138,68,.6);
    outline-offset:2px;
    border-radius:3px;
}

.prop-detail-badges{
    display:flex;
    gap:8px;
    flex-wrap:wrap;
}

.prop-detail-badge{
    display:inline-block;
    padding:5px 13px;
    border-radius:6px;
    font-size:.68rem;
    font-weight:700;
    letter-spacing:.12em;
    text-transform:uppercase;
}

.prop-detail-badge.type{
    background:#f7eed9;
    border:1px solid #ead9b6;
    color:var(--sg-gold-deep);
}

.prop-detail-badge.price{
    background:var(--sg-espresso);
    color:#fff;
}

/* Legend */
.unit-legend{
    display:flex;
    gap:10px;
    flex-wrap:wrap;
    margin-bottom:22px;
    padding-bottom:18px;
    border-bottom:1px solid var(--sg-line-soft);
}

.unit-legend-item{
    display:flex;
    align-items:center;
    gap:7px;
    padding:6px 13px;
    border-radius:999px;
    background:#fff;
    border:1px solid var(--sg-line-soft);
    font-size:.78rem;
    font-weight:600;
    color:var(--sg-text);
}

.unit-dot{
    width:10px;
    height:10px;
    border-radius:50%;
    flex-shrink:0;
    /* Same three fills as the tiles, with a halo so a small dot still
       carries its colour */
    box-shadow:0 0 0 3px rgba(var(--sg-shadow),.05);
}

.unit-legend-item.vacant  .unit-dot{ background:var(--sg-ok);   box-shadow:0 0 0 3px rgba(45,122,82,.16); }
.unit-legend-item.reserved .unit-dot{ background:#d1a02e;       box-shadow:0 0 0 3px rgba(209,160,46,.2); }
.unit-legend-item.occupied .unit-dot{ background:#cf4a3c;       box-shadow:0 0 0 3px rgba(207,74,60,.17); }

/* Sandbox container */
.unit-sandbox{
    display:flex;
    flex-direction:column;
    gap:20px;
}

.unit-sandbox-loading{
    text-align:center;
    color:var(--sg-muted);
    font-size:.85rem;
    padding:30px 0;
}

/* ── Two-column body layout ─────────────────────────────────── */
.prop-detail-body{
    display:grid;
    grid-template-columns:1.3fr 1fr;
    gap:26px;
    align-items:stretch;
    flex:1 1 auto;
    min-height:0;
    overflow:hidden;
}

.prop-detail-column-left,
.prop-detail-column-right{
    min-width:0;
    overflow-y:auto;
}

/* Slight inset so long scrollbars don't touch the columns' edges */
.prop-detail-column-left  { padding-right:10px; }
.prop-detail-column-right { padding-left:10px; }

/* Per-floor group — its own card, so the floor plan reads as a distinct
   object beside the unit's detail panel rather than loose blocks */
.unit-floor-group{
    display:flex;
    flex-direction:column;
    gap:12px;
    margin-bottom:18px;

    padding:16px 18px 18px;
    background:#fff;
    border:1px solid var(--sg-line-soft);
    border-radius:16px;
    box-shadow:0 1px 2px rgba(var(--sg-shadow),.04), 0 10px 26px rgba(var(--sg-shadow),.06);
}

.unit-floor-group:last-child{
    margin-bottom:0;
}

/* Header row for each floor — the accent tile gives the group a
   recognisable top edge before you read the floor name */
.unit-floor-label{
    display:flex;
    align-items:center;
    gap:9px;
    font-size:.72rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.12em;
    color:var(--sg-gold-deep);
    border-bottom:1px solid var(--sg-line-soft);
    padding-bottom:10px;
}

.unit-floor-label::before{
    content:'';
    width:7px;
    height:7px;
    border-radius:2px;
    background:var(--sg-gold);
    box-shadow:0 0 0 3px rgba(184,138,68,.18);
    flex-shrink:0;
}

/* The graph-like canvas per floor (mirrors the admin's floor plan).
   Height is computed in JS from the blocks' bounding box so there's
   no empty canvas space beyond the unit layout. */
.unit-floor-canvas{
    position:relative;
    background:
        linear-gradient(#eee4d4 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(90deg,#eee4d4 1px, transparent 1px) 0 0 / 40px 40px,
        linear-gradient(180deg,#fbf8f1,#f6f0e5);
    border:1px solid var(--sg-line-soft);
    border-radius:12px;
    overflow:hidden;
    /* Recessed, so the unit tiles read as sitting ON the plan */
    box-shadow:inset 0 2px 6px rgba(var(--sg-shadow),.05);
}

/* Individual unit block (positioned by the admin's floor-plan geometry).
   Tiles sit above the recessed canvas with a top-light sheen, so each one
   reads as a small raised card rather than a flat colour swatch. */
.unit-plan-block{
    position:absolute;
    border:1.5px solid transparent;
    border-radius:10px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:4px;
    font-size:.7rem;
    font-weight:700;
    user-select:none;
    transition:transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease, opacity .16s ease;
    min-width:34px;
    min-height:30px;
    background:#fff;
    box-shadow:0 2px 6px rgba(var(--sg-shadow),.1), inset 0 1px 0 rgba(255,255,255,.9);
    overflow:hidden;
}

/* Volume: a soft highlight across the top half of every tile */
.unit-plan-block::before{
    content:'';
    position:absolute;
    inset:0;
    border-radius:inherit;
    background:linear-gradient(180deg,rgba(255,255,255,.4),rgba(255,255,255,0) 58%);
    pointer-events:none;
}

/* Keep the label + status text above the sheen */
.unit-plan-block > span{
    position:relative;
    z-index:1;
}

.unit-plan-block .tile-label{
    font-size:.68rem;
    font-weight:700;
    line-height:1;
    text-align:center;
    padding:0 3px;
}

.unit-plan-block .tile-status{
    font-size:.56rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.03em;
    line-height:1;
    opacity:.8;
}

/* ── Status states ──────────────────────────────────────────────
   Three clearly different fills (green / amber / red), each with its
   own tinted shadow so they stay distinguishable when printed small. */

/* Vacant — green, the "you can pick this" colour */
.unit-plan-block.vacant.unit-selectable{
    cursor:pointer;
    border-color:#8fc6a7;
    background:linear-gradient(180deg,#f0f8f2,#dcefe2);
    color:#1f6b45;
    box-shadow:0 3px 8px rgba(31,107,69,.14), inset 0 1px 0 rgba(255,255,255,.85);
}

@media (hover:hover){
.unit-plan-block.vacant.unit-selectable:hover{
    transform:translateY(-3px) scale(1.02);
    border-color:var(--sg-ok);
    box-shadow:0 11px 22px rgba(31,107,69,.24), inset 0 1px 0 rgba(255,255,255,.9);
}
}

/* Selected — deeper green + a focus ring, so it stays obvious which
   tile the detail panel is showing */
.unit-plan-block.vacant.unit-selectable.selected{
    border-color:var(--sg-ok);
    background:linear-gradient(180deg,#d6ecde,#bfe0cb);
    color:#175a39;
    box-shadow:0 0 0 4px rgba(45,122,82,.2), 0 11px 24px rgba(31,107,69,.26);
    transform:translateY(-3px) scale(1.03);
}

/* Reserved — amber, clickable like a vacant tile: its details open in the
   panel, but the Book action stays locked (see .ud-book-btn:disabled) */
.unit-plan-block.reserved.unit-selectable{
    cursor:pointer;
    border-color:#e3c887;
    background:linear-gradient(180deg,#fdf7e8,#f9ecc9);
    color:var(--sg-warn);
    box-shadow:0 3px 8px rgba(134,96,15,.14), inset 0 1px 0 rgba(255,255,255,.8);
}

@media (hover:hover){
.unit-plan-block.reserved.unit-selectable:hover{
    transform:translateY(-3px) scale(1.02);
    border-color:#d6b25a;
    box-shadow:0 11px 22px rgba(134,96,15,.24), inset 0 1px 0 rgba(255,255,255,.9);
}
}

/* Selected reserved tile — the amber twin of the vacant selected rule */
.unit-plan-block.reserved.unit-selectable.selected{
    border-color:#c99a2a;
    background:linear-gradient(180deg,#faedc6,#f2dc9b);
    color:#6b4e04;
    box-shadow:0 0 0 4px rgba(201,154,42,.22), 0 11px 24px rgba(134,96,15,.26);
    transform:translateY(-3px) scale(1.03);
}

/* Occupied — red, taken */
.unit-plan-block.occupied.unit-locked{
    cursor:not-allowed;
    border-color:var(--sg-bad-line);
    background:linear-gradient(180deg,#fdf3f1,#f9e1dd);
    color:var(--sg-bad);
    opacity:.95;
    box-shadow:0 3px 8px rgba(169,54,42,.13), inset 0 1px 0 rgba(255,255,255,.8);
}

/* Locked tiles get depth on hover (and rise above their neighbours) but
   keep cursor:not-allowed so they never read as clickable */
.unit-plan-block.unit-locked:hover{
    opacity:1;
    z-index:2;
    box-shadow:0 9px 18px rgba(var(--sg-shadow),.18), inset 0 1px 0 rgba(255,255,255,.9);
}

/* ── Unit detail panel (right column) ───────────────────────── */
.unit-detail-panel{
    background:#fff;
    border:1px solid var(--sg-line-soft);
    border-radius:18px;
    padding:24px;
    min-height:100%;
    /* Column, so the "Unit Details" label sits ABOVE the card. As a row
       (the inherited default) it rendered beside the card instead. */
    display:flex;
    flex-direction:column;
    align-items:stretch;
    justify-content:flex-start;
    position:relative;
    top:auto;
    box-shadow:0 1px 2px rgba(var(--sg-shadow),.04), 0 12px 30px rgba(var(--sg-shadow),.07);
}

/* Empty state (nothing selected yet): framed dashed area with a tinted
   round icon, so it reads as an intentional drop-zone rather than a
   grey box. */
.unit-detail-empty{
    text-align:center;
    color:var(--sg-muted);
    font-size:.86rem;
    width:100%;
    padding:40px 24px;
    margin:auto 0;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:16px;
    border:1.5px dashed var(--sg-line);
    border-radius:14px;
    background:
        radial-gradient(120% 95% at 50% 0%, rgba(243,235,222,.9), rgba(243,235,222,0) 72%),
        var(--sg-ivory);
}

/* The shared house glyph, centred inside whichever container it lands in */
.ps-unit-placeholder{
    display:inline-block;
    width:34px;
    height:34px;
    margin-bottom:8px;
    border-radius:10px;
    background-color:var(--sg-cream);
    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23a9794c' stroke-width='1.7' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 10.6 12 3.2l9 7.4'/%3E%3Cpath d='M5.2 9.6V20.8h13.6V9.6'/%3E%3Cpath d='M9.8 20.8v-5.6h4.4v5.6'/%3E%3C/svg%3E");
    background-repeat:no-repeat;
    background-position:center;
    background-size:19px 19px;
    filter:none;
    opacity:1;
}

.unit-detail-empty .ps-unit-placeholder{
    width:74px;
    height:74px;
    margin-bottom:0;
    border-radius:50%;
    background-color:#fff;
    background-size:34px 34px;
    border:1px solid var(--sg-line);
    box-shadow:0 8px 18px rgba(var(--sg-shadow),.09), inset 0 1px 0 #fff;
}

.unit-detail-empty p{
    margin:0;
    max-width:24ch;
    line-height:1.6;
    color:var(--sg-muted);
}

/* ── Unit detail card ───────────────────────────────────────── */
/* Section label with a short gold bar, matching the floor-group cards */
.ud-panel-title{
    display:flex;
    align-items:center;
    gap:10px;
    font-size:.7rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.14em;
    color:var(--sg-gold-deep);
    margin:0 0 18px;
    padding-bottom:14px;
    border-bottom:1px solid var(--sg-line-soft);
}

.ud-panel-title::before{
    content:'';
    width:4px;
    height:14px;
    border-radius:2px;
    background:var(--sg-gold);
    flex-shrink:0;
}

/* "Book" CTA in the Unit Details header, pushed to the right edge.
   Vacant units book; reserved units render the same button locked —
   disabled, relabelled "Reserved" — because only vacant units can be
   booked. */
.ud-book-btn{
    margin-left:auto;
    border:none;
    border-radius:8px;
    padding:8px 20px;
    background:var(--sg-espresso);
    color:#fbf6ec;
    font-size:.72rem;
    font-weight:700;
    letter-spacing:.12em;
    text-transform:uppercase;
    cursor:pointer;
    flex-shrink:0;
    transition:background .2s, transform .2s;
}

.ud-book-btn:hover{ background:var(--sg-brand); }
.ud-book-btn:active{ transform:scale(.97); }

.ud-book-btn:focus-visible{
    outline:2px solid var(--sg-gold);
    outline-offset:2px;
}

/* Locked (reserved unit) — muted, inert: no hover or press feedback */
.ud-book-btn:disabled,
.ud-book-btn:disabled:hover{
    background:var(--sg-sand);
    color:#9a8b79;
    cursor:not-allowed;
}

.ud-book-btn:disabled:active{
    transform:none;
}

/* The panel itself is now the card, so this inner wrapper goes
   borderless — avoids a card-inside-a-card look */
.ud-card{
    width:100%;
    background:transparent;
    border:none;
    border-radius:0;
    overflow:visible;
    box-shadow:none;
}

.ud-image{
    width:100%;
    height:150px;
    object-fit:cover;
    display:block;
    background:var(--sg-sand);
}

/* Unit with no photo: a framed, textured placeholder with a house glyph
   instead of the old flat grey rectangle. Same element as .ud-image, so
   it only overrides the fill/border treatment. */
.ud-image-placeholder{
    display:flex;
    align-items:center;
    justify-content:center;
    background-color:transparent;
    background-image:
        repeating-linear-gradient(135deg, rgba(255,255,255,.55) 0 10px, rgba(255,255,255,0) 10px 20px),
        linear-gradient(160deg,#f8f3ec,#efe7dc);
    border:1.5px dashed #ddcdb6;
    border-radius:14px;
    box-shadow:inset 0 1px 0 #fff;
    font-size:2.4rem;
}

.ud-image-placeholder .ps-unit-placeholder{
    width:66px;
    height:66px;
    margin-bottom:0;
    border-radius:50%;
    background-color:#fff;
    background-size:30px 30px;
    border:1px solid var(--sg-line);
    box-shadow:0 7px 16px rgba(var(--sg-shadow),.1), inset 0 1px 0 #fff;
}

/* ── Unit image gallery ─────────────────────────────────────── */
.ud-gallery{
    background:var(--sg-cream);
    border:1px solid var(--sg-line-soft);
    border-radius:14px;
    overflow:hidden;
    box-shadow:0 6px 18px rgba(var(--sg-shadow),.1);
}

.ud-main-image{
    position:relative;
}

.ud-main-image .ud-image{
    height:220px;
}

/* Carousel arrows over the main photo (units with 2+ photos). Always
   visible so touch screens can use them too. */
.ud-nav{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:34px;
    height:34px;
    padding:0 0 3px;
    display:flex;
    align-items:center;
    justify-content:center;
    border:none;
    border-radius:50%;
    background:rgba(251,248,242,.92);
    color:var(--sg-espresso);
    font-size:1.5rem;
    line-height:1;
    cursor:pointer;
    box-shadow:0 4px 12px rgba(20,12,6,.3);
    transition:background .15s, transform .15s;
}

.ud-nav:hover{
    background:#fff;
    transform:translateY(-50%) scale(1.08);
}

.ud-nav:focus-visible{
    outline:2px solid var(--sg-gold);
    outline-offset:2px;
}

.ud-nav-prev{ left:10px; }
.ud-nav-next{ right:10px; }

/* The main photo is wrapped in a button so it can also open the lightbox
   from the keyboard. It keeps the image's block layout and adds the zoom
   cursor; the button itself is invisible. */
.ud-main-trigger{
    display:block;
    width:100%;
    padding:0;
    border:none;
    background:none;
    cursor:zoom-in;
}

.ud-main-trigger:focus-visible,
.ud-thumb:focus-visible{
    outline:2px solid var(--sg-gold);
    outline-offset:-2px;
}

.ud-thumbs{
    display:flex;
    gap:8px;
    padding:10px;
    background:#fff;
    border-top:1px solid var(--sg-line-soft);
}

.ud-thumb{
    width:54px;
    height:46px;
    padding:0;
    border:2px solid var(--sg-line-soft);
    border-radius:8px;
    overflow:hidden;
    cursor:zoom-in;
    background:#fff;
    transition:border-color .12s, transform .12s;
    flex-shrink:0;
}

.ud-thumb img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.ud-thumb.active,
.ud-thumb:hover{
    border-color:var(--sg-gold);
}

.ud-thumb.active{
    transform:translateY(-1px);
}

/* ── Unit description ───────────────────────────────────────── */
/* Rich text from the admin's Quill editor — presented as a notes
   block so it reads as secondary to the specs above it */
.ud-description{
    font-size:.85rem;
    line-height:1.7;
    color:var(--sg-text);
    margin:16px 0 0;
    padding:14px 16px;
    background:var(--sg-ivory);
    border:1px solid var(--sg-line-soft);
    border-radius:12px;
}
.ud-description p{
    margin:0 0 8px;
}
.ud-description p:last-child{
    margin-bottom:0;
}
.ud-description ul,
.ud-description ol{
    margin:0 0 8px;
    padding-left:18px;
}
.ud-description ul:last-child,
.ud-description ol:last-child{
    margin-bottom:0;
}
.ud-description li{
    margin-bottom:2px;
}
.ud-description strong{
    font-weight:700;
    color:var(--sg-ink);
}

.ud-body{
    padding:22px 2px 4px;
}

.ud-label{
    font-size:1.75rem;
    font-weight:600;
    line-height:1.15;
    letter-spacing:-.022em;
    color:var(--sg-ink);
    margin:0 0 6px;
    font-family:'Fraunces',Georgia,serif;
}

/* Floor reads as metadata: small, quiet, bulleted away from the name */
.ud-floor{
    display:flex;
    align-items:center;
    gap:8px;
    font-size:.7rem;
    font-weight:600;
    text-transform:uppercase;
    letter-spacing:.14em;
    color:var(--sg-muted);
    margin-bottom:14px;
}

.ud-floor::before{
    content:'';
    width:5px;
    height:5px;
    border-radius:50%;
    background:var(--sg-gold);
    flex-shrink:0;
}

/* Availability reads as a badge, not plain text */
.ud-status{
    display:inline-flex;
    align-items:center;
    gap:8px;
    font-size:.68rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:.1em;
    padding:7px 14px;
    border-radius:999px;
    border:1px solid var(--sg-ok-line);
    margin-bottom:4px;
    transition:background .2s ease;
}

.ud-status.vacant{
    background:var(--sg-ok-bg);
    color:var(--sg-ok);
}

/* Reserved pill — the same ambers as the legend dot and the tile */
.ud-status.reserved{
    background:var(--sg-warn-bg);
    border-color:var(--sg-warn-line);
    color:var(--sg-warn);
}

.ud-dot{
    width:8px;
    height:8px;
    border-radius:50%;
    background:currentColor;
    box-shadow:0 0 0 3px rgba(45,122,82,.16);
}

/* Reserved pill: same dot, but the halo turns amber (legend gold) */
.ud-status.reserved .ud-dot{
    box-shadow:0 0 0 3px rgba(209,160,46,.2);
}

/* The rent amount is the headline number, so it gets its own tinted
   band with a gold edge instead of a hairline rule */
.ud-price{
    font-size:1.55rem;
    font-weight:700;
    letter-spacing:-.02em;
    line-height:1.2;
    color:var(--sg-espresso);
    margin-top:18px;
    padding:15px 18px;
    background:linear-gradient(100deg,#f4e9d6,#fbf6ec);
    border:1px solid #ebdcc2;
    border-left:3px solid var(--sg-gold);
    border-radius:12px;
}

/* Placeholder house glyph is defined once, next to the empty state —
   .unit-detail-empty and .ud-image-placeholder size it from there. */

/* Responsive */
@media screen and (max-width:900px){
    .prop-detail-modal-lg{
        overflow-y:auto;
    }
    .prop-detail-body{
        grid-template-columns:1fr;
        overflow:visible;
    }
    .prop-detail-column-left,
    .prop-detail-column-right{
        overflow:visible;
        padding:0;
    }
    .unit-detail-panel{
        position:static;
        min-height:auto;
    }
}

/* Touch: the key controls get finger-sized targets. (Sticky :hover lifts
   on the unit tiles are limited to real hover devices above.) */
@media (pointer:coarse){
    .prop-detail-close{
        width:44px;
        height:44px;
        top:14px;
        right:14px;
    }

    .prop-detail-header{
        padding-right:56px;
    }

    .ud-book-btn{
        min-height:40px;
        padding:0 22px;
    }

    .ud-nav{
        width:42px;
        height:42px;
    }

    .ud-thumb{
        width:60px;
        height:52px;
    }
}

@media screen and (max-width:480px){
    .prop-detail-modal{
        padding:24px 18px 20px;
        border-radius:16px;
    }
    .prop-detail-name{ font-size:1.2rem; }
    .unit-floor-canvas{ min-height:140px; }
}

/* ── Unit image lightbox ─────────────────────────────────────── */
/* Full-screen photo viewer for the Unit Details gallery, built once
   from JS in image-lightbox.js. Sits above the Booking modal (8500)
   but below the Login modal (9999). */
.lb-overlay{
    display:none;
    position:fixed;
    inset:0;
    background:rgba(20,12,7,.9);
    z-index:9000;
    align-items:center;
    justify-content:center;
    padding:24px;
}

.lb-overlay.active{
    display:flex;
}

/* The photo stays fully visible and is never cropped */
.lb-image{
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    display:block;
    border-radius:10px;
    box-shadow:0 24px 60px rgba(0,0,0,.5);
    user-select:none;
}

/* Round controls reuse the modal close-button look */
.lb-close,
.lb-arrow{
    position:absolute;
    width:44px;
    height:44px;
    border:1px solid rgba(217,184,114,.4);
    background:rgba(251,248,242,.94);
    border-radius:50%;
    color:var(--sg-espresso);
    cursor:pointer;
    display:flex;
    align-items:center;
    justify-content:center;
    transition:background .2s, color .2s, transform .2s;
}

.lb-close{
    top:18px;
    right:20px;
    font-size:16px;
}

.lb-arrow{
    top:50%;
    transform:translateY(-50%);
    font-size:30px;
    line-height:1;
    padding-bottom:4px; /* optically centre the glyph */
}

.lb-prev{ left:20px; }
.lb-next{ right:20px; }

.lb-close:hover,
.lb-arrow:hover{
    background:#fff;
    color:var(--sg-espresso);
}

.lb-arrow:active{
    transform:translateY(-50%) scale(.94);
}

.lb-close:focus-visible,
.lb-arrow:focus-visible{
    outline:2px solid var(--sg-gold-bright);
    outline-offset:2px;
}

/* The counter sits bottom-centre, clear of the arrows and the close
   button. The [hidden] rules are needed because .lb-arrow sets
   display:flex, which would otherwise beat the browser's [hidden]. */
.lb-arrow[hidden],
.lb-counter[hidden]{
    display:none;
}

.lb-counter{
    position:absolute;
    left:50%;
    bottom:22px;
    transform:translateX(-50%);
    padding:7px 15px;
    border-radius:999px;
    background:rgba(42,26,16,.78);
    border:1px solid rgba(217,184,114,.3);
    color:#fff;
    font-size:.8rem;
    font-weight:600;
    letter-spacing:.06em;
    line-height:1;
    white-space:nowrap;
}

@media screen and (max-width:480px){
    .lb-overlay{ padding:14px; }
    .lb-close{ top:12px; right:12px; width:40px; height:40px; }
    .lb-arrow{ width:38px; height:38px; font-size:26px; }
    .lb-prev{ left:8px; }
    .lb-next{ right:8px; }
    .lb-counter{ bottom:14px; }
}

