html {
  scrollbar-gutter: stable;
}

.imovel-page-container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto 0 auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  padding-bottom: 7.5rem; /* Respiro para a barra fixa inferior não sobrepor o conteúdo no mobile */
}

/* Padding lateral para as seções de conteúdo no Mobile */
.imovel-header-section,
.imovel-content-layout,
.imovel-reviews-section,
.imovel-rules-info-section,
.imovel-location-section {
  padding-left: 1.2rem;
  padding-right: 1.2rem;
}

@media (min-width: 768px) {
  .imovel-page-container {
    display: block;
    padding: 1.5rem 0 4rem;
    margin-top: 75px;
  }
}

/* Divisores de Seção */
.section-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 3rem 0;
}

.imovel-reviews-section,
.imovel-location-section {
  border-top: 1px solid var(--color-border);
  margin-top: 1.5rem;
  padding-top: 4rem;
  padding-bottom: 3rem;
}

@media (min-width: 1024px) {
  .section-divider {
    margin: 2rem 0;
  }
  .imovel-reviews-section {
    margin-top: 3rem;
    padding-top: 3rem;
  }
}

/* Placeholders de Loading */
.loading-placeholder {
  background: linear-gradient(
    90deg,
    var(--color-bg-hover) 25%,
    var(--color-border) 50%,
    var(--color-bg-hover) 75%
  );
  background-size: 200% 100%;
  animation: loading-animation 1.5s infinite;
  color: transparent !important;
  border-radius: 4px;
}

@keyframes loading-animation {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.imovel-header-section h1 {
  font-size: var(--font-size-h2);
  letter-spacing: 0;
  line-height: var(--lh-title);
  font-weight: 600;
  text-align: center;
}

.imovel-meta-bar {
  display: none; /* Oculta no mobile */
  flex-direction: column;
  gap: 1rem;
  font-size: var(--font-size-body-sm);
  color: var(--color-text-medium);
  align-items: center;
}

.meta-right {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.meta-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: inherit;
  font-size: var(--font-size-body-sm);
  font-weight: 500;
  color: var(--color-text-dark);
  text-decoration: none; /* Remove o sublinhado */
  padding: 0.2rem 0;
  transition: opacity 0.2s;
}

.meta-btn:hover {
  opacity: 0.7;
}

.meta-btn .material-icons {
  font-size: 1rem; /* Reduz tamanho do ícone */
}

@media (min-width: 768px) {
  .imovel-header-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-top: 0;
  }

  .imovel-header-section h1 {
    text-align: left;
    margin: 0;
  }

  .imovel-meta-bar {
    display: flex;
    align-items: center;
    margin: 0;
  }

  .meta-right {
    display: flex;
    justify-content: flex-end;
  }
}

/* ==========================================================================
   2. Galeria de Fotos
   ========================================================================== */
/* Estilização e reordenação da Galeria de Fotos no Mobile */
.imovel-gallery-section {
  order: 1; /* Força no topo absoluto no mobile */
  margin: 0;
  width: 100%;
}

.imovel-header-section {
  order: 2; /* Fica abaixo da galeria no mobile */
  padding-top: 2rem;
  margin-top: -1.5rem;
  border-radius: 24px;
  z-index: 2;
  background-color: var(--color-bg-canvas);
}

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

/* Badge do Contador no Mobile */
.mobile-gallery-counter {
  position: absolute;
  bottom: 38px;
  right: 12px;
  background-color: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(4px);
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 400;
  padding: 2px 8px;
  border-radius: 4px;
  z-index: 15;
}

/* Mobile: Carrossel de rolagem horizontal */
.mobile-gallery-carousel {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  scrollbar-width: none;
}

.mobile-gallery-carousel::-webkit-scrollbar {
  display: none; /* Safari e Chrome */
}

.mobile-gallery-carousel img {
  flex: 0 0 100%;
  width: 100%;
  height: 370px;
  object-fit: cover;
  scroll-snap-align: start;
}

/* Desktop: Grid Airbnb */
.desktop-gallery-grid {
  display: none;
  grid-template-columns: 1fr 1fr; /* 50% a 50% */
  gap: 8px;
  width: 100%;
  height: 380px; /* Deixa a seção mais fina e compacta para exibir o título e descrição na primeira dobra */
  border-radius: 12px;
  overflow: hidden;
}

.grid-col-left {
  height: 100%;
  width: 100%;
}

.grid-col-left img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: filter 0.3s;
}

