/* Property detail — two-column layout (main left, sidebar right, aligned with site container) */
@media (min-width: 992px) {
  .cdspg-property-detail-row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    column-gap: 2.75rem;
    margin-right: -15px;
    margin-left: -15px;
  }

  .cdspg-property-detail-row > .cdspg-property-detail-main,
  .cdspg-property-detail-row > .cdspg-property-detail-sidebar {
    position: relative;
    width: auto;
    max-width: none;
    flex: none;
    -ms-flex: none;
    order: unset;
    -ms-flex-order: unset;
    padding-right: 15px;
    padding-left: 15px;
  }

  .cdspg-property-detail-row > .cdspg-property-detail-main {
    grid-column: 1;
    grid-row: 1;
  }

  .cdspg-property-detail-row > .cdspg-property-detail-sidebar {
    grid-column: 2;
    grid-row: 1;
  }
}

.cdspg-property-detail-main .property-detail-gallery,
.cdspg-property-detail-main .property-info,
.cdspg-property-detail-main .property-description {
  max-width: 100%;
}

/* Property detail page — weather widget */
.cdspg-property-sidebar-weather {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.cdspg-property-weather {
  margin: 1rem 0 1.5rem;
  max-width: 320px;
}

.cdspg-property-weather--sidebar {
  margin: 0;
  max-width: none;
}

.cdspg-property-weather__card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #0d3b66 0%, #1a6b9e 48%, #47b0dc 100%);
  box-shadow: 0 8px 24px rgba(13, 59, 102, 0.22);
  color: #fff;
}

.cdspg-property-weather__icon {
  flex: 0 0 72px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
}

.cdspg-property-weather__icon img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

.cdspg-property-weather__info {
  flex: 1;
  min-width: 0;
}

.cdspg-property-weather__town {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0.85;
  margin-bottom: 0.2rem;
}

.cdspg-property-weather__temp {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.cdspg-property-weather__desc {
  display: block;
  font-size: 0.95rem;
  margin-top: 0.25rem;
  opacity: 0.92;
  text-transform: capitalize;
}

.cdspg-property-weather--loading .cdspg-property-weather__temp {
  font-size: 1rem;
  font-weight: 500;
  opacity: 0.8;
}

.cdspg-property-weather--error .cdspg-property-weather__card {
  background: linear-gradient(135deg, #4a5568 0%, #718096 100%);
}

/* Similar / latest property cards — fixed image frame (match search results). */
.cdspg-property-similar .property-item {
  margin-bottom: 1.75rem;
}

.cdspg-property-similar .property-image.cdspg-property-card-media {
  display: block;
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: #e8edf2;
}

.cdspg-property-similar .cdspg-property-card-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}

.cdspg-property-similar .property-image .property-lable {
  z-index: 2;
}

/* Responsive video — never overflow viewport */
.cdspg-property-video-responsive {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 6px;
  overflow: hidden;
}

.cdspg-property-video-responsive iframe,
.cdspg-property-video-responsive video {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: 100%;
  border: 0;
  object-fit: contain;
}

.cdspg-property-video-block {
  margin-top: 1rem;
  padding: 0 0.25rem;
}

.cdspg-property-video-label,
.cdspg-property-explore-label {
  margin: 1rem 0 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  color: #001935;
}

/* Mobile property layout — gallery → video → explore → message */
@media (max-width: 991.98px) {
  .cdspg-property-detail-row {
    display: flex;
    flex-direction: column;
  }

  .cdspg-property-detail-sidebar,
  .cdspg-property-detail-main {
    display: contents;
  }

  .cdspg-property-detail-sidebar > .sticky-top {
    display: contents;
  }

  .cdspg-property-sidebar-head { order: 1; }
  .cdspg-property-media-stack { order: 2; }
  .cdspg-property-sidebar-enquiry { order: 3; }
  .cdspg-property-sidebar-phone { order: 4; }
  .cdspg-property-sidebar-weather { order: 5; }
  .cdspg-property-detail-body { order: 6; }

  .cdspg-property-media-stack {
    width: 100%;
    max-width: 100%;
    overflow: hidden;
    padding: 0 0.15rem;
  }

  .cdspg-property-video-block {
    padding: 0;
  }

  .cdspg-property-detail-body .property-info,
  .cdspg-property-detail-body .property-description,
  .cdspg-property-detail-body .property-features,
  .cdspg-property-detail-body .property-address {
    padding-left: 0.15rem;
    padding-right: 0.15rem;
  }
}
