/* صفحة تفاصيل العقار */
.qre-property-detail {
  --qre-coral: #ff5a3c;
  --qre-coral-d: #e04a30;
  --qre-wa: #25d366;
  --qre-wa-d: #1ebe57;
  --qre-heading: #071c1f;
  --qre-muted: #5c727d;
  --qre-border: #e5eaee;
  --qre-radius: 1rem;
  --qre-shadow: 0 4px 24px rgba(7, 28, 31, 0.08);
}

/* معرض صور */
.qre-pd-gallery {
  max-width: 100%;
  margin-bottom: 2.5rem;
  padding: 0 0.75rem;
}

/* داخل بطاقة الصفحة الرئيسية — نفس أنماط المعرض بدون هوامش صفحة التفاصيل */
.qre-pd-gallery--card {
  --qre-coral: #ff5a3c;
  --qre-radius: 1rem;
  --qre-shadow: 0 4px 24px rgba(7, 28, 31, 0.08);
  margin-bottom: 0;
  padding: 0;
}

.qre-pd-hero--card {
  max-height: none;
  min-height: 200px;
  margin-bottom: 0.65rem;
}

@media (min-width: 576px) {
  .qre-pd-hero--card {
    min-height: 240px;
  }
}

@media (min-width: 992px) {
  .qre-pd-hero--card {
    min-height: 280px;
  }
}

.qre-pd-gallery-subtitle {
  letter-spacing: 0.02em;
}

.qre-pd-hero {
  position: relative;
  border-radius: var(--qre-radius);
  overflow: hidden;
  background: #e8ecee;
  box-shadow: var(--qre-shadow);
  margin-bottom: 1.25rem;
  aspect-ratio: 16 / 9;
  min-height: 280px;
  max-height: 72vh;
}

.qre-pd-lightbox-trigger {
  cursor: zoom-in;
}

.qre-pd-lb-content {
  background: #0f172a;
  color: #fff;
}

.qre-pd-lb-img {
  max-height: min(85vh, 900px);
  width: auto;
  margin: 0 auto;
}

.qre-pd-hero a {
  display: block;
  width: 100%;
  height: 100%;
}

.qre-pd-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  vertical-align: middle;
  transition: transform 0.45s ease;
}

.qre-pd-hero a:hover img {
  transform: scale(1.02);
}

.qre-pd-lc-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* شبكة الصور تحت الصورة الكبيرة — أكبر من المصغّرات السابقة، عمودان ثم 3–4 */
.qre-pd-thumbs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  width: 100%;
  margin-top: 0.25rem;
}

@media (min-width: 576px) {
  .qre-pd-thumbs {
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
  }
}

@media (min-width: 992px) {
  .qre-pd-thumbs {
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
  }
}

.qre-pd-thumbs a,
.qre-pd-thumbs button.qre-pd-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  min-height: 0;
  border-radius: 0.55rem;
  overflow: hidden;
  border: 2px solid transparent;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s ease;
  padding: 0;
  background: #e8ecee;
  cursor: pointer;
  font: inherit;
}

.qre-pd-thumbs button.qre-pd-thumb:hover {
  transform: translateY(-2px);
}

.qre-pd-thumbs a:hover,
.qre-pd-thumbs a.is-active,
.qre-pd-thumbs button.qre-pd-thumb:hover,
.qre-pd-thumbs button.qre-pd-thumb.is-active {
  border-color: var(--qre-coral);
  box-shadow: 0 2px 12px rgba(255, 90, 60, 0.25);
}

.qre-pd-thumbs a img,
.qre-pd-thumbs button.qre-pd-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* المحتوى */
.qre-pd-main {
  padding-bottom: 3rem;
}