.grid-col-left img:hover,
.grid-col-right img:hover {
  filter: brightness(0.9);
}

.grid-col-right {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  height: 100%;
  width: 100%;
}

.grid-col-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: pointer;
  transition: filter 0.3s;
}

/* Botão "Ver todas as fotos" */
.btn-all-photos {
  position: absolute;
  bottom: 16px;
  right: 16px;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  color: var(--color-text-dark);
  justify-content: center;
  padding: 0.4rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 12px;
  cursor: pointer;
  display: none;
  align-items: center;
  gap: 0.4rem;
  transition:
    background-color 0.2s,
    transform 0.1s;
  z-index: 5;
}

.btn-all-photos:hover {
  background-color: var(--white);
}

.btn-all-photos .material-icons {
  font-size: 1.1rem;
}

@media (min-width: 1024px) {
  .imovel-page-container {
    max-width: 1160px; /* 1120px de conteúdo útil + 40px de padding lateral */
    padding-left: 20px;
    padding-right: 20px;
  }

  .imovel-header-section,
  .imovel-content-layout,
  .imovel-reviews-section,
  .imovel-rules-info-section,
  .imovel-location-section {
    padding-left: 0;
    padding-right: 0;
  }

  .mobile-gallery-carousel {
    display: none;
  }

  .desktop-gallery-grid {
    display: grid;
    margin-left: 0;
    margin-right: 0;
  }

  .imovel-gallery-section {
    max-width: 100%;
    margin: 1.2rem auto 0.5rem auto;
  }

  /* Ocultar elementos mobile flutuantes */
  .mobile-gallery-counter {
    display: none !important;
  }

  .btn-all-photos {
    display: flex;
  }
}

/* ==========================================================================
   3. Layout de Colunas (Corpo)
   ========================================================================== */
