/*
Theme Name: CasasRed Divi Child
Theme URI: https://casasred.com
Description: Child theme para personalizar CasasRed sobre Divi sin tocar el tema padre.
Author: Sistemas Web / Pedro Esparza + ChatGPT
Template: Divi
Version: 0.6.15
*/

:root {
  --casasred-red: #dc0008;
  --casasred-dark: #111111;
  --casasred-gold: #e8d8a4;
  --casasred-gray: #5b5f66;
}

body { font-smoothing: antialiased; -webkit-font-smoothing: antialiased; }
.et_pb_button, .button { border-radius: 6px; font-weight: 900; }

/* Limpieza para páginas comerciales de CasasRed generadas con shortcodes */
body.cr-casasred-page #main-content .container{
  max-width:none!important;
  width:100%!important;
  padding-left:0!important;
  padding-right:0!important;
}
body.cr-casasred-page #left-area{
  width:100%!important;
  padding-right:0!important;
}
body.cr-casasred-page #sidebar,
body.cr-casasred-page #main-content .container:before{
  display:none!important;
}
body.cr-catalog-fullscreen-page #main-content{ padding-top:0!important; }
body.cr-catalog-fullscreen-page .entry-title{ display:none!important; }


/* CasasRed Divi integration v0.3 */
body.cr-home-enhanced-page #main-content .container,
body.home #main-content .container{
  max-width:none!important;
  width:100%!important;
  padding-left:0!important;
  padding-right:0!important;
}
body.cr-home-enhanced-page #left-area,
body.home #left-area{
  width:100%!important;
  padding-right:0!important;
}
body.cr-home-enhanced-page #sidebar,
body.home #sidebar,
body.cr-home-enhanced-page #main-content .container:before,
body.home #main-content .container:before{
  display:none!important;
}
body.cr-home-enhanced-page .entry-title,
body.home .entry-title{
  display:none!important;
}
body .et_pb_button,
body .et_pb_module .et_pb_button{
  border-radius:999px;
  font-weight:800;
}
body .et_pb_button:hover,
body .et_pb_module .et_pb_button:hover{
  transform:translateY(-1px);
}
.casasred-red-text{color:var(--casasred-red)!important}.casasred-dark-section{background:#111!important;color:#fff!important}.casasred-card-shadow{box-shadow:0 18px 45px rgba(17,24,39,.12)!important;border-radius:22px!important;overflow:hidden!important}


/* CasasRed Home Landing visual v0.4 */
:root{
  --casasred-red:#dc0008;
  --casasred-red-dark:#8a0006;
  --casasred-black:#060606;
  --casasred-white:#ffffff;
  --casasred-whatsapp:#25d366;
}

/* Header / menú principal sobre Hero */
body.home #main-header,
body.cr-home-enhanced-page #main-header{
  background:transparent!important;
  box-shadow:none!important;
}
body.home #main-header.et-fixed-header,
body.cr-home-enhanced-page #main-header.et-fixed-header{
  background:rgba(8,8,8,.92)!important;
  backdrop-filter:blur(12px);
  box-shadow:0 12px 34px rgba(0,0,0,.18)!important;
}
body.home #logo,
body.cr-home-enhanced-page #logo{
  max-height:86px!important;
}
body.home #main-header.et-fixed-header #logo,
body.cr-home-enhanced-page #main-header.et-fixed-header #logo{
  max-height:64px!important;
}
body.home #top-menu li a,
body.cr-home-enhanced-page #top-menu li a{
  color:#fff!important;
  font-weight:800;
  letter-spacing:.01em;
}
body.home #top-menu li:last-child > a,
body.cr-home-enhanced-page #top-menu li:last-child > a{
  background:var(--casasred-whatsapp);
  color:#fff!important;
  padding:12px 18px!important;
  border-radius:999px;
  box-shadow:0 12px 30px rgba(37,211,102,.28);
}

