/* Property / project detail page */
.pd-detail-page {
  --pd-orange: #f28d48;
  --pd-orange-dark: #e07c37;
  --pd-surface: #f4f6f9;
  --pd-card: #ffffff;
  --pd-border: #e8ecf1;
  --pd-text: #1a202c;
  --pd-muted: #64748b;
  background: var(--pd-surface);
  padding-bottom: 3rem;
}

.pd-detail-page .text-orange {
  color: var(--pd-orange) !important;
}

.pd-back {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--pd-muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  margin-bottom: 1rem;
  transition: color 0.2s ease, transform 0.2s ease;
}

.pd-back:hover {
  color: var(--pd-orange);
  transform: translateX(-3px);
}

/* Hero header */
.pd-hero {
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.pd-hero__title {
  font-size: clamp(1.35rem, 2.5vw, 1.75rem);
  font-weight: 700;
  color: var(--pd-text);
  line-height: 1.25;
  margin-bottom: 0.5rem;
}

.pd-hero__location {
  color: var(--pd-muted);
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.pd-hero__price {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  color: var(--pd-orange);
  line-height: 1.2;
}

.pd-hero__price-suffix {
  font-size: 0.875rem;
  color: var(--pd-muted);
  font-weight: 500;
}

.pd-badge {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
}

.pd-badge--status {
  background: #e6f9ed;
  color: #059669;
}

.pd-badge--meta {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid var(--pd-border);
}

.pd-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-width: 220px;
}

@media (max-width: 991.98px) {
  .pd-actions {
    flex-direction: row;
    flex-wrap: wrap;
    min-width: 0;
    margin-top: 1rem;
  }
}

.pd-btn-contact {
  background: var(--pd-orange) !important;
  border: none !important;
  color: #fff !important;
  font-weight: 600;
  border-radius: 10px;
  padding: 0.65rem 1.25rem;
}

.pd-btn-contact:hover {
  background: var(--pd-orange-dark) !important;
  color: #fff !important;
}

.pd-btn-outline {
  background: #fff !important;
  color: var(--pd-orange) !important;
  border: 2px solid var(--pd-orange) !important;
  font-weight: 600;
  border-radius: 10px;
}

/* Gallery */
.pd-gallery {
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  padding: 0.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.pd-gallery__main-wrap {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
  aspect-ratio: 16 / 10;
}

.pd-gallery__main {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.25s ease;
  cursor: zoom-in;
}

.pd-gallery__side img {
  cursor: zoom-in;
}

.pd-gallery__count {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.75);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 0.35rem 0.65rem;
  border-radius: 8px;
  backdrop-filter: blur(4px);
}

.pd-gallery__stack {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  height: 100%;
}

.pd-gallery__side {
  flex: 1;
  min-height: 0;
  border-radius: 12px;
  overflow: hidden;
  background: #e2e8f0;
}

.pd-gallery__side img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pd-gallery__thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  padding-top: 0.25rem;
  overflow-x: auto;
  scrollbar-width: thin;
}

.pd-gallery__thumb {
  flex: 0 0 88px;
  height: 64px;
  border: 2px solid transparent;
  border-radius: 10px;
  overflow: hidden;
  padding: 0;
  background: #e2e8f0;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.15s ease;
}

.pd-gallery__thumb:hover,
.pd-gallery__thumb.is-active {
  border-color: var(--pd-orange);
  transform: translateY(-2px);
}

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

@media (max-width: 767.98px) {
  .pd-gallery__stack {
    flex-direction: row;
    margin-top: 0.5rem;
  }

  .pd-gallery__side {
    flex: 1;
    aspect-ratio: 4 / 3;
  }
}

/* Section cards */
.pd-section {
  background: var(--pd-card);
  border: 1px solid var(--pd-border);
  border-radius: 16px;
  padding: 1.5rem 1.75rem;
  margin-bottom: 1.25rem;
  box-shadow: 0 2px 12px rgba(15, 23, 42, 0.04);
}

.pd-section__title {
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--pd-text);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.pd-section__title i {
  color: var(--pd-orange);
}

.pd-spec-card {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.1rem;
  background: #f8fafc;
  border: 1px solid var(--pd-border);
  border-radius: 12px;
  height: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.pd-spec-card:hover {
  border-color: #cbd5e1;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.pd-spec-card__icon {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: #fff5ed;
  color: var(--pd-orange);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

.pd-spec-card__label {
  font-size: 0.75rem;
  color: var(--pd-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.15rem;
}

.pd-spec-card__value {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--pd-text);
  word-break: break-word;
}

.pd-about {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #475569;
}

.pd-amenity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.85rem;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px solid var(--pd-border);
  font-size: 0.875rem;
  font-weight: 500;
  height: 100%;
}

.pd-amenity i {
  color: var(--pd-orange);
  flex-shrink: 0;
}

.pd-amenity-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pd-amenity-icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.pd-map-wrap {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--pd-border);
  min-height: 280px;
  background: #f1f5f9;
}

.pd-map-wrap iframe {
  display: block;
  width: 100%;
  min-height: 280px;
}

/* Similar listings — landing cards, wider 3-up grid on detail page */
.pd-similar-section {
  margin-top: 0.5rem;
}

.pd-similar-listings {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  justify-content: center;
}

@media (min-width: 576px) {
  .pd-similar-listings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .pd-similar-listings {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.75rem;
  }

  /* Center a lone card on the last row (e.g. 4 or 7 items) */
  .pd-similar-listings > *:last-child:nth-child(3n + 1):not(:only-child) {
    grid-column: 2;
  }
}

/* Override fragment col-* so grid controls width */
.pd-similar-listings > .property-item,
.pd-similar-listings > .project-carousel-item {
  width: 100% !important;
  max-width: 100% !important;
  flex: none !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
}

.pd-similar-listings .property-card {
  cursor: pointer;
  width: 100%;
}

.pd-similar-listings .property-card:hover {
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1);
}

.pd-similar-listings .property-image {
  height: 240px !important;
}

.pd-similar-listings .property-card-body h6 {
  font-size: 1.1rem !important;
}

.pd-similar-listings .property-card-actions .btn-contact-property {
  font-size: 0.95rem !important;
  min-height: 44px;
}

.pd-similar-listings .property-card-actions .btn-share-property {
  width: 44px !important;
  min-width: 44px;
  flex-shrink: 0;
}

.pd-actions .btn-share-property {
  width: 100% !important;
  min-height: 44px;
  border-radius: 10px !important;
  background: #eef2f6 !important;
}

.pd-mobile-bar {
  display: none;
}

@media (max-width: 991.98px) {
  .pd-detail-page {
    padding-bottom: 5.5rem;
  }

  .pd-mobile-bar {
    display: flex;
    align-items: center;
    position: fixed;
    bottom: 64px;
    left: 0;
    right: 0;
    z-index: 1015;
    background: #fff;
    border-top: 1px solid var(--pd-border);
    padding: 0.65rem 1rem;
    gap: 0.5rem;
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.06);
  }

  .pd-mobile-bar .btn-share-property {
    width: 48px !important;
    min-width: 48px;
    flex-shrink: 0;
  }
}