.imovel-content-layout {
  order: 3;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (min-width: 1024px) {
  .imovel-content-layout {
    grid-template-columns: 2fr 1fr;
    gap: 2.5rem;
  }
}

/* ==========================================================================
   4. Seções da Coluna Esquerda
   ========================================================================== */
.content-column-left {
  width: 100%;
}

/* Descrição */
.imovel-description-section h2,
.imovel-amenities-section h2,
.imovel-calendar-section h2,
.imovel-location-section h2 {
  font-size: var(--font-size-h2);
  letter-spacing: 0px;
  line-height: var(--lh-title);
}

.imovel-description-section h2,
.imovel-amenities-section h2 {
  margin-bottom: 20px;
}

.imovel-calendar-section h2,
.imovel-location-section h2 {
  margin-bottom: 4px;
}

.description-text p {
  font-size: var(--font-size-body);
  line-height: var(--lh-body);
  margin-bottom: 1rem;
  color: var(--color-text-medium);
}

.description-text p:last-child {
  margin-bottom: 0;
}

/* Comodidades */
.amenities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

@media (min-width: 480px) {
  .amenities-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.amenity-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: var(--font-size-body);
  color: var(--color-text-dark);
}

.amenity-item .material-icons {
  font-size: 1.4rem;
  color: var(--color-primary);
}

.btn-all-amenities,
.btn-all-reviews,
.btn-show-more-desc {
  background-color: var(--color-bg-hover);
  color: var(--color-text-dark);
  border: none;
  font-size: var(--font-size-body-sm);
  line-height: var(--lh-title);
  min-width: 112px;
  border-radius: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-all-amenities:hover,
.btn-all-reviews:hover,
.btn-show-more-desc:hover {
  background-color: var(--color-bg-active);
}

.btn-all-amenities:active,
.btn-all-reviews:active,
.btn-show-more-desc:active {
  transform: scale(0.98);
}

.btn-all-amenities,
.btn-all-reviews {
  padding: 14px 24px;
}

/* ==========================================================================
   5. Widget de Reserva (Caixa Lateral) e Calendário
   ========================================================================== */
.content-column-right {
  position: relative;
  width: 100%;
}

/* Widget no Desktop */
.booking-widget-card {
  display: none; /* Fica oculto no mobile, onde entra a barra de rodapé */
  background: var(--color-bg-canvas);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
  border: 1px solid var(--color-border-light);
  border-radius: 24px;
  padding: 1.5rem;
  position: sticky;
  top: 4.8rem; /* Mantém flutuante ao rolar */
  width: 100%;
}

@media (min-width: 1024px) {
  .booking-widget-card {
    display: block;
  }
}

.widget-header {
  margin-bottom: 0.8rem;
}

.price-placeholder {
  font-size: var(--font-size-h3);
  font-weight: 600;
  color: var(--color-text-dark);
  line-height: var(--lh-title);
  display: block;
}

.price-total-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: var(--font-title);
  color: var(--color-text-dark);
}

.price-total-label {
  font-size: var(--font-size-h2);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

.price-original {
  font-size: var(--font-size-h3);
  color: var(--color-text-muted);
  text-decoration: line-through;
  font-weight: 400;
}

.price-discounted {
  font-size: var(--font-size-h3);
  font-weight: 700;
  text-decoration: none;
}

.price-installment {
  font-size: var(--font-size-body-sm);
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* Formulário do Widget */
.widget-form {
  border: 1px solid var(--color-border);
  transition: border-color 0.3s ease;
  border-radius: 14px;
  /* Removido overflow: hidden para permitir que o dropdown flutuante de hóspedes seja exibido */
  margin-bottom: 0.9rem;
}

.widget-form:hover {
  border: 1px solid var(--color-text-medium);
}

.date-inputs-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--color-border);
  transition: border-color 0.3s ease;
  border-radius: 14px 14px 0 0;
  overflow: hidden; /* Garante cantos arredondados no topo do formulário */
}

.date-inputs-group:hover {
  border-bottom: 1px solid var(--color-text-medium);
}

.date-input-field {
  padding: 0.6rem 0.8rem;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.checkin-field {
  border-right: 1px solid var(--color-text-light);
}

.date-input-field label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 0.2rem;
}

.date-input-field span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

.date-input-field span.placeholder-val {
  color: var(--color-text-muted);
}

/* Botão de Submissão */
.btn-book-submit {
  width: 100%;
  background-color: var(--color-primary);
  color: var(--white);
  border: none;
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    transform 0.1s;
  margin-bottom: 0.8rem;
  text-align: center;
}

.btn-book-submit:hover {
  background-color: var(--color-primary-hover);
}

.btn-book-submit:active {
  transform: scale(0.98);
}

.widget-billing-notice {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
  margin-bottom: 1.2rem;
}

/* Detalhamento de Cálculo */
.widget-pricing-details {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  margin-top: 1rem;
  font-size: 0.9rem;
}

.pricing-row {
  display: flex;
  justify-content: space-between;
  color: var(--color-text-medium);
}

.pricing-row-left {
  display: flex;
  flex-direction: column;
}

.pricing-row .row-label {
  text-decoration: none;
  cursor: default;
}

.pricing-row .pricing-subnote {
  display: block;
  font-size: 0.76rem;
  font-weight: 500;
  color: var(--color-text-muted);
  text-decoration: none !important;
  margin-top: 2px;
}

.pricing-divider {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0.3rem 0;
}

.pricing-row.total-row {
  font-weight: 700;
  font-size: 1rem;
  color: var(--color-primary);
}

.pricing-row.total-row .row-label {
  text-decoration: none;
  cursor: default;
}

/* ==========================================================================
   8. Seção de Avaliações
   ========================================================================== */
.imovel-reviews-section {
  width: 100%;
  order: 4;
}

.reviews-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.star-title-icon {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.reviews-header h2 {
  font-size: var(--font-size-h2);
  letter-spacing: 0px;
  font-weight: 600;
  margin-bottom: 0 !important;
  line-height: var(--lh-title);
}

.reviews-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 768px) {
  .reviews-grid {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
  }
}

.review-card {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 1.2rem;
}

.review-author-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.review-author-img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background-color: var(--color-border);
}

.author-name {
  font-size: var(--font-size-body);
  font-weight: 700;
  color: var(--color-text-dark);
}

.review-date {
  font-size: var(--font-size-legend);
  color: var(--color-text-muted);
}

.review-text {
  font-size: var(--font-size-body-sm);
  line-height: var(--lh-body);
  color: var(--color-text-medium);
}

.btn-all-reviews {
  margin-top: 1.75rem;
}

.reviews-modal-header {
  margin-bottom: 2rem;
}

.reviews-modal-header h2 {
  font-size: var(--font-size-h2);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  line-height: var(--lh-title);
}

.reviews-modal-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* ==========================================================================
   9. Seção de Localização e Mapa
   ========================================================================== */
.imovel-location-section {
  width: 100%;
  order: 6;
}

