/* CEMI Core v1.2.80 — single hero mobile fix + sticky search timing
   - El buscador sticky NO aparece al inicio de una single; aparece al llegar a galería o más abajo.
   - Corrige mobile: textos, specs, precio y métodos de pago ya no se recortan ni se enciman.
   - Desktop conserva los ajustes de v1.2.79. */

/* En single property no reserves espacio para buscador sticky desde arriba. */
body.cemi-ui-single-property .cemi-hdr-spacer,
body.single-cemi_property .cemi-hdr-spacer,
body.single-opalestate_property .cemi-hdr-spacer{
  height:var(--cemi-hdr-height,68px)!important;
}

/* Mientras el buscador sticky no está activo, no debe ocupar interacción visual. */
body.cemi-ui-single-property:not(.cemi-sticky-search-active) .cemi-sticky-search{
  opacity:0!important;
  pointer-events:none!important;
  transform:translateY(-18px)!important;
}

@media (max-width:1180px){
  /* En tablet/móvil quitamos el full-bleed negativo heredado: eso era lo que recortaba el lado izquierdo. */
  body.cemi-ui-single-property .cemi-single-property,
  body.cemi-ui-single-property .cemi-single-property > .cemi-single-hero,
  body.cemi-ui-single-property .cemi-single-hero{
    width:100%!important;
    max-width:100%!important;
    left:auto!important;
    right:auto!important;
    margin-left:0!important;
    margin-right:0!important;
    transform:none!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  body.cemi-ui-single-property .cemi-single-hero{
    min-height:auto!important;
    display:block!important;
    background:#080d15!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-bg{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    object-fit:cover!important;
    object-position:center center!important;
    opacity:.46!important;
    z-index:0!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-overlay{
    position:absolute!important;
    inset:0!important;
    z-index:1!important;
    background:
      linear-gradient(180deg,rgba(8,11,18,.70) 0%,rgba(8,11,18,.91) 38%,rgba(8,11,18,.98) 100%)!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-inner{
    position:relative!important;
    z-index:2!important;
    width:calc(100% - 28px)!important;
    max-width:760px!important;
    min-height:auto!important;
    margin:0 auto!important;
    padding:clamp(86px,18vw,122px) 0 18px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:14px!important;
    align-items:start!important;
    box-sizing:border-box!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-copy,
  body.cemi-ui-single-property .cemi-single-hero-panel{
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    margin:0!important;
    box-sizing:border-box!important;
    overflow:visible!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-kickers{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:7px!important;
    max-width:100%!important;
  }

  body.cemi-ui-single-property .cemi-single-hero h1{
    max-width:100%!important;
    margin:12px 0 8px!important;
    font-size:clamp(30px,9.4vw,44px)!important;
    line-height:1.02!important;
    letter-spacing:-.045em!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    color:#fff!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-location{
    max-width:100%!important;
    margin:0 0 12px!important;
    font-size:13px!important;
    line-height:1.45!important;
    color:rgba(255,255,255,.80)!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-specs{
    width:100%!important;
    max-width:none!important;
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-specs span{
    min-width:0!important;
    width:100%!important;
    padding:10px 10px!important;
    border-radius:14px!important;
    background:rgba(255,255,255,.105)!important;
    border:1px solid rgba(255,255,255,.14)!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-specs strong{
    display:block!important;
    font-size:clamp(17px,5.4vw,23px)!important;
    line-height:1!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-specs small{
    display:block!important;
    margin-top:4px!important;
    font-size:9.5px!important;
    line-height:1.1!important;
    letter-spacing:.08em!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-panel{
    padding:14px!important;
    border-radius:20px!important;
    background:rgba(13,19,30,.88)!important;
    border:1px solid rgba(255,255,255,.14)!important;
    box-shadow:0 16px 40px rgba(0,0,0,.28)!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-price-label,
  body.cemi-ui-single-property .cemi-single-hero-pay-title{
    display:block!important;
    font-size:10.5px!important;
    line-height:1.2!important;
    letter-spacing:.10em!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-price{
    display:block!important;
    max-width:100%!important;
    font-size:clamp(25px,8.4vw,38px)!important;
    line-height:1.02!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    color:#fff!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-payments{
    margin-top:13px!important;
    padding-top:12px!important;
    border-top:1px solid rgba(255,255,255,.12)!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-pay-pills{
    width:100%!important;
    max-width:100%!important;
    display:flex!important;
    flex-wrap:wrap!important;
    gap:7px!important;
    margin-top:9px!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-pay-pills span{
    max-width:100%!important;
    min-width:0!important;
    flex:0 1 auto!important;
    padding:7px 10px!important;
    border-radius:999px!important;
    font-size:10.5px!important;
    line-height:1.1!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    text-align:center!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-actions{
    display:grid!important;
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:7px!important;
    margin-top:12px!important;
  }

  body.cemi-ui-single-property .cemi-single-hero-actions a{
    min-width:0!important;
    min-height:38px!important;
    padding:0 8px!important;
    border-radius:12px!important;
    font-size:11px!important;
    line-height:1!important;
    text-align:center!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }
}

@media (max-width:430px){
  body.cemi-ui-single-property .cemi-single-hero-inner{
    width:calc(100% - 24px)!important;
    padding-top:86px!important;
  }
  body.cemi-ui-single-property .cemi-single-hero-specs{
    gap:7px!important;
  }
  body.cemi-ui-single-property .cemi-single-hero-actions{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
  }
}
