/* CEMI Core v1.2.118 — Reset real del single property.
   Objetivo: el theme NO debe encerrar el single. Hero full width como estaba y contenido inferior centrado con ancho real. */

body.single-cemi_property,
body.cemi-ui-single-property{
  overflow-x:hidden!important;
}

/* 1) Sacar TODO el single del contenedor angosto del theme sin desplazarlo a la izquierda. */
body.single-cemi_property main.cemi-single-property,
body.cemi-ui-single-property main.cemi-single-property,
main.cemi-single-property{
  position:relative!important;
  left:50%!important;
  right:auto!important;
  width:100vw!important;
  max-width:100vw!important;
  margin-left:-50vw!important;
  margin-right:0!important;
  padding:0!important;
  transform:none!important;
  box-sizing:border-box!important;
  overflow-x:clip!important;
  background:#f3f5f9!important;
}

/* 2) Hero: volverlo full width y sin heredar el ancho miniatura del contenido. */
body.single-cemi_property .cemi-single-property > .cemi-single-hero,
body.cemi-ui-single-property .cemi-single-property > .cemi-single-hero,
.cemi-single-property > .cemi-single-hero{
  width:100vw!important;
  max-width:100vw!important;
  margin:0!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}

body.single-cemi_property .cemi-single-hero-inner,
body.cemi-ui-single-property .cemi-single-hero-inner,
.cemi-single-hero-inner{
  width:min(1540px, calc(100vw - 72px))!important;
  max-width:1540px!important;
  margin-left:auto!important;
  margin-right:auto!important;
  box-sizing:border-box!important;
}

/* 3) El contenido bajo hero usa un wrapper interno propio, no el wrapper del theme. */
body.single-cemi_property .cemi-single-property > .cemi-property-wrap,
body.cemi-ui-single-property .cemi-single-property > .cemi-property-wrap,
.cemi-single-property > .cemi-property-wrap{
  position:relative!important;
  left:auto!important;
  right:auto!important;
  transform:none!important;
  width:min(1440px, calc(100vw - 56px))!important;
  max-width:1440px!important;
  margin:0 auto!important;
  padding:clamp(28px,3vw,54px) 0 88px!important;
  box-sizing:border-box!important;
  background:transparent!important;
  outline:0!important;
}

/* 4) Desktop real: dos columnas cómodas, no 3 columnas angostas. */
@media (min-width:1180px){
  body.single-cemi_property .cemi-single-property > .cemi-property-wrap,
  body.cemi-ui-single-property .cemi-single-property > .cemi-property-wrap,
  .cemi-single-property > .cemi-property-wrap{
    display:grid!important;
    grid-template-columns:minmax(650px, 1fr) minmax(430px, 520px)!important;
    gap:clamp(26px,2.2vw,42px)!important;
    align-items:start!important;
  }

  body.single-cemi_property .cemi-prop-left,
  body.single-cemi_property .cemi-prop-right,
  body.cemi-ui-single-property .cemi-prop-left,
  body.cemi-ui-single-property .cemi-prop-right,
  .cemi-prop-left,
  .cemi-prop-right{
    min-width:0!important;
    width:100%!important;
    max-width:none!important;
    margin:0!important;
    transform:none!important;
  }

  body.single-cemi_property .cemi-sticky-panel,
  body.cemi-ui-single-property .cemi-sticky-panel,
  .cemi-sticky-panel{
    position:sticky!important;
    top:18px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:18px!important;
    width:100%!important;
    max-width:none!important;
    min-width:0!important;
    transform:none!important;
  }
}

@media (min-width:1600px){
  body.single-cemi_property .cemi-single-property > .cemi-property-wrap,
  body.cemi-ui-single-property .cemi-single-property > .cemi-property-wrap,
  .cemi-single-property > .cemi-property-wrap{
    width:min(1540px, calc(100vw - 80px))!important;
    max-width:1540px!important;
    grid-template-columns:minmax(760px, 1fr) minmax(460px, 540px)!important;
  }
}

/* Tablet: una columna limpia para evitar compresión lateral. */
@media (min-width:760px) and (max-width:1179px){
  body.single-cemi_property .cemi-single-hero-inner,
  body.cemi-ui-single-property .cemi-single-hero-inner,
  .cemi-single-hero-inner{
    width:min(1040px, calc(100vw - 36px))!important;
  }
  body.single-cemi_property .cemi-single-property > .cemi-property-wrap,
  body.cemi-ui-single-property .cemi-single-property > .cemi-property-wrap,
  .cemi-single-property > .cemi-property-wrap{
    width:min(1040px, calc(100vw - 36px))!important;
    max-width:1040px!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:22px!important;
  }
  body.single-cemi_property .cemi-sticky-panel,
  body.cemi-ui-single-property .cemi-sticky-panel,
  .cemi-sticky-panel{
    position:relative!important;
    top:auto!important;
    display:grid!important;
    grid-template-columns:1fr!important;
    gap:18px!important;
  }
}