.location-description {
  font-size: var(--font-size-body);
  color: var(--color-text-medium);
  margin-bottom: 1.2rem;
  line-height: var(--lh-body);
}

.map-container-wrapper {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--color-border);
}

.map-container-wrapper iframe {
  display: block;
}

/* ==========================================================================
   10. Barra Fixa Inferior (Mobile Sticky Bottom Bar)
   ========================================================================== */
.mobile-sticky-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-white);
  border-top: 1px solid var(--color-border);
  padding: 0.8rem 1.2rem;
  z-index: 99;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.mobile-sticky-bottom-bar.hidden-by-footer {
  transform: translateY(100%);
  opacity: 0;
  pointer-events: none;
}

.sticky-bar-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.6rem;
  max-width: 768px;
  margin: 0 auto;
}

.sticky-info-wrapper {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
}

.sticky-price-placeholder {
  font-size: 1rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.sticky-reviews-info,
.sticky-reviews-link {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
  display: inline-block;
}

.sticky-price-total {
  display: flex;
  align-items: baseline;
  gap: 6px;
  color: var(--color-text-dark);
}

.sticky-total-label {
  font-size: 1rem;
  font-weight: 700;
}

.sticky-price-original {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: line-through;
}

.sticky-price-discounted {
  font-size: 1.05rem;
  font-weight: 700;
  text-decoration: none;
}

.sticky-dates-summary {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  text-decoration: none;
}

.btn-sticky-book {
  background-color: var(--color-primary);
  color: var(--white);
  border: none;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: 999px; /* Cantos arredondados estilo Airbnb */
  cursor: pointer;
  width: 100%; /* Largura total */
  text-align: center;
  transition: background-color 0.2s;
}

.btn-sticky-book:hover {
  background-color: var(--color-primary-hover);
}

@media (min-width: 1024px) {
  .mobile-sticky-bottom-bar {
    display: none;
  }
}

/* ==========================================================================
   11. Modal Lightbox (Ver todas as fotos)
   ========================================================================== */
.lightbox-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.96);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ocultado no desktop */
.lightbox-header-mobile {
  display: none;
}

.btn-close-lightbox {
  position: absolute;
  top: 20px;
  right: 20px;
  background: transparent;
  border: none;
  color: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: transform 0.2s;
  z-index: 1005;
}

.btn-close-lightbox:hover {
  transform: scale(1.1);
}

.btn-close-lightbox .material-icons {
  font-size: 2rem;
}

.lightbox-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 1100px;
  padding: 0 1rem;
  gap: 1rem;
  position: relative;
}

.lightbox-individual-viewer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.btn-close-individual-mobile {
  display: none;
}

.lightbox-image-container {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.lightbox-image-container img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 15px;
  user-select: none;
}

.lightbox-controls-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  width: 100%;
  z-index: 1003;
  margin-top: 12px;
}

.lightbox-nav {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--white);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    background-color 0.2s,
    border-color 0.2s;
}

.lightbox-nav:hover {
  background-color: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.3);
}

.lightbox-nav .material-icons {
  font-size: 1.5rem;
}

.lightbox-counter {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  font-weight: 500;
  font-family: var(--font-body);
  letter-spacing: 0.5px;
  min-width: 60px;
  text-align: center;
}

/* Ocultado no desktop */
.lightbox-mobile-list {
  display: none;
}

/* Regras de navegação em telas grandes (Desktop) */
@media (min-width: 769px) {
  .lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 52px;
    height: 52px;
  }

  .btn-prev {
    left: 40px;
  }

  .btn-next {
    right: 40px;
  }

  .lightbox-image-container img {
    max-height: 76vh;
  }
}

