/* Property portfolio: listing cards, filters, detail pages, location pages and the enquiry modal.
   Loaded after index.css and uses the same design tokens. */

/* --- Listing filters --- */
.packages-filter-bar { flex-wrap: wrap; gap: 16px; margin-bottom: 2rem; }
.filter-tabs { flex-wrap: wrap; }
.search-filter-box { flex-wrap: wrap; align-items: center; }
.listing-select {
  appearance: auto;
  border: 1px solid rgba(17, 24, 39, 0.12);
  border-radius: 10px;
  background: #fff;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.88rem;
  padding: 10px 12px;
  min-height: 44px;
}
.listing-search { padding: 10px 16px; font-size: 0.88rem; width: 250px; min-height: 44px; }
.listing-count { color: var(--text-secondary); font-size: 0.9rem; margin: -0.5rem 0 1.5rem; }
.listing-empty { grid-column: 1 / -1; padding: 50px; text-align: center; color: var(--text-secondary); }
.listing-actions { text-align: center; margin-top: 2.5rem; }
.prop-card[hidden], .listing-empty[hidden] { display: none; }

.location-links { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 2rem; }
.location-link {
  border: 1px solid rgba(17, 24, 39, 0.1);
  border-radius: 999px;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 8px 16px;
  transition: var(--transition-fast);
}
.location-link:hover { border-color: var(--accent-red); color: var(--accent-red); }

/* --- Property cards --- */
.prop-img-box { aspect-ratio: 16 / 10; height: auto; background: var(--bg-tertiary); }
.prop-img { display: block; }
.prop-title a { color: inherit; }
.prop-title a:hover { color: var(--accent-red); }
.prop-dev { color: var(--text-secondary); font-size: 0.85rem; margin: -0.6rem 0 1rem; }
.prop-card .prop-specs-row { grid-template-columns: 1fr; gap: 8px; padding: 1rem 0; margin-bottom: 1rem; }
.prop-card .prop-body { padding: 24px; }
.prop-rera { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 1.2rem; display: flex; gap: 6px; align-items: baseline; }
.prop-rera i { color: var(--accent-emerald, #10b981); }
.prop-card .prop-bottom { flex-wrap: wrap; gap: 12px; }
.prop-card .prop-price { font-size: 1.2rem; }
.prop-card .prop-price.is-request { color: var(--text-primary); font-size: 1rem; }
.prop-actions { display: flex; gap: 8px; width: 100%; }
.prop-actions .btn-premium { flex: 1; justify-content: center; padding: 11px 12px; font-size: 0.82rem; min-height: 44px; }

/* --- Detail pages --- */
/* The global overflow-x: hidden on html and body turns body into a scroll container, which stops sticky working. */
html:has(.pd-main), html:has(.pd-main) body { overflow-x: clip; overflow-y: visible; }
.pd-main { padding-top: 110px; }
.pd-wrap { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.pd-crumbs { color: var(--text-secondary); font-size: 0.82rem; margin-bottom: 1rem; }
.pd-crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 0; }
.pd-crumbs li + li::before { content: '/'; margin-right: 6px; color: var(--text-muted); }
.pd-crumbs a:hover { color: var(--accent-red); }
.pd-head h1 { font-family: var(--font-heading); font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.15; margin-bottom: 0.75rem; }
.pd-sub { color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 0.95rem; margin-bottom: 1.5rem; }
.pd-sub i { color: var(--accent-red); margin-right: 5px; }
.pd-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 40px; align-items: start; }
.pd-hero-img { border-radius: 20px; overflow: hidden; background: var(--bg-tertiary); aspect-ratio: 16 / 9; }
.pd-hero-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-caption { color: var(--text-secondary); font-size: 0.78rem; margin-top: 8px; }
.pd-section { padding: 2.5rem 0 0; scroll-margin-top: 100px; }
.pd-section h2 { font-family: var(--font-heading); font-size: clamp(1.35rem, 3vw, 1.7rem); line-height: 1.25; margin-bottom: 1rem; }
.pd-section h3 { font-family: var(--font-heading); font-size: 1.05rem; margin: 1.25rem 0 0.6rem; }
.pd-section p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 1rem; }
.pd-section a:not(.btn-premium) { color: var(--accent-red); text-decoration: underline; text-underline-offset: 2px; }
.pd-highlights { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; list-style: none; padding: 0; margin: 0 0 1rem; }
.pd-highlights li { background: var(--bg-secondary); border-radius: 12px; color: var(--text-primary); font-size: 0.92rem; font-weight: 500; line-height: 1.45; padding: 14px 16px; }
.pd-table-wrap { overflow-x: auto; border: 1px solid var(--border-soft); border-radius: 14px; margin-bottom: 1rem; }
.pd-table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.pd-table th, .pd-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--border-soft); vertical-align: top; }
.pd-table tr:last-child th, .pd-table tr:last-child td { border-bottom: 0; }
.pd-table thead th { background: var(--bg-secondary); font-family: var(--font-heading); font-size: 0.85rem; white-space: nowrap; }
.pd-table tbody th { color: var(--text-secondary); font-weight: 500; }
.pd-table a { color: var(--accent-red); font-weight: 600; }
.pd-note { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; }
.pd-alert {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 14px;
  color: #78350f;
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 1.5rem;
  padding: 16px 18px;
}
.pd-amenities { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0 0 1rem; }
.pd-amenities li { background: var(--bg-secondary); border-radius: 999px; font-size: 0.86rem; padding: 7px 14px; }
.pd-conn-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 28px; }
.pd-conn { list-style: none; padding: 0; margin: 0 0 1rem; }
.pd-conn li { border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 16px; padding: 8px 0; font-size: 0.9rem; color: var(--text-secondary); }
.pd-conn li strong { color: var(--text-primary); font-weight: 600; white-space: nowrap; }