/* Mobile: todo a 100%, sin scroll horizontal y sin diagnósticos. */
@media (max-width:759px){
  body.single-cemi_property main.cemi-single-property,
  body.cemi-ui-single-property main.cemi-single-property,
  main.cemi-single-property{
    width:100vw!important;
    max-width:100vw!important;
  }
  body.single-cemi_property .cemi-single-hero-inner,
  body.cemi-ui-single-property .cemi-single-hero-inner,
  .cemi-single-hero-inner{
    width:100%!important;
    max-width:100%!important;
    padding-left:12px!important;
    padding-right:12px!important;
  }
  body.single-cemi_property .cemi-single-property > .cemi-property-wrap,
  body.cemi-ui-single-property .cemi-single-property > .cemi-property-wrap,
  .cemi-single-property > .cemi-property-wrap{
    width:100%!important;
    max-width:100%!important;
    display:block!important;
    padding:16px 12px 56px!important;
  }
  body.single-cemi_property .cemi-sticky-panel,
  body.cemi-ui-single-property .cemi-sticky-panel,
  .cemi-sticky-panel{
    position:relative!important;
    top:auto!important;
  }
}

/* 5) Galería, mapa, cercanías y cards no deben quedar con max-width viejo. */
body.single-cemi_property .cemi-gallery,
body.single-cemi_property .cemi-gallery-main,
body.single-cemi_property .cemi-card-map-left,
body.single-cemi_property .cemi-card-nearby-front,
body.single-cemi_property .cemi-card-property-summary,
body.single-cemi_property .cemi-card-contact,
body.cemi-ui-single-property .cemi-gallery,
body.cemi-ui-single-property .cemi-gallery-main,
body.cemi-ui-single-property .cemi-card-map-left,
body.cemi-ui-single-property .cemi-card-nearby-front,
body.cemi-ui-single-property .cemi-card-property-summary,
body.cemi-ui-single-property .cemi-card-contact{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  box-sizing:border-box!important;
  transform:none!important;
  outline:0!important;
}

/* 6) Mantener lectura correcta de características/equipamiento sin texto vertical. */
body.single-cemi_property .cemi-property-summary-grid,
body.cemi-ui-single-property .cemi-property-summary-grid{
  display:grid!important;
  grid-template-columns:repeat(auto-fit,minmax(210px,1fr))!important;
  gap:12px!important;
}
body.single-cemi_property .cemi-property-summary-item,
body.cemi-ui-single-property .cemi-property-summary-item{
  writing-mode:horizontal-tb!important;
  text-orientation:mixed!important;
  word-break:normal!important;
  overflow-wrap:break-word!important;
  min-width:0!important;
}
body.single-cemi_property .cemi-property-summary-item strong,
body.cemi-ui-single-property .cemi-property-summary-item strong{
  word-break:normal!important;
  overflow-wrap:normal!important;
  hyphens:none!important;
}
@media (max-width:520px){
  body.single-cemi_property .cemi-property-summary-grid,
  body.cemi-ui-single-property .cemi-property-summary-grid{
    grid-template-columns:1fr!important;
  }
}

/* 7) Eliminar por completo colores/etiquetas de diagnóstico de v1.2.117. */
body.single-cemi_property .cemi-single-property,
body.cemi-ui-single-property .cemi-single-property,
body.single-cemi_property .cemi-single-hero,
body.cemi-ui-single-property .cemi-single-hero,
body.single-cemi_property .cemi-property-wrap,
body.cemi-ui-single-property .cemi-property-wrap,
body.single-cemi_property .cemi-prop-left,
body.cemi-ui-single-property .cemi-prop-left,
body.single-cemi_property .cemi-prop-right,
body.cemi-ui-single-property .cemi-prop-right,
body.single-cemi_property .cemi-sticky-panel,
body.cemi-ui-single-property .cemi-sticky-panel{
  outline:0!important;
}
body.single-cemi_property .cemi-property-wrap::before,
body.cemi-ui-single-property .cemi-property-wrap::before,
body.single-cemi_property .cemi-prop-left::before,
body.cemi-ui-single-property .cemi-prop-left::before,
body.single-cemi_property .cemi-prop-right::before,
body.cemi-ui-single-property .cemi-prop-right::before,
body.single-cemi_property .cemi-sticky-panel::before,
body.cemi-ui-single-property .cemi-sticky-panel::before{
  content:none!important;
  display:none!important;
}