/* Regras responsivas para Dispositivos Móveis (Mobile) */
@media (max-width: 768px) {
  .lightbox-modal {
    background-color: var(--color-bg-white);
    display: block;
    overflow-y: auto;
  }

  .lightbox-header-mobile {
    position: sticky;
    top: 0;
    width: 100%;
    height: 60px;
    background-color: var(--color-bg-white);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 1rem;
    z-index: 1010;
  }

  .btn-back-lightbox,
  .btn-share-lightbox {
    background: transparent;
    border: none;
    color: var(--color-text-dark);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0.5rem;
  }

  .btn-back-lightbox .material-icons,
  .btn-share-lightbox .material-icons {
    font-size: 1.2rem;
  }

  .btn-close-lightbox {
    display: none;
  }

  .lightbox-content {
    padding: 0;
    gap: 0;
  }

  /* Modo Mobile Nível 1: Galeria Vertical */
  .lightbox-mobile-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    padding: 8px 16px 32px 16px;
    gap: 8px;
    background-color: var(--color-bg-white);
  }

  .lightbox-mobile-list img {
    width: 100%;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
  }

  /* Fotos grandes: ocupam toda a largura e intercalam em progressão aritmética 3n+1 (1, 4, 7, 10...) */
  .lightbox-mobile-list img:nth-child(3n + 1) {
    grid-column: span 2;
    height: 220px;
  }

  /* Fotos pequenas: ficam lado a lado e ocupam meia largura */
  .lightbox-mobile-list img:not(:nth-child(3n + 1)) {
    grid-column: span 1;
    height: 130px;
  }

  /* Modo Mobile Nível 2: Visualizador Individual */
  .lightbox-individual-viewer {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #000000;
    z-index: 1020;
    display: none; /* Controlado via JS */
    align-items: center;
    justify-content: center;
  }

  .btn-close-individual-mobile {
    position: absolute;
    top: 16px;
    right: 16px;
    background: transparent;
    border: none;
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 0;
    z-index: 1025;
  }

  .btn-close-individual-mobile .material-icons {
    font-size: 24px;
  }

  .lightbox-individual-viewer .lightbox-image-container img {
    max-width: 96%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 6px;
  }

  .lightbox-individual-viewer .lightbox-controls-bar {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
  }

  /* Oculta as setas de navegação do carrossel no mobile, usando apenas swipe */
  .lightbox-individual-viewer .lightbox-controls-bar .lightbox-nav {
    display: none;
  }
}

/* ==========================================================================
   10. Customizações de Cabeçalho Mobile e Controles Flutuantes
   ========================================================================== */

/* Ocultar o cabeçalho padrão (logo e menu) apenas no mobile nesta página */
header {
  display: none;
}

@media (min-width: 768px) {
  header {
    display: block;
  }
}

/* Botões Flutuantes Glassmorphism no Mobile */
.mobile-floating-controls {
  position: absolute;
  top: 16px;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 10;
  pointer-events: none;
}

.btn-floating-back,
.btn-floating-share {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  color: var(--color-text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Ocultar controles flutuantes no desktop */
@media (min-width: 768px) {
  .mobile-floating-controls {
    display: none !important;
  }
}

/* ==========================================================================
   12. Modais Customizados (Descrição & Comodidades)
   ========================================================================== */
.custom-modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end; /* Mobile: encosta na base (bottom) da tela */
  justify-content: center;
  z-index: 1100;
  padding: 0; /* Mobile: sem paddings laterais */
}

.modal-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.3);
}

.modal-box {
  position: relative;
  background-color: var(--color-bg-white);
  width: 100%;
  max-width: 100%; /* Mobile: ocupa 100% da largura */
  height: 98vh; /* Fallback */
  height: 98dvh; /* Mobile Safari: viewport dinâmico respeitando barras do navegador */
  max-height: 98vh;
  max-height: 98dvh;
  border-radius: 35px 35px 0 0; /* Cantos superiores arredondados, retos nas laterais/base */
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: none;
  z-index: 10;
  animation: modal-slide-up 0.35s cubic-bezier(0.25, 0.8, 0.25, 1); /* Animação nativa de deslizar de baixo */
}

@keyframes modal-slide-up {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

.modal-header-space {
  height: 50px; /* Altura do cabeçalho bem fino que cobre a rolagem de texto e o botão fechar */
  background-color: var(--color-bg-white);
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 12;
  pointer-events: none;
}

.btn-close-modal {
  position: absolute;
  top: 14px;
  left: 18px;
  right: auto;
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--color-text-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem;
  transition: all 0.3s;
  z-index: 15;
  border-radius: 50%;
}

.btn-close-modal:hover {
  background-color: var(--color-primary-light);
}

.btn-close-modal .material-icons {
  font-size: 1.1rem;
}

.modal-body {
  padding: 4.3rem 1.2rem 2.5rem 1.2rem;
  overflow-y: auto;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-medium);
}

.modal-body h2 {
  font-size: 1.6rem;
  font-weight: 600;
  margin-top: 0;
  margin-bottom: 2rem;
}

.modal-body p {
  margin-bottom: 1.2rem;
  line-height: 1.65;
}

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

/* Estilos de Comodidades no Modal */
.amenities-modal-list {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.amenity-modal-category-block {
  text-align: left;
}

.amenity-modal-category-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-top: 0;
  margin-bottom: 1.2rem;
}

