/*
Theme Name: Houzez Child
Template: houzez
Version: 1.0
*/

/* ===== Zenex: Concept section ===== */
body .zenex-concept {
  --zenex-concept-overlay-color: #000;
  --zenex-concept-overlay-opacity: 0.6;
  --zenex-concept-text-color: #fff;
  --zenex-concept-min-height: 480px;
  --zenex-concept-max-width: 860px;

  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--zenex-concept-min-height);
  padding: 70px 20px;
  background-size: cover;
  background-position: center bottom;
  background-repeat: no-repeat;
  background-attachment: scroll;
  color: var(--zenex-concept-text-color);
}

@media (min-width: 992px) {
  body .zenex-concept {
    background-attachment: fixed;
  }
}

body .zenex-concept::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--zenex-concept-overlay-color);
  opacity: var(--zenex-concept-overlay-opacity);
  pointer-events: none;
}

body .zenex-concept__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  display: flex;
  justify-content: center;
}

body .zenex-concept__content {
  max-width: var(--zenex-concept-max-width);
  text-align: center;
}

body .zenex-concept__title {
  margin: 0 0 6px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  font-size: 36px;
  text-transform: uppercase;
  color: inherit;
}

body .zenex-concept__subtitle {
  margin: 0 0 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1.2;
  font-size: 14px;
  text-transform: uppercase;
  color: inherit;
  opacity: 0.95;
}

body .zenex-concept__desc {
  font-size: 14px;
  line-height: 1.7;
  color: inherit;
}

body .zenex-concept__desc p {
  margin: 0 0 12px;
}

body .zenex-concept__desc p:last-child {
  margin-bottom: 0;
}

@media (max-width: 767px) {
  body .zenex-concept {
    padding: 50px 18px;
  }
  body .zenex-concept__title {
    font-size: 28px;
  }
}

/* ===== Zenex: Map tabs (Google/Graphic) ===== */
body .zenex-map {
    width: 100%;
    border-radius: 14px;
    overflow: hidden;
    background: #f3f4f6;
}

body .zenex-map iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
}

body .zenex-map--graphic a {
    display: block;
    height: 100%;
}

body .zenex-map .zenex-map__img {
    display: block;
    width: 100%;
    height: 100%;
}

body .zenex-map--fit-contain .zenex-map__img {
    object-fit: contain;
    background: #fff;
}

body .zenex-map--fit-cover .zenex-map__img {
    object-fit: cover;
}

/* ===== Zenex: Property Features (Elementor: Section Features) ===== */
body .property-features-wrap .block-content-wrap ul[role="list"] {
  --zenex-feature-icon-size: 46px;
  --zenex-feature-item-min-width: 110px;
  --zenex-feature-item-max-width: 140px;
  --zenex-feature-icon-color: #7b0f12;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 24px 32px;
  margin: 0 !important;
  padding: 0 !important;
}

body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] {
  flex: 1 1 var(--zenex-feature-item-min-width);
  min-width: var(--zenex-feature-item-min-width) !important;
  max-width: var(--zenex-feature-item-max-width) !important;
  width: auto !important;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  text-align: center;
  gap: 10px;
  padding: 0 !important;
  margin: 0 !important;
}

@media (min-width: 1400px) {
  body .property-features-wrap .block-content-wrap ul[role="list"] {
    --zenex-feature-item-min-width: 100px;
    --zenex-feature-item-max-width: 130px;
    gap: 22px 28px;
  }
}

body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] i,
body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] img.hz-fte-img {
  width: var(--zenex-feature-icon-size);
  height: var(--zenex-feature-icon-size);
  margin: 0 !important;
}

body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] img.hz-fte-img {
  display: block;
  object-fit: contain;
}

body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: var(--zenex-feature-icon-size);
  line-height: 1;
  color: var(--zenex-feature-icon-color);
}

body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] a {
  display: block;
  color: #111;
  text-decoration: none;
  font-weight: 600;
  line-height: 1.35;
}

body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] a:hover {
  color: #111;
  text-decoration: none;
}

