/* ==========================================================================
   Thawany Motta Imóveis — Property Detail Page
   ========================================================================== */

/* ---------- Hero Gallery / OwlCarousel ---------- */
.hero-gallery {
  background: linear-gradient(180deg, #f8f3ec 0, #f4ede2 100%);
  padding: 1.5rem 0 1rem;
}
.owl-carousel { position: relative; }
#propertyCarousel .owl-stage-outer { overflow: hidden; }
#propertyCarousel .owl-stage { padding-left: 0 !important; }
.owl-nav button.owl-prev,
.owl-nav button.owl-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  background: #fff !important;
  color: var(--color-text-primary) !important;
  border: 1px solid rgba(47,36,31,.12) !important;
  box-shadow: var(--shadow-sm);
  display: grid;
  place-items: center;
  z-index: 3;
  font-size: 32px !important;
  line-height: 1 !important;
}
.owl-nav button.owl-prev { left: -18px; }
.owl-nav button.owl-next { right: -18px; }
.owl-dots { margin-top: 1rem; }
.owl-dots .owl-dot span {
  width: .6rem;
  height: .6rem;
  background: #d0c7bd;
  border-radius: 50%;
}
.owl-dots .owl-dot.active span { background: var(--color-text-primary); }
.carousel-wrap { max-width: 1280px; margin: 0 auto; }
#propertyCarousel .owl-item {
  display: flex;
}
.slide-card {
  width: 100%;
  height: 552px;
  overflow: hidden;
  border-radius: 0 !important;
  box-shadow: var(--shadow-sm);
  background: #ddd;
  cursor: zoom-in;
}
.slide-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0 !important;
}
.slide-card--single {
  cursor: default;
}

/* ---------- Details Section ---------- */
.details-wrap { background: #f0e8de; }
.detail-header {
  position: relative;
  text-align: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.detail-header .meta-badge {
  position: absolute;
  top: 0;
  left: 0;
}
.detail-header .property-title {
  max-width: 18ch;
  margin: 0 auto;
}
.detail-header .subhead {
  max-width: 40ch;
  margin: .75rem auto 0;
}
.detail-body {
  margin-top: 0;
}
.sticky-sidebar {
  position: sticky;
  top: 6.5rem;
}
.sidebar-price-title {
  margin: 0 0 1rem;
  line-height: 1.15;
}
.sidebar-cta {
  background: #fff;
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}
.sidebar-cta .price-box {
  background: transparent;
  padding: 0;
  box-shadow: none;
}
.sidebar-cta-actions {
  display: grid;
  gap: .85rem;
  margin-top: 1.75rem;
  padding-top: .35rem;
}
.price-value {
  font-size: clamp(1.55rem, 2.8vw, 2.2rem);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
  white-space: nowrap;
}
.price-installment {
  margin-top: .5rem;
  color: var(--color-text-secondary);
  font-size: .92rem;
}
.share-box .share-title {
  font-weight: 700;
  margin-bottom: .75rem;
}
.share-buttons {
  display: flex;
  align-items: center;
  gap: .65rem;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: var(--color-text-primary);
  box-shadow: none;
  border-radius: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}
.share-btn:hover,
.share-btn:focus {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: var(--color-brand-primary);
  outline: none;
}
.share-btn svg {
  width: 20px;
  height: 20px;
}
.section-title-sm {
  font-size: clamp(1.7rem, 2.8vw, 2.6rem);
}
.details-wrap h1.property-title {
  font-size: clamp(2rem, 3.5vw, 4rem);
}
.subhead {
  color: var(--color-text-secondary);
  font-size: 1.1rem;
  margin-top: .5rem;
}
.meta-badge {
  display: inline-flex;
  align-items: center;
  padding: .35rem .75rem;
  border: 1px solid var(--color-border-default);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: var(--color-brand-primary);
  color: #fff;
  border-color: transparent;
}

/* ---------- Related listings (mesmo padrão da listagem) ---------- */
.related-section .property-card {
  display: flex;
  flex-direction: column;
}
.related-section .property-media {
  aspect-ratio: 16 / 11;
  background: #ddd;
  flex: none;
}
.related-section .property-body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 1.2rem;
}
.related-section .property-title {
  font-size: 1.45rem;
  line-height: 1.02;
  margin-bottom: .5rem;
}
.related-section .property-address {
  color: var(--color-text-secondary);
  font-size: .94rem;
  margin-bottom: .8rem;
}
.related-section .property-specs {
  display: flex;
  flex-wrap: wrap;
  gap: .9rem;
  font-size: .84rem;
  color: var(--color-text-primary);
  margin-bottom: .9rem;
}
.related-section .property-specs span {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}
.related-section .property-price {
  font-size: 1.55rem;
  line-height: 1;
  margin-bottom: 1rem;
}
.related-section .property-actions {
  display: flex;
  gap: .7rem;
  flex-wrap: nowrap;
  margin-top: auto;
  width: 100%;
}
.related-section .property-actions .btn,
.related-section .property-actions .ghost-link {
  flex: 1 1 0;
  width: auto;
  min-width: 0;
  justify-content: center;
  text-align: center;
}
.related-section .ghost-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: .8rem 1rem;
  border: 1px solid rgba(47,36,31,.12);
  font-weight: 700;
}