.amenity-modal-category-list {
  display: flex;
  flex-direction: column;
}

.amenity-modal-item {
  display: flex;
  align-items: flex-start;
  gap: 1.2rem;
  padding: 1.2rem 0;
  border-bottom: 1px solid var(--color-border); /* Separador var(--color-border) */
  box-sizing: border-box;
}

.amenity-modal-item:last-child {
  border-bottom: 1px solid var(--color-border);
}

.amenity-modal-item .material-icons {
  font-size: 1.6rem;
  color: var(--color-primary);
  margin-top: 2px;
}

.amenity-item-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: left;
}

.amenity-item-name {
  font-size: 1rem;
  font-weight: 400;
  color: var(--color-text-dark);
}

.amenity-item-sub {
  font-size: 14px !important; /* Fonte 14 pixels */
  color: var(--color-text-muted) !important; /* Cor var(--color-text-muted) */
  line-height: 1.45;
}

/* Estilo para itens indisponíveis (Risco no ícone e texto + Opacidade reduzida) */
.amenity-modal-item.item-unavailable {
  opacity: 0.8;
}

.amenity-modal-item.item-unavailable .material-icons {
  text-decoration: line-through; /* Risco no ícone */
  color: var(--color-text-muted);
}

.amenity-modal-item.item-unavailable .amenity-item-name {
  text-decoration: line-through; /* Risco na frase */
  color: var(--color-text-muted);
}

.amenity-modal-item.item-unavailable .amenity-item-sub {
  text-decoration: line-through; /* Risco no subtítulo */
}

/* Botão "Mostrar mais" na descrição */
.btn-show-more-desc {
  padding: 14px 12px 14px 24px;
  margin-top: 1rem;
}

@keyframes modal-slide-in {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.host-info-bar {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 0.2rem;
  padding-bottom: 1rem;
  margin-top: 0;
  width: 100%;
}

.host-text-details {
  width: 100%;
  text-align: center;
}

.host-text-details h2 {
  font-family: var(--font-body);
  font-size: 14px;
  letter-spacing: 0px;
  font-weight: 400;
  color: var(--color-text-dark);
  opacity: 0.7;
  margin: 0.4rem 0 0 0;
  line-height: 1.2;
}

.host-text-details p {
  font-size: 14px;
  color: var(--color-text-dark);
  opacity: 0.7;
  margin: 0;
  padding-top: 0.2rem;
}

@media (min-width: 768px) {
  .host-info-bar {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
    padding-top: 0;
    padding-bottom: 3rem;
    margin-top: 0;
  }
  .host-text-details {
    width: auto;
    text-align: left;
  }
  .host-text-details h2 {
    font-size: 1.5rem;
    font-weight: 600;
    opacity: 1;
  }
  .host-text-details p {
    opacity: 1;
    color: var(--color-text-medium);
  }
}

@media (min-width: 1024px) {
  .host-info-bar {
    padding-bottom: 1.5rem;
  }
}

.section-divider-thin {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 0;
}

.imovel-highlights-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 3rem 0 0 0;
}

@media (min-width: 1024px) {
  .imovel-highlights-list {
    padding: 1.5rem 0 0 0;
  }
}

.highlight-item {
  display: flex;
  gap: 1.2rem;
  align-items: flex-start;
}

.highlight-icon {
  font-size: 1.8rem;
  color: var(--color-text-dark);
  margin-top: 2px;
}

.highlight-text-box h3 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin: 0 0 0.15rem 0;
}

.highlight-text-box p {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* ==========================================================================
   13. Bloco de Destaques do Bairro (Abaixo do mapa principal)
   ========================================================================== */
.neighborhood-highlights-block {
  margin-top: 1rem;
  text-align: left;
  padding-top: 1rem;
}

.neighborhood-highlights-block h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-text-dark);
  opacity: 0.9;
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.neighborhood-highlights-summary {
  font-size: 1rem;
  line-height: 1.4;
  color: var(--color-text-medium);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-show-more-neighborhood {
  background: transparent;
  border: none;
  color: var(--color-text-dark);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  margin-top: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: opacity 0.2s;
  font-family: inherit;
}

.btn-show-more-neighborhood:hover {
  opacity: 0.9;
}

/* ==========================================================================
   14. Modal Detalhado do Bairro (Estilo Airbnb Tela Cheia)
   ========================================================================== */

.neighborhood-modal-content {
  display: grid;
  grid-template-columns: 1fr;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.neighborhood-modal-left {
  padding: 3.6rem 2rem 2rem 2rem; /* Padding superior para dar espaço ao botão fechar fixo no topo esquerdo */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  height: 100%;
  min-height: 0;
  box-sizing: border-box;
  background-color: var(--color-bg-white);
}

.neighborhood-modal-left h2 {
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-top: 0;
  margin-bottom: 2.5rem;
}

.neighborhood-modal-section {
  margin-bottom: 2.5rem;
}

.neighborhood-modal-section:last-child {
  margin-bottom: 0;
}

.neighborhood-modal-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-dark);
  margin-top: 0;
  margin-bottom: 1rem;
}

