/* Public marketplace (home, search, listing, agency). Builds on pt.css tokens. Mobile-first. */
.pub-hero { background: linear-gradient(135deg, var(--pt-primary) 0%, var(--pt-primary-500) 100%); color: #fff; padding: var(--pt-s6) 0; }
.pub-hero__title { color: #fff; font-size: 1.75rem; margin-bottom: var(--pt-s2); }
/* uxreview3: AI search box sits on the red hero, so its text must be light */
.pub-hero .by-ai { margin-top: var(--pt-s4); }
.pub-hero .by-ai__label, .pub-hero .by-ai__hint, .pub-hero .by-ai__status { color: #fff; }
.pub-hero .by-ai__status.is-error { color: #fff; font-weight: 700; text-decoration: underline; }
.pub-hero__lead { color: rgba(255,255,255,.88); margin-bottom: var(--pt-s5); }
.pub-hero__form { display: grid; gap: var(--pt-s2); grid-template-columns: 1fr; background: var(--pt-surface); padding: var(--pt-s3); border-radius: var(--pt-r-lg); box-shadow: var(--pt-shadow-3); }
.pub-hero__form .pt-btn { width: 100%; }
@media (min-width: 900px) {
  .pub-hero { padding: var(--pt-s7) 0; }
  .pub-hero__title { font-size: 2.5rem; }
  .pub-hero__form { grid-template-columns: 2fr 1fr 1fr auto; align-items: center; }
  .pub-hero__form .pt-btn { width: auto; }
}
.pub-areas { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--pt-s3); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .pub-areas { grid-template-columns: repeat(4, 1fr); } }
.pub-area { display: flex; flex-direction: column; gap: 2px; padding: var(--pt-s4); background: var(--pt-surface); border: 1px solid var(--pt-border); border-radius: var(--pt-r-lg); text-decoration: none; min-height: var(--pt-tap); transition: box-shadow .2s, border-color .2s; }
.pub-area:hover { box-shadow: var(--pt-shadow-2); border-color: var(--pt-border-strong); }
.pub-area__name { font-weight: 700; color: var(--pt-text); }
.pub-area__count { font-size: .875rem; color: var(--pt-text-2); }
.pub-cta { display: flex; flex-direction: column; align-items: flex-start; gap: var(--pt-s2); }
.pub-empty { padding: var(--pt-s6) var(--pt-s4); display: flex; flex-direction: column; align-items: center; gap: var(--pt-s2); }

/* listing card: photo carousel, badges (used on home, search, agency, similar listings) */
.srch-car { position: relative; }
.srch-car__track { display: flex; width: 100%; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; position: relative; z-index: 2; }
.srch-car__track::-webkit-scrollbar { display: none; }
.srch-car__slide { flex: 0 0 100%; scroll-snap-align: start; display: block; height: 100%; }
.srch-car__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-lcard__badges { z-index: 3; pointer-events: none; flex-direction: row; align-items: flex-start; gap: 6px; max-width: calc(100% - 64px); }
.srch-badge { display: inline-flex; align-items: center; max-width: 100%; padding: 4px 10px; border-radius: var(--pt-r-pill); background: rgba(255,255,255,.96); color: var(--pt-text); font-size: .75rem; font-weight: 700; line-height: 1.3; white-space: nowrap; box-shadow: var(--pt-shadow-1); }
.srch-badge--new { background: var(--pt-primary); color: #fff; }
.srch-badge--sold { background: var(--pt-sold-bg); color: var(--pt-sold); }
.srch-badge--ai { background: var(--pt-ink); color: #fff; }
.pt-lcard .pt-lcard__fav { z-index: 4; }
.srch-car__dots { position: absolute; z-index: 3; left: 0; right: 0; bottom: 8px; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.srch-car__dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); box-shadow: 0 0 2px rgba(0,0,0,.35); }
.srch-car__dots i.is-on { background: #fff; transform: scale(1.25); }
.srch-car__nav { position: absolute; z-index: 4; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: none; place-items: center; border: 0; border-radius: 50%; background: rgba(255,255,255,.95); color: var(--pt-text); box-shadow: var(--pt-shadow-2); cursor: pointer; opacity: 0; transition: opacity .16s; }
.srch-car__nav--prev { left: 8px; } .srch-car__nav--next { right: 8px; }
.srch-car__nav .pt-icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .srch-car[data-multi] .srch-car__nav { display: grid; } .pt-lcard:hover .srch-car__nav { opacity: 1; } }
.pt-lcard__title a:hover { text-decoration: underline; }

/* listing */
.pub-gallery { margin-bottom: var(--pt-s5); }
.pt-gallery__main, .pt-gallery__thumb { position: relative; }
.pub-ai { position: absolute; left: 10px; top: 10px; background: rgba(10,22,36,.8); color: #fff; font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: var(--pt-r-pill); letter-spacing: .02em; }
.pub-ai--sm { left: 6px; top: 6px; padding: 1px 7px; font-size: .6875rem; }
.pub-nophoto { display: grid; place-items: center; gap: 8px; color: var(--pt-text-3); aspect-ratio: 16 / 7; margin-bottom: var(--pt-s5); border-radius: var(--pt-r-lg); background: var(--pt-surface-3); }
.pub-nophoto .pt-icon { width: 40px; height: 40px; }
.pub-place { display: flex; gap: 6px; align-items: center; margin: 0; }
.pub-place .pt-icon { color: var(--pt-accent); }
.pub-main { min-width: 0; }
.pub-aside { min-width: 0; }
@media (min-width: 900px) { .pub-aside { position: sticky; top: calc(var(--pt-header-h) + 12px); } }
.pub-phone small { font-weight: 500; }
.pub-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.pub-contact h2 { margin: 0; }
.pub-extras { margin-top: var(--pt-s5); }
body.pub-listing, .pub-listing-page { padding-bottom: 72px; }
@media (min-width: 900px) { .pub-listing-page { padding-bottom: 0; } }
.pub-listing .pt-prose p { max-width: 70ch; }
.pub-agency-head { display: grid; gap: var(--pt-s4); grid-template-columns: 1fr; margin-top: var(--pt-s3); }
@media (min-width: 600px) { .pub-agency-head { grid-template-columns: auto 1fr; } }
.pub-agency-logo { width: 88px; height: 88px; font-size: 2rem; }

/* uxreview2: sticky action bar on phones (three buttons must fit; the third lives in the page too) */
.pt-actionbar .pt-btn { min-width: 0; padding-inline: .6rem; white-space: nowrap; }
.pt-actionbar .pt-btn:first-child { flex: 1.4; }
@media (max-width: 479px) { .pt-actionbar [data-askpt-open] { display: none; } }

/* uxreview2: map controls and attribution reachable by thumb */
.pub-map .maplibregl-ctrl-group button, [data-pub-map] .maplibregl-ctrl-group button { width: 44px; height: 44px; }

/* uxreview2: shorter desktop gallery so title and price show above the fold at 1280x800 */
@media (min-width: 900px) { .pt-gallery.pub-gallery { aspect-ratio: 2.7 / 1; max-height: 430px; } }

.pt-gallery__more { min-height: 44px; }

/* uxreview3: 44px touch targets for the seller links in the contact column */
.pub-aside a:not(.pt-btn) { display: inline-flex; align-items: center; min-height: 44px; }

/* listing-page map (kept from v1; the search map uses .srch-map in search.css) */
.pub-map { width: 100%; height: 60vh; min-height: 320px; border-radius: var(--pt-r-lg); overflow: hidden; border: 1px solid var(--pt-border); background: var(--pt-surface-3); }
.srch-car__track:focus-visible { outline: 3px solid var(--pt-ring); outline-offset: -3px; }
