/*
 * Stylesheet for WordPress Single Property Detail Page
 * Hauss Properties Child Theme Asset
 */

@font-face {
  font-family: "Now";
  src: url("../fonts/Now-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Now";
  src: url("../fonts/Now-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Now";
  src: url("../fonts/Now-Bold.otf") format("opentype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1d3d4a;
  --navy-text: #1d3d4a;
  --beige: #f5ebdf;
  --orange: #ec9b57;
  --grey: #f3f3f3;
  --grey-line: #e3e3e3;
}

.hauss-property-detail-container,
.hauss-property-detail-container * {
  font-family:
    "Now",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    sans-serif !important;
  box-sizing: border-box;
}

.hauss-property-detail-container p {
  padding: 0 !important;
}

.hauss-property-detail-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Full-width gallery band ---------- */
.gallery-band {
  display: flex;
  gap: 6px;
  width: 100%;
  height: 64vh;
  min-height: 420px;
  background: #dfe3e3;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  cursor: grab;
}
.gallery-band::-webkit-scrollbar {
  display: none;
}
.gallery-band.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}
.gallery-band .gb {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  flex: 0 0 42%;
  height: 100%;
  scroll-snap-align: start;
}
.gallery-band .gb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* ---------- Gallery tab row ---------- */
.gallery-tabs {
  border-bottom: 1px solid #ececec;
}
.gallery-tabs .inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.gallery-tabs .spacer {
  flex: 1;
}
.gallery-tabs .icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--navy);
  display: flex;
  align-items: center;
  padding: 0;
  transition: color 0.15s ease;
}
.gallery-tabs .icon-btn:hover {
  color: var(--orange);
}
.gallery-tabs .icon-btn svg {
  width: 20px;
  height: 20px;
}

/* Chips/Pills styling */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: #fff;
  border: 1.5px solid var(--navy);
  color: var(--navy);
  border-radius: 4px;
  padding: 10px 18px;
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.chip svg {
  width: 14px;
  height: 14px;
}
.chip:hover {
  background: var(--navy);
  color: #fff;
}

/* ---------- Listing head ---------- */
.listing-head {
  padding: 38px 0 8px;
}
.listing-head h1 {
  font-weight: 400 !important;
  font-size: 40px;
  margin: 0 0 10px;
  letter-spacing: 0.3px;
  color: var(--navy);
}
.price-view {
  color: var(--orange) !important;
  font-weight: 600;
  font-size: 22px;
  margin: 0 0 18px !important;
  letter-spacing: 0.2px;
  line-height: 1.3;
}
.price-view.status-withdrawn {
  color: #6c757d !important;
  text-transform: uppercase;
  font-size: 20px;
}
.price-view.status-sold {
  color: var(--orange) !important;
  text-transform: uppercase;
  font-size: 22px;
}
.price-view.status-leased {
  color: var(--navy) !important;
  text-transform: uppercase;
  font-size: 22px;
}

/* Status Pill */
.property-status-pill {
  display: inline-block;
  padding: 6px 14px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  border-radius: 4px;
  margin-bottom: 12px;
}
.property-status-pill.withdrawn {
  background: #6c757d;
  color: #fff;
}
.property-status-pill.sold {
  background: var(--orange);
  color: #fff;
}
.property-status-pill.leased {
  background: var(--navy);
  color: #fff;
}

/* Withdrawn Notice Banner */
.withdrawn-notice-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: #f8f9fa;
  border-left: 4px solid #6c757d;
  padding: 16px 20px;
  margin: 8px 0 20px;
  border-radius: 0 8px 8px 0;
  color: #495057;
  font-size: 15px;
  line-height: 1.5;
}
.withdrawn-notice-banner svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #6c757d;
}
.withdrawn-notice-banner strong {
  display: block;
  color: #212529;
  font-size: 15px;
  margin-bottom: 3px;
}
.stats {
  display: flex;
  gap: 22px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.stats .item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 400;
}
.stats .stat-icon {
  width: 34px;
  height: 34px;
  object-fit: contain;
  vertical-align: middle;
  display: inline-block;
  flex-shrink: 0;
}
.stats .stat-svg {
  width: 25px;
  height: 25px;
  color: #bbbbbb !important;
}
.stats.stats-land {
  margin-top: 4px;
  margin-bottom: 16px;
}
.stats.stats-land .item {
  font-size: 19px;
  font-weight: 500;
  color: var(--navy);
}
.auction-line {
  color: var(--orange);
  font-weight: 600;
  font-size: 18px;
  margin: 8px 0 0;
}

/* ---------- Open home ---------- */
.open-home {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
  padding: 20px 0;
  margin: 14px 0;
  border-top: 1px solid #ececec;
  border-bottom: 1px solid #ececec;
}
.open-home h2 {
  font-weight: 600;
  font-size: 13px;
  margin: 0;
  white-space: nowrap;
  color: var(--navy);
  letter-spacing: 1.4px;
  text-transform: uppercase;
}
.open-home ul {
  margin: 0;
  padding-left: 18px;
}
.open-home li {
  font-size: 15px;
  margin: 3px 0;
}

