/* 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 — #9476 light text on navy hero (≥4.5:1) */
.pb-home-greet {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.88);
  opacity: 1;
}
.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: 9px 16px; font-size: 14px; 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: 14px; font-weight: 600;
  color: #0f172a; background: rgba(15,23,42,.05); border: 1px solid rgba(15,23,42,.16);
  border-radius: 999px; padding: 8px 16px; cursor: pointer;
}
.pb-near-me:hover { background: rgba(15,23,42,.10); color: #0f172a; }

/* 6. Listing toolbar */
.pb-feed-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px;
}
.pb-feed-toolbar .chip-btn {
  border: 1px solid var(--pb-line); background: #fff; border-radius: 999px;
  padding: 8px 14px; font-size: 13px; 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,.88); color: #fff; font-size: 11px; font-weight: 800;
  text-transform: uppercase; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em;
  border: 1px solid rgba(255,255,255,.22); box-shadow: 0 2px 10px rgba(0,0,0,.28);
}
.pb-home-card-badge-tx--lease { background: #2563eb; color: #fff; }
.pb-home-card-badge-tx--sale { background: #059669; color: #fff; }
html[data-pb-theme="dark"] .pb-home-card-media img[src*="placeholder"] {
  background: #242429 !important;
  filter: invert(0.88) hue-rotate(180deg) brightness(0.92);
}
.pb-home-card-badge-new {
  position: absolute; left: 10px; bottom: 10px;
  background: #16a34a; color: #fff; font-size: 12px; 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: 16px; }
.pb-feed-actions button {
  border: 1px solid var(--pb-line); background: #fff; border-radius: 12px;
  padding: 12px 22px; font-size: 15px; 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: 14px; overflow-x: auto; padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.pb-recent-item {
  flex: 0 0 210px; 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: 12px 14px; }
.pb-recent-item h3 { margin: 0 0 4px; font-size: 15px; font-weight: 700; }
.pb-recent-item p { margin: 0; font-size: 14px; color: var(--pb-muted); }

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

/* 11. Testimonials */
.pb-quotes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px;
}
.pb-quote {
  background: #fff; border: 1px solid var(--pb-line); border-radius: 16px; padding: 20px 22px; margin: 0;
}
.pb-quote p { margin: 0 0 12px; font-size: 15px; line-height: 1.6; color: #222; }
.pb-quote cite { font-size: 13px; 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(240px, 1fr)); gap: 16px;
}
.pb-insight-card {
  display: block; text-decoration: none; color: inherit;
  border: 1px solid var(--pb-line); border-radius: 16px; padding: 20px; background: #fff;
}
.pb-insight-card h3 { margin: 0 0 6px; font-size: 17px; font-weight: 700; color: #222; }
.pb-insight-card p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--pb-muted); }

/* 13. Newsletter home */
.pb-home-news {
  display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between;
  background: #f8fafc; border: 1px solid var(--pb-line); border-radius: 16px; padding: 20px 22px;
}
.pb-home-news form { display: flex; gap: 8px; flex-wrap: wrap; }
.pb-home-news input {
  border: 1px solid #e0e0e0; border-radius: 10px; padding: 10px 14px; min-width: 240px; font-size: 15px;
}
.pb-home-news button {
  border: 0; background: #111; color: #fff; border-radius: 10px; padding: 10px 18px; font-size: 15px; 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 strong {
  display: block; font-size: 15px; color: #111; margin-bottom: 2px;
}
.pb-alert-cta .pb-alert-cta-sub {
  font-size: 13px; color: #9a3412; line-height: 1.4;
}
.pb-alert-cta a,
.pb-alert-cta button.pb-alert-cta-btn {
  background: #ea580c; color: #fff; text-decoration: none; font-weight: 700;
  padding: 10px 14px; border-radius: 10px; border: 0; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.pb-alert-cta a:hover,
.pb-alert-cta button.pb-alert-cta-btn:hover {
  background: #c2410c; color: #fff;
}

html[data-pb-theme="dark"] .pb-alert-cta,
[data-pb-theme="dark"] .pb-alert-cta {
  background: #231815;
  border-color: #4a2818;
}
html[data-pb-theme="dark"] .pb-alert-cta strong,
[data-pb-theme="dark"] .pb-alert-cta strong {
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-alert-cta .pb-alert-cta-sub,
[data-pb-theme="dark"] .pb-alert-cta .pb-alert-cta-sub {
  color: #fdba74;
}
html[data-pb-theme="dark"] .pb-alert-cta a,
html[data-pb-theme="dark"] .pb-alert-cta button.pb-alert-cta-btn,
[data-pb-theme="dark"] .pb-alert-cta a,
[data-pb-theme="dark"] .pb-alert-cta button.pb-alert-cta-btn {
  background: #c2410c;
  color: #ffffff;
}
html[data-pb-theme="dark"] .pb-alert-cta a:hover,
html[data-pb-theme="dark"] .pb-alert-cta button.pb-alert-cta-btn:hover,
[data-pb-theme="dark"] .pb-alert-cta a:hover,
[data-pb-theme="dark"] .pb-alert-cta button.pb-alert-cta-btn:hover {
  background: #ea580c;
}

/* #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; }
}

/* Listing pop-ups (owner request, 2026-10-16): dynamic feed cards */
.pb-listing-pop {
  position: fixed; left: 16px; bottom: 16px; z-index: 800;
  width: 330px; max-width: calc(100vw - 32px);
  opacity: 0; transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease;
}
.pb-listing-pop.is-in { opacity: 1; transform: translateY(0); }
.pb-listing-pop-card {
  display: flex; gap: 12px; align-items: center;
  background: #fff; color: #222; text-decoration: none;
  border: 1px solid #ebebeb; border-radius: 12px;
  box-shadow: 0 10px 34px rgba(0,0,0,.18);
  padding: 10px 34px 10px 10px;
}
.pb-listing-pop-card:hover { color: #222; text-decoration: none; }
.pb-listing-pop-img {
  width: 76px; height: 76px; flex: 0 0 76px;
  object-fit: cover; border-radius: 10px; background: #f2f2f2;
}
.pb-listing-pop-body { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pb-listing-pop-price { font-size: 16px; font-weight: 700; color: #222; }
.pb-listing-pop-name {
  font-size: 13.5px; color: #222; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.pb-listing-pop-meta { font-size: 12px; color: #6a6a6a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pb-listing-pop-x {
  position: absolute; top: 6px; right: 6px;
  width: 24px; height: 24px; border: 0; border-radius: 999px;
  background: #f2f2f2; color: #6a6a6a; font-size: 15px; line-height: 1;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pb-listing-pop-x:hover { background: #ebebeb; color: #222; }
@media (max-width: 640px) {
  .pb-listing-pop { left: 12px; right: 12px; bottom: 12px; width: auto; }
}

/* Dark theme — Soft Airbnb Night palette */
html[data-pb-theme="dark"] .pb-intent-chips button,
html[data-pb-theme="dark"] .pb-intent-chips a {
  background: #1c1c1c;
  border-color: #2e2e2e;
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-intent-chips button.is-active,
html[data-pb-theme="dark"] .pb-intent-chips a:hover {
  border-color: #ff385c;
  color: #ff385c;
}

html[data-pb-theme="dark"] .pb-near-me {
  color: #f7f7f7;
  background: #242424;
  border-color: #383838;
}
html[data-pb-theme="dark"] .pb-near-me:hover {
  background: #2e2e2e;
  color: #ffffff;
}

html[data-pb-theme="dark"] .pb-feed-toolbar .chip-btn {
  background: #1c1c1c;
  border-color: #2e2e2e;
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-feed-toolbar .chip-btn.is-active {
  background: #ff385c;
  border-color: #ff385c;
  color: #ffffff;
}

html[data-pb-theme="dark"] .pb-home-card-actions button {
  background: rgba(36, 36, 36, 0.92);
  color: #f7f7f7;
}

html[data-pb-theme="dark"] .pb-feed-actions button {
  background: #1c1c1c;
  border-color: #2e2e2e;
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-feed-actions button.primary {
  background: #ff385c;
  border-color: #ff385c;
  color: #ffffff;
}

html[data-pb-theme="dark"] .pb-recent-item {
  background: #1c1c1c;
  border-color: #2e2e2e;
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-recent-item img {
  background: #242424;
}
html[data-pb-theme="dark"] .pb-recent-item h3 {
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-recent-item p {
  color: #a3a3a3;
}

html[data-pb-theme="dark"] .pb-faq details {
  background: #1c1c1c;
  border-color: #2e2e2e;
}
html[data-pb-theme="dark"] .pb-faq summary {
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-faq details p {
  color: #a3a3a3;
}

html[data-pb-theme="dark"] .pb-quote {
  background: #1c1c1c;
  border-color: #2e2e2e;
}
html[data-pb-theme="dark"] .pb-quote p {
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-quote cite {
  color: #a3a3a3;
}

html[data-pb-theme="dark"] .pb-insight-card {
  background: #1c1c1c;
  border-color: #2e2e2e;
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-insight-card h3 {
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-insight-card p {
  color: #a3a3a3;
}

html[data-pb-theme="dark"] .pb-home-news {
  background: #1c1c1c;
  border-color: #2e2e2e;
}
html[data-pb-theme="dark"] .pb-home-news input {
  background: #242424;
  color: #f7f7f7;
  border-color: #383838;
}

html[data-pb-theme="dark"] .pb-listing-pop-card {
  background: #1c1c1c;
  color: #f7f7f7;
  border-color: #2e2e2e;
}
html[data-pb-theme="dark"] .pb-listing-pop-card:hover {
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-listing-pop-img {
  background: #242424;
}
html[data-pb-theme="dark"] .pb-listing-pop-price {
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-listing-pop-name {
  color: #f7f7f7;
}
html[data-pb-theme="dark"] .pb-listing-pop-meta {
  color: #a3a3a3;
}
html[data-pb-theme="dark"] .pb-listing-pop-x {
  background: #242424;
  color: #a3a3a3;
}
html[data-pb-theme="dark"] .pb-listing-pop-x:hover {
  background: #333333;
  color: #ffffff;
}
