/* v578 - UNIT PAGE, compact top for phones / small screens (<=720px). Pairs with js/170 unitCrumb(). Desktop keeps its layout.
   Replaces css/287 (the unit-code strip under the photo is gone: that code + location already live in the breadcrumb).
   Rollback: remove this link from index.html. */

/* breadcrumb: last crumb is the SHORT unit code, shown as a gold pill (all sizes) */
.u2-crumb .u2-ccode{font-family:var(--font-mono,'IBM Plex Mono',monospace);letter-spacing:.2px;white-space:nowrap}

.u2-tags{display:none}

/* ---- v582: About the building (all sizes) ---- */
.u2-about{position:relative;margin:18px 0 0;padding:14px 18px 14px 20px;border-radius:18px;background:var(--u2-card);border:1px solid var(--u2-line);overflow:hidden}
.u2-about::before{content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:linear-gradient(var(--u2-gold2),var(--u2-gold))}
.u2-about-head{display:flex;align-items:center;gap:11px;margin-bottom:9px}
.u2-about-head>i{flex:none;width:32px;height:32px;display:grid;place-items:center;border-radius:10px;background:rgba(206,165,119,.16);color:var(--u2-gold);font-size:14px}
.u2-about-head div{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.u2-about-head span{font-family:var(--font-mono,'IBM Plex Mono',monospace);font-size:10px;letter-spacing:1.6px;text-transform:uppercase;color:var(--u2-gold)}
.u2-about-head b{font-size:14px;color:var(--u2-ink);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.u2-about-txt{margin:0;font-size:13.5px;line-height:1.65;color:var(--u2-mute);white-space:pre-line;overflow-wrap:anywhere}
.u2-about-more{margin-top:8px;padding:0;border:0;background:none;cursor:pointer;font-size:12px;font-weight:800;letter-spacing:.3px;color:var(--u2-gold)}
.u2-note .u2-ns{display:none}

@media (max-width:720px){
  /* ---- no empty band above the footer: the room the fixed Request Viewing bar needs is now INSIDE the footer's own bottom padding ---- */
  body:has(.u2) footer.site{margin-top:12px;padding-bottom:calc(74px + env(safe-area-inset-bottom,0px))}
  /* ---- about the building: compact, 3 lines + Read more; takes the gap that sat empty above the footer ---- */
  .u2-grid:has(+ .u2-about){margin-bottom:0}
  .u2-about{margin:8px 0 0;padding:10px 12px 10px 15px;border-radius:14px}
  .u2-about::before{width:3px}
  .u2-about-head{gap:9px;margin-bottom:6px}
  .u2-about-head>i{width:26px;height:26px;border-radius:8px;font-size:12px}
  .u2-about-head b{font-size:13px}
  .u2-about-txt{font-size:12.5px;line-height:1.55}
  .u2-about:not(.open) .u2-about-txt{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden}
  .u2-about-more{margin-top:5px;font-size:11.5px}
  /* ---- 0. NOTHING sits on the photo except the status + 3 round buttons (top) and the photo counter (bottom-right) ---- */
  .u2-id{display:none!important}   /* unit code + location live in the breadcrumb */
  .u2-chips>:not(.status-chip){display:none!important}
  .u2-tags{display:flex;flex-wrap:wrap;align-items:center;gap:6px;margin:6px 0 0}
  .u2-tags .badge{font-size:10px;padding:4px 9px}
  .u2-tags .badge.warn{margin-inline-start:auto}

  /* ---- 1. breadcrumb: one slim swipeable row (was 2 tall rows) ---- */
  .crumb-bar.u2-crumb{padding:7px 12px}
  .u2-crumb .crumb-inner{flex-wrap:nowrap;font-size:12px}
  .u2-crumb .crumb-trail{flex-wrap:nowrap;gap:6px;width:100%;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;-webkit-overflow-scrolling:touch;align-items:center}
  .u2-crumb .crumb-trail::-webkit-scrollbar{display:none}
  .u2-crumb .crumb-trail>*{flex:none}
  .u2-crumb .crumb-inner a{white-space:nowrap;gap:4px}
  .u2-crumb .crumb-inner .num{display:none}
  .u2-crumb .sep{display:inline-flex}
  .u2-crumb .u2-ccode{font-size:12.5px;font-weight:700;padding:3px 10px;border-radius:999px;color:#fff;background:rgba(206,165,119,.2);border:1px solid rgba(206,165,119,.55)}

  /* ---- 2. page padding + photo stage ---- */
  section.section:has(.u2){padding-top:10px;padding-bottom:0}
  .u2{padding:0}
  .u2-stage{height:clamp(212px,60vw,310px);min-height:0;border-radius:16px;box-shadow:0 8px 22px rgba(15,31,53,.2)}
  .u2-track{padding:7px 3%;gap:8px}
  .u2-slide{flex-basis:94%;border-radius:12px}
  .u2-top{left:10px;right:10px;top:10px}
  .u2-chips{gap:5px}
  .u2-chips .status-chip{transform:scale(.88);transform-origin:left center;margin-right:-6px}
  .u2-chips .badge{font-size:9px;padding:3px 7px}
  .u2-act{gap:6px}
  .u2 .u2-ib{width:34px;height:34px;font-size:13px}
  .u2-slide .u2-wm{top:46px;left:8px;width:38px}
  .u2-ctrl{right:10px;bottom:10px}
  .u2-count{width:46px;height:46px}
  .u2-count b{font-size:14px}
  .u2-count i{font-size:8.5px}

  /* ---- 3. photo helpers: slimmer note, chips, thumbnails ---- */
  /* note: ONE line, text scales with the screen width (9.5px on the narrowest phones up to 12px) */
  .u2-note{align-items:center;margin:6px 0 0;padding:6px 10px;gap:7px;border-radius:10px;white-space:nowrap;font-size:clamp(9.5px,3vw,12px);line-height:1.3}
  .u2-note i{margin-top:0;font-size:1.1em;flex:none}
  .u2-note>span{min-width:0;overflow:hidden;text-overflow:ellipsis}
  .u2-note .u2-nl{display:none}
  .u2-note .u2-ns{display:inline}
  .u2-sets{margin:6px 0 0;gap:6px}
  .u2-chip{padding:6px 12px;font-size:11.5px}
  .u2-reel{margin:4px 0 0;gap:6px;padding:3px 1px}
  .u2-th{width:60px;height:42px;border-radius:9px}
  .u2-th.on{transform:none}

  /* ---- 4. price + 4 facts: one tight block ---- */
  .u2-grid{margin-top:6px;gap:8px;margin-bottom:0}
  .u2-main{gap:6px}
  .u2-priceCard{display:flex;flex-wrap:wrap;align-items:center;gap:2px 8px;padding:8px 12px 8px 15px;border-radius:14px}
  .u2-priceCard::before{width:3px}
  .u2-strike{order:1;flex:0 1 auto;font-size:12px;margin:0}
  .u2-priceRow{display:contents}
  .u2-save{order:2;margin-left:auto;padding:3px 9px;font-size:10.5px;gap:5px}
  .u2-price{order:3;font-size:clamp(24px,7.4vw,30px)}
  .u2-per{order:4;font-size:12px;margin:0}
  .u2-facts{grid-template-columns:repeat(4,minmax(0,1fr));gap:0;border:1px solid var(--u2-line);border-radius:14px;background:var(--u2-card);overflow:hidden}
  .u2-fact{align-items:center;text-align:center;gap:1px;padding:6px 4px 7px;border:0;border-radius:0;background:transparent;border-inline-start:1px solid var(--u2-line);animation:none}
  .u2-fact:first-child{border-inline-start:0}
  .u2-fact:hover{transform:none;box-shadow:none}
  .u2-fact i{width:24px;height:24px;border-radius:7px;font-size:11px;margin-bottom:2px}
  .u2-fact span{font-size:9px;letter-spacing:.5px}
  .u2-fact b{font-size:12.5px;line-height:1.25}

  /* ---- 5. specs: the first four repeat the facts row, so only the rest are listed (2 columns) ---- */
  .u2-block,.u2-legacy{padding:10px 11px;border-radius:14px}
  .u2-kicker{margin-bottom:7px;font-size:10px;letter-spacing:1.6px}
  .u2-specs{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
  .u2-spec:nth-child(-n+4){display:none}
  /* 2 x 2 tiles (Balcony | Utilities / Booking Status | Remarks): icon + label over value, each tile ~38px tall; a long Remarks text simply wraps inside its tile */
  .u2-specs{gap:6px}
  .u2-spec{grid-template-columns:24px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;row-gap:0;align-content:center;padding:6px 8px;border-radius:10px;animation:none;min-height:0}
  .u2-spec i{width:24px;height:24px;border-radius:7px;font-size:11px}
  .u2-spec span{font-size:9px;letter-spacing:.4px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .u2-spec strong{font-size:12.5px;line-height:1.25}
  .u2-block:has(.u2-specs){padding:8px 9px 9px}
  .u2-block:has(.u2-specs) .u2-kicker{margin-bottom:6px}
  /* admin-only freshness strip: one compact row */
  .u2-main .freshness-block{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;padding:7px 10px;margin:0;border-radius:12px}

  /* ---- 6. dock: the fixed bottom bar already has Request Viewing + Call, so only the quick actions stay ---- */
  .u2-dock-in{padding:12px;border-radius:18px}
  .u2-dock-top,.u2-dock h3,.u2-dock p,.u2-dock .u2-cta{display:none}
  .u2-tiles{margin-top:0;gap:7px;grid-template-columns:repeat(auto-fit,minmax(56px,1fr))}
  .u2-tile{flex-direction:row;justify-content:center;gap:7px;padding:10px 6px;font-size:11.5px}
  .u2-tile i{font-size:13px}
  .u2-contact{display:none}   /* phone + address: the fixed bar already has the Call button, and the footer has the contact buttons */
}

/* ---- v585: footer on the unit page, phones: exactly 2 aligned rows ----
   row 1: logo | WhatsApp | Channel | back-to-top          row 2: Home  List  Deals  External | "Updated 09:26"
   (the round Call button is not repeated here: Call is already in the fixed bottom bar; copyright line hidden on this page) */
@media (max-width:599px){
  body:has(.u2) footer.site.bh-footer .bh-f-inner{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:4px 6px;padding:10px 14px 0}
  body:has(.u2) footer.site.bh-footer .bh-f-main,
  body:has(.u2) footer.site.bh-footer .bh-f-bottom,
  body:has(.u2) footer.site.bh-footer .bh-f-meta{display:contents}
  /* row 1 */
  body:has(.u2) footer.site.bh-footer .bh-f-brand{grid-column:1;grid-row:1;min-width:0}
  body:has(.u2) footer.site.bh-footer .bh-f-logo{height:28px}
  body:has(.u2) footer.site.bh-footer .bh-f-contact{grid-column:2;grid-row:1;gap:6px}
  body:has(.u2) footer.site.bh-footer #footerPhoneLink{display:none}
  body:has(.u2) footer.site.bh-footer .bh-f-btn,
  body:has(.u2) footer.site.bh-footer .bh-f-top{width:34px;height:34px;padding:0;gap:0;justify-content:center}
  body:has(.u2) footer.site.bh-footer .bh-f-btn i{width:26px;height:26px}
  body:has(.u2) footer.site.bh-footer .bh-f-top{grid-column:3;grid-row:1}
  /* row 2 */
  body:has(.u2) footer.site.bh-footer .bh-f-links{grid-column:1;grid-row:2;justify-content:space-between;flex-wrap:nowrap;margin:0;padding:3px 0 0;border:0;border-top:1px solid rgba(255,255,255,.1);gap:0}
  body:has(.u2) footer.site.bh-footer .bh-f-links a{padding:7px 4px;font-size:clamp(11.5px,3.3vw,13px)}
  body:has(.u2) footer.site.bh-footer .bh-f-links a::after{left:4px;right:4px;bottom:3px}
  body:has(.u2) footer.site.bh-footer .bh-f-sync{grid-column:2 / -1;grid-row:2;justify-self:stretch;justify-content:flex-end;margin-left:-6px;padding:3px 0 0;border-top:1px solid rgba(255,255,255,.1);align-self:stretch;align-items:center;font-size:11px;white-space:nowrap}
  body:has(.u2) footer.site.bh-footer .bh-f-copy{display:none}
  body:has(.u2) footer.site.bh-footer #footerSync[data-short]{font-size:0}
  body:has(.u2) footer.site.bh-footer #footerSync[data-short]::after{content:attr(data-short);font-size:11px}
  body:has(.u2) footer.site.bh-footer .bh-f-inner:has(.bh-f-sync:has(#footerSync:empty)) .bh-f-links{grid-column:1 / -1}
}
