/* The same residence preview sits beside the building or below it on small screens. */
#inventario .calea-tower-layout { display:block; position:relative; width:100%; }
#inventario .calea-tower-layout::before,
#inventario .calea-tower-layout::after { display:none; }
.calea-tower-tooltip[hidden] { display:none!important; }
#inventario .zona { outline:none; }
#inventario .calea-tower-unit-link { cursor:pointer; outline:none; }
#inventario .zona.calea-unit-selected { stroke:#fff; stroke-width:4; stroke-linejoin:round; filter:drop-shadow(0 0 3px #51483d); }
#inventario .zona.disponible.calea-unit-selected { fill:rgba(166,148,124,.74); }
#inventario .zona.vendido.calea-unit-selected { fill:rgba(0,0,0,.72); }
#inventario .calea-tower-unit-link:focus-visible .zona { stroke:#fff; stroke-width:5; stroke-dasharray:6 3; }
#inventario .zona.vendido:is(:hover,.calea-pen-hover) { fill:rgba(0,0,0,.74); }
.calea-tower-sr { position:absolute!important; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0; }

.calea-tower-tooltip { position:fixed; z-index:900; box-sizing:border-box; width:280px; max-width:calc(100vw - 32px); padding:14px 16px; border:1px solid #d8cdbd; border-radius:8px; background:rgba(250,249,245,.98); box-shadow:0 8px 28px #51483d1a; color:#51483d; font:400 13px/1.5 var(--calea-body,Arial,sans-serif); pointer-events:none; }
.calea-tower-tooltip-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.calea-tower-tooltip-heading>strong { font:400 24px/1.2 var(--calea-display,Georgia,serif); }
.calea-tower-tooltip-heading>span { font-size:11px; color:#6b6257; }
.calea-tower-tooltip .calea-tower-tooltip-level { margin:3px 0 10px; color:#6b6257; font-size:11px; letter-spacing:.04em; }
.calea-tower-tooltip-plan { display:grid; place-items:center; height:clamp(72px,22vh,176px); background:#fff; border-radius:4px; overflow:hidden; }
.calea-tower-tooltip-plan img { display:block; width:100%; height:100%; min-height:0; object-fit:contain; padding:6px; }
.calea-tower-tooltip .calea-tower-tooltip-facts { margin:10px 0 0; font:inherit; color:inherit; }
.calea-tower-tooltip small { display:block; margin-top:8px; font-size:11px; color:#6b6257; }
@media (max-height:480px) {
  .calea-tower-tooltip { padding:10px 14px; }
  .calea-tower-tooltip .calea-tower-tooltip-level { margin-bottom:6px; }
  .calea-tower-tooltip .calea-tower-tooltip-facts { margin-top:6px; }
  .calea-tower-tooltip small { margin-top:4px; }
}
@media (prefers-reduced-motion:reduce) {
  #inventario .zona { transition:none; }
}

.calea-tower-detail[hidden] { display:none!important; }
@media (min-width:1000px) and (min-height:600px) {
  #inventario .calea-tower-layout.calea-tower-has-detail {
    display:grid;
    grid-template-columns:minmax(300px,.82fr) minmax(420px,1.18fr);
    grid-template-rows:auto 1fr;
    align-items:start;
    column-gap:clamp(24px,3vw,56px);
    max-width:1380px;
    margin-inline:auto;
  }
  #inventario .calea-tower-has-detail>.tabs-menu-3 {
    grid-column:1;
    grid-row:1;
    width:100%;
    gap:6px;
    margin:0 0 20px;
    position:static;
  }
  #inventario .calea-tower-has-detail>.tabs-menu-3>.w-tab-link {
    padding:10px 7px;
    min-height:64px;
    background:#f5f3ec;
  }
  #inventario .calea-tower-has-detail>.tabs-menu-3>.w-tab-link.w--current { background:#75604e; }
  #inventario .calea-tower-has-detail>.tabs-menu-3 .text-block-63 { font-size:13px; line-height:1.35; }
  #inventario .calea-tower-has-detail>.tabs-content-3 {
    grid-column:1;
    grid-row:2;
    width:100%;
    position:static;
    overflow:visible;
  }
  #inventario .calea-tower-has-detail .contenedor-vista-edificio { width:100%; max-width:560px; }
  #inventario .calea-tower-has-detail .container-17 { gap:18px; font-size:12px; }
  #inventario .calea-tower-has-detail .container-17 * { font-size:inherit; }
  #inventario .calea-tower-detail { grid-column:2; grid-row:1 / span 2; }
}

#inventario .calea-tower-detail {
  display:block;
  min-width:0;
  width:100%;
  padding:19px clamp(16px,2.5vw,36px) 14px;
  border:1px solid #ddd4c6;
  border-radius:8px;
  background:#fbfaf6;
  color:#51483d;
  box-shadow:0 10px 36px #51483d0a;
  font:400 14px/1.55 var(--calea-body,Arial,sans-serif);
}
.calea-tower-detail *, .calea-tower-detail *::before, .calea-tower-detail *::after { box-sizing:border-box; }
.calea-tower-detail button, .calea-tower-detail a { -webkit-tap-highlight-color:transparent; }
.calea-tower-detail button { font:inherit; cursor:pointer; color:inherit; }
.calea-tower-detail button:focus-visible, .calea-tower-detail a:focus-visible { outline:2px solid #8e795d; outline-offset:4px; }
.calea-tower-detail-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; margin-bottom:20px; }
.calea-tower-detail-heading h3 { margin:0; padding:0; font:400 clamp(25px,2.2vw,34px)/1.2 var(--calea-display,Georgia,serif); color:#51483d; letter-spacing:0; text-transform:none; }
.calea-tower-detail-heading h3:focus { outline:none; }
.calea-tower-status { display:flex; align-items:center; gap:7px; margin:8px 0 0; font-size:13px; color:#685e50; }
.calea-tower-status::before { content:""; flex:none; width:6px; height:6px; border-radius:50%; background:#7b756a; }
.calea-tower-status[data-status="available"]::before { background:#7c8569; }
.calea-tower-status[data-status="reserved"]::before { background:#a58d67; }
.calea-tower-close { display:grid; place-items:center; flex:none; width:36px; height:36px; margin:-5px -6px 0 0; padding:8px; border:0; border-radius:50%; background:transparent; }
.calea-tower-close:is(:hover,.calea-pen-hover) { background:#eee7db; }
.calea-tower-close svg { width:20px; height:20px; }
.calea-tower-offer { display:grid; row-gap:9px; margin:16px 0; align-items:start; }
.calea-tower-offer > .calea-residence-notes { display:contents; }
.calea-tower-offer > .calea-residence-notes > p:first-child { grid-area:1 / 1; }
.calea-tower-inquiry { grid-area:2 / 1; min-width:0; }
.calea-tower-inquiry>p { margin:0 0 12px; color:#776e60; font:inherit; }
.calea-tower-inquiry>.calea-tower-advisor { display:flex; align-items:center; justify-content:center; min-height:36px; padding:7px 10px; border:1px solid #75604e; border-radius:6px; background:#75604e; color:#fff; font-size:13px; line-height:1.4; text-align:center; text-decoration:none; transition:background-color .18s ease; }
.calea-tower-inquiry>.calea-tower-advisor:is(:hover,.calea-pen-hover) { background:#5d4b3e; }
.calea-tower-media-grid { display:grid; grid-template-columns:minmax(0,1fr); row-gap:16px; align-items:stretch; }
.calea-tower-detail .calea-residence-facts, .calea-tower-offer, .calea-tower-media-grid {
  column-gap:clamp(14px,1.6vw,24px);
}
@container residence-summary (min-width:24rem) {
  .calea-tower-detail:not(.calea-compact-facts) .calea-residence-facts, .calea-tower-offer, .calea-tower-media-grid {
    grid-template-columns:minmax(0,.9fr) minmax(0,1.1fr);
  }
  .calea-tower-offer > .calea-residence-notes > p:nth-child(2) { grid-area:1 / 2 / span 2; }
  @supports (grid-template-rows:subgrid) {
    .calea-tower-detail:not(.calea-compact-facts) .calea-residence-facts dl { grid-row:span 3; grid-template-rows:subgrid; }
  }
}
@container residence-summary (max-width:30rem) {
  .calea-tower-interiors .calea-tower-gallery-controls { gap:4px; }
  .calea-tower-detail .calea-tower-detail-actions { column-gap:12px; }
}
.calea-tower-plan-section { display:flex; flex-direction:column; min-width:0; }
.calea-tower-plan-tabs { display:flex; justify-content:center; gap:6px; margin-bottom:10px; }
.calea-tower-plan-tabs button { flex:1; border:1px solid #d8cdbd; border-radius:6px; padding:7px 8px; min-height:36px; font-size:11px; line-height:1.35; background:transparent; }
.calea-tower-plan-tabs button[aria-selected="true"] { background:#e8dfd0; border-color:#b7a58b; }
.calea-tower-media { position:relative; display:block; width:100%; padding:0; margin:0; border:0; border-radius:8px; background:#fbfaf6; overflow:hidden; }
.calea-tower-media>img { display:block; width:100%; height:100%; margin:0; max-width:none; }
.calea-tower-plan-open { flex:1; height:100%; min-height:185px; border:1px solid #ddd4c6; }
.calea-tower-plan-open>img { position:absolute; inset:0; padding:10px; object-fit:contain; }
.calea-tower-media-expand { position:absolute; bottom:9px; right:9px; display:grid; place-items:center; width:28px; height:28px; border-radius:50%; background:#faf9f5e6; color:#75604e; border:1px solid #d8d0c380; pointer-events:none; }
.calea-tower-media-expand svg { width:15px; height:15px; }
.calea-tower-interiors { min-width:0; margin:0; }
.calea-tower-render-open { aspect-ratio:16/10; touch-action:pan-y; }
.calea-tower-render-open>img { object-fit:cover; object-position:center; user-select:none; -webkit-user-select:none; }
.calea-tower-gallery-controls { display:flex; justify-content:space-between; align-items:center; gap:12px; margin:9px 0 0; }
.calea-tower-gallery-controls>button { display:grid; place-items:center; padding:9px; width:36px; height:36px; border:1px solid #ddd4c6; background:transparent; border-radius:50%; }
.calea-tower-gallery-controls>button:is(:hover,.calea-pen-hover) { background:#eee7db; }
.calea-tower-gallery-controls>button svg { width:14px; height:14px; }
.calea-tower-gallery-dots { display:flex; align-items:center; justify-content:center; gap:2px; }
.calea-tower-gallery-dots button { display:grid; place-items:center; width:24px; height:28px; padding:4px; border:0; background:transparent; }
.calea-tower-gallery-dots button>span { display:block; width:4px; height:4px; border-radius:3px; background:#c5baaa; transition:width .18s ease,background-color .18s ease; }
.calea-tower-gallery-dots button[aria-pressed="true"]>span { width:15px; background:#8b795f; }
.calea-tower-detail-actions { display:flex; flex-wrap:wrap; align-items:center; gap:4px 18px; padding-top:10px; margin-top:14px; border-top:1px solid #e2dacc; }
.calea-tower-detail-actions a { display:inline-flex; align-items:center; min-height:40px; color:#6e5c47; font-size:13px; text-underline-offset:4px; text-decoration-thickness:1px; }
.calea-tower-detail-actions a:is(:hover,.calea-pen-hover) { color:#3d3328; }
.calea-tower-share { display:flex; align-items:center; justify-content:center; gap:7px; min-height:40px; padding:7px 10px; margin-inline:auto -10px; border:0; background:transparent; border-radius:4px; }
.calea-tower-share:is(:hover,.calea-pen-hover) { background:#eee7db; }
.calea-tower-share svg { width:16px; height:16px; }
.calea-tower-share span { font-size:12px; }
.calea-tower-detail-actions .calea-tower-share-status { flex-basis:100%; margin:0; font-size:12px; color:#6b7057; }
.calea-tower-share-status:empty { display:none; }
.calea-tower-share-fallback { width:100%; border:1px solid #b7a58b; border-radius:4px; background:white; padding:10px; font:400 12px/1.5 var(--calea-body,Arial,sans-serif); }
.calea-tower-share-fallback[hidden] { display:none; }

/* The list and its preview share a place below the building on phones. */
@media (max-width:999px), (max-height:599px) {
  #inventario .calea-tower-detail {
    max-width:660px;
    margin:clamp(26px,4vw,48px) auto 0;
  }
}
@container residence-summary (width < 24rem) {
  .calea-tower-plan-open { flex:none; height:auto; min-height:0; aspect-ratio:1.65; }
  .calea-tower-offer > .calea-residence-notes > p:nth-child(2) { grid-area:2 / 1; }
  .calea-tower-inquiry { grid-area:3 / 1; }
  .calea-tower-detail-actions { gap:4px 12px; }
}
/* On a phone the selected level uses its native horizontal shape before the facts. */
.calea-tower-detail.calea-compact-facts .calea-tower-detail-heading { margin-bottom:12px; }
.calea-compact-facts > .calea-tower-plan-section { margin-bottom:14px; }
.calea-compact-facts > .calea-tower-plan-section .calea-tower-plan-open {
  container:none;
  flex:none;
  height:auto;
  min-height:0;
  aspect-ratio:auto;
  padding:clamp(9px,2.6vw,14px);
  padding-bottom:26px;
}
.calea-compact-facts > .calea-tower-plan-section .calea-tower-plan-open > img {
  position:static;
  width:100%;
  height:auto;
  padding:0;
  object-fit:contain;
}
/* The whole plan is tappable; its enlargement mark sits clear of the drawing. */
.calea-compact-facts > .calea-tower-plan-section .calea-tower-media-expand {
  width:20px;
  height:20px;
  right:6px;
  bottom:3px;
}
.calea-compact-facts > .calea-tower-plan-section .calea-tower-media-expand svg { width:12px; height:12px; }
.calea-compact-facts .calea-tower-offer {
  display:flex;
  flex-direction:column;
  align-items:stretch;
  gap:7px;
  margin:12px 0;
}
.calea-compact-facts .calea-tower-offer p { font-size:13px; line-height:1.45; }
.calea-compact-facts .calea-tower-media-grid { grid-template-columns:minmax(0,1fr); }

@media (min-width:600px) and (max-width:960px) and (max-height:480px) and (pointer:coarse) {
  #inventario .calea-tower-detail.calea-compact-facts {
    display:grid;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr);
    grid-template-areas:"heading heading" "plan facts" "offer gallery" "actions actions";
    column-gap:20px;
    row-gap:14px;
    align-items:start;
  }
  .calea-compact-facts > .calea-tower-detail-heading { grid-area:heading; }
  .calea-compact-facts > .calea-tower-plan-section { grid-area:plan; }
  .calea-compact-facts > .calea-residence-facts { grid-area:facts; }
  .calea-compact-facts > .calea-tower-offer { grid-area:offer; margin:0; }
  .calea-compact-facts > .calea-tower-media-grid { grid-area:gallery; }
  .calea-compact-facts > .calea-tower-detail-actions { grid-area:actions; margin-top:0; }
  .calea-tower-detail.calea-compact-facts > :is(.calea-tower-detail-heading,.calea-tower-plan-section) { margin-bottom:0; }
}
@media (prefers-reduced-motion:no-preference) {
  #inventario .calea-tower-detail {
    animation:calea-detail-enter .42s cubic-bezier(.22,.78,.24,1) both;
  }
  #inventario .calea-tower-detail.is-closing {
    animation:calea-detail-exit .22s cubic-bezier(.4,0,.65,1) both;
    pointer-events:none;
  }
  @keyframes calea-detail-enter {
    from { opacity:0; transform:translateY(10px); }
    to { opacity:1; transform:none; }
  }
  @keyframes calea-detail-exit {
    from { opacity:var(--calea-exit-opacity,1); transform:var(--calea-exit-transform,none); }
    to { opacity:0; transform:translateY(5px); }
  }
}
@media (pointer:coarse) {
  .calea-tower-inquiry > .calea-tower-advisor,
  .calea-tower-detail-actions :is(a,button) { min-height:44px; }
  .calea-tower-close, .calea-tower-gallery-controls > button { width:44px; height:44px; }
}
@media (min-width:1000px) and (max-width:1199px) and (min-height:600px) {
  #inventario .calea-tower-layout.calea-tower-has-detail { grid-template-columns:minmax(270px,.8fr) minmax(370px,1.2fr); gap:20px; }
  #inventario .calea-tower-detail { padding-inline:22px; }
  #inventario .calea-tower-has-detail>.tabs-menu-3 .text-block-63 { font-size:12px; }
}
@media (prefers-reduced-motion:reduce) {
  #inventario .calea-tower-detail { animation:none; }
  .calea-tower-detail *, .calea-tower-detail *::before, .calea-tower-detail *::after { transition:none!important; }
}
