/* ==========================================================================
   ZedHome — Listing & profile pages
   Used by properties/detail.php, cars/detail.php, businesses/profile.php and
   professionals/profile.php only. Every class here is prefixed .ld- so
   nothing leaks into the pages that share components.css. The existing
   primitives (.btn, .field, .form-group, .alert, .segmented, .breadcrumb,
   .status-tag, .card grids, .lightbox, .mobile-cta-bar) are reused as-is.

   Principles: one surface per purpose (the gallery, the contact panel) and
   hairline dividers between sections instead of a floating card per block;
   icons stay neutral grey, orange is kept for the primary action and prices
   stay ink; nothing moves except a short colour/opacity transition.
   ========================================================================== */

/* ---- Top row: breadcrumb + share/save ---- */
.ld-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding-block: var(--space-5) var(--space-4);
}
.ld-top .breadcrumb { margin: 0; min-width: 0; }
.ld-top .breadcrumb span[aria-current] { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42ch; }
.ld-top__actions { display: flex; gap: var(--space-2); flex-shrink: 0; }
.ld-preview { margin-top: var(--space-5); }

/* Text+icon utility buttons (Share / Save). .fav-btn keeps its JS hook but
   loses its floating-circle look here. */
.ld-action,
.ld-top .fav-btn {
  position: relative;
  top: auto; right: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: auto;
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--color-border-strong);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  backdrop-filter: none;
  color: var(--color-ink);
  font-size: var(--fs-md);
  font-weight: 700;
  transition: border-color var(--dur-fast) var(--ease-standard), background-color var(--dur-fast) var(--ease-standard);
}
.ld-action svg, .ld-top .fav-btn svg { width: 16px; height: 16px; }
.ld-action:hover, .ld-top .fav-btn:hover { transform: none; border-color: var(--color-ink); }
.ld-top .fav-btn.is-active { border-color: #E7B3B3; background: #FDF3F3; }
@media (max-width: 640px) {
  .ld-top { align-items: flex-start; }
  .ld-action, .ld-top .fav-btn { width: 38px; padding: 0; justify-content: center; }
  .ld-action span, .ld-top .fav-btn span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ---- Gallery: one large photo + up to four tiles, one rounded frame ---- */
.ld-gallery {
  position: relative;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 6px;
  height: clamp(340px, 42vw, 540px);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--color-border);
}
.ld-gallery--s0 { grid-template-columns: 1fr; grid-template-rows: 1fr; }
.ld-gallery--s1, .ld-gallery--s2 { grid-template-columns: 2fr 1fr; }
.ld-gallery--s1 .ld-gallery__tile { grid-row: span 2; }
.ld-gallery--s3 .ld-gallery__tile:first-of-type { grid-row: span 2; }
.ld-gallery__hero { position: relative; grid-row: span 2; min-height: 0; }
.ld-gallery__hero > img,
.ld-gallery__tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ld-gallery__open { position: absolute; inset: 0; z-index: 1; cursor: zoom-in; }
.ld-gallery__tile { position: relative; min-height: 0; padding: 0; border: 0; background: var(--color-border); cursor: zoom-in; overflow: hidden; }
.ld-gallery__hero::after,
.ld-gallery__tile::after { content: ""; position: absolute; inset: 0; background: rgba(20, 17, 16, 0); transition: background-color var(--dur-base) var(--ease-standard); pointer-events: none; }
.ld-gallery__hero:has(.ld-gallery__open:hover)::after,
.ld-gallery__tile:hover::after { background: rgba(20, 17, 16, 0.12); }
.ld-gallery__more { position: absolute; inset: 0; z-index: 1; display: flex; align-items: center; justify-content: center; background: rgba(20, 17, 16, 0.55); color: #fff; font-weight: 700; font-size: var(--fs-base); }
.ld-gallery__badges { position: absolute; top: 16px; left: 16px; z-index: 2; display: flex; flex-wrap: wrap; gap: 6px; pointer-events: none; }
.ld-gallery__all {
  position: absolute;
  right: 16px; bottom: 16px;
  z-index: 2;
  display: inline-flex; align-items: center; gap: 8px;
  height: 38px;
  padding: 0 14px;
  border: 1px solid rgba(30, 27, 26, 0.12);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--fs-md);
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(30, 27, 26, 0.12);
}
.ld-gallery__all svg { width: 16px; height: 16px; }
.ld-gallery__all:hover { border-color: var(--color-ink); }
.ld-gallery__empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  height: 100%;
  background: var(--color-surface);
  color: var(--color-text-soft);
  font-size: var(--fs-md);
  font-weight: 600;
}
.ld-gallery__empty svg { width: 40px; height: 40px; stroke-width: 1.4; color: var(--color-border-strong); }
.ld-gallery--empty { height: clamp(200px, 22vw, 260px); border: 1px solid var(--color-border); background: var(--color-surface); }