.qre-pd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.qre-pd-badges .badge {
  background: linear-gradient(135deg, var(--qre-coral) 0%, #cb3421 100%);
  color: #fff;
  font-weight: 600;
  padding: 0.35em 0.9em;
  border-radius: 999px;
  font-size: 0.85rem;
}

.qre-pd-title {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 800;
  color: var(--qre-heading);
  line-height: 1.35;
  margin-bottom: 0.5rem;
}

.qre-pd-meta {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  color: var(--qre-muted);
  font-size: 0.95rem;
}

.qre-pd-meta li {
  margin-bottom: 0.4rem;
  display: flex;
  align-items: flex-start;
  gap: 0.4rem;
}

.qre-pd-meta i {
  color: var(--qre-coral);
  margin-top: 0.15rem;
}

.qre-pd-meta-views .qre-pd-views-count {
  font-weight: 800;
  color: var(--qre-heading);
  font-variant-numeric: tabular-nums;
  margin-inline-start: 0.2rem;
}

.qre-pd-section-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--qre-heading);
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--qre-border);
}

.qre-pd-desc {
  color: #333;
  line-height: 1.9;
  font-size: 1.02rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* خريطة */
.qre-pd-map-wrap {
  position: relative;
  border-radius: var(--qre-radius);
  overflow: hidden;
  box-shadow: var(--qre-shadow);
  background: #e8ecee;
  min-height: 360px;
  border: 1px solid var(--qre-border);
  margin-top: 0.5rem;
}

.qre-pd-map-wrap iframe {
  display: block;
  width: 100%;
  min-height: 360px;
  height: 420px;
  border: 0;
}

.qre-pd-map-fallback {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--qre-muted);
}

/* الشريط الجانبي */
.qre-pd-sticky {
  position: -webkit-sticky;
  position: sticky;
  top: 1.25rem;
}

.qre-pd-card {
  background: #fff;
  border: 1px solid var(--qre-border);
  border-radius: var(--qre-radius);
  box-shadow: var(--qre-shadow);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1.25rem;
}

.qre-pd-card--price .qre-pd-price {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--qre-heading);
  margin: 0;
}

.qre-pd-card--price .qre-pd-currency {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--qre-muted);
  margin-right: 0.35rem;
}

.qre-pd-cta {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.qre-pd-cta a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 50px;
  padding: 0.65rem 1rem;
  border-radius: 0.65rem;
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: 2px solid transparent;
}

.qre-pd-cta a:hover {
  transform: translateY(-2px);
}

.qre-pd-btn--wa {
  background: var(--qre-wa);
  color: #fff;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.35);
}

.qre-pd-btn--wa:hover {
  background: var(--qre-wa-d);
  color: #fff;
}

.qre-pd-btn--phone {
  background: #0b2c3d;
  color: #fff;
  box-shadow: 0 4px 16px rgba(11, 44, 61, 0.25);
}

.qre-pd-btn--phone:hover {
  color: #fff;
  background: #133236;
}

.qre-pd-btn--form {
  background: var(--qre-coral);
  color: #fff;
  box-shadow: 0 4px 16px rgba(255, 90, 60, 0.3);
}

.qre-pd-btn--form:hover {
  background: var(--qre-coral-d);
  color: #fff;
}

.qre-pd-cta a .bi-whatsapp {
  font-size: 1.2rem;
}

.qre-pd-map-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--qre-coral);
  font-size: 0.95rem;
}

.qre-pd-map-link:hover {
  text-decoration: underline;
}

@media (max-width: 991px) {
  .qre-pd-sticky {
    position: static;
  }
}

@media (max-width: 767.98px) {
  .qre-pd-gallery {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .qre-pd-hero {
    min-height: 220px;
    max-height: 58vh;
  }

  .qre-pd-map-wrap {
    min-height: 280px;
  }

  #qre-property-detail-map {
    height: 300px !important;
    min-height: 280px !important;
  }

  .qre-pd-card {
    padding: 1.1rem 1.15rem;
  }

  .qre-pd-cta a {
    min-height: 48px;
    font-size: 0.9rem;
  }
}

@media (max-width: 575.98px) {
  .qre-property-detail .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .qre-pd-title {
    font-size: 1.35rem;
  }
}