.neighborhood-modal-section p {
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-text-medium);
  margin: 0 0 1.2rem 0;
}

.neighborhood-modal-section p:last-child {
  margin-bottom: 0;
}

.neighborhood-modal-right {
  display: none;
  position: relative;
  height: 100%;
  width: 100%;
  padding: 24px; /* Margem em cima, baixo e laterais do mapa */
  box-sizing: border-box;
}

.neighborhood-modal-right iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 16px; /* Bordas arredondadas do mapa */
}

/* Barra de rolagem minimalista para os modais */
.modal-body::-webkit-scrollbar,
.neighborhood-modal-left::-webkit-scrollbar {
  width: 8px;
  display: block;
}

.modal-body::-webkit-scrollbar-track,
.neighborhood-modal-left::-webkit-scrollbar-track {
  background: transparent;
}

.modal-body::-webkit-scrollbar-thumb,
.neighborhood-modal-left::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 4px;
}

.modal-body::-webkit-scrollbar-thumb:hover,
.neighborhood-modal-left::-webkit-scrollbar-thumb:hover {
  background-color: rgba(0, 0, 0, 0.35);
}

@media (min-width: 768px) {
  .custom-modal {
    align-items: center; /* Centraliza verticalmente no desktop */
    padding: 1rem;
  }

  .modal-box {
    height: auto;
    max-height: 85vh; /* Card de até 85% de altura no desktop */
    max-width: 780px;
    border-radius: 35px;
    box-shadow: none;
    animation: modal-slide-in 0.4s ease-out; /* Animação clássica de fade e escala */
  }

  /* No desktop, forçar o modal do bairro a ser tela cheia estilo Airbnb */
  .neighborhood-modal {
    padding: 0 !important;
  }

  .neighborhood-modal-box {
    width: 100% !important;
    max-width: 100% !important;
    height: 100vh !important;
    max-height: 100vh !important;
    border-radius: 0 !important;
    margin: 0 !important;
  }

  .neighborhood-modal-content {
    grid-template-columns: 420px 1fr; /* Largura fixa de 420px para o texto e restante para o mapa */
  }

  .neighborhood-modal-left {
    padding: 5rem 2.5rem 3rem 2.5rem; /* Padding superior mantido no desktop para dar espaço ao botão fechar */
  }

  .neighborhood-modal-right {
    display: block;
  }

  .neighborhood-modal .modal-header-space {
    width: 420px;
    right: auto;
  }
}

@media (min-width: 1200px) {
  .neighborhood-modal-content {
    grid-template-columns: 500px 1fr; /* Um pouco mais largo para telas bem grandes */
  }

  .neighborhood-modal .modal-header-space {
    width: 500px;
  }
}

/* ==========================================================================
   WIDGET CUSTOM GUESTS DROPDOWN (Estilo Airbnb)
   ========================================================================== */
.custom-guests-dropdown {
  position: relative;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--color-border-light, #e0e0e0);
  padding: 10px 14px;
  border-radius: 0 0 14px 14px;
}

.custom-guests-dropdown label {
  font-size: 0.55rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--color-text-dark, #222);
  margin-bottom: 2px;
}