/* ---------- Feature List ---------- */
.feature-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.feature-item {
  display: flex;
  gap: .8rem;
  align-items: flex-start;
  padding: 1rem;
  border: 1px solid rgba(47,36,31,.08);
  background: #fff;
  border-radius: 0 !important;
}
.feature-item .icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--color-surface-base);
  flex: none;
  color: var(--color-brand-primary, #3f2419);
}
.feature-item .icon svg,
.feature-item .icon .tm-icon {
  width: 20px;
  height: 20px;
  display: block;
}

/* ---------- Detail Text ---------- */
.detail-text p { margin-bottom: 1rem; }
.detail-text ul { padding-left: 1.2rem; }
.mais-detalhes-text {
  white-space: pre-line;
  line-height: 1.7;
  font-family: var(--font-body);
  font-variant-emoji: emoji;
}
.mais-detalhes-text img.emoji {
  display: inline;
  width: 1.15em;
  height: 1.15em;
  margin: 0 .05em;
  vertical-align: -0.15em;
  border: 0;
  box-shadow: none;
}

/* ---------- Gallery Grid ---------- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.gallery-grid img {
  aspect-ratio: 1.1;
  object-fit: cover;
  width: 100%;
  border-radius: 0 !important;
  box-shadow: var(--shadow-sm);
}

/* ---------- Image Modal / Lightbox ---------- */
.image-modal {
  position: fixed;
  inset: 0;
  background: rgba(14,10,8,.88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
}
.image-modal.is-open { display: flex; }
.image-modal img {
  max-width: min(1200px, 95vw);
  max-height: 78vh;
  object-fit: contain;
  box-shadow: var(--shadow-md);
  border-radius: 0 !important;
  background: #000;
}
.image-modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,255,255,.3);
  background: #fff;
  color: var(--color-text-primary);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  line-height: 1;
  border-radius: 0 !important;
}
.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.25);
  background: #fff;
  color: var(--color-text-primary);
  display: grid;
  place-items: center;
  font-size: 2rem;
  line-height: 1;
  border-radius: 0 !important;
  box-shadow: var(--shadow-md);
}
.modal-prev { left: 1rem; }
.modal-next { right: 1rem; }
.modal-thumbs {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  display: flex;
  gap: .5rem;
  overflow: auto;
  padding-bottom: .25rem;
}
.modal-thumbs .t {
  flex: 0 0 auto;
  width: 72px;
  height: 52px;
  opacity: .55;
  border: 2px solid transparent;
  overflow: hidden;
  background: #fff;
}
.modal-thumbs .t.active {
  opacity: 1;
  border-color: #fff;
}
.modal-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Detail Page Responsive ---------- */
@media (max-width: 991.98px) {
  .feature-list { grid-template-columns: 1fr; }
  .gallery-grid { grid-template-columns: 1fr 1fr; }
  .carousel-wrap { max-width: 100%; }
  .slide-card { height: 480px; }
}

@media (max-width: 767.98px) {
  .gallery-grid { grid-template-columns: 1fr; }
  .hero-gallery { padding: 1rem 0 1rem; }
  .owl-nav button.owl-prev { left: 2px; }
  .owl-nav button.owl-next { right: 2px; }
  .slide-card { height: min(420px, 75vh); }
  .details-wrap h1.property-title { font-size: clamp(1.8rem, 8vw, 2.8rem); }
  .detail-header .meta-badge {
    position: static;
    margin: 0 auto 1rem;
  }
  .detail-header .property-title { max-width: none; }
}

@media (max-width: 575.98px) {
  .sidebar-cta { padding: 1rem; }
  .feature-list { gap: .75rem; }
  .feature-item { padding: .85rem; }
  .slide-card { height: min(380px, 70vh); }
}