.pd-gallery { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.pd-gallery button { aspect-ratio: 4 / 3; background: var(--bg-tertiary); border: 0; border-radius: 12px; cursor: zoom-in; overflow: hidden; padding: 0; }
.pd-gallery img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pd-plan { border: 1px solid var(--border-soft); border-radius: 14px; background: #fff; cursor: zoom-in; display: block; overflow: hidden; padding: 0; width: 100%; }
.pd-plan img { width: 100%; height: auto; display: block; }
.pd-lightbox { background: transparent; border: 0; margin: auto; max-height: 94vh; max-width: min(1400px, 94vw); padding: 0; }
.pd-lightbox::backdrop { background: rgba(10, 12, 20, 0.86); }
.pd-lightbox img { border-radius: 10px; display: block; max-height: 84vh; max-width: 100%; margin: 0 auto; }
.pd-lightbox p { color: #fff; font-size: 0.88rem; margin-top: 10px; text-align: center; }
.pd-lightbox-close {
  background: #fff;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  height: 44px;
  position: fixed;
  right: 18px;
  top: 18px;
  width: 44px;
}

.pd-faq { border-bottom: 1px solid var(--border-soft); }
.pd-faq summary { cursor: pointer; font-family: var(--font-heading); font-weight: 600; line-height: 1.4; padding: 16px 28px 16px 0; position: relative; list-style: none; }
.pd-faq summary::-webkit-details-marker { display: none; }
.pd-faq summary::after { content: '+'; color: var(--accent-red); font-size: 1.3rem; line-height: 1; position: absolute; right: 2px; top: 16px; }
.pd-faq[open] summary::after { content: '–'; }
.pd-faq p { margin-bottom: 1rem; }

.pd-side { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 16px; }
.pd-card { background: #fff; border: 1px solid var(--border-soft); border-radius: 20px; box-shadow: 0 10px 30px -14px rgba(17, 24, 39, 0.14); padding: 24px; }
.pd-price-label { color: var(--text-secondary); display: block; font-size: 0.8rem; font-weight: 600; }
.pd-price { color: var(--accent-red); font-family: var(--font-heading); font-size: 1.7rem; font-weight: 800; line-height: 1.2; margin: 2px 0 8px; }
.pd-price.is-request { color: var(--text-primary); font-size: 1.35rem; }
.pd-facts { list-style: none; margin: 1rem 0; padding: 0; }
.pd-facts li { border-top: 1px solid var(--border-soft); display: flex; justify-content: space-between; gap: 14px; font-size: 0.86rem; padding: 9px 0; color: var(--text-secondary); }
.pd-facts strong { color: var(--text-primary); font-weight: 600; text-align: right; }
.pd-cta-stack { display: flex; flex-direction: column; gap: 8px; }
.pd-cta-stack .btn-premium { justify-content: center; min-height: 46px; width: 100%; }
.pd-wa { color: #128c4e; font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-size: 0.92rem; }
.pd-tel { color: var(--text-primary); font-weight: 600; display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; font-size: 0.92rem; }

.pd-project-block { border: 1px solid var(--border-soft); border-radius: 20px; margin-top: 2.5rem; overflow: hidden; scroll-margin-top: 100px; }
.pd-project-block > img { aspect-ratio: 16 / 7; display: block; height: auto; object-fit: cover; width: 100%; }
.pd-project-body { padding: 24px; }
.pd-project-body h2 { font-family: var(--font-heading); font-size: clamp(1.3rem, 3vw, 1.6rem); line-height: 1.25; margin-bottom: 0.4rem; }
.pd-project-body p { color: var(--text-secondary); line-height: 1.75; margin-bottom: 1rem; }
.pd-project-body h3 { font-family: var(--font-heading); font-size: 1.02rem; margin: 1.25rem 0 0.6rem; }
.pd-project-body .pd-caption { margin-bottom: 1rem; }
.pd-project-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1rem; }
.pd-project-actions .btn-premium { min-height: 44px; padding: 10px 18px; font-size: 0.85rem; }
.pd-jump { display: flex; flex-wrap: wrap; gap: 10px; margin: 1.5rem 0 0; }

.pd-compare .properties-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pd-full { padding-bottom: 3rem; }
.pd-disclaimer { background: var(--bg-secondary); border-radius: 14px; color: var(--text-secondary); font-size: 0.8rem; line-height: 1.65; margin-top: 2.5rem; padding: 16px 18px; }

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

/* --- Enquiry form --- */
.enq-form .form-group { margin-bottom: 14px; }
.enq-label { color: var(--text-primary); display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 5px; }
.enq-input {
  background: #fff;
  border: 1px solid rgba(17, 24, 39, 0.16);
  border-radius: 10px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  min-height: 46px;
  padding: 10px 12px;
  width: 100%;
}
.enq-input:focus { border-color: var(--accent-red); outline: 2px solid var(--border-red); }
textarea.enq-input { min-height: 74px; resize: vertical; }
.enq-consent { color: var(--text-secondary); font-size: 0.75rem; line-height: 1.5; margin: 10px 0 0; }
.enq-hp { position: absolute; left: -9999px; }
.enq-status { border-radius: 10px; display: none; font-size: 0.88rem; line-height: 1.55; margin-top: 12px; padding: 12px 14px; }
.enq-status.is-ok { background: #ecfdf5; color: #065f46; display: block; }
.enq-status.is-err { background: #fef2f2; color: #991b1b; display: block; }
.enq-status a { font-weight: 700; text-decoration: underline; }
.enq-submit { justify-content: center; min-height: 48px; width: 100%; }
.enq-modal { background: #fff; border: 0; border-radius: 20px; margin: auto; max-height: 92vh; max-width: 460px; overflow-y: auto; padding: 28px; width: calc(100% - 32px); }
.enq-modal::backdrop { background: rgba(10, 12, 20, 0.6); }
.enq-modal h2 { font-family: var(--font-heading); font-size: 1.35rem; line-height: 1.25; margin: 0 28px 4px 0; }
.enq-modal > p { color: var(--text-secondary); font-size: 0.88rem; margin-bottom: 1rem; }
.enq-close { background: var(--bg-tertiary); border: 0; border-radius: 50%; cursor: pointer; height: 40px; position: absolute; right: 14px; top: 14px; width: 40px; }

@media (max-width: 1100px) {
  .pd-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pd-side { position: static; }
  .pd-compare .properties-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .packages-filter-bar, .search-filter-box { align-items: stretch; flex-direction: column; width: 100%; }
  .filter-tabs { flex-wrap: wrap; gap: 8px; width: 100%; }
  .filter-tab-btn { font-size: 0.85rem; min-height: 44px; padding: 8px 14px; }
  .section-container, .cta-banner { max-width: 100vw; }
  /* Sections on the home and real estate pages set fixed columns inline, which widened the phone layout. */
  .testimonial-carousel, .trust-cards-grid, .process-grid, .cta-banner { grid-template-columns: minmax(0, 1fr) !important; }
  .cta-banner { padding: 28px 20px !important; }
  .ambient-glow { display: none; }
  .listing-search, .listing-select { width: 100% !important; }
  .pd-main { padding-top: 90px; padding-bottom: 72px; }
  .pd-wrap { padding: 0 16px; }
  .pd-highlights, .pd-conn-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-compare .properties-grid { grid-template-columns: minmax(0, 1fr); }
  .pd-hero-img { border-radius: 14px; }
  .pd-mobile-bar {
    background: #fff;
    border-top: 1px solid var(--border-soft);
    bottom: 0;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 48px 48px;
    left: 0;
    padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    z-index: 90;
  }
  .pd-mobile-bar .btn-premium { justify-content: center; min-height: 48px; padding: 10px; }
  .pd-mobile-icon { align-items: center; border: 1px solid var(--border-soft); border-radius: 10px; display: flex; font-size: 1.15rem; height: 48px; justify-content: center; }
  .pd-mobile-icon.is-wa { color: #128c4e; }
  .pd-mobile-icon.is-tel { color: var(--accent-red); }
}

@media (prefers-reduced-motion: reduce) {
  .prop-img, .prop-card:hover .prop-img { transform: none; transition: none; }
}
