/* ============================================================
   Bahria Town Lahore: Listing pages (house-for-sale, etc.)
   Extends ../css/style.css: same tokens, glass system, fonts.
   ============================================================ */

/* Page hero: slightly tighter than home, own backdrop */
.hero--page .hero__bg {
  background-image: url('../assets/images/bahria-lahore-house-for-sale-hero.jpg');
}
.hero--page .hero__inner {
  padding-top: clamp(52px, 7vw, 84px);
  padding-bottom: clamp(40px, 5vw, 64px);
}

/* ---------- Filter / sort bar (light glass) ---------- */
.filter-bar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 16px 18px; margin-bottom: 22px;
}
.filter-bar__count {
  font-family: var(--font-head); font-weight: 700; font-size: 0.92rem;
  color: var(--bl-dark); margin-right: auto;
}
.filter-bar label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.78rem; font-weight: 700; letter-spacing: 0.04em; color: var(--bl-dark);
}
.filter-bar select {
  font-family: var(--font-body); font-size: 0.88rem; font-weight: 600;
  padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--bl-line); background: #fff; color: var(--bl-ink);
  cursor: pointer;
}
.filter-bar select:focus { outline: 2px solid rgba(211, 148, 66, 0.55); outline-offset: 1px; }
.filter-bar__reset {
  font-size: 0.82rem; font-weight: 700; color: var(--bl-secondary);
  background: none; border: 0; cursor: pointer; text-decoration: underline;
  text-underline-offset: 3px; padding: 8px 4px;
}

/* ---------- Listings grid ---------- */
.listings-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.listing-card { padding: 0; display: flex; flex-direction: column; position: relative; }
.listing-card__media { position: relative; aspect-ratio: 16/10; overflow: hidden; border-radius: var(--bl-radius) var(--bl-radius) 0 0; }
.listing-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
/* Zoom is scoped to the image wrapper only; hovering the image never
   changes the card's layout, height, or any sibling element. */
.listing-card__media:hover img { transform: scale(1.05); }
/* Whole-card clickable: the single "View Details" link stretches over the
   entire card (image, badges, price, title), no nested anchors, so no
   double-trigger or console errors. Each card keeps its own relative href. */
.listing-card__body .btn::after {
  content: ""; position: absolute; inset: 0; z-index: 1; cursor: pointer;
}
/* Locked button size: explicit floor + full width so no hover, flex, or
   grid resize can compress it. The stretched ::after above means any card
   hover also :hovers this anchor, so its hover must never use transform,
   otherwise the button visibly rescales on every image hover. Color-only
   feedback from .btn--outline:hover still applies. */
.listing-card__body .btn {
  min-height: 48px; min-width: 180px; width: 100%; box-sizing: border-box;
}
.listing-card__body .btn:hover { transform: none; }
.listing-card__tag {
  position: absolute; top: 12px; left: 12px;
  background: rgba(30, 20, 8, 0.72); color: #fff;
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.05em;
  padding: 7px 13px; border-radius: 999px;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
}
.listing-card__size {
  position: absolute; bottom: 12px; right: 12px;
  background: linear-gradient(135deg, var(--bl-primary), var(--bl-secondary));
  color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 0.78rem;
  padding: 7px 14px; border-radius: 999px;
  box-shadow: 0 6px 18px rgba(211, 148, 66, 0.45);
}
.listing-card__body { padding: 20px 22px 22px; display: grid; gap: 8px; flex: 1; }
.listing-card__price {
  font-family: var(--font-head); font-weight: 800; font-size: 1.25rem;
  color: var(--bl-secondary); letter-spacing: -0.01em;
}
.listing-card__title { margin: 0; font-size: 1.05rem; }
.listing-card__loc { font-size: 0.86rem; color: var(--bl-muted); margin: 0; }
.listing-card__specs {
  display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px;
  font-size: 0.76rem; font-weight: 700; color: var(--bl-secondary);
}
.listing-card__specs span {
  background: rgba(211, 148, 66, 0.12); border: 1px solid rgba(211, 148, 66, 0.28);
  padding: 4px 11px; border-radius: 999px;
}
.listing-card__empty {
  grid-column: 1 / -1; text-align: center; padding: 40px 20px; color: var(--bl-muted);
}
.listing-card__desc { font-size: 0.88rem; color: #57493a; margin: 0; }
.listing-card__chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0 6px; }
.chip {
  font-size: 0.72rem; font-weight: 700; color: var(--bl-secondary);
  background: rgba(211, 148, 66, 0.12); border: 1px solid rgba(211, 148, 66, 0.28);
  padding: 3px 10px; border-radius: 999px;
}
.chip--more { background: transparent; border-style: dashed; }

