/*
Theme Name: Houzez Child
Theme URI: #
Author: WDX.pt
Author URI: https://www.wdx.pt
Version: 1.4.1
License: GNU General Public License version 3.0
License URI: http://www.gnu.org/licenses/gpl-3.0.html
Text Domain: houzez-child
Template: houzez
*/

@import url("../houzez/style.css");

/* Estilos aplicados apenas à página de propriedades */
:root {
  --property-content-bg-color: #f3f0e8;
  --property-content-detail-bg-color: #f3f0e8;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overflow-y: auto !important; /* Garante que a barra de rolagem global esteja visível */
}

@media (min-width: 768px) {
    div#property-content{
        margin-top: -30px!important;
    }
    .property-gallery-wrapper{
        height: 100vh!important;
    }
}

.property-page .property-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  position: relative;
}

.property-page #property-header {
  width: 100%;
  height: 160px; /* Ajuste conforme necessário */
  background: #f3f0e8;
  position: sticky;
  position: -webkit-sticky;
  top: 0;
  z-index: 10; /* Para que o header fique acima do conteúdo ao rolar */
}

.property-page #property-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.property-page #property-content {
  flex: 2;
  overflow-y: auto;
  padding-right: 10px;
}

.property-page #property-content {
  width: 100%;
  float: right;
  right: 0;
  overflow-y: auto; /* Permite que a coluna direita tenha scroll */
  padding: 0px 30px;
  box-sizing: border-box;
  background-color: var(--property-content-bg-color);
  
  /* Remove a barra de rolagem apenas da coluna direita */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Internet Explorer and Edge */
  padding-bottom: 30px; /* Espaço extra para a barra sticky */
}

.property-page #property-content::-webkit-scrollbar {
    display: none; /* Oculta a barra de rolagem no Chrome, Safari e WebKit */
}

.property-page ul.item-tools {
  bottom: 5px !important;
  text-align: right;
}

.property-page .page-title h1 {
  font-size: 1.2rem;
  font-weight: 400;
}

.property-page section.header {
  position: sticky;
  top: 0;
  background: #f3f0e8;
  z-index: 10;
}

.property-page h2.price {
  font-size: 2.5rem;
  font-weight: 400;
}

.property-overview-icons ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.property-overview-icons li {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 15px;
  flex: 1;
}

.property-overview-icons li i {
  font-size: 20px; /* Aumenta o tamanho dos ícones */
  margin-bottom: 5px;
}

.property-overview-icons li i strong {
  font-family: "Typold", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #242424;
  white-space: nowrap;
  line-height: 1.1;
}

.property-overview-icons li span {
  font-size: 70%;
  color: #666; /* Cor do texto das labels */
}

/* Ajuste para garantir que a galeria ocupe 100vh */
.property-page #property-gallery {
  width: 100%;
  display: flex;
  flex-direction: column; /* Alinha os thumbnails e a galeria verticalmente */
  justify-content: space-between; /* Distribui a galeria e thumbnails */
  position: sticky;
  top: 160px; /* Fica fixo no topo */
  box-sizing: border-box;
  background-color: #f5f5f5; /* Adicione cor de fundo, se necessário */
  overflow: hidden; /* Para garantir que o conteúdo fique dentro do espaço */
}

/* Galeria principal ajustada para ocupar o espaço disponível */
.property-page #property-gallery .top-gallery-section {
  flex-grow: 1; /* A galeria principal ocupa o espaço disponível */
  overflow: hidden;
}

/* Ajuste o contêiner de thumbnails */
.property-page #property-gallery .lSPager {
  height: 79px; /* Define a altura exata para os thumbnails */
  display: flex;
  justify-content: center;
  gap: 10px; /* Espaço entre os thumbnails */
  overflow-x: auto; /* Permite rolar horizontalmente se necessário */
  margin-bottom: 80px; /* Espaço para a barra sticky */
  background-color: #f5f5f5; /* Mantém o fundo consistente */
  padding: 10px 0; /* Espaçamento vertical */
  position: relative; /* Garante que fique acima da barra sticky */
  z-index: 1000; /* Maior que o z-index da barra sticky */
}

