/* Mobile navigation: complete choices, normal document flow, original media. */
.mobile-host-label { display: none; }

@media (max-width: 760px) {
  body { overflow-x: hidden; overflow-y: auto; }
  .future-header, .site-header {
    height: auto; min-height: 94px; padding: 8px 16px 0;
    position: sticky; top: 0; display: grid;
    grid-template-columns: minmax(0, 1fr) auto; gap: 0 10px;
  }
  .future-header { background: #102d25; }
  .future-header .brand, .site-header .brand { min-width: 0; gap: 8px; }
  .future-header .brand-mark, .site-header .brand-mark { width: 34px; height: 34px; flex-shrink: 0; }
  .future-header .brand > span:last-child, .site-header .brand > span:last-child { font-size: .78rem; }
  .future-header > .visit-link, .site-header .header-cta {
    display: inline-flex; align-items: center; justify-content: center;
    min-height: 42px; padding: 10px 12px; font-size: .72rem;
    background: #dec176; border-color: #dec176; color: #102d25;
  }
  .future-header nav, .site-header .header-nav {
    grid-column: 1 / -1; grid-row: 2; display: flex;
    align-items: center; justify-content: space-between; gap: 4px;
    width: 100%; overflow: visible; font-size: .65rem;
  }
  .future-header nav a, .site-header .header-nav a {
    min-height: 44px; display: inline-flex; align-items: center; padding: 8px 2px; white-space: nowrap; flex: 0 0 auto;
  }
  .mobile-favorites-link { display: none; }
  .future-header #thp-welcome-retry { grid-column: 1 / -1; justify-self: stretch; margin: 4px 0 8px; }

  .future-stage {
    height: auto; min-height: calc(100svh - 94px); padding: 18px 14px 16px;
    overflow: hidden;
  }
  .future-vignette { background: linear-gradient(180deg,rgba(4,24,18,.88),rgba(4,24,18,.77)); }
  .future-heading { text-align: center; }
  .future-heading p { font-size: .65rem; margin: 0 0 6px; }
  .future-heading h1 { font-size: clamp(1.4rem,6vw,1.8rem); line-height: 1.15; letter-spacing: -.035em; }
  .future-heading h1 span { display: block; font-size: .82rem; margin-top: 6px; letter-spacing: 0; }
  .future-heading > .heading-subtitle { font-size: .8rem; line-height: 1.4; margin-top: 8px; color: #e4eae5; }
  /* These shortcuts duplicate the private entrances and central assistant. */
  .future-silent-guide { display: none; }
  .future-silent-guide > div { justify-content: flex-start; gap: 8px; }
  .future-silent-guide .visit-link { min-height: 44px; padding: 9px 12px; font-size: .72rem; }
  /* Five private entrances surround THP, all within one mobile view. */
  .private-orbit, .future-stage:has(.future-silent-guide) .private-orbit {
    position: relative; display: block; width: 100%; max-width: 520px;
    height: clamp(330px, calc(100svh - 322px), 490px);
    min-height: 0; margin: 16px auto 0;
  }
  .private-side { display: contents; }
  .private-orbit .floating-private,
  .private-orbit .private-side-left .floating-private:last-child {
    position: absolute; min-width: 0; width: 43%; height: 106px; min-height: 0;
    margin: 0; grid-column: auto; border-radius: 16px; transform: none;
    border: 1px solid #d9bf785c; box-shadow: 0 8px 24px #0003;
  }
  .private-orbit [data-private="sorento"] { top: 0; left: 0; }
  .private-orbit [data-private="montalese"] { top: 0; right: 0; }
  .private-orbit [data-private="oporto"] { top: 45%; left: 0; width: 30%; }
  .private-orbit [data-private="ardenza"] { top: 45%; right: 0; width: 30%; }
  .private-orbit .private-side-left [data-private="torres"]:last-child {
    bottom: 0; left: 23%; width: 54%; height: 88px;
  }
  .private-orbit .floating-private img { filter: none; }
  .private-orbit .floating-private::before { background: linear-gradient(180deg,transparent 8%,rgba(4,24,18,.94)); }
  .private-orbit .floating-private .card-copy { left: 9px; right: 7px; bottom: 10px; }
  .private-orbit .card-copy small { display: none; }
  .private-orbit .card-copy strong { font-size: .91rem; white-space: normal; overflow: visible; line-height: 1.2; letter-spacing: -.02em; }
  .private-orbit .card-copy em { font-size: .62rem; color: #edf0eb; line-height: 1.3; }
  .private-orbit .floating-private > b { top: 7px; bottom: auto; right: 8px; font-size: .9rem; }
  .private-orbit .card-index { top: 7px; left: 8px; right: auto; font-size: .6rem; }
  .private-orbit .thp-host {
    position: absolute; left: 31%; top: 112px; bottom: 94px; width: 38%;
    grid-row: auto; height: auto; min-height: 0; border: 0;
    background: none; overflow: visible;
  }
  .thp-host::before, .thp-host .thp-halo { display: none; }
  .thp-center-launcher {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    width: 100%; height: 100%; min-height: 0; padding: 0; gap: 6px;
  }
  .thp-host .thp-figure {
    width: 100%; height: calc(100% - 28px); max-width: 100%; max-height: none;
    object-fit: contain; filter: drop-shadow(0 8px 12px #0005); animation: none;
  }
  .mobile-host-label {
    display: block; flex: none; margin: 0; padding: 5px 7px; border-radius: 20px;
    border: 1px solid #d9bf785c; background: #14372c; font-size: .63rem;
    white-space: nowrap; font-weight: 700; color: #f0d89c;
  }
  .carousel-status { position: relative; top: auto; right: auto; bottom: auto; left: auto; transform: none; justify-content: center; margin: 14px auto 0; }
  .carousel-status button { width: 44px; height: 44px; }
  .future-thp-panel { top: 8px; right: 8px; width: calc(100% - 16px); height: calc(100dvh - 16px); max-height: 680px; }
  .future-thp-suggestions { flex-wrap: wrap; overflow: visible; }
  .future-thp-suggestions button { min-height: 44px; }
  .future-thp-form input { font-size: 16px; }

  /* Private selection: all model names are visible, without a horizontal rail. */
  .subpage-hero { min-height: 170px; padding: 18px 16px; }
  .subpage-copy .breadcrumb { margin-bottom: 12px; }
  .subpage-copy h1 { font-size: 2.1rem; }
  .subpage-copy > p { margin-top: 8px; font-size: .8rem; line-height: 1.45; }
  .subpage-copy .eyebrow { font-size: .6rem; }
  .models-section { padding: 22px 14px 40px; scroll-margin-top: 104px; }
  .models-intro { margin-bottom: 16px; gap: 8px; }
  .models-intro h2 { font-size: 1.4rem; line-height: 1.2; }
  .models-intro > p { font-size: .78rem; line-height: 1.4; }
  .catalog-model-showcase { padding: 14px; gap: 14px; border-radius: 20px; }
  .catalog-model-selector {
    display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px;
    width: 100%; max-height: none; overflow: visible; border: 0;
  }
  .catalog-model-option, .catalog-model-option:hover, .catalog-model-option.is-active {
    width: 100%; min-width: 0; min-height: 48px; margin: 0; padding: 9px 10px;
    grid-template-columns: 1fr; gap: 4px; border-radius: 12px;
    border: 1px solid #ffffff36; background: #ffffff08; color: #e3ece6;
  }
  .catalog-model-option + .catalog-model-option { margin-left: 0; }
  .catalog-model-option span { display: none; }
  .catalog-model-option strong { font-size: .86rem; line-height: 1.25; letter-spacing: 0; }
  .catalog-model-option small { display: block; grid-column: 1; margin: 0; font-size: .6rem; }
  .catalog-model-option.is-active { border-color: #e0bd67; background: #e0bd67; color: #102d25; }
  .catalog-model-option.is-active small { color: #384d37; }
  .catalog-model-stage { min-height: 290px; padding-bottom: 58px; }
  .catalog-model-stage > img, .catalog-model-stage[data-model="moscatel"] > img,
  .catalog-model-stage.is-interior > img { width: auto; max-width: 100%; max-height: 260px; object-fit: contain; }
  .catalog-model-name strong { font-size: 2rem; }
  .catalog-model-details { padding: 8px 2px 0; }
  .catalog-model-price, .catalog-model-description { margin-bottom: 16px; }
  .torres-section-nav { top: 94px; flex-wrap: wrap; overflow: visible; }
  .torres-section-nav button { min-height: 44px; }
  #thp-assistant { width: 66px !important; height: 110px !important; }
  #thp-assistant .thp-assistant-launcher { width: 62px !important; height: 104px !important; }
  #thp-assistant .thp-assistant-panel {
    left: 8px !important; right: 8px !important; bottom: 8px !important;
    width: auto !important; height: calc(100dvh - 16px) !important; max-height: 680px !important;
  }

  /* Put the house and its photo/video choices before the longer description. */
  .final-model-page { padding: 18px 16px 32px; display: flex; flex-direction: column; align-items: stretch; gap: 10px; }
  .final-model-copy { display: contents; }
  .final-model-copy > * { animation: none; opacity: 1; }
  .final-model-back { order: 1; margin: 0; min-height: 32px; }
  .final-model-eyebrow { order: 2; margin: 0; font-size: .65rem; }
  .final-model-copy h1 { order: 3; font-size: 2.55rem; line-height: 1.05; }
  .final-model-stage { order: 4; height: 380px; min-height: 0; flex: none; padding-bottom: 136px; animation: none; opacity: 1; }
  .final-model-stage > img { max-height: 238px; max-width: 100%; }
  .final-model-switcher { animation: none; transform: translateX(-50%); bottom: 0; display: grid; width: 100%; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .final-model-switcher button { min-height: 56px; width: 100%; }
  .final-model-price { order: 5; margin: 10px 0 0; }
  .final-model-actions { order: 6; margin: 6px 0; }
  .final-model-facts { order: 7; margin-top: 8px; }
  .final-model-intro { order: 8; margin-top: 8px; }
  .final-model-commercial-note { order: 9; margin-top: 0; }
}

@media (max-width: 760px) and (max-height: 700px) {
  .future-stage { padding-top: 12px; }
  .future-heading h1 { font-size: 1.35rem; }
  .future-heading h1 span { font-size: .75rem; margin-top: 4px; }
  .private-orbit .floating-private { height: 88px; }
  .private-orbit .private-side-left [data-private="torres"]:last-child { height: 70px; }
  .private-orbit .thp-host { top: 94px; bottom: 76px; }
  .private-orbit, .future-stage:has(.future-silent-guide) .private-orbit { gap: 8px; margin-top: 10px; }
}

/* Mobile model carousel: selected facade in the center, alternatives around it. */
.mobile-model-thumb { display: none; }
@media (max-width: 760px) {
  .page-shell:has(.has-mobile-orbit) .subpage-hero { min-height: 60px; padding: 7px 16px; }
  .page-shell:has(.has-mobile-orbit) .subpage-copy .breadcrumb { display: none; }
  .page-shell:has(.has-mobile-orbit) .subpage-copy h1 { font-size: 1.6rem; }
  .page-shell:has(.has-mobile-orbit) .subpage-copy > p { display: none; }
  .page-shell:has(.has-mobile-orbit) .models-section { padding: 8px 8px 12px; }
  .page-shell:has(.has-mobile-orbit) .models-intro { margin-bottom: 8px; }
  .page-shell:has(.has-mobile-orbit) .models-intro .eyebrow,
  .page-shell:has(.has-mobile-orbit) .models-intro > p { display: none; }
  .page-shell:has(.has-mobile-orbit) .models-intro h2 { font-size: 1rem; }
  .has-mobile-orbit {
    --orbit-height: clamp(270px, calc(100svh - 205px), 540px);
    --orbit-card-height: clamp(70px, 12svh, 94px);
    position: relative; display: block; padding: calc(var(--orbit-height) + 16px) 12px 12px;
    overflow: hidden; border-radius: 18px;
  }
  .has-mobile-orbit .catalog-model-selector { display: contents; }
  .has-mobile-orbit .catalog-model-option,
  .has-mobile-orbit .catalog-model-option:hover {
    position: absolute; width: 44%; height: var(--orbit-card-height); min-height: 0; margin: 0;
    padding: 0 5px 6px; display: flex; flex-direction: column; justify-content: end;
    gap: 2px; background: #ffffff0a; border: 1px solid #d9bf785c;
    color: #edf1ea; text-align: center; box-shadow: 0 5px 16px #0002;
  }
  .has-mobile-orbit .catalog-model-option.is-active { display: none; }
  .has-mobile-orbit .mobile-model-thumb {
    display: block; width: 100%; height: 66px; min-height: 0;
    object-fit: contain; object-position: center; flex: 1;
  }
  .has-mobile-orbit .catalog-model-option strong { font-size: .75rem; line-height: 1.12; flex: none; }
  .has-mobile-orbit .catalog-model-option small { font-size: .56rem; line-height: 1.1; }
  .has-mobile-orbit [data-orbit-slot="0"] { top: 8px; left: 8px; }
  .has-mobile-orbit [data-orbit-slot="1"] { top: 8px; right: 8px; }
  .has-mobile-orbit [data-orbit-slot="2"] { top: calc((var(--orbit-height) - var(--orbit-card-height)) / 2); left: 4px; width: 18%; }
  .has-mobile-orbit [data-orbit-slot="3"] { top: calc((var(--orbit-height) - var(--orbit-card-height)) / 2); right: 4px; width: 18%; }
  .has-mobile-orbit [data-orbit-slot="4"] { top: calc(var(--orbit-height) - var(--orbit-card-height)); left: 8px; }
  .has-mobile-orbit [data-orbit-slot="5"] { top: calc(var(--orbit-height) - var(--orbit-card-height)); right: 8px; }
  .has-mobile-orbit[data-orbit-count="5"] [data-orbit-slot="4"] { left: 27%; width: 46%; }
  .has-mobile-orbit[data-orbit-count="4"] [data-orbit-slot="2"] { top: calc(var(--orbit-height) - var(--orbit-card-height)); left: 8px; width: 42%; }
  .has-mobile-orbit[data-orbit-count="4"] [data-orbit-slot="3"] { top: calc(var(--orbit-height) - var(--orbit-card-height)); right: 8px; width: 42%; }
  .has-mobile-orbit .catalog-model-stage {
    position: absolute; left: 20%; top: calc(var(--orbit-card-height) + 14px); width: 60%;
    height: calc(var(--orbit-height) - var(--orbit-card-height) * 2 - 22px); min-height: 0; padding: 0; display: block;
    border: 0; background: transparent; overflow: visible;
  }
  .has-mobile-orbit .catalog-model-stage > img,
  .has-mobile-orbit .catalog-model-stage.is-interior > img,
  .has-mobile-orbit .catalog-model-stage[data-model="moscatel"] > img {
    width: 100%; height: calc(100% - 42px); max-width: 100%; max-height: none;
    object-fit: contain; transform: none;
  }
  .has-mobile-orbit .catalog-model-rings { display: none; }
  .has-mobile-orbit .catalog-model-name { bottom: 17px; left: 0; width: 100%; text-align: center; transform: none; }
  .has-mobile-orbit .catalog-model-name small { display: none; }
  .has-mobile-orbit .catalog-model-name strong { font-size: 1rem; line-height: 1.05; }
  .has-mobile-orbit .catalog-model-stage-link::after {
    content: 'Ver casa →'; position: absolute; bottom: 0; left: 0; width: 100%;
    text-align: center; font-size: .68rem; color: #e4c47a;
  }
  .has-mobile-orbit .catalog-model-stage.is-upcoming .catalog-model-stage-link::after { content: ''; }
  .has-mobile-orbit .catalog-model-details { padding-top: 10px; border-top: 1px solid #ffffff20; }
  .has-mobile-orbit .catalog-model-price { margin-bottom: 12px; }
  .has-mobile-orbit .catalog-model-price strong { font-size: 1.6rem; }
}
@media (max-width:760px) and (max-height:700px) {
  .has-mobile-orbit .catalog-model-option strong { font-size: .66rem; }
  .has-mobile-orbit .catalog-model-option small { font-size: .51rem; }
}
@media (max-width:760px) {
  .page-shell:has(.has-mobile-orbit) .subpage-hero > .thp-media-watermark {
    top: 5px; bottom: auto; right: 8px; font-size: 5px; padding: 2px 4px; opacity: .7;
  }
  .has-mobile-orbit .catalog-model-stage.thp-protected-media > .thp-media-watermark {
    top: 0; font-size: 5px; line-height: 1.2; padding: 2px 4px; max-width: 100%; opacity: .65;
  }
  .has-mobile-orbit[data-orbit-count="4"] .catalog-model-stage { left: 14%; width: 72%; }
}

@media (max-width:760px) {
  body:has(.has-mobile-orbit) { overflow-anchor: none; }
  .has-mobile-orbit .catalog-model-option strong { overflow-wrap: anywhere; }
  .has-mobile-orbit .mobile-model-thumb { flex: 1 1 0; min-height: 0; }
  .has-mobile-orbit[data-orbit-count="6"] [data-orbit-slot="2"],
  .has-mobile-orbit[data-orbit-count="6"] [data-orbit-slot="3"] { padding-left: 2px; padding-right: 2px; }
  /* Keep Chuchin available without covering the selected model. */
  body:has(.has-mobile-orbit) #thp-assistant { position: fixed !important; top: auto !important; right: 12px !important; bottom: calc(12px + env(safe-area-inset-bottom)) !important; width: 62px !important; height: 62px !important; }
  body:has(.has-mobile-orbit) #thp-assistant .thp-assistant-launcher { right: 0 !important; bottom: 0 !important; width: 62px !important; height: 62px !important; border: 2px solid #dec176 !important; border-radius: 50% !important; background: linear-gradient(145deg,#1b604b,#102d25) !important; box-shadow: 0 8px 24px #071c1766 !important; }
  body:has(.has-mobile-orbit) #thp-assistant .thp-assistant-launcher > img { width: 100% !important; height: 100% !important; display: block !important; border: 0 !important; border-radius: 50% !important; object-fit: cover !important; object-position: center 18% !important; }
  body:has(.has-mobile-orbit) #thp-assistant .thp-assistant-launcher::after { display: none; }
  body:has(.has-mobile-orbit) #thp-assistant .thp-assistant-launcher:focus-visible::after { width: max-content; top: auto; right: 68px; bottom: 10px; padding: 8px 10px; border-radius: 10px; content: "Habla con Chuchin"; display: block; font-size: .7rem; }
  body:has(.has-mobile-orbit) #thp-assistant .thp-assistant-panel { left: 8px !important; right: 8px !important; bottom: 8px !important; width: auto !important; height: calc(100dvh - 16px) !important; max-height: 680px !important; }
}
@media (max-width:360px) {
  .has-mobile-orbit[data-orbit-count="6"] [data-orbit-slot="2"] strong,
  .has-mobile-orbit[data-orbit-count="6"] [data-orbit-slot="3"] strong { font-size: .59rem; }
}

/* Regreso reconocible en escritorio y teléfono. */
body .back-link, body .final-model-back {
 display:inline-flex; align-items:center; justify-content:center; gap:8px;
 min-height:48px; padding:12px 20px; border:2px solid #dec176;
 border-radius:12px; background:#123d32; color:#fff; font-size:16px;
 font-weight:800; line-height:1.35; text-decoration:none; box-shadow:0 4px 14px #123d3220;
 width:fit-content; max-width:100%;
}
body .back-link::before { color:#ead393; }
body .back-link:hover, body .final-model-back:hover { background:#215b49; }
body .back-link:focus-visible, body .final-model-back:focus-visible { outline:3px solid #b6821d; outline-offset:4px; }
.subpage-copy > .back-link { margin-bottom:20px; }
.material-header > .back-link { order:-1; flex-shrink:0; }
body .premium-model-dialog-close { position:sticky;top:0;right:auto;display:inline-flex;align-items:center;width:auto;min-height:48px;height:auto;padding:12px 18px;margin-bottom:16px;border:2px solid #dec176;border-radius:12px;background:#123d32;color:white;font:800 16px/1.3 "DM Sans",sans-serif; }
body .premium-model-dialog header { padding-right:0; }
body .premium-model-dialog-close:focus-visible { outline:3px solid #b6821d;outline-offset:3px; }
@media(max-width:760px) { .material-header { align-items:stretch; } body .final-model-back { margin-bottom:8px; } }



/* En móvil, reserva un lugar propio para Vittoria; no debe tapar a Sorento. */
@media (max-width: 760px) {
  .private-orbit .private-side-left [data-private="torres"]:last-child {
    bottom: 0;
    left: 0;
    width: 43%;
    height: 70px;
    min-height: 70px;
  }
  .private-orbit .private-side-right [data-private="vittoria"]:last-child {
    top: auto;
    right: 0;
    bottom: 0;
    left: auto;
    width: 43%;
    height: 70px;
    min-height: 70px;
  }
  .private-orbit [data-private="vittoria"] img {
    object-position: center 62%;
  }
}