@media (max-width: 760px) {
  /* Phones: one edge-to-edge photo; the tiles live in the full-screen viewer. */
  .ld-gallery,
  .ld-gallery--s0, .ld-gallery--s1, .ld-gallery--s2 { grid-template-columns: 1fr; grid-template-rows: auto; height: auto; }
  .ld-gallery { margin-inline: calc(-1 * var(--gutter)); border-radius: 0; }
  .ld-gallery__hero { grid-row: auto; aspect-ratio: 4 / 3; }
  .ld-gallery__tile { display: none; }
  .ld-gallery__badges { top: 12px; left: 12px; }
  .ld-gallery__all { right: 12px; bottom: 12px; height: 34px; padding: 0 12px; font-size: var(--fs-sm); }
  .ld-gallery--empty { height: 180px; margin-inline: 0; border-radius: var(--radius-md); }
}

/* ---- Two columns: content + contact panel ---- */
.ld-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 372px;
  gap: clamp(32px, 4vw, 64px);
  align-items: start;
  margin-top: var(--space-8);
  padding-bottom: var(--space-16);
}
.ld-aside { position: sticky; top: 100px; display: grid; gap: var(--space-4); }
@media (max-width: 980px) {
  .ld-layout { grid-template-columns: minmax(0, 1fr); padding-bottom: var(--space-10); }
  .ld-aside { position: static; }
}