/* Thumbnails com uma altura definida */
.property-page #property-gallery .lSPager li {
  height: 100%;
  display: inline-block;
}

.property-page #property-gallery .lSPager li img {
  height: 100%; /* Os thumbnails preenchem o contêiner */
  object-fit: cover; /* Garante que a imagem se ajuste bem */
  cursor: pointer;
}

/* Ajuste o contêiner principal do slider */
.property-page #property-gallery-js {
  flex: 1;
  min-height: 0; /* Importante para o flex funcionar corretamente */
  position: relative;
}

.property-page #property-gallery-js img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Estilos para a barra de contato fixa */
.property-page .property-contact-agent-sticky {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px; /* Altura fixa para a barra */
    background-color: #f3f0e8;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    padding: 5px 30px;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

.property-page .property-contact-agent-sticky .agent-details {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Ajustes para a imagem do agente */
.property-page .property-contact-agent-sticky .agent-image {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #beaf87;
    flex-shrink: 0;
}

.property-page .property-contact-agent-sticky .agent-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ajustes para os botões */
.property-page .property-contact-agent-sticky .btn {
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.property-page .property-contact-agent-sticky .btn-call {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

.property-page .property-contact-agent-sticky .btn-call:hover {
    background-color: #e9ecef;
}

.property-page .property-contact-agent-sticky .btn-primary {
    background-color: #beaf87;
    border-color: #beaf87;
    color: #fff;
}

.property-page .property-contact-agent-sticky .btn-primary:hover {
    background-color: #a69770;
    border-color: #a69770;
}

.property-page .property-contact-agent-sticky .agent-name {
    margin-bottom: 2px;
    font-weight: 700;
    font-size: 1.2rem;
}

.property-page .property-contact-agent-sticky .agent-position {
  margin-bottom: 2px;
  font-size: 0.8rem;
}

/* Ajuste para dispositivos móveis */
@media (max-width: 768px) {
    .property-page .property-contact-agent-sticky {
        padding: 10px 15px;
    }
    
    .property-page .property-contact-agent-sticky .agent-image {
        width: 35px;
        height: 35px;
    }
    
    .property-page .property-contact-agent-sticky .btn {
        font-size: 13px;
    }
    
    .property-page .property-contact-agent-sticky .agent-info {
        font-size: 12px;
    }
}

/* Ajuste o container de thumbnails */
.property-page #property-gallery .lSPager.lSGallery {
    height: 80px; /* Altura fixa para os thumbnails */
    min-height: 80px; /* Garante altura mínima */
    margin: 10px 0 !important; /* Espaçamento vertical */
    display: flex;
    justify-content: center;
    gap: 10px;
    overflow-x: auto;
    background-color: #f5f5f5;
    padding: 5px 0;
    position: relative;
    z-index: 1000;
    transform: translateY(-60px); /* Move os thumbnails 60px para cima */
    margin-bottom: -60px !important; /* Compensa o espaço para manter o layout */
}

/* Ajuste os thumbnails individuais */
.property-page #property-gallery .lSPager.lSGallery li {
    height: 70px;
    width: auto !important;
    margin-right: 10px !important;
}

.property-page #property-gallery .lSPager.lSGallery img {
    height: 100%;
    width: auto;
    object-fit: cover;
}

/* Garante que o container da galeria mantenha a estrutura correta */
.property-page #property-gallery {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Alinha conteúdo ao topo */
    overflow: hidden;
}

/* Ajuste para o wrapper das miniaturas */
.gallery-thumbnails-wrapper {
    bottom: 20px; /* Posiciona acima da barra sticky */
    left: 0;
    width: 50%;
    height: 100px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 0;
    transform: translateY(-60px); /* Move 60px para cima */
    z-index: 1000;
}

/* Ajuste a galeria principal para compensar */
.property-gallery-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    margin-bottom: 100px; /* Espaço para as miniaturas */
}

/* Ajuste os thumbnails dentro do wrapper */
.gallery-thumbnails {
    display: flex;
    gap: 10px;
    padding: 0 10px;
    height: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #beaf87 rgba(0, 0, 0, 0.2);
}