/* ===== Zenex: House Types Tabs ===== */
body .zenex-house-types {
  text-align: center;
}

body .zenex-house-types__heading {
  margin: 0 0 12px;
}

body .zenex-house-types__tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 14px;
}

body .zenex-house-types__tab {
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: #5a5f63;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

body .zenex-house-types__tab.is-active,
body .zenex-house-types__tab[aria-selected="true"] {
  background: #7b0f12;
}

body .zenex-house-types__tab:focus {
  outline: 2px solid rgba(123, 15, 18, 0.35);
  outline-offset: 3px;
}

body .zenex-house-types__panels {
  width: 100%;
}

body .zenex-house-types__panel[hidden] {
  display: none !important;
}

body .zenex-house-types__media {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

body .zenex-house-types__media.zenex-house-types__media--single {
  grid-template-columns: minmax(280px, 1fr);
  justify-content: center;
}

body .zenex-house-types__media-item {
  margin: 0;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  min-height: 280px;
  background: #f2f2f2;
}

body .zenex-house-types__media.zenex-house-types__media--single .zenex-house-types__media-item {
  width: min(100%, 820px);
  justify-self: center;
  aspect-ratio: 16 / 10;
  min-height: 300px;
}

body .zenex-house-types__img {
  display: block;
  width: 100%;
  height: 100%;
}

body .zenex-house-types__img--house {
  object-fit: cover;
}

body .zenex-house-types__img--plan {
  object-fit: cover;
}

@media (max-width: 767px) {
  body .zenex-house-types__media {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  body .zenex-house-types__media-item {
    aspect-ratio: 4 / 3;
    min-height: 220px;
  }
  body .zenex-house-types__media.zenex-house-types__media--single .zenex-house-types__media-item {
    width: 100%;
    min-height: 220px;
    aspect-ratio: 4 / 3;
  }
}

.custom-box {
  border-radius: 40px 0 40px 0;
  padding: 40px 25px;
  color: #fff;
  text-align: center;
  width: 80%;
  height: 100%;
  min-height: 450px;
  align-self: stretch;
}

/* สีแดง */
.custom-box.red {
  background: #7b0f12;
}

/* สีเทา */
.custom-box.dark {
  background: #3a3a3a;
}

/* icon */
.custom-box .elementor-icon {
  margin-bottom: 15px;
}

/* text */
.box-text {
  font-size: 14px;
  line-height: 1.6;
}

/* ===== Zenex: Equal height boxes (Elementor) =====
   ใช้โดยใส่ class "custom-boxes" ที่ Section/Container แม่ (Elementor > Advanced > CSS Classes)
*/
body .custom-boxes .elementor-row,
body .custom-boxes .elementor-container,
body .custom-boxes .e-con-inner {
  align-items: stretch;
}

body .custom-boxes,
body .custom-boxes > .e-con-inner,
body .custom-boxes > .elementor-container,
body .custom-boxes > .elementor-row {
  display: flex !important;
  align-items: stretch !important;
}

body .custom-boxes > .e-con-inner {
  width: 100%;
}

body .custom-boxes > .e-con-inner > .custom-box,
body .custom-boxes > .elementor-container > .custom-box,
body .custom-boxes > .elementor-row > .custom-box {
  align-self: stretch !important;
}

body .custom-boxes .elementor-column,
body .custom-boxes .elementor-widget-wrap,
body .custom-boxes .e-con {
  display: flex;
}

body .custom-boxes .elementor-widget-wrap,
body .custom-boxes .e-con {
  flex-direction: column;
}

body .custom-boxes .custom-box {
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* Layout: Desktop 4 cards / Tablet 2 cards / Mobile 1 card */
body .custom-boxes > .e-con-inner,
body .custom-boxes > .elementor-container,
body .custom-boxes > .elementor-row {
  display: flex !important;
  flex-wrap: wrap;
  gap: 16px;
}

/* Elementor wrappers (container/column) */
body .custom-boxes > .e-con-inner > .e-con,
body .custom-boxes > .elementor-container > .elementor-column,
body .custom-boxes > .elementor-row > .elementor-column {
  flex: 0 0 calc(25% - 12px);
  max-width: calc(25% - 12px);
}

body .custom-boxes > .e-con-inner > .custom-box,
body .custom-boxes > .elementor-container > .custom-box,
body .custom-boxes > .elementor-row > .custom-box {
  flex: 0 0 calc(25% - 12px);
  max-width: calc(25% - 12px);
}

/* Auto: ถ้าไม่อยากใส่ class ที่ container แม่ (รองรับ browser ใหม่) */
@supports selector(.e-con-inner:has(> .custom-box)) {
  body .e-con-inner:has(> .custom-box),
  body .elementor-row:has(> .custom-box),
  body .elementor-container:has(> .custom-box) {
    align-items: stretch !important;
  }

  body .e-con-inner:has(> .custom-box) > .custom-box,
  body .elementor-row:has(> .custom-box) > .custom-box,
  body .elementor-container:has(> .custom-box) > .custom-box {
    align-self: stretch !important;
    height: 100% !important;
  }
}

@media (max-width: 1024px) {
  body .custom-boxes > .e-con-inner,
  body .custom-boxes > .elementor-container,
  body .custom-boxes > .elementor-row {
    gap: 14px;
  }

  body .custom-boxes > .e-con-inner > .custom-box,
  body .custom-boxes > .elementor-container > .custom-box,
  body .custom-boxes > .elementor-row > .custom-box {
    flex: 0 0 calc(50% - 7px);
    max-width: calc(50% - 7px);
  }

  body .custom-boxes > .e-con-inner > .e-con,
  body .custom-boxes > .elementor-container > .elementor-column,
  body .custom-boxes > .elementor-row > .elementor-column {
    flex: 0 0 calc(50% - 7px);
    max-width: calc(50% - 7px);
  }
}

@media (max-width: 767px) {
  body .custom-boxes > .e-con-inner,
  body .custom-boxes > .elementor-container,
  body .custom-boxes > .elementor-row {
    gap: 12px;
  }

  body .custom-boxes > .e-con-inner > .custom-box,
  body .custom-boxes > .elementor-container > .custom-box,
  body .custom-boxes > .elementor-row > .custom-box {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body .custom-boxes > .e-con-inner > .e-con,
  body .custom-boxes > .elementor-container > .elementor-column,
  body .custom-boxes > .elementor-row > .elementor-column {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* ===== Zenex: Global responsive tuning for shortcode sections ===== */
@media (max-width: 1024px) {
  /* Concept */
  body .zenex-concept {
    --zenex-concept-min-height: 420px;
    --zenex-concept-max-width: 760px;
    padding: 56px 24px;
    background-attachment: scroll;
  }
  body .zenex-concept__title {
    font-size: 32px;
  }
  body .zenex-concept__subtitle {
    margin-bottom: 14px;
  }
  body .zenex-concept__desc {
    font-size: 13px;
    line-height: 1.65;
  }

  /* Map */
  body .zenex-map {
    border-radius: 12px;
    height: 460px !important;
  }

  /* Property Features */
  body .property-features-wrap .block-content-wrap ul[role="list"] {
    --zenex-feature-icon-size: 38px;
    --zenex-feature-item-min-width: 96px;
    --zenex-feature-item-max-width: 122px;
    gap: 18px 20px;
  }
  body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] a {
    font-size: 14px;
    line-height: 1.3;
  }

  /* House tabs */
  body .zenex-house-types__tabs {
    gap: 8px;
    margin-bottom: 12px;
  }
  body .zenex-house-types__tab {
    padding: 7px 16px;
    font-size: 14px;
  }
  body .zenex-house-types__media {
    gap: 10px;
  }
  body .zenex-house-types__media-item {
    min-height: 240px;
    border-radius: 12px;
  }

  /* Nearby cards */
  body .custom-box {
    width: 100%;
    min-height: 360px;
    padding: 30px 18px;
    border-radius: 30px 0 30px 0;
  }
}

@media (max-width: 767px) {
  /* Concept */
  body .zenex-concept {
    --zenex-concept-min-height: 360px;
    --zenex-concept-max-width: 100%;
    padding: 44px 16px;
  }
  body .zenex-concept__title {
    font-size: 25px;
    letter-spacing: 0.04em;
  }
  body .zenex-concept__subtitle {
    font-size: 12px;
    margin-bottom: 12px;
  }
  body .zenex-concept__desc {
    font-size: 13px;
    line-height: 1.6;
  }

  /* Map */
  body .zenex-map {
    height: 340px !important;
    border-radius: 10px;
  }

  /* Property Features */
  body .property-features-wrap .block-content-wrap ul[role="list"] {
    --zenex-feature-icon-size: 30px;
    --zenex-feature-item-min-width: 78px;
    --zenex-feature-item-max-width: 100px;
    gap: 14px 12px;
  }
  body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] {
    gap: 6px;
  }
  body .property-features-wrap .block-content-wrap ul[role="list"] > li[role="listitem"] a {
    font-size: 12px;
    line-height: 1.25;
  }

  /* House tabs */
  body .zenex-house-types__heading {
    margin-bottom: 10px;
  }
  body .zenex-house-types__tabs {
    gap: 7px;
    margin-bottom: 10px;
  }
  body .zenex-house-types__tab {
    padding: 7px 14px;
    font-size: 13px;
  }
  body .zenex-house-types__media {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  body .zenex-house-types__media-item {
    min-height: 210px;
    border-radius: 10px;
  }

  /* Nearby cards */
  body .custom-box {
    min-height: 300px;
    padding: 24px 14px;
    border-radius: 24px 0 24px 0;
  }
  body .custom-box .elementor-icon {
    margin-bottom: 10px;
  }
  body .box-text {
    font-size: 13px;
    line-height: 1.55;
  }
}

/* ===== Zenex: Top Area 2 - show Status only (hide Labels) ===== */
body.property-detail-v2 .property-labels-wrap .hz-label,
body.property-detail-v2 .property-labels-wrap .label-featured {
  display: none !important;
}

/* Elementor/Template preview often uses wrapper class instead of body class */
body .property-wrap.property-detail-v2 .property-labels-wrap .hz-label,
body .property-wrap.property-detail-v2 .property-labels-wrap .label-featured {
  display: none !important;
}

/* Match old MU-plugin behavior (Top Area v2 / homepage cards using page-label-wrap) */
body .property-detail-v2 .page-label-wrap .hz-label,
body .property-detail-v2 .page-label-wrap .label-featured,
body .page-label-wrap .hz-label,
body .page-label-wrap .label-featured {
  display: none !important;
}

/* Listing cards (homepage tabs/carousels): keep only one Status badge */
body .labels-wrap .hz-label,
body .labels-wrap .label-featured {
  display: none !important;
}
body .labels-wrap .label-status ~ .label-status {
  display: none !important;
}

/* Force Houzez Elementor hamburger menu visible on all devices */
body [class*="houzez-ele-mobile-menu-"].nav-mobile,
body [class*="houzez-ele-mobile-menu-"].houzez-show-menu-desktop,
body [class*="houzez-ele-mobile-menu-"].hz-show-menu-desktop,
body [class*="houzez-ele-mobile-menu-"].houzez-show-menu-tablet,
body [class*="houzez-ele-mobile-menu-"].houzez-show-menu-mobile {
  display: block !important;
}
body [class*="houzez-ele-mobile-menu-"] .houzez-menu-toggle-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 42px;
  min-height: 42px;
  visibility: visible !important;
  opacity: 1 !important;
  color: var(--e-global-color-primary, currentColor) !important;
  background-color: transparent !important;
  border-color: currentColor !important;
}
body [class*="houzez-ele-mobile-menu-"] .houzez-menu-toggle-button i,
body [class*="houzez-ele-mobile-menu-"] .houzez-menu-toggle-button svg {
  color: inherit !important;
  fill: currentColor !important;
}
@media (min-width: 992px) {
  body [class*="houzez-ele-mobile-menu-"].nav-mobile:not(.houzez-nav-menu-main-mobile-wrap) {
    display: block !important;
  }
}
