/* Property detail — wide layout aligned with search/account shells */
.pb-listing {
  --ink: #222;
  --muted: #6a6a6a;
  --line: #ebebeb;
  --rausch: #ff385c;
  --soft: #f7f7f7;
  --radius: 20px;
  max-width: 1520px;
  margin: 0 auto;
  padding: 16px 24px 80px;
  color: var(--ink);
  box-sizing: border-box;
}
@media (max-width: 640px) {
  .pb-listing { padding: 8px 14px 56px; }
}
.pb-listing * { box-sizing: border-box; }
.pb-listing .pb-breadcrumb {
  display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 8px 0 16px; margin: 0;
  font-size: 13px; color: var(--muted);
}
.pb-listing .pb-breadcrumb a { color: var(--muted); text-decoration: none; }
.pb-listing .pb-breadcrumb a:hover { color: var(--ink); }

.pb-listing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px);
  gap: 28px 32px;
  align-items: start;
}
@media (max-width: 1024px) {
  .pb-listing-grid { grid-template-columns: 1fr; }
}

.pb-gallery-wrap { margin-bottom: 20px; }

/* Hero Photo Mosaic Grid */
.pb-mosaic-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: repeat(2, 190px);
  gap: 8px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  margin-bottom: 12px;
}
.pb-mosaic-item {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: #111;
  border: 0;
  padding: 0;
  margin: 0;
}
.pb-mosaic-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease, filter 0.25s ease;
  display: block;
}
.pb-mosaic-item:hover img {
  transform: scale(1.03);
  filter: brightness(0.92);
}
.pb-mosaic-item-main {
  grid-column: 1 / 2;
  grid-row: 1 / 3;
}
.pb-mosaic-btn {
  position: absolute;
  bottom: 14px;
  right: 14px;
  background: #ffffff;
  color: #222222;
  border: 1px solid rgba(0,0,0,0.15);
  padding: 8px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.18);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 5;
  transition: transform 0.15s ease, background 0.15s ease;
}
.pb-mosaic-btn:hover {
  background: #f7f7f7;
  transform: scale(1.03);
}

@media (max-width: 768px) {
  .pb-mosaic-grid {
    display: none !important;
  }
  .pb-gallery-wrap #pbGallery {
    display: block !important;
  }
  .pb-gallery-wrap #pbGalThumbs {
    display: grid !important;
  }
}

.pb-gallery {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #111;
  aspect-ratio: 16 / 10;
}
.pb-gallery img {
  width: 100%; height: 100%; object-fit: cover; display: none;
}
.pb-gallery img.is-active { display: block; }
.pb-gallery-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 42px; height: 42px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.95);
  cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,0.18); z-index: 2;
}
.pb-gallery-nav.left { left: 12px; }
.pb-gallery-nav.right { right: 12px; }
.pb-gallery-count {
  position: absolute; bottom: 14px; right: 14px; z-index: 2;
  background: rgba(0,0,0,0.55); color: #fff; font-size: 12px; font-weight: 600;
  padding: 6px 10px; border-radius: 999px;
}
.pb-gallery-thumbs {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(88px, 1fr)); gap: 8px; margin-top: 10px;
}
.pb-gallery-thumbs button {
  border: 2px solid transparent; border-radius: 10px; padding: 0; overflow: hidden;
  cursor: pointer; background: #eee; aspect-ratio: 4/3;
}
.pb-gallery-thumbs button.is-active { border-color: var(--rausch); }
.pb-gallery-thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.pb-title {
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.15; margin: 0 0 8px;
}
.pb-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.pb-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 9999px;
  background: var(--soft); font-size: 13px; font-weight: 600;
}

.pb-spec-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 10px; margin: 16px 0 20px;
}
.pb-spec {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 10px; text-align: center;
}
.pb-spec strong { display: block; font-size: 18px; font-weight: 800; }
.pb-spec span {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--muted); font-weight: 600;
}