/* Mantenha os estilos existentes da barra de rolagem */
.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background-color: #beaf87;
    border-radius: 3px;
}

/* Ajusta a barra sticky para garantir que fique abaixo das miniaturas */
.property-page .property-contact-agent-sticky {
    z-index: 999;
}

/* Media Queries para Mobile */
@media (max-width: 768px) {
    /* Oculta o header em mobile */
    .property-page #property-header {
        display: none;
    }

    /* Reorganiza o layout principal sem o header */
    .property-page .property-container {
        flex-direction: column;
        height: auto;
        padding: 0;
        margin-top: 0; /* Remove margem superior já que o header está oculto */
    }

    .property-page #property-body {
        display: block;
        width: 100%;
        height: auto;
        overflow: visible;
        padding: 0;
        margin-top: 0; /* Remove margem superior */
    }

    /* Ajusta a galeria para começar no topo */
    .property-page #property-gallery {
        width: 100%;
        height: auto !important;
        position: relative;
        top: 0;
        margin: 0;
        padding: 0;
    }

    /* Ajusta o container da galeria */
    .property-gallery-wrapper {
        margin: 0;
        width: 100%;
    }

    /* Ajusta o conteúdo */
    .property-page #property-content {
        width: 100%;
        height: auto;
        overflow: visible;
        padding: 20px 15px;
        margin-top: 0;
        background-color: #beaf87;
    }

    /* Ajusta o header */
    .property-page #property-header {
        height: auto;
        position: relative;
        padding: 15px;
        margin-bottom: 0;
        background: #f3f0e8;
    }

    .property-page #property-header .detail-grid__header {
        padding: 0;
    }

    .property-page #property-header .detail-grid__header .row > div {
        margin: 0;
        padding: 10px 15px;
        border-bottom: 1px solid rgba(190, 175, 135, 0.2);
    }

    .property-page #property-header .page-title h1 {
        font-size: 1.2rem;
        margin: 10px 0;
    }

    .property-page #property-header .property-overview-icons {
        margin: 15px 0;
    }

    /* Ajusta os thumbnails */
    .gallery-thumbnails-wrapper {
        position: static !important;
        transform: none;
        margin-top: 0;
        bottom: auto;
    }

    /* Remove margens e paddings desnecessários */
    .property-page #property-gallery,
    .property-page #property-content {
        margin: 0;
        overflow: visible;
    }

    .property-section-wrap {
      margin-bottom: 20px;
    }

    #pills-tab {
      display: none;
    }

    /* Ajusta o grid de informações */
    .property-overview-icons {
        margin: 20px 0;
    }

    .property-overview-icons ul {
        flex-wrap: wrap;
        gap: 15px;
    }

    .property-overview-icons li {
        flex: 0 0 calc(50% - 10px);
        padding: 10px;
        border: 1px solid rgba(255,255,255,0.2);
        border-radius: 8px;
    }

    /* Ajusta espaçamentos do conteúdo */
    .property-page .page-title {
        margin: 15px 0;
    }

    .property-page .page-title h1 {
        font-size: 1.2rem;
        line-height: 1.4;
    }

    .property-page h2.price {
        font-size: 2rem;
        margin: 10px 0 20px;
    }

    /* Ajusta o breadcrumb */
    .detail-grid__header {
        padding: 10px 15px;
    }

    .detail-grid__header .row > div {
        width: 100%;
        margin-left: 0;
        padding: 0 15px;
    }

    /* Ajusta as ferramentas */
    .property-page ul.item-tools {
        justify-content: center;
        margin: 15px 0;
    }
}

/* Ajustes específicos para telas muito pequenas */
@media (max-width: 480px) {
    .property-gallery-wrapper {
        height: 45vh !important;
    }

    .property-overview-icons li {
        flex: 0 0 100%;
    }
}

/* Property Content Scroll Style */
.property-container {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

#property-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
}

.property-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
    height: calc(100vh - 300px); /* Ajuste este valor conforme a altura do seu header e outros elementos fixos */
    scrollbar-width: thin;
}

.property-content::-webkit-scrollbar {
    width: 6px;
}