/* ---------- Detail 2-column layout ---------- */
.section--detail { padding-top: clamp(22px, 3vw, 40px); }
.crumbs--bar {
  background: rgba(211, 148, 66, 0.10);
  border: 1px solid rgba(211, 148, 66, 0.25);
  border-radius: 12px; padding: 10px 18px; margin-bottom: 22px;
}
.detail-layout {
  display: grid; grid-template-columns: 1.65fr 1fr; gap: 22px; align-items: start;
  margin-top: 24px;
}
.detail-main-col { min-width: 0; display: grid; gap: 26px; }
.detail-section { margin: 0; }
.detail-section h2 { font-size: 1.3rem; margin-bottom: 10px; }
.detail-section p { color: #453B2D; font-size: 0.98rem; line-height: 1.8; margin: 0; }
.detail-side { position: sticky; top: 88px; display: grid; gap: 16px; min-width: 0; }
.side-card { padding: 24px; }
.side-card__label {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.18em;
  color: var(--bl-muted); text-transform: uppercase; margin: 0 0 4px;
}
.side-card__price {
  font-family: var(--font-head); font-weight: 800; font-size: 1.7rem;
  color: var(--bl-secondary); margin: 0 0 4px; letter-spacing: -0.01em;
}
.side-card__sub { font-size: 0.85rem; color: var(--bl-muted); margin: 0 0 16px; }
.rate-line { display: flex; align-items: center; gap: 8px; margin: 0 0 16px; font-size: 0.85rem; color: var(--bl-muted); }
.rate-line__stars { color: var(--bl-primary); letter-spacing: 2px; }
.rate-line strong { color: var(--bl-ink); }
.side-card__trust { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.side-card__trust li {
  position: relative; padding-left: 30px; font-size: 0.88rem; color: #453B2D; line-height: 1.5;
}
.side-card__trust li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(211, 148, 66, 0.14); border: 1px solid rgba(211, 148, 66, 0.4);
  color: var(--bl-secondary); font-size: 0.7rem; font-weight: 800;
  display: grid; place-items: center;
}
.side-card__btns { display: grid; gap: 10px; }
.side-card__btns .btn { width: 100%; justify-content: center; }
.side-card__muted { font-size: 0.78rem; color: var(--bl-muted); text-align: center; margin: 12px 0 0; }
.side-card__fine { font-size: 0.75rem; color: var(--bl-muted); line-height: 1.6; margin: 12px 0 0; padding-top: 12px; border-top: 1px solid var(--bl-line); }
.side-card--visit { background: linear-gradient(150deg, #17552E, #0E3B20); border: 1px solid rgba(255,255,255,0.14); color: #fff; }
.side-card--visit h3 { color: #fff; font-size: 1.05rem; margin-bottom: 8px; }
.side-card--visit p { font-size: 0.88rem; color: rgba(255,255,255,0.82); margin: 0 0 14px; }
.side-card__call {
  font-family: var(--font-head); font-weight: 800; font-size: 1.05rem;
  color: var(--bl-accent); text-decoration: none;
  display: inline-flex; align-items: center; gap: 8px;
}
.side-card__call:hover { text-decoration: underline; text-underline-offset: 3px; }
.side-card--form h3 { font-size: 1.05rem; margin-bottom: 4px; }
.side-card--form > p { font-size: 0.85rem; color: var(--bl-muted); margin: 0 0 14px; }
.side-card--form form { display: grid; gap: 10px; }
.side-card--form label { display: grid; gap: 5px; font-size: 0.78rem; font-weight: 700; color: var(--bl-dark); }
.side-card--form input, .side-card--form textarea {
  font-family: var(--font-body); font-size: 0.9rem; padding: 11px 13px;
  border-radius: 11px; border: 1px solid var(--bl-line); background: #fff; width: 100%; color: var(--bl-ink);
}
.side-card--form textarea { min-height: 84px; resize: vertical; }
.side-card--form input:focus, .side-card--form textarea:focus { outline: 2px solid rgba(211,148,66,0.55); outline-offset: 1px; }
@media (max-width: 960px) {
  .detail-layout { grid-template-columns: 1fr; }
  .detail-side { position: static; }
}
.crumbs { font-size: 0.85rem; color: var(--bl-muted); margin-bottom: 18px; }
.crumbs a { color: var(--bl-secondary); font-weight: 700; text-decoration: none; }
.crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.detail-hero { margin-bottom: 26px; }
.detail-main { margin: 0; border-radius: var(--bl-radius); overflow: hidden; box-shadow: var(--bl-shadow); border: 1px solid rgba(255,255,255,0.6); position: relative; }
.detail-main img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: opacity 0.16s ease; }
.detail-main img.is-fading { opacity: 0; }
.detail-thumbs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.detail-thumbs img { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: var(--bl-radius-sm); border: 1px solid rgba(255,255,255,0.6); box-shadow: var(--bl-shadow-sm); cursor: pointer; transition: outline-color 0.2s ease, transform 0.2s ease; outline: 2px solid transparent; outline-offset: 2px; }
.detail-thumbs img:hover { transform: translateY(-2px); }
.detail-thumbs img.is-active { outline-color: var(--bl-secondary); }
/* Gallery arrows: same circular treatment as the home discover arrows. */
.g-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(211, 148, 66, 0.40); background: rgba(255, 255, 255, 0.78);
  color: var(--bl-secondary); font-size: 1.15rem; line-height: 1;
  box-shadow: var(--bl-shadow-sm); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s ease, color 0.2s ease;
}
.g-arrow:hover { background: var(--bl-dark); border-color: var(--bl-dark); color: #fff; }
.g-prev { left: 12px; }
.g-next { right: 12px; }
/* Detail lightbox: click-to-enlarge overlay reusing the gallery arrows. */
.detail-main img { cursor: zoom-in; }
.lb { position: fixed; inset: 0; z-index: 400; display: grid; align-content: center; justify-items: center; gap: 12px; background: rgba(15, 10, 4, 0.9); padding: 56px 20px 20px; }
.lb[hidden] { display: none; }
.lb img { max-width: min(1100px, 94vw); max-height: 78vh; border-radius: 12px; object-fit: contain; box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5); }
.lb__count { margin: 0; color: rgba(255, 255, 255, 0.85); font-size: 0.9rem; letter-spacing: 0.08em; }
.lb__close { position: absolute; top: 16px; right: 16px; transform: none; }
.lb .g-prev { left: 16px; }
.lb .g-next { right: 16px; }
@media (max-width: 720px) {
  .g-arrow { width: 38px; height: 38px; font-size: 1rem; }
  .g-prev { left: 8px; }
  .g-next { right: 8px; }
}
.detail-head { max-width: 820px; margin: 0 auto 30px; text-align: center; }
.detail-head h1 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 8px; }
.detail-price { font-family: var(--font-head); font-weight: 800; font-size: 1.6rem; color: var(--bl-secondary); margin: 0 0 4px; }
.detail-ref { font-size: 0.85rem; color: var(--bl-muted); margin-bottom: 18px; }
.detail-ctas { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.spec-table { width: 100%; border-collapse: collapse; margin: 6px 0 1.2em; font-size: 0.95rem; }
.spec-table th, .spec-table td { text-align: left; padding: 11px 14px; border: 1px solid var(--bl-line); }
.spec-table th { width: 34%; font-family: var(--font-head); font-size: 0.85rem; color: var(--bl-secondary); background: rgba(211,148,66,0.08); }
.spec-table td { color: #453B2D; background: #fff; }
/* Scroll wrapper keeps wide spec tables from forcing page-level
   horizontal scroll on narrow phones; harmless where tables fit. */
.spec-scroll { overflow-x: auto; margin: 6px 0 1.2em; }
.spec-scroll .spec-table { margin: 0; min-width: 400px; }
.similar-title { text-align: center; margin: 44px 0 22px; }
@media (max-width: 720px) {
  .detail-ctas { flex-direction: column; align-items: stretch; }
  .detail-ctas .btn { justify-content: center; }
  .detail-thumbs { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* ---------- Listing content helpers ---------- */
.content-block { max-width: 820px; margin: 0 auto 40px; }
.content-block:last-child { margin-bottom: 0; }
.content-block p { color: #453B2D; font-size: 1rem; line-height: 1.8; margin-bottom: 1.1em; }
.content-block a { color: var(--bl-secondary); font-weight: 700; }
.content-block ul.ticks { list-style: none; margin: 0 0 1.2em; padding: 0; display: grid; gap: 10px; }
.content-block ul.ticks li {
  position: relative; padding-left: 30px; font-size: 0.96rem; color: #453B2D; line-height: 1.65;
}
.content-block ul.ticks li::before {
  content: "✓"; position: absolute; left: 0; top: 1px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(211, 148, 66, 0.14); border: 1px solid rgba(211, 148, 66, 0.4);
  color: var(--bl-secondary); font-size: 0.72rem; font-weight: 800;
  display: grid; place-items: center;
}
.mini-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin: 22px 0; }
.mini-card { padding: 22px; }
.mini-card h3 { font-size: 1rem; margin-bottom: 8px; }
.mini-card p { font-size: 0.9rem; color: #57493a; margin: 0; }

/* Page-specific hero backdrops (unique image per page) */
.hero--rent .hero__bg { background-image: url('../assets/images/bahria-lahore-house-for-rent-hero.jpg'); }
.hero--plot .hero__bg { background-image: url('../assets/images/bahria-lahore-plot-for-sale-hero.webp'); }
.hero--aptsale .hero__bg { background-image: url('../assets/images/bahria-lahore-apartment-for-sale-hero.jpg'); }
.hero--aptrent .hero__bg { background-image: url('../assets/images/bahria-lahore-apartment-tower-hero.jpg'); }
.hero--aptinst .hero__bg { background-image: url('../assets/images/bahria-lahore-apartment-installment-hero.webp'); }
.hero--contact .hero__bg { background-image: url('../assets/images/bahria-lahore-contact-hero.jpg'); }

/* Glass form fields on dark hero cards (contact page) */
.search-widget input, .search-widget textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.95rem;
  padding: 13px 14px; border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.25);
  background-color: rgba(255,255,255,0.14); color: #fff;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.search-widget input::placeholder, .search-widget textarea::placeholder { color: rgba(255,255,255,0.6); }
.search-widget textarea { min-height: 96px; resize: vertical; }
.search-widget input:focus, .search-widget textarea:focus { outline: 2px solid rgba(242,198,109,0.6); outline-offset: 1px; }
.form-note { font-size: 0.82rem; color: rgba(255,255,255,0.75); margin: 0; text-align: center; }
.form-success {
  display: none; text-align: center; padding: 26px 10px;
  color: #fff; font-family: var(--font-head);
}
.form-success.show { display: block; }
.form-success strong { display: block; font-size: 1.2rem; margin-bottom: 8px; color: var(--bl-accent); }
.form-success p { font-family: var(--font-body); font-size: 0.92rem; color: rgba(255,255,255,0.85); margin: 0; }
.cta-band {
  text-align: center; padding: clamp(28px, 4vw, 44px);
  max-width: 820px; margin: 0 auto;
}
.cta-band h2 { margin-bottom: 10px; }
.cta-band p { color: var(--bl-muted); margin-bottom: 22px; }
.cta-band__btns { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; }

@media (max-width: 1080px) {
  .listings-grid { grid-template-columns: repeat(2, 1fr); }
}
.mini-grid--4 { grid-template-columns: repeat(4, 1fr); max-width: 1000px; margin-left: auto; margin-right: auto; }
@media (max-width: 1080px) {
  .mini-grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .listings-grid, .mini-grid { grid-template-columns: 1fr; }
  .mini-grid--4 { grid-template-columns: 1fr; }
  .filter-bar__count { flex-basis: 100%; }
  .filter-bar label { flex: 1 1 45%; }
  .filter-bar select { width: 100%; }
  .cta-band__btns { flex-direction: column; align-items: stretch; }
  .cta-band__btns .btn { justify-content: center; }
}

/* ============ SEO guide block (detail pages) ============ */
.seo-guide h2 { margin: 30px 0 14px; line-height: 1.55; }
.seo-guide h2:first-of-type { margin-top: 22px; }
.seo-guide h3 { font-size: 1.08rem; margin: 22px 0 10px; line-height: 1.55; }
.seo-guide p { text-align: justify; text-justify: inter-word; line-height: 1.85; margin: 0 0 14px; }
.seo-guide p:last-child { margin-bottom: 0; }