.pb-toc {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 10px 0;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5;
  background: rgba(255,255,255,0.94); backdrop-filter: blur(8px);
}
.pb-toc a {
  font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none;
  padding: 6px 12px; border-radius: 999px; border: 1px solid transparent;
}
.pb-toc a:hover, .pb-toc a.is-active {
  color: var(--ink); border-color: var(--line); background: var(--soft);
}

.pb-section {
  margin: 24px 0; padding: 20px 22px;
  border: 1px solid var(--line); border-radius: var(--radius); background: #fff;
  scroll-margin-top: 72px;
}
.pb-section h2 { font-size: 18px; font-weight: 700; margin: 0 0 12px; }
.pb-section .pb-body { font-size: 15px; line-height: 1.65; color: #3f3f3f; }

.pb-sidebar {
  position: sticky;
  top: 72px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pb-side-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; background: #fff;
  box-shadow: 0 12px 40px rgba(0,0,0,0.07);
}

/* —— Recommended closing pros (sidebar) —— */
.pb-pro-suggestions-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 18px 14px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.04);
}
.pb-pro-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 4px;
}
.pb-pro-head-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #fff5f7;
  color: var(--rausch);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  border: 1px solid #ffe0e6;
}
.pb-pro-head-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.pb-pro-sub {
  font-size: 12.5px;
  color: var(--muted);
  margin: 0 0 14px;
  line-height: 1.45;
  padding-left: 48px;
}
@media (max-width: 400px) {
  .pb-pro-sub { padding-left: 0; }
}
.pb-pro-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}
.pb-pro-item {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px;
  background: var(--soft);
  border: 1px solid transparent;
  border-radius: 14px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.pb-pro-item:hover {
  background: #fff;
  border-color: var(--line);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
}
.pb-pro-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #fff;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 15px;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid var(--line);
}
.pb-pro-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pb-pro-info {
  flex: 1;
  min-width: 0;
}
.pb-pro-category-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  border: 1px solid var(--line);
  margin-bottom: 5px;
}
.pb-pro-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
}
.pb-pro-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pb-pro-verified {
  color: var(--rausch);
  font-size: 12px;
  flex-shrink: 0;
}
.pb-pro-desc {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pb-pro-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--rausch);
  margin-top: 6px;
}
.pb-pro-footer {
  text-align: center;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  line-height: 1.4;
}
.pb-pro-footer a {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}
.pb-pro-footer a:hover {
  color: var(--rausch);
  border-bottom-color: var(--rausch);
}

.pb-price { font-size: 28px; font-weight: 800; letter-spacing: -0.03em; margin: 0 0 4px; }
.pb-price-sub { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.pb-side-actions { display: flex; gap: 8px; margin-bottom: 12px; }
.pb-side-actions .button-secondary { flex: 1; }
.pb-cta-primary {
  display: block; text-align: center; width: 100%;
  background: var(--rausch); color: #fff !important; border: 0;
  padding: 13px 16px; border-radius: 12px; font-weight: 700; font-size: 15px;
  text-decoration: none; margin-bottom: 8px; cursor: pointer;
}
.pb-cta-ghost {
  display: block; text-align: center; width: 100%;
  border: 1px solid var(--line); padding: 11px; border-radius: 12px;
  font-weight: 600; font-size: 14px; text-decoration: none; color: var(--ink);
  margin-bottom: 8px; background: #fff; cursor: pointer;
}
.pb-host {
  display: flex; gap: 12px; align-items: center;
  padding: 14px; background: var(--soft); border-radius: 14px; margin-top: 12px;
}
.pb-host-icon {
  width: 48px; height: 48px; border-radius: 50%; background: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); font-size: 20px; flex-shrink: 0;
}