.guests-dropdown-trigger {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
  color: var(--color-text-medium, #222);
  cursor: pointer;
  padding: 4px 0;
  min-height: 24px;
  user-select: none;
}

.guests-dropdown-trigger .trigger-chevron {
  font-size: 1.25rem;
  color: var(--color-text-dark, #222);
  transition: transform 0.25s ease;
}

.custom-guests-dropdown.open .trigger-chevron {
  transform: rotate(180deg);
}

.guests-dropdown-panel {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background-color: var(--color-bg-white, #fff);
  border: 1px solid var(--color-border-light, #ccc);
  border-radius: 15px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  padding: 8px 16px;
  z-index: 100;
  margin-top: 4px;
}

.guest-type-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
}

.guest-type-row:nth-last-child(2) {
  border-bottom: none;
}

.guest-type-info {
  display: flex;
  flex-direction: column;
  padding-right: 8px;
}

.guest-type-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark, #222);
}

.guest-type-desc {
  font-size: 0.75rem;
  color: var(--color-text-muted, #717171);
  margin-top: 1px;
}

.guest-type-controls {
  display: flex;
  align-items: center;
  gap: 12px;
  user-select: none;
}

.btn-guest-control {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid #b0b0b0;
  background-color: transparent;
  color: #717171;
  font-size: 1.1rem;
  font-weight: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.btn-guest-control:hover:not(:disabled) {
  border-color: #222;
  color: #222;
}

.btn-guest-control:disabled {
  opacity: 0.25;
  cursor: not-allowed;
  border-color: #e0e0e0;
}

.guest-count-val {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-dark, #222);
  min-width: 18px;
  text-align: center;
}

.guests-dropdown-footer {
  padding: 10px 0 6px 0;
  border-top: 1px solid #e8e8e8;
}

.guests-dropdown-footer p {
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--color-text-muted, #717171);
  margin: 0;
}

.widget-capacity-note {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.45rem 0 0.65rem 0;
  padding: 0.2rem 0;
  background: transparent;
  border: none;
  font-size: 0.75rem;
  line-height: 1.35;
  color: var(--color-text-muted, #717171);
}

.widget-capacity-note .capacity-note-icon {
  font-size: 0.95rem;
  color: #94a3b8;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ==========================================================================
   Seção O que você deve saber (Regras, Segurança e Cancelamento)
   ========================================================================== */
.imovel-rules-info-section {
  width: 100%;
  order: 5; /* Fica exatamente entre Avaliações (order: 4) e Localização (order: 6) no mobile */
  border-top: 1px solid var(--color-border);
  margin-top: 1.5rem;
  padding-top: 3rem;
  padding-bottom: 2rem;
}

.imovel-rules-info-section h2 {
  font-size: var(--font-size-h2);
  margin-bottom: 1.4rem;
  font-weight: 600;
  color: var(--color-text-dark);
}

.rules-info-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
}

@media (min-width: 768px) {
  .rules-info-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
  }
}

.rules-info-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.column-top-icon {
  font-size: 1.75rem;
  width: 1.75rem;
  height: 1.75rem;
  color: var(--color-primary);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.rules-info-col h3 {
  font-size: var(--font-size-body);
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--color-text-dark);
}

.rules-summary-content {
  margin-bottom: 0.4rem;
  font-size: 0.9rem;
  color: var(--color-text-medium);
  line-height: 1.6;
  width: 100%;

}

.rules-summary-content p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-text-medium);
  line-height: 1.6;
  max-width: 290px;
}

.rules-summary-content p:last-child {
  margin-bottom: 0;
}

.btn-show-rules-link {
  background: transparent;
  border: none;
  color: var(--color-text-dark);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  padding: 0;
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  transition: opacity 0.2s;
  font-family: inherit;
}

.btn-show-rules-link:hover {
  opacity: 0.7;
}

/* Modais de regras detalhadas */
.modal-section-block {
  margin-bottom: 2rem;
}

.modal-section-block h3 {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--color-text-dark);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 0.5rem;
}

.modal-section-block p {
  font-size: 1rem;
  color: var(--color-text-medium);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-rules-detailed-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.modal-rules-detailed-list li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  font-size: 1rem;
  color: var(--color-text-medium);
  line-height: 1.5;
  width: 100%;
}

.modal-rules-detailed-list li span.material-icons {
  font-size: 1.5rem;
  color: var(--color-text-dark);
  margin-top: 2px;
  flex-shrink: 0;
}

.modal-rule-text {
  flex: 1;
  min-width: 0;
  word-break: break-word;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.modal-rule-text strong {
  color: var(--color-text-dark);
  font-weight: 600;
  font-size: 1rem;
}

.modal-rule-text span {
  color: var(--color-text-medium);
  font-size: 0.95rem;
  line-height: 1.5;
}

.modal-rules-bullet-list {
  list-style-type: disc;
  padding-left: 1.5rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.modal-rules-bullet-list li {
  font-size: 1rem;
  color: var(--color-text-medium);
  line-height: 1.6;
}