/* Hero premium: contraste y lectura */
body.home .et_builder_inner_content > .et_pb_section:first-of-type,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type{
  position:relative;
  min-height:92vh;
  overflow:hidden;
  isolation:isolate;
}
body.home .et_builder_inner_content > .et_pb_section:first-of-type:before,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type:before{
  content:"";
  position:absolute;
  inset:0;
  z-index:0;
  background:
    linear-gradient(90deg, rgba(0,0,0,.72) 0%, rgba(99,0,8,.48) 32%, rgba(0,0,0,.18) 62%, rgba(0,0,0,.05) 100%),
    radial-gradient(circle at 18% 60%, rgba(220,0,8,.28), transparent 32%);
  pointer-events:none;
}
body.home .et_builder_inner_content > .et_pb_section:first-of-type > *,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type > *{
  position:relative;
  z-index:1;
}
body.home .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_heading,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_heading{
  text-shadow:0 10px 32px rgba(0,0,0,.25);
}
body.home .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_heading:first-child h1,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_heading:first-child h1{
  letter-spacing:.08em;
  text-transform:uppercase;
  font-weight:900!important;
}

/* CTA del hero insertado desde Zippy v0.3 */
.cr-hero-copy{
  max-width:760px;
  margin-top:22px;
}
.cr-hero-subtitle{
  color:#fff;
  font-size:20px;
  line-height:1.65;
  font-weight:600;
  text-shadow:0 8px 28px rgba(0,0,0,.32);
  max-width:720px;
}
.cr-hero-actions{
  display:flex;
  gap:14px;
  flex-wrap:wrap;
  margin-top:28px;
}
.cr-hero-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:52px;
  padding:0 24px;
  border-radius:999px;
  font-weight:900;
  letter-spacing:.02em;
  text-transform:uppercase;
  font-size:13px;
}
.cr-hero-btn-primary{
  background:var(--casasred-red);
  color:#fff!important;
  box-shadow:0 18px 40px rgba(220,0,8,.34);
}
.cr-hero-btn-secondary{
  background:rgba(255,255,255,.12);
  color:#fff!important;
  border:1px solid rgba(255,255,255,.65);
  backdrop-filter:blur(8px);
}
.cr-hero-btn:hover{
  transform:translateY(-2px);
  filter:brightness(1.05);
}

/* Accesos rápidos debajo del hero */
body.home .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_row:last-child,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_row:last-child{
  border-radius:0;
  box-shadow:0 -18px 50px rgba(0,0,0,.22);
}
body.home .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_row:last-child .et_pb_column,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_row:last-child .et_pb_column{
  transition:background .18s ease, transform .18s ease;
}
body.home .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_row:last-child .et_pb_column:hover,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type .et_pb_row:last-child .et_pb_column:hover{
  background:var(--casasred-red)!important;
  transform:translateY(-2px);
}

/* Secciones CasasRed */
body.home .cr-home-recent,
body.cr-home-enhanced-page .cr-home-recent{
  background:#fff;
}
body.home .cr-property-card,
body.cr-home-enhanced-page .cr-property-card{
  border-radius:24px!important;
  overflow:hidden;
  box-shadow:0 22px 65px rgba(17,24,39,.12)!important;
  border:1px solid rgba(0,0,0,.06)!important;
}
body.home .cr-price,
body.cr-home-enhanced-page .cr-price{
  color:var(--casasred-red)!important;
  font-weight:900!important;
}
body.home .cr-btn,
body.home .cr-card-actions a:first-child,
body.cr-home-enhanced-page .cr-btn,
body.cr-home-enhanced-page .cr-card-actions a:first-child{
  background:var(--casasred-red)!important;
  color:#fff!important;
  border-radius:999px!important;
}
body.home .cr-btn-whatsapp,
body.home .cr-card-actions a:last-child,
body.cr-home-enhanced-page .cr-btn-whatsapp,
body.cr-home-enhanced-page .cr-card-actions a:last-child{
  background:var(--casasred-whatsapp)!important;
  color:#fff!important;
  border-radius:999px!important;
}

@media (max-width:980px){
  body.home #logo,
  body.cr-home-enhanced-page #logo{max-height:70px!important;}
  body.home .et_builder_inner_content > .et_pb_section:first-of-type,
  body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type{min-height:78vh;}
  .cr-hero-subtitle{font-size:17px;}
}
@media (max-width:767px){
  .cr-hero-actions{display:grid;grid-template-columns:1fr;}
  .cr-hero-btn{width:100%;}
  body.home .et_builder_inner_content > .et_pb_section:first-of-type:before,
  body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type:before{
    background:linear-gradient(180deg, rgba(0,0,0,.72), rgba(99,0,8,.52) 55%, rgba(0,0,0,.2));
  }
}