/* Sections are separated by a hairline, not boxed. */
.ld-section { padding-block: var(--space-8); border-top: 1px solid var(--color-border); scroll-margin-top: 110px; }
.ld-section:first-child { padding-top: 0; border-top: 0; }
.ld-section__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-5); }
.ld-section__title { margin: 0 0 var(--space-5); font-size: 1.25rem; font-weight: 700; letter-spacing: -0.01em; }
.ld-section__head .ld-section__title { margin: 0; }
.ld-section__sub { margin: calc(-1 * var(--space-3)) 0 var(--space-5); font-size: var(--fs-md); color: var(--color-text-soft); }
.ld-link { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-md); font-weight: 700; color: var(--color-brand-dark); white-space: nowrap; }
.ld-link svg { width: 15px; height: 15px; }
.ld-link:hover { color: var(--color-ink); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Listing heading: labels, title, location | price ---- */
.ld-head { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--space-4) var(--space-10); }
.ld-head__main { min-width: 0; }
.ld-labels { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: var(--space-3); }
.ld-label {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--radius-xs);
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  color: var(--color-ink-soft);
  font-size: var(--fs-xs);
  font-weight: 700;
  text-transform: capitalize;
}
.ld-label--sale { background: var(--color-brand-50); border-color: #F6D6B6; color: var(--color-brand-dark); }
.ld-label--rent { background: var(--color-rent-light); border-color: #C9DCF1; color: var(--color-rent); }
.ld-label--verified { background: var(--color-verified-light); border-color: #C3E4CF; color: var(--color-verified); text-transform: none; }
.ld-label svg { width: 13px; height: 13px; stroke-width: 2.6; }
.ld-head__title { margin: 0; font-size: clamp(1.625rem, 1.25rem + 1.3vw, 2.25rem); line-height: 1.15; letter-spacing: -0.02em; text-wrap: balance; }
.ld-head__loc { display: flex; align-items: center; gap: 6px; margin-top: var(--space-2); font-size: var(--fs-base); font-weight: 600; color: var(--color-text); }
.ld-head__loc svg { width: 16px; height: 16px; color: var(--color-text-soft); flex-shrink: 0; }
.ld-price { flex-shrink: 0; text-align: right; }
.ld-price__value { display: block; font-family: var(--font-display); font-size: clamp(1.625rem, 1.3rem + 1.1vw, 2.125rem); font-weight: 800; line-height: 1.1; letter-spacing: -0.015em; color: var(--color-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ld-price__suffix { font-family: var(--font-body); font-size: var(--fs-md); font-weight: 600; color: var(--color-text-soft); letter-spacing: 0; }
.ld-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px 12px; margin-top: var(--space-2); font-size: var(--fs-sm); color: var(--color-text-soft); }
.ld-meta span + span::before { content: "·"; margin-right: 12px; color: var(--color-border-strong); }
@media (max-width: 720px) {
  .ld-head { flex-direction: column; gap: var(--space-4); }
  .ld-price { text-align: left; }
  .ld-meta { justify-content: flex-start; }
}

/* ---- Key facts: one ruled strip ---- */
.ld-facts {
  display: grid;
  grid-template-columns: repeat(var(--ld-n, 4), minmax(0, 1fr));
  gap: 1px;
  margin-top: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-border);
  overflow: hidden;
}
.ld-fact { display: grid; gap: 2px; padding: 16px 18px; background: var(--color-surface); min-width: 0; }
.ld-fact svg { width: 20px; height: 20px; margin-bottom: 8px; color: var(--color-text-soft); stroke-width: 1.7; }
.ld-fact strong { font-family: var(--font-display); font-size: 1.125rem; font-weight: 700; color: var(--color-ink); line-height: 1.2; overflow-wrap: anywhere; }
.ld-fact span { font-size: var(--fs-sm); color: var(--color-text-soft); }
@media (max-width: 640px) {
  .ld-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ld-fact:last-child:nth-child(odd) { grid-column: span 2; }
  .ld-fact { padding: 14px 16px; }
}

/* ---- Specification list (label | value rows, two columns) ---- */
.ld-specs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--space-10); margin: 0; }
.ld-spec { display: flex; justify-content: space-between; gap: var(--space-4); padding: 13px 0; border-bottom: 1px solid var(--color-border); font-size: var(--fs-base); }
.ld-spec dt { color: var(--color-text-soft); }
.ld-spec dd { margin: 0; font-weight: 700; color: var(--color-ink); text-align: right; }
@media (max-width: 640px) { .ld-specs { grid-template-columns: minmax(0, 1fr); } }

/* ---- Long-form text ---- */
.ld-prose p { max-width: 68ch; margin: 0 0 var(--space-4); font-size: var(--fs-body); line-height: 1.75; color: var(--color-text); text-wrap: pretty; }
.ld-prose p:last-child { margin-bottom: 0; }
.ld-muted { margin: 0; font-size: var(--fs-base); color: var(--color-text-soft); }

/* ---- Features: a plain checklist ---- */
.ld-features { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 150px), 1fr)); gap: 14px var(--space-6); margin: 0; padding: 0; list-style: none; }
.ld-features li { display: flex; align-items: center; gap: 10px; font-size: var(--fs-base); font-weight: 600; color: var(--color-ink); }
.ld-features svg { width: 18px; height: 18px; color: var(--color-text-soft); flex-shrink: 0; }