.pb-votes {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
}
.pb-vote-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 600; text-align: left;
}
.pb-vote-btn:hover { border-color: #f5c2cc; }
.pb-vote-btn.is-mine { border-color: var(--rausch); background: #fff5f7; }
.pb-vote-btn .count { color: var(--muted); font-variant-numeric: tabular-nums; }
.pb-vote-btn:disabled { opacity: 0.65; cursor: not-allowed; }
.pb-vote-hint { font-size: 13px; color: var(--muted); margin: 0 0 12px; }

/* Legacy related-card styles (kept for any server-rendered rails) */
.pb-carousel-section { margin: 36px 0 12px; scroll-margin-top: 72px; min-height: 220px; }
.pb-carousel-section[hidden] { display: none !important; }
.pb-carousel-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px;
}
.pb-carousel-head h2 { font-size: 20px; font-weight: 700; margin: 0; }
.pb-carousel {
  display: flex; gap: 14px; overflow-x: auto; padding-bottom: 8px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
}
.pb-carousel .pb-related-card {
  flex: 0 0 min(240px, 78vw); scroll-snap-align: start;
}
.pb-related-card {
  border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.pb-related-card:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(0,0,0,0.08); }
.pb-related-card img { width: 100%; height: 148px; object-fit: cover; display: block; background: #f3f4f6; }
.pb-related-card .cap { padding: 12px; }
.pb-related-card a { color: inherit; text-decoration: none; font-weight: 600; font-size: 14px; }

.pb-carousel-skel {
  display: flex; gap: 14px; overflow: hidden;
}
.pb-carousel-skel .sk {
  flex: 0 0 min(240px, 78vw);
  height: 200px;
  border-radius: 14px;
  background: linear-gradient(90deg, #f0f0f0 25%, #f7f7f7 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: pb-skel 1.2s ease-in-out infinite;
}
@keyframes pb-skel {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}
.pb-carousel-empty {
  font-size: 13px; color: var(--muted); padding: 12px 0;
}

.pb-modal-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); z-index: 1000;
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.pb-modal-backdrop.is-open { display: flex; }
.pb-modal {
  background: #fff; border-radius: 16px; max-width: 440px; width: 100%;
  padding: 22px; box-shadow: 0 24px 64px rgba(0,0,0,0.2);
}
.pb-modal h3 { margin: 0 0 8px; font-size: 18px; }
.pb-modal .text-input { width: 100%; margin-bottom: 10px; }
.pb-modal-actions { display: flex; gap: 8px; margin-top: 12px; }
.pb-modal-actions button { flex: 1; }

.pb-property-extras { max-width: min(1400px, 100%) !important; }

/* Fullscreen Lightbox Gallery Modal */
.pb-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  z-index: 2000;
  display: none;
  flex-direction: column;
  justify-content: space-between;
  padding: 20px;
  box-sizing: border-box;
}
.pb-lightbox.is-open {
  display: flex;
}
.pb-lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #fff;
  z-index: 2005;
}
.pb-lightbox-counter {
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.15);
  padding: 6px 14px;
  border-radius: 20px;
}
.pb-lightbox-close {
  background: rgba(255,255,255,0.2);
  color: #fff;
  border: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.pb-lightbox-close:hover {
  background: rgba(255,255,255,0.35);
}
.pb-lightbox-body {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0;
}
.pb-lightbox-body img {
  max-width: 90vw;
  max-height: 72vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 16px 48px rgba(0,0,0,0.5);
}
.pb-lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.2);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease;
}
.pb-lightbox-nav:hover {
  background: rgba(255,255,255,0.4);
}
.pb-lightbox-nav.prev { left: 10px; }
.pb-lightbox-nav.next { right: 10px; }
.pb-lightbox-footer {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 0;
  justify-content: center;
}
.pb-lightbox-footer button {
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  width: 64px;
  height: 48px;
  flex-shrink: 0;
  opacity: 0.5;
  background: #222;
}
.pb-lightbox-footer button.is-active {
  border-color: #ff385c;
  opacity: 1;
}
.pb-lightbox-footer img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— #3569 slim phone detail: keep gallery + facts + CTA, drop extras —— */
@media (max-width: 640px) {
  .pb-pro-suggestions-card,
  .pb-carousel-section,
  .pb-property-extras,
  .pb-toc,
  .pb-votes {
    display: none !important;
  }
  .pb-gallery-thumbs button:nth-child(n+7) {
    display: none;
  }
  .pb-sidebar {
    position: static;
    gap: 12px;
  }
  .pb-listing {
    padding-bottom: 88px;
  }
}