/* ---------- Description ---------- */
.description {
  position: relative;
  margin: 22px 0 0;
  max-height: 150px;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.description.expanded {
  max-height: 2000px;
}
.description p {
  margin: 0 0 18px !important;
  font-size: 17px;
}
.description:not(.expanded)::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 64px;
  background: linear-gradient(rgba(255, 255, 255, 0), #fff);
  pointer-events: none;
}
.read-toggle {
  background: none;
  border: none;
  color: var(--orange);
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  padding: 0;
  margin: 2px 0 22px;
}
.read-toggle:hover {
  text-decoration: underline;
}
.banner {
  font-weight: 600;
  font-size: 24px;
  color: var(--navy);
  margin: 30px 0 16px;
  letter-spacing: 0.2px;
  line-height: 1.5;
}

/* ---------- Section titles ---------- */
.section-title {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin: 0 0 22px;
  color: var(--navy);
}

/* ---------- Features ---------- */
.features {
  margin: 44px 0;
  padding-top: 38px;
  border-top: 1px solid #ececec;
}
.features ul {
  list-style: none;
  margin: 0;
  padding: 0;
  column-count: 2;
  column-gap: 44px;
}
.features li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 0;
  font-size: 16px;
  line-height: 1.5;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
}
.features li .check {
  color: var(--orange);
  font-weight: 700;
}

/* ---------- Agent ---------- */
.agent-v2 {
  display: block;
  padding: 38px 0;
  margin: 20px 0;
  border-top: 1px solid #ececec;
}
.agent-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}
.agent-v2.multi-agents .agent-cards-grid {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 36px 48px;
}
.agent-card-item {
  display: block;
}
.agent-top {
  display: flex;
  align-items: center;
  gap: 28px;
  flex-wrap: wrap;
}
.agent-photo {
  width: 140px;
  height: 140px;
  border-radius: 12px;
  object-fit: cover;
  flex: 0 0 auto;
  background: #dcdcd6;
}
.agent-meta {
  flex: 1;
  min-width: 200px;
}
.agent-meta h3 {
  font-weight: 700;
  font-size: 26px;
  margin: 0 0 4px !important;
  color: var(--navy);
}
.agent-meta p {
  margin: 1px 0 !important;
  padding: 0 !important;
  font-size: 16px;
}
.agent-meta a {
  color: var(--navy);
  text-decoration: none;
}
.agent-meta a:hover {
  color: var(--orange);
  text-decoration: underline;
}
.agent-actions {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-top: 32px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  padding: 15px 26px;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    filter 0.15s,
    background 0.15s,
    color 0.15s;
}
.btn-enquire {
  background: var(--orange);
  color: var(--navy) !important;
}
.btn-enquire:hover,
.btn-enquire:focus {
  background: var(--orange);
  color: var(--navy) !important;
  filter: brightness(0.92);
  text-decoration: none;
}

.btn-apply {
  background: var(--navy);
  color: #ffffff !important;
}
.btn-apply:hover,
.btn-apply:focus,
.btn-apply:active {
  background: #254b5a;
  color: #ffffff !important;
  filter: none;
  text-decoration: none;
}

.btn-back {
  background: #fff;
  color: var(--navy) !important;
  border: 2px solid var(--navy);
}
.btn-back:hover,
.btn-back:focus {
  background: var(--navy);
  color: #ffffff !important;
  text-decoration: none;
}

/* ---------- Map band ---------- */
.map-band {
  width: 100%;
  height: 460px;
  background: #e8eef0;
}
.map-band iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ---------- Location ---------- */
.location {
  padding: 40px 0 10px;
  margin: 16px 0;
}
.location p {
  margin: 0 !important;
  font-size: 17px;
  max-width: 820px;
}

/* ---------- Suburb guides / Carousel ---------- */
.suburb-guides {
  text-align: left;
  margin: 40px 0;
}
.suburb-guides h2 {
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  margin: 0 0 22px;
  color: var(--navy);
}
.sg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 34px;
}
.sg-card {
  cursor: pointer;
  text-decoration: none;
  color: var(--navy);
  display: block;
}
.sg-img {
  height: 300px;
  border-radius: 14px;
  background: #d7ddd9 center/cover no-repeat;
  transition: transform 0.3s;
}
.sg-card:hover .sg-img {
  transform: translateY(-4px);
}
.sg-card span {
  display: block;
  text-align: left;
  margin-top: 14px;
  font-size: 22px;
}

/* Dynamic Carousel Dots for lifestyle */
.carousel-dots {
  margin-top: 15px;
  display: flex;
  width: 100%;
  border-radius: 5px;
  height: 10px;
  overflow: hidden;
  background: #f0f0f0;
}
.carousel-dot {
  flex: 1;
  height: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s ease;
  padding: 0;
}
.carousel-dot.active {
  background-color: var(--navy);
}