.property-content::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.property-content::-webkit-scrollbar-thumb {
    background: #beaf87;
    border-radius: 3px;
}

/* Garantir que o scroll funcione */
#property-content {
    scroll-behavior: smooth !important;
    -webkit-overflow-scrolling: touch !important;
    overflow-y: auto !important;
}

#property-contact-agent-wrap {
    scroll-margin-top: 160px;
}

/* Hide original footer on property pages */
.single-property > footer.footer-wrap,
.single-property > .footer-bottom-wrap {
    display: none !important;
}

/* Style footer inside property container */
#property-footer {
    margin-top: 0!important;
    position: relative;
}

.footer-wrap {
    margin-bottom: 60px;
}

/* main {height: 100vh;} */
.property-gallery-wrapper {
    position: relative;
    width: 100%;
    background: #000;
    margin-bottom: 0px;
}

.gallery-content {
    position: relative;
    width: 100%;
    height: 100%;
}

.main-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: none;
}

.gallery-slide.active {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbnails-wrapper {
    position: fixed;
    bottom: 20px;
    width: 50%;
    height: 100px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 0;
}

.gallery-thumbnails {
    display: flex;
    gap: 10px;
    padding: 0 10px;
    height: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    scrollbar-color: #beaf87 rgba(0, 0, 0, 0.2);
}

.gallery-thumbnails::-webkit-scrollbar {
    height: 6px;
}

.gallery-thumbnails::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
}

.gallery-thumbnails::-webkit-scrollbar-thumb {
    background-color: #beaf87;
    border-radius: 3px;
}

.thumbnail {
    flex: 0 0 auto;
    width: 120px;
    height: 80px;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.3s;
    border: 2px solid transparent;
    margin-right: 5px;
}

.thumbnail:hover {
    opacity: 0.8;
}

.thumbnail.active {
    opacity: 1;
    border-color: #beaf87;
}

.thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-actions {
    position: absolute;
    top: 20px;
    right: 20px;
    display: flex;
    gap: 15px;
    z-index: 100;
}

.action-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s;
}

.action-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

.action-btn i {
    font-size: 20px;
}

.gallery-nav {
    position: absolute;
    top: 40%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    z-index: 90;
    pointer-events: none;
}

.nav-btn {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: #fff;
    border: none;
    cursor: pointer;
    transition: background 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
}

.nav-btn:hover {
    background: rgba(0, 0, 0, 0.8);
}

@media (max-width: 768px) {
    .property-gallery-wrapper {
        height: 400px;
    }

    .thumbnail {
        width: 80px;
        height: 60px;
    }

    .main-gallery {
        height: calc(100% - 80px);
    }
}

/* Estilos do Modal */
.gallery-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1000;
}

.modal-content {
    position: relative;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#fullModalImage {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #fff;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1001;
}

.modal-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
}

.modal-nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Estilos do Modal Popup */
.popup-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
}

.popup-content {
    position: relative;
    width: 90%;
    max-width: 1200px;
    height: 90vh;
    margin: 2% auto;
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    animation: modalOpen 0.3s ease-out;
}

@keyframes modalOpen {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.popup-header {
    padding: 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.popup-title {
    font-size: 1.2em;
    color: #333;
}

.popup-close {
    cursor: pointer;
    font-size: 24px;
    color: #666;
    background: none;
    border: none;
    padding: 0 10px;
}

.popup-close:hover {
    color: #000;
}

.popup-body {
    height: calc(100% - 60px);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
}

.popup-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.popup-nav {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
}

.popup-nav-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: auto;
    transition: background 0.3s;
}

.popup-nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Estilos do Popup */
.custom-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    display: none;
}

.custom-popup-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

#customPopupImage {
    max-width: 90%;
    max-height: 90vh;
    object-fit: contain;
}

.custom-popup-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 30px;
    cursor: pointer;
    z-index: 10000;
}

.custom-popup-prev,
.custom-popup-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 15px;
    cursor: pointer;
    font-size: 20px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-popup-prev { left: 20px; }
.custom-popup-next { right: 20px; }

.custom-popup-prev:hover,
.custom-popup-next:hover {
    background: rgba(255, 255, 255, 0.3);
}