/* Homepage feature pack v3 */
#common-home { --pb-brand: #ff385c; --pb-ink: #111; --pb-muted: #6a6a6a; --pb-line: #ebebeb; }

/* 1. Skip / focus */
#common-home :focus-visible { outline: 2px solid var(--pb-brand); outline-offset: 2px; }

/* 2. Hero greeting + map legend */
.pb-home-greet { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; opacity: .85; margin-bottom: 6px; }
.pb-map-legend {
  position: absolute; left: 16px; bottom: 16px; z-index: 3;
  display: flex; gap: 10px; flex-wrap: wrap;
  background: rgba(15,23,42,.85); color: #fff; border-radius: 999px;
  padding: 6px 12px; font-size: 12px;
}
@media (hover: hover) and (pointer: fine) {
  .pb-map-legend {
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
}
.pb-map-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pb-map-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.pb-map-legend .sale { background: #ff385c; }
.pb-map-legend .rent { background: #38bdf8; }

/* 3. Extra hero fields */
.pb-home-search .pb-home-seg.compact select { min-width: 0; }
@media (min-width: 900px) {
  .pb-home-search { grid-template-columns: 1.4fr 1fr 1fr .8fr auto; }
}

/* 4. Intent chips under band */
.pb-intent-chips {
  max-width: min(1400px, 100%); margin: 16px auto 0; padding: 0 24px;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.pb-intent-chips button, .pb-intent-chips a {
  border: 1px solid var(--pb-line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--pb-ink);
  cursor: pointer; text-decoration: none;
}
.pb-intent-chips button.is-active, .pb-intent-chips a:hover {
  border-color: var(--pb-brand); color: var(--pb-brand);
}

/* 5. Near me */
.pb-near-me {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: 13px; font-weight: 600;
  color: #fff; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.28);
  border-radius: 999px; padding: 8px 14px; cursor: pointer;
}
.pb-near-me:hover { background: rgba(255,255,255,.28); color: #fff; }

/* 6. Listing toolbar */
.pb-feed-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 14px;
}
.pb-feed-toolbar .chip-btn {
  border: 1px solid var(--pb-line); background: #fff; border-radius: 999px;
  padding: 7px 12px; font-size: 12px; font-weight: 600; cursor: pointer;
}
.pb-feed-toolbar .chip-btn.is-active { background: #111; color: #fff; border-color: #111; }

/* 7. Card fav + compare + badges */
.pb-home-card { position: relative; }
.pb-home-card-actions {
  position: absolute; top: 10px; right: 10px; z-index: 2; display: flex; gap: 6px;
}
.pb-home-card-actions button {
  width: 36px; height: 36px; border-radius: 50%; border: 0;
  background: rgba(255,255,255,.92); color: #333; cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,.12); font-size: 14px;
}
.pb-home-card-actions button.is-on { color: var(--pb-brand); }
.pb-home-card-badge-status {
  position: absolute; right: 10px; bottom: 10px;
  background: rgba(17,17,17,.85); color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 999px;
}
.pb-home-card-badge-new {
  position: absolute; left: 10px; bottom: 10px;
  background: #16a34a; color: #fff; font-size: 11px; font-weight: 700;
  padding: 4px 8px; border-radius: 999px;
}
.pb-home-card-media { position: relative; }

/* 8. Load more / retry */
.pb-feed-actions { text-align: center; margin-top: 12px; }
.pb-feed-actions button {
  border: 1px solid var(--pb-line); background: #fff; border-radius: 12px;
  padding: 12px 20px; font-weight: 700; cursor: pointer;
}
.pb-feed-actions button.primary { background: var(--pb-brand); color: #fff; border-color: var(--pb-brand); }

/* 9. Recently viewed */
.pb-recent-strip {
  display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.pb-recent-item {
  flex: 0 0 200px; scroll-snap-align: start;
  border: 1px solid var(--pb-line); border-radius: 14px; background: #fff;
  text-decoration: none; color: inherit; overflow: hidden;
}
.pb-recent-item img { width: 100%; height: 110px; object-fit: cover; display: block; background: #f3f4f6; }
.pb-recent-item .body { padding: 10px 12px; }
.pb-recent-item h3 { margin: 0 0 2px; font-size: 13px; font-weight: 700; }
.pb-recent-item p { margin: 0; font-size: 12px; color: var(--pb-muted); }

/* 10. FAQ */
.pb-faq details {
  border: 1px solid var(--pb-line); border-radius: 14px; background: #fff;
  padding: 14px 16px; margin-bottom: 10px;
}
.pb-faq summary { font-weight: 700; cursor: pointer; }
.pb-faq details p { margin: 10px 0 0; color: var(--pb-muted); font-size: 14px; line-height: 1.5; }

/* 11. Testimonials */
.pb-quotes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px;
}
.pb-quote {
  background: #fff; border: 1px solid var(--pb-line); border-radius: 16px; padding: 18px;
}
.pb-quote p { margin: 0 0 10px; font-size: 14px; line-height: 1.5; color: #333; }
.pb-quote cite { font-size: 12px; color: var(--pb-muted); font-style: normal; font-weight: 600; }

/* 12. Insights teaser */
.pb-insights-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px;
}
.pb-insight-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--pb-line); border-radius: 16px; padding: 18px; background: #fff;
}
.pb-insight-card h3 { margin: 0 0 6px; font-size: 15px; }
.pb-insight-card p { margin: 0; font-size: 13px; color: var(--pb-muted); }

/* 13. Newsletter home */
.pb-home-news {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: #f8fafc; border: 1px solid var(--pb-line); border-radius: 16px; padding: 18px 20px;
}
.pb-home-news form { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-home-news input {
  border: 1px solid #e0e0e0; border-radius: 10px; padding: 10px 12px; min-width: 220px; font-size: 15px;
}
.pb-home-news button {
  border: 0; background: #111; color: #fff; border-radius: 10px; padding: 10px 16px; font-weight: 700; cursor: pointer;
}

/* 14. Compare bar — #2486 safe-area for notched iPhones */
.pb-compare-bar {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  z-index: 40; display: none; align-items: center; gap: 12px;
  background: #111; color: #fff; border-radius: 16px; padding: 12px 16px;
  box-shadow: 0 12px 40px rgba(0,0,0,.25); max-width: calc(100% - 24px);
}
.pb-compare-bar.is-on { display: flex; }
.pb-compare-bar a, .pb-compare-bar button {
  border: 0; border-radius: 10px; padding: 8px 12px; font-weight: 700; cursor: pointer;
}
.pb-compare-bar a.primary { background: var(--pb-brand); color: #fff; text-decoration: none; }
.pb-compare-bar button.ghost { background: transparent; color: #fff; border: 1px solid #444; }

/* 15. Back to top — #2486 safe-area */
.pb-back-top {
  position: fixed; right: 16px; bottom: max(16px, env(safe-area-inset-bottom, 0px)); z-index: 35;
  width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: #111; color: #fff; cursor: pointer; display: none;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.pb-back-top.is-on { display: inline-flex; align-items: center; justify-content: center; }

/* 16. Alert CTA */
.pb-alert-cta {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 14px; padding: 14px 16px; margin-top: 16px;
}
.pb-alert-cta a {
  background: #ea580c; color: #fff; text-decoration: none; font-weight: 700;
  padding: 10px 14px; border-radius: 10px;
}

/* #2486: removed unused .pb-mobile-search-sticky (never wired in home.twig) */

@media (prefers-reduced-motion: reduce) {
  .pb-home-card, .pb-intent-chips button { transition: none; }
}

@media print {
  .pb-home-hero, .pb-compare-bar, .pb-back-top { display: none !important; }
}