/* CasasRed Divi Child v0.6 - Catálogo Premium */
body.cr-catalog-fullscreen-page #main-content .container,
body.cr-casasred-page #main-content .container{
  width:100%!important;
  max-width:none!important;
  padding-left:0!important;
  padding-right:0!important;
}
body.cr-catalog-fullscreen-page #left-area,
body.cr-casasred-page #left-area{
  width:100%!important;
  padding:0!important;
}
body.cr-catalog-fullscreen-page #sidebar,
body.cr-catalog-fullscreen-page #main-content .container:before,
body.cr-casasred-page #sidebar,
body.cr-casasred-page #main-content .container:before{
  display:none!important;
}
body.cr-catalog-fullscreen-page .entry-title,
body.cr-catalog-fullscreen-page .post-meta{
  display:none!important;
}
body.cr-catalog-fullscreen-page .et_pb_post,
body.cr-catalog-fullscreen-page .entry-content{
  margin-bottom:0!important;
  padding-bottom:0!important;
}

/* Importante: desde v0.6 el gradiente/foto del hero se controla en Divi, no desde el child theme. */
body.home .et_builder_inner_content > .et_pb_section:first-of-type:before,
body.cr-home-enhanced-page .et_builder_inner_content > .et_pb_section:first-of-type:before{
  display:none!important;
  content:none!important;
  background:none!important;
}

/* Footer CasasRed / limpieza de créditos default */
#footer-widgets{padding-top:64px!important;padding-bottom:44px!important;}
#footer-widgets .footer-widget h4,#footer-widgets .footer-widget h3{font-weight:800!important;color:#fff!important;}
#footer-widgets .footer-widget a{color:#fff!important;}
#footer-widgets .footer-widget a:hover{color:var(--casasred-red)!important;}
#footer-bottom{background:#151515!important;}
#footer-info{color:#cfcfcf!important;}
.et-social-icons li a{color:#fff!important;}

/* v0.6.1: Ajustes para catálogo premium: full width, sin sidebar y compatible con menú Divi. */


/* CasasRed child v0.6.5: versión alineada con Catálogo Premium v0.4.5. */


/* CasasRed child v0.6.5: soporte Catálogo Premium v0.4.5 */
body.cr-catalog-fullscreen-page #main-content,
body.cr-catalog-fullscreen-page .entry-content{
  overflow-x:hidden!important;
}
body.cr-catalog-fullscreen-page #main-content .container,
body.cr-catalog-fullscreen-page #left-area{
  margin-left:0!important;
  margin-right:0!important;
  max-width:none!important;
  width:100%!important;
}


/* CasasRed Catalog integration v0.6.5 */
body.cr-catalog-fullscreen-page .cr-listing-fullscreen{
  max-width:100%!important;
}
@media(max-width:1100px){
  body.cr-catalog-fullscreen-page #page-container,
  body.cr-catalog-fullscreen-page #main-content{
    overflow-x:hidden!important;
  }
}




/* CasasRed Divi Child v0.6.12
   El catálogo controla sus filtros desde el plugin para evitar conflictos.
   El child theme conserva únicamente integración visual general y home. */
body.cr-catalog-fullscreen-page .cr-results-panel,
body.cr-catalog-fullscreen-page .cr-advanced-filter,
body.cr-catalog-fullscreen-page .cr-searchbar,
body.cr-catalog-fullscreen-page .cr-search-main{
  box-sizing:border-box!important;
  max-width:100%!important;
}
.cr-properties-grid-home .cr-property-img{
  height:355px!important;
}
.cr-properties-grid-home .cr-btn-whatsapp{
  min-width:160px;
}
@media(max-width:980px){
  .cr-properties-grid-home .cr-property-img{
    height:330px!important;
  }
}


/* CasasRed Single Property full width v0.6.14 */
body.single-cr_property #main-content .container{
  max-width:none!important;
  width:100%!important;
  padding-left:0!important;
  padding-right:0!important;
}
body.single-cr_property #left-area{
  width:100%!important;
  padding-right:0!important;
}
body.single-cr_property #sidebar,
body.single-cr_property #main-content .container:before,
body.single-cr_property .entry-title{
  display:none!important;
}
body.single-cr_property #main-content{
  background:#f7f8fb!important;
}
/* cr-single-property-template-fullwidth */