/* ---------- Enquiry form ---------- */
.enquiry {
  padding: 44px 0 64px;
  margin: 16px 0 0;
  border-top: 1px solid #ececec !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
}
.enquiry-sub {
  margin: 0 0 22px !important;
  font-size: 16px;
  max-width: 680px;
}
.enquiry-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  background-color: transparent;
  padding: 0 !important;
}
.enquiry-form input,
.enquiry-form textarea {
  width: 100%;
  padding: 15px 18px;
  border: 1px solid #dcdcdc;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: 16px;
  color: var(--navy);
}
.enquiry-form input::placeholder,
.enquiry-form textarea::placeholder {
  color: #9a9a9a;
}
.enquiry-form input:focus,
.enquiry-form textarea:focus {
  outline: none;
  border-color: var(--navy);
}
.enquiry-form textarea {
  min-height: 150px;
  resize: vertical;
}
.enquiry-form .full {
  grid-column: 1 / -1;
}
.btn-submit-enquiry {
  grid-column: 1 / -1;
  justify-self: start;
  background: var(--orange) !important;
  color: #fff !important;
  border: none !important;
  border-radius: 4px !important;
  padding: 16px 40px !important;
  font-weight: 700 !important;
  font-size: 14px !important;
  letter-spacing: 1.2px !important;
  text-transform: uppercase !important;
  cursor: pointer !important;
  box-shadow: none !important;
  text-shadow: none !important;
  transition: filter 0.15s;
}
.btn-submit-enquiry:hover {
  filter: brightness(0.94) !important;
}

/* Form success message */
.enquiry-success {
  grid-column: 1 / -1;
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
  padding: 15px;
  border-radius: 8px;
  font-size: 16px;
  margin-top: 10px;
  text-align: center;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(25, 34, 38, 0.93);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000; /* High z-index to overlay WP admin bar/headers */
}
.lightbox.open {
  display: flex;
}
.lightbox.single .lb-prev,
.lightbox.single .lb-next,
.lightbox.single .lb-count {
  display: none;
}
.lightbox.zoomed {
  overflow: auto;
  align-items: flex-start;
  justify-content: flex-start;
}
.lb-img {
  max-width: 90vw;
  max-height: 84vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
  cursor: zoom-in;
  user-select: none;
  -webkit-user-drag: none;
}
.lightbox.zoomed .lb-img {
  max-width: none;
  max-height: none;
  border-radius: 0;
  cursor: grab;
}
.lightbox.zoomed .lb-img:active {
  cursor: grabbing;
}
.lb-zoom {
  position: fixed;
  bottom: 20px;
  right: 24px;
  display: flex;
  gap: 10px;
  z-index: 3;
}
.lb-zoom button {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-zoom button:hover {
  background: rgba(255, 255, 255, 0.34);
}
.lb-close {
  position: fixed;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}
.lb-prev,
.lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-prev {
  left: 24px;
}
.lb-next {
  right: 24px;
}
.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.32);
}
.lb-count {
  position: fixed;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  color: #fff;
  font-size: 15px;
}

/* ---------- Video modal ---------- */
.video-modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 20, 23, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10100;
  padding: 24px;
}
.video-modal.open {
  display: flex;
}
.vm-wrapper {
  position: relative;
  width: 100%;
  max-width: 960px;
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6);
}
.vm-iframe,
.vm-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}
.vm-close {
  position: fixed;
  top: 20px;
  right: 28px;
  background: none;
  border: none;
  color: #fff;
  font-size: 42px;
  line-height: 1;
  cursor: pointer;
  z-index: 10101;
  transition: opacity 0.2s;
}
.vm-close:hover {
  opacity: 0.75;
}

/* ---------- Loading Detail Loader ---------- */
.detail-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50vh;
  color: var(--navy);
  font-size: 18px;
}
.detail-loader-spinner {
  width: 44px;
  height: 44px;
  border: 4px solid rgba(29, 61, 74, 0.1);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spinner-rotate 1s linear infinite;
  margin-bottom: 16px;
}
@keyframes spinner-rotate {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Error State ---------- */
.detail-error {
  text-align: center;
  padding: 100px 24px;
  color: #d9534f;
}
.detail-error h2 {
  font-size: 28px;
  margin-bottom: 14px;
}
.detail-error p {
  font-size: 17px;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ---------- Responsive Layout ---------- */
@media (max-width: 820px) {
  .gallery-band {
    height: 62vw;
    min-height: 300px;
  }
  .gallery-band .gb {
    flex: 0 0 86%;
  }
  .listing-head h1 {
    font-size: 30px;
  }
  .features ul {
    column-count: 1;
  }
  .sg-grid {
    grid-template-columns: 1fr;
  }
  .enquiry-form {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .gallery-tabs .inner {
    flex-wrap: nowrap;
    gap: 6px;
    padding: 12px 14px;
    overflow-x: auto;
  }
  .gallery-tabs .spacer,
  .gallery-tabs .icon-btn {
    display: none;
  }
  .chip {
    flex: 1 1 0;
    justify-content: center;
    padding: 9px 6px;
    font-size: 9.5px;
    letter-spacing: 0.3px;
    gap: 0;
    white-space: nowrap;
  }
  .chip svg {
    display: none;
  }
}