/* ---- Map ---- */
.ld-map { aspect-ratio: 16 / 8; border: 1px solid var(--color-border); border-radius: var(--radius-md); overflow: hidden; background: var(--color-paper); }
.ld-map iframe { width: 100%; height: 100%; border: 0; display: block; }
.ld-map-caption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-3); font-size: var(--fs-md); color: var(--color-text); }
.ld-map-caption span { display: inline-flex; align-items: center; gap: 6px; }
.ld-map-caption svg { width: 15px; height: 15px; color: var(--color-text-soft); }
@media (max-width: 640px) { .ld-map { aspect-ratio: 4 / 3; } }

/* ---- Contact panel (sidebar) ---- */
.ld-panel {
  padding: var(--space-6);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  box-shadow: 0 1px 2px rgba(30, 27, 26, 0.04), 0 6px 20px rgba(30, 27, 26, 0.05);
  scroll-margin-top: 110px;
}
.ld-panel__eyebrow { margin: 0 0 var(--space-3); font-size: var(--fs-xs); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--color-text-soft); }
.ld-person { display: flex; align-items: center; gap: 14px; }
.ld-person__avatar { width: 52px; height: 52px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ld-person__avatar--tile { border-radius: var(--radius-sm); }
.ld-person .avatar-placeholder { width: 52px; height: 52px; border-radius: 50%; flex-shrink: 0; background: var(--color-paper); border: 1px solid var(--color-border); color: var(--color-text-soft); }
.ld-person .avatar-placeholder.ld-person__avatar--tile { border-radius: var(--radius-sm); }
.ld-person .avatar-placeholder svg { width: 22px; height: 22px; }
.ld-person__body { min-width: 0; }
.ld-person__name { display: block; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700; line-height: 1.25; color: var(--color-ink); }
a.ld-person__name:hover { color: var(--color-brand-dark); text-decoration: underline; text-underline-offset: 3px; }
.ld-person__role { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 3px; font-size: var(--fs-sm); color: var(--color-text-soft); }
.ld-verified { display: inline-flex; align-items: center; gap: 4px; font-size: var(--fs-sm); font-weight: 700; color: var(--color-verified); }
.ld-verified svg { width: 14px; height: 14px; stroke-width: 2.8; }
.ld-panel__actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--space-2); margin-top: var(--space-5); }
.ld-panel .btn { min-height: 46px; padding-inline: var(--space-4); }
.ld-btn-wa svg { color: #1F9D55; }
.ld-panel__divider { height: 1px; margin: var(--space-6) calc(-1 * var(--space-6)) var(--space-5); background: var(--color-border); border: 0; }
.ld-panel__title { margin: 0; font-family: var(--font-display); font-size: 1.0625rem; font-weight: 700; color: var(--color-ink); }
.ld-panel__hint { margin: 4px 0 0; font-size: var(--fs-sm); color: var(--color-text-soft); }
.ld-form { display: grid; gap: 14px; margin-top: var(--space-4); }
.ld-form .form-group { gap: 6px; margin: 0; }
.ld-form label { font-size: var(--fs-sm); }
.ld-form textarea.field-textarea { min-height: 88px; }
.ld-form .btn { margin-top: 4px; }
.ld-panel .alert { margin-top: var(--space-4); }
.ld-panel .alert ul { margin: 0; padding-left: 18px; }
.ld-panel__note { display: flex; gap: 8px; align-items: flex-start; margin: var(--space-4) 0 0; font-size: var(--fs-xs); line-height: 1.5; color: var(--color-text-soft); }
.ld-panel__note svg { width: 14px; height: 14px; margin-top: 1px; color: var(--color-text-soft); flex-shrink: 0; }

/* Facts block in the sidebar (profiles) */
.ld-details { margin: 0; }
.ld-details div { display: flex; justify-content: space-between; gap: var(--space-4); padding: 11px 0; border-bottom: 1px solid var(--color-border); font-size: var(--fs-md); }
.ld-details div:last-child { border-bottom: 0; padding-bottom: 0; }
.ld-details dt { color: var(--color-text-soft); }
.ld-details dd { margin: 0; font-weight: 700; color: var(--color-ink); text-align: right; }

/* ---- Related listings: full width under the layout ---- */
.ld-related { padding-block: var(--space-12) var(--space-16); border-top: 1px solid var(--color-border); background: var(--color-surface); }
.ld-related .ld-section__head { margin-bottom: var(--space-6); }
.ld-related .ld-section__title { font-size: clamp(1.25rem, 1.15rem + 0.4vw, 1.5rem); }
/* Four across on wide screens: the same card size as the cars / properties directories (about 300px). */
.ld-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); }
.ld-grid .card-property, .ld-grid .card-vehicle { max-width: none; }
@media (max-width: 1100px) { .ld-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) { .ld-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ld-grid { grid-template-columns: minmax(0, 1fr); } }
/* Dealer profile: stock sits above the two-column layout, full width. */
.ld-section.ld-stock { padding-block: var(--space-10) var(--space-2); border-top: 0; }
.ld-stock + .ld-layout { margin-top: var(--space-6); }

