/* ==========================================================================
   property.css — جزئیات ملک
   ========================================================================== */

/* ---------- ۱. هیرو گالری ---------- */
.detail-hero {
  position: relative;
  border-radius: var(--r-card-lg);
  overflow: hidden;
  background: #efe6d6;
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 3;
  max-height: 320px;
}

.detail-hero-image-open {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  position: relative;
  cursor: zoom-in;
}

.detail-hero-image-open > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* لایه واترمارک: ۹ نشان ثابت روی تصویر */
.property-watermark-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.property-watermark-item {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transform: translate(-50%, -50%) rotate(-14deg);
  opacity: .5;
  white-space: nowrap;
}

.property-watermark-item img {
  width: 13px;
  height: 13px;
  border-radius: 3px;
}

.property-watermark-item b {
  font-size: 9px;
  font-weight: 700;
  color: #fffdf8;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .55);
}

/* شمارنده عکس */
.photo-counter {
  position: absolute;
  bottom: 10px;
  inset-inline-start: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 28px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: rgba(31, 23, 17, .72);
  color: #fffdf8;
  font-size: 11.5px;
  font-weight: 700;
  backdrop-filter: blur(4px);
}

.photo-counter svg { width: 14px; height: 14px; }

/* دکمه بازگشت */
.detail-back {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 253, 250, .94);
  color: var(--sadaf-text);
  box-shadow: 0 2px 10px rgba(51, 35, 17, .16);
}

.detail-back svg { width: 20px; height: 20px; }

/* ---------- ۲. خلاصه ---------- */
.detail-summary {
  margin-top: 12px;
  padding: 14px 13px;
  border-radius: var(--r-card-lg);
  background: var(--sadaf-card);
  box-shadow: var(--shadow);
}

.detail-summary h1 {
  font-size: 17px;
  line-height: 1.7;
  text-align: start;
  margin-bottom: 9px;
}

.detail-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--sadaf-gold);
  margin-bottom: 9px;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 13px;
}

.detail-tags span {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: #f4ead7;
  color: #6b5730;
  font-size: 11px;
  font-weight: 700;
}

/* مشخصات سریع */
.quick-specs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--sadaf-line);
}

.detail-spec {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 4px;
  border-radius: 12px;
  background: #fbf6ec;
  text-align: center;
}

.detail-spec i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #fff;
}

.detail-spec i svg { width: 15px; height: 15px; color: var(--sadaf-gold); }

.detail-spec span {
  font-size: 10px;
  color: var(--sadaf-muted);
}

.detail-spec strong {
  font-size: 12px;
  font-weight: 700;
  color: var(--sadaf-text);
}

/* ---------- ۳ و ۴. بخش‌ها ---------- */
.detail-section {
  margin-top: 12px;
  padding: 14px 13px;
  border-radius: var(--r-card-lg);
  background: var(--sadaf-card);
  box-shadow: var(--shadow);
}

.amenities-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}

.amenity-feature {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding-inline-end: 4px;
}

.amenity-feature i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: #f4ead7;
}

.amenity-feature i svg { width: 14px; height: 14px; color: var(--sadaf-gold); }

.amenity-feature strong {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--sadaf-text);
  white-space: nowrap;
}

.amenity-divider {
  display: inline-block;
  width: 1px;
  height: 14px;
  margin-inline: 8px;
  background: var(--sadaf-line);
}

.amenity-feature:last-child .amenity-divider { display: none; }

/* توضیحات */
.detail-description-text {
  font-size: 12.5px;
  line-height: 2.05;
  color: var(--sadaf-muted);
}

.detail-description-text p { margin-bottom: 10px; }

.detail-description-text ul {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
}

.detail-description-text li {
  position: relative;
  padding-inline-start: 16px;
  margin-bottom: 5px;
}

.detail-description-text li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: 11px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--sadaf-gold-2);
}

/* ---------- ۵. مشاور ---------- */
.advisor-card-simple {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border-radius: 15px;
  background: #fbf6ec;
  border: 1px solid var(--sadaf-line);
  transition: border-color var(--t-fast);
}

.advisor-card-simple:hover { border-color: rgba(184, 137, 59, .5); }

.advisor-photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  background: #efe6d6;
  flex: none;
}

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

.advisor-meta { min-width: 0; }

.advisor-meta strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--sadaf-text);
}

.advisor-meta small {
  display: block;
  font-size: 11px;
  color: var(--sadaf-muted);
  line-height: 1.7;
}

.advisor-meta span {
  display: block;
  font-size: 10.5px;
  color: var(--sadaf-gold);
  font-weight: 700;
}

.advisor-all-listings {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  padding: 0 13px;
  border-radius: 13px;
  background: #fff;
  border: 1px solid rgba(184, 137, 59, .45);
  color: var(--sadaf-gold);
  font-size: 12.5px;
  font-weight: 700;
}

.advisor-all-listings svg { width: 18px; height: 18px; }

/* ---------- لایت‌باکس گالری ---------- */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: var(--z-lightbox);
  display: flex;
  flex-direction: column;
  background: rgba(20, 15, 10, .96);
  opacity: 0;
  transition: opacity var(--t-base);
}

.gallery-lightbox.is-open { opacity: 1; }

.gallery-lb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  color: #fffdf8;
  font-size: 13px;
  font-weight: 700;
  flex: none;
}

.gallery-lb-head button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 253, 250, .14);
  color: #fffdf8;
  font-size: 19px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-lb-stage {
  flex: 1;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  min-height: 0;
}

.gallery-lb-track {
  display: flex;
  height: 100%;
  align-items: center;
  overflow: hidden;
  touch-action: pan-y;
}

.gallery-lb-slide {
  flex: 0 0 100%;
  width: 100%;
  margin: 0;
  display: none;
  align-items: center;
  justify-content: center;
}

.gallery-lb-slide.is-active { display: flex; }

.gallery-lb-slide img {
  width: 100%;
  height: auto;
  max-height: 62vh;
  object-fit: contain;
  border-radius: 12px;
}

.gallery-lb-nav {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 253, 250, .14);
  color: #fffdf8;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}

.gallery-lb-nav svg { width: 20px; height: 20px; }

.gallery-lb-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  padding: 18px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  flex: none;
}

.gallery-lb-dots button {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 253, 250, .32);
  transition: background var(--t-fast), transform var(--t-fast);
}

.gallery-lb-dots button[aria-selected="true"] {
  background: var(--sadaf-gold-2);
  transform: scale(1.3);
}

/* ---------- واکنش‌گرایی ---------- */
@media (max-width: 380px) {
  .detail-summary h1 { font-size: 15.5px; }
  .detail-price { font-size: 16px; }
  .quick-specs { grid-template-columns: repeat(2, 1fr); }
  .detail-hero { max-height: 280px; }
}

@media (min-width: 768px) {
  .gallery-lb-slide img { max-height: 72vh; }
}