/* ==========================================================================
   Profile header (dealer / professional)
   ========================================================================== */
.ld-phead { background: var(--color-surface); border-bottom: 1px solid var(--color-border); }
.ld-phead .ld-top { padding-bottom: 0; }
.ld-phead__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--space-4) var(--space-6);
  padding-block: var(--space-6) var(--space-8);
}
.ld-phead__avatar { position: relative; width: 96px; height: 96px; }
.ld-phead__avatar img,
.ld-phead__avatar .avatar-placeholder { width: 100%; height: 100%; border-radius: var(--radius-md); object-fit: cover; }
.ld-phead__avatar .avatar-placeholder { background: var(--color-paper); border: 1px solid var(--color-border); color: var(--color-text-soft); }
.ld-phead__avatar .avatar-placeholder svg { width: 36px; height: 36px; stroke-width: 1.5; }
.ld-phead__avatar--round img, .ld-phead__avatar--round .avatar-placeholder { border-radius: 50%; }
.ld-phead__title { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.125rem); line-height: 1.15; letter-spacing: -0.02em; }
.ld-phead__role { margin: 6px 0 0; font-size: var(--fs-body); font-weight: 600; color: var(--color-ink-soft); }
.ld-phead__role span { font-weight: 500; color: var(--color-text-soft); }
.ld-phead__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin: var(--space-3) 0 0; padding: 0; list-style: none; font-size: var(--fs-md); color: var(--color-text); }
.ld-phead__meta li { display: inline-flex; align-items: center; gap: 6px; }
.ld-phead__meta svg { width: 15px; height: 15px; color: var(--color-text-soft); flex-shrink: 0; }
.ld-phead__meta .ld-rating svg { color: var(--color-brand); fill: var(--color-brand); stroke: none; }
.ld-phead__actions { display: flex; flex-wrap: wrap; gap: var(--space-2); justify-content: flex-end; }
.ld-phead__actions .btn { min-height: 46px; }
@media (max-width: 860px) {
  .ld-phead__row { grid-template-columns: auto minmax(0, 1fr); }
  .ld-phead__actions { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 560px) {
  .ld-phead__row { gap: var(--space-4); padding-block: var(--space-5) var(--space-6); }
  .ld-phead__avatar { width: 72px; height: 72px; }
  .ld-phead__actions .btn { flex: 1 1 0; }
}

/* In-page section links under the profile header */
.ld-tabs { display: flex; gap: var(--space-6); overflow-x: auto; scrollbar-width: none; margin-top: calc(-1 * var(--space-2)); }
.ld-tabs::-webkit-scrollbar { display: none; }
.ld-tabs a { flex-shrink: 0; padding: 12px 0 14px; border-bottom: 2px solid transparent; font-size: var(--fs-md); font-weight: 700; color: var(--color-text); }
.ld-tabs a:hover { color: var(--color-ink); border-bottom-color: var(--color-border-strong); }
.ld-tabs a:first-child { color: var(--color-ink); border-bottom-color: var(--color-ink); }

/* ---- Services (professional) ---- */
.ld-services { margin: 0; padding: 0; list-style: none; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.ld-service { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px var(--space-6); padding: 18px 20px; }
.ld-service + .ld-service { border-top: 1px solid var(--color-border); }
.ld-service__name { margin: 0; font-family: var(--font-body); font-size: var(--fs-body); font-weight: 700; color: var(--color-ink); letter-spacing: 0; }
.ld-service__cat { display: block; margin-top: 2px; font-size: var(--fs-sm); color: var(--color-text-soft); }
.ld-service__desc { grid-column: 1; margin: 4px 0 0; font-size: var(--fs-md); line-height: 1.6; color: var(--color-text); }
.ld-service__side { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; gap: var(--space-2); text-align: right; }
.ld-service__price { font-size: var(--fs-md); color: var(--color-text-soft); white-space: nowrap; }
.ld-service__price strong { display: block; font-family: var(--font-display); font-size: 1.0625rem; color: var(--color-ink); }
@media (max-width: 560px) {
  .ld-service { grid-template-columns: minmax(0, 1fr); }
  .ld-service__side { grid-column: 1; grid-row: auto; flex-direction: row; align-items: center; justify-content: space-between; text-align: left; margin-top: var(--space-2); }
}

/* ---- Photos (portfolio) ---- */
.ld-photos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ld-photos button { display: block; padding: 0; border: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--color-border); cursor: zoom-in; aspect-ratio: 4 / 3; }
.ld-photos img { width: 100%; height: 100%; object-fit: cover; display: block; transition: opacity var(--dur-fast) var(--ease-standard); }
.ld-photos button:hover img { opacity: 0.88; }
@media (max-width: 560px) { .ld-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Reviews ---- */
.ld-stars { position: relative; display: inline-flex; flex-shrink: 0; line-height: 0; }
.ld-stars svg { width: 15px; height: 15px; fill: var(--color-border-strong); stroke: none; }
.ld-stars__fill { position: absolute; inset: 0 auto 0 0; display: inline-flex; overflow: hidden; white-space: nowrap; }
.ld-stars__fill svg { fill: var(--color-brand); flex-shrink: 0; }
.ld-review-summary { display: flex; align-items: center; gap: var(--space-4); margin-bottom: var(--space-2); }
.ld-review-summary__score { font-family: var(--font-display); font-size: 2rem; font-weight: 700; line-height: 1; color: var(--color-ink); }
.ld-review-summary__count { display: block; margin-top: 4px; font-size: var(--fs-sm); color: var(--color-text-soft); }
.ld-reviews { margin: 0; padding: 0; list-style: none; }
.ld-review { padding: var(--space-5) 0; border-bottom: 1px solid var(--color-border); }
.ld-review__head { display: flex; align-items: center; gap: var(--space-3); }
.ld-review__avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.ld-review .avatar-placeholder { width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0; background: var(--color-paper); border: 1px solid var(--color-border); color: var(--color-text-soft); }
.ld-review .avatar-placeholder svg { width: 18px; height: 18px; }
.ld-review__who { min-width: 0; }
.ld-review__name { display: block; font-weight: 700; color: var(--color-ink); font-size: var(--fs-base); }
.ld-review__sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 3px; font-size: var(--fs-sm); color: var(--color-text-soft); }
.ld-review__tag { display: inline-flex; align-items: center; gap: 4px; font-weight: 700; color: var(--color-verified); }
.ld-review__tag svg { width: 13px; height: 13px; stroke-width: 2.8; }
.ld-review__text { max-width: 68ch; margin: var(--space-3) 0 0; font-size: var(--fs-base); line-height: 1.7; color: var(--color-text); }
.ld-report { margin-top: var(--space-2); }
.ld-report summary { display: inline-block; cursor: pointer; font-size: var(--fs-sm); font-weight: 600; color: var(--color-text-soft); list-style: none; }
.ld-report summary::-webkit-details-marker { display: none; }
.ld-report summary:hover { color: var(--color-ink); text-decoration: underline; }
.ld-report form { display: flex; gap: var(--space-2); max-width: 520px; margin-top: var(--space-2); }
.ld-report .field { flex: 1; }
.ld-review-cta { margin: var(--space-5) 0 0; font-size: var(--fs-base); color: var(--color-text-soft); }
.ld-review-cta a { font-weight: 700; color: var(--color-brand-dark); }
.ld-review-cta a:hover { text-decoration: underline; }
.ld-review-form { max-width: 520px; margin-top: var(--space-6); padding-top: var(--space-6); border-top: 1px solid var(--color-border); }
.ld-review-form h3 { margin: 0 0 var(--space-4); font-size: var(--fs-body); }
.ld-reviews-wrap .alert { margin-top: var(--space-5); }
.ld-reviews-wrap .alert ul { margin: 0; padding-left: 18px; }

/* Empty note (no vehicles, no reviews) — quiet, not a dashed hero box */
.ld-empty { padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.ld-empty strong { display: block; color: var(--color-ink); font-size: var(--fs-base); }
.ld-empty p { margin: 4px 0 0; font-size: var(--fs-md); color: var(--color-text-soft); }
.ld-empty .btn { margin-top: var(--space-4); }

/* Dealer summary block inside a listing (cars/detail.php) */
.ld-section .ld-person ~ .ld-muted,
.ld-section .ld-person ~ .ld-specs { margin-top: var(--space-4); }

/* Phone action bar: up to three actions share the width without overflowing. */
.ld-cta .btn { flex: 1 1 0; min-width: 0; padding-inline: 10px; }
@media (max-width: 380px) { .ld-cta .btn svg { display: none; } }
.ld-about-specs { margin-top: var(--space-5); }
.ld-related .professionals-grid { margin-top: 0; }

/* ---- Review slider (profiles with 2+ reviews; js/review-slider.js adds .is-ready) ----
   One review at a time in a quiet bordered block, moving right-to-left every
   few seconds; small dots underneath show where you are. Without the script
   the list above stays a plain list. */
.ld-rv-slider { margin-top: var(--space-2); }
.ld-rv-slider.is-ready .ld-rv-slider__viewport { overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.ld-rv-slider.is-ready .ld-rv-slider__track {
  display: flex;
  align-items: stretch;
  transition: transform 700ms cubic-bezier(0.22, 0.61, 0.36, 1);
  will-change: transform;
}
.ld-rv-slider.is-ready .ld-review { flex: 0 0 100%; min-width: 0; padding: 28px 32px; border-bottom: 0; }
.ld-rv-slider.is-ready .ld-review__text { margin-top: var(--space-4); font-size: var(--fs-lead); line-height: 1.7; color: var(--color-ink-soft); }
.ld-rv-slider__dots { display: flex; justify-content: center; gap: 4px; margin-top: var(--space-3); }
.ld-rv-slider:not(.is-ready) .ld-rv-slider__dots { display: none; }
.ld-rv-slider__dot {
  position: relative;
  width: 24px; height: 24px;
  padding: 0; border: 0; background: none; cursor: pointer;
}
.ld-rv-slider__dot::before {
  content: "";
  position: absolute; left: 50%; top: 50%;
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--color-border-strong);
  transition: background-color var(--dur-fast) var(--ease-standard), width var(--dur-base) var(--ease-standard), margin var(--dur-base) var(--ease-standard);
}
.ld-rv-slider__dot:hover::before { background: var(--color-text-soft); }
.ld-rv-slider__dot[aria-current="true"]::before { width: 20px; margin-left: -10px; border-radius: 4px; background: var(--color-ink); }
.ld-rv-slider__dot:focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; border-radius: 6px; }
@media (max-width: 560px) {
  .ld-rv-slider.is-ready .ld-review { padding: 20px; }
  .ld-rv-slider.is-ready .ld-review__text { font-size: var(--fs-body); }
}
@media (prefers-reduced-motion: reduce) {
  .ld-rv-slider.is-ready .ld-rv-slider__track { transition: none; }
}
