/**
 * SalesDesk — Public Pages CSS
 * T1 owns this file.
 *
 * Loads after global.css (which defines all :root vars).
 * public-fonts.css must load before this to provide --font-d = Sora.
 *
 * CONFLICT AUDIT:
 *   – .pub-mega-hdivider      → OWNED by browse.css  (removed from §19 here)
 *   – .pub-mega-panel__inner  → OWNED by browse.css  (removed from browse-additions §5)
 *   – .pub-browse-grid        → defined here (§15) as base 2-col; browse.css
 *                               overrides per breakpoint. No conflict.
 *   – .pub-page-wide          → OWNED here; layout-public.php inline <style>
 *                               block duplicates intentionally for cache-busting.
 *   – .pub-breadcrumb         → OWNED here; layout-public.php inline block
 *                               duplicates intentionally for cache-busting.
 *
 * Sections:
 *   1.  Public nav
 *   2.  Breadcrumb
 *   3.  Utility buttons (public variants)
 *   4.  Layout shells
 *   5.  Gallery
 *   6.  Car header & badges
 *   7.  Spec chips
 *   8.  Spec table
 *   9.  Description block
 *  10.  Dealer card
 *  11.  Sticky enquiry sidebar
 *  12.  Enquiry form elements
 *  13.  Related cars grid
 *  14.  Broker storefront hero
 *  15.  Browse grid (base — browse.css handles breakpoint overrides)
 *  16.  Share sheet overlay
 *  17.  Animations (pub-reveal / pub-revealed)
 *  18.  Responsive breakpoints
 *  19.  Footer utilities
 */


/* ══════════════════════════════════════
   1. PUBLIC NAV
   ══════════════════════════════════════ */
.pub-nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  height: 60px;
  background: rgba(255,255,255,.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.pub-nav__inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 10px;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 20px;
}

/* Brand */
.pub-nav__brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  text-decoration: none;
}

.pub-nav__logo {
  width: 30px;
  height: 30px;
  background: #fff;
  border-radius: var(--r-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}

.pub-nav__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.pub-nav__name {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.02em;
}

.pub-nav__name span { color: var(--p); }

.pub-nav__badge {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .06em;
  background: var(--gr-bg);
  color: var(--green);
  border: 1px solid var(--gr-b);
  border-radius: var(--r-full);
  padding: 2px 7px;
}

/* Centre links */
.pub-nav__links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex: 1;
  justify-content: center;
}

.pub-nav__link {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  transition: color .18s;
  text-decoration: none;
  white-space: nowrap;
}

.pub-nav__link:hover { color: var(--p); }

/* Browse dropdown (legacy — mega-nav triggers live in browse.css) */
.pub-nav__browse { position: relative; }

.pub-nav__browse-btn {
  display: inline-flex;
  align-items: flex-end;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  padding: 0;
  transition: color .18s;
}

.pub-nav__browse-btn:hover,
.pub-nav__browse-btn.open    { color: var(--p); }

.pub-nav__browse-btn .pub-chevron {
  font-size: 8px;
  transition: transform .2s ease;
  display: inline-block;
  opacity: .6;
}

.pub-nav__browse-btn.open .pub-chevron { transform: rotate(180deg); }

.pub-nav__browse-panel {
  position: absolute;
  top: calc(100% + 14px);
  left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 230px;
  padding: 6px;
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.pub-nav__browse-panel.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.pub-nav__browse-panel-title {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--faint);
  padding: 6px 11px 3px;
}

.pub-nav__browse-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.pub-nav__browse-item i {
  font-size: 11px;
  color: var(--faint);
  width: 14px;
  text-align: center;
}

.pub-nav__browse-item:hover  { background: var(--p-light); color: var(--p); }
.pub-nav__browse-item:hover i { color: var(--p); }

.pub-nav__browse-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 0;
  opacity: .5;
}

/* Right actions */
.pub-nav__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.pub-nav__signin {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color .18s;
}

.pub-nav__signin:hover { color: var(--p); }

/* Account dropdown */
.pub-nav__account { position: relative; }

.pub-nav__account-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: var(--p);
  color: #fff;
  border-radius: var(--r-md);
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  border: none;
  transition: background .18s;
}

.pub-nav__account-btn:hover { background: var(--p-dark); }

.pub-nav__account-btn .pub-chevron {
  font-size: 8px;
  transition: transform .2s ease;
  display: inline-block;
  opacity: .7;
}

.pub-nav__account-btn.open .pub-chevron { transform: rotate(180deg); }

.pub-nav__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  padding: 6px;
  z-index: var(--z-dropdown);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.pub-nav__dropdown.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.pub-nav__dropdown-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border-radius: var(--r-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.pub-nav__dropdown-item i {
  font-size: 12px;
  color: var(--faint);
  width: 14px;
  text-align: center;
}

.pub-nav__dropdown-item:hover  { background: var(--p-light); color: var(--p); }
.pub-nav__dropdown-item:hover i { color: var(--p); }

.pub-nav__dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 5px 0;
  opacity: .5;
}

.pub-nav__dropdown-item.danger       { color: var(--red); }
.pub-nav__dropdown-item.danger i     { color: var(--red); }
.pub-nav__dropdown-item.danger:hover { background: var(--red-bg); }

.pub-nav-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--r-sm);
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all .18s;
  flex-shrink: 0;
}

.pub-nav-icon-btn:hover     { background: var(--p-light); color: var(--p); border-color: var(--p-b); }
.pub-nav-icon-btn.wishlisted { background: var(--red-bg); color: var(--red); border-color: var(--red-b); }


/* ══════════════════════════════════════
   2. BREADCRUMB
   ══════════════════════════════════════ */
.pub-breadcrumb {
  max-width: 1400px;
  margin: 0 auto 28px;
  padding: 8px 16px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--faint);
  border-bottom: 1px solid var(--border);
}

.pub-breadcrumb a { color: var(--muted); text-decoration: none; transition: color .15s; }
.pub-breadcrumb a:hover { color: var(--p); }
.pub-breadcrumb .sep     { color: var(--border2); font-size: 10px; }
.pub-breadcrumb .current { color: var(--text); font-weight: 500; }


/* ══════════════════════════════════════
   3. UTILITY BUTTONS (public variants)
   ══════════════════════════════════════ */
.pub-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--sans);
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all .18s;
  white-space: nowrap;
  text-decoration: none;
}

.pub-btn-primary {
  background: var(--p);
  color: #fff;
  border-radius: var(--r-md);
  padding: 11px 22px;
  font-size: 14px;
}
.pub-btn-primary:hover { background: var(--p-dark); }

.pub-btn-ghost {
  background: var(--white);
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  padding: 10px 18px;
  font-size: 13px;
}
.pub-btn-ghost:hover { border-color: var(--p); color: var(--p); }

/* Full-width modifier — used in share sheet */
.pub-btn-full {
  width: 100%;
  padding: 10px;
  font-size: 13px;
  justify-content: center;
}

.pub-btn-wa {
  background: #25d366;
  color: #fff;
  border-radius: var(--r-md);
  padding: 11px 22px;
  font-size: 14px;
  width: 100%;
  justify-content: center;
}
.pub-btn-wa:hover { background: #1ebe5d; }


/* ══════════════════════════════════════
   4. LAYOUT SHELLS
   ══════════════════════════════════════ */
/* Wide: browse, car detail, homepage */
.pub-page-wide {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 0 64px;
}

/* Narrow: broker storefront */
.pub-page-narrow {
  max-width: 1240px;
  margin: 0 auto;
  padding: 28px 24px 64px;
}

/* Two-column detail grid */
.pub-detail-grid {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 28px;
  align-items: start;
  margin-inline: clamp(16px, 4vw, 48px);
  padding-inline: clamp(12px, 2vw, 24px);
}

/*
 * Prevent 4:3 images from expanding the grid track beyond the viewport.
 * min-width: auto is the default on grid children and causes blowout.
 */
.pub-detail-grid > div { min-width: 0; }

/* Public footer — simple top-bordered footer */
.pub-footer {
  border-top: 1px solid var(--border);
  margin-top: 4rem;
  padding: 1.5rem 24px;
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 12px;
  color: var(--faint);
}

.pub-footer a        { color: var(--muted); text-decoration: none; }
.pub-footer a:hover  { color: var(--p); }

.pub-footer__brand       { font-family: var(--font-d); font-weight: 700; color: var(--text); }
.pub-footer__brand span  { color: var(--p); }

.pub-footer__links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.pub-footer__links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  transition: color .15s;
}

.pub-footer__links a:hover { color: var(--p); }


/* ══════════════════════════════════════
   5. GALLERY
   ══════════════════════════════════════ */
.pub-gallery {
  margin-bottom: 24px;
  min-width: 0;
  width: 100%;
}

.pub-gallery__main {
  position: relative;
  height: 440px;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: #08143c;
  cursor: zoom-in;
  box-shadow: var(--shadow-lg);
  width: 100%;
}

.pub-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .35s cubic-bezier(.2,0,0,1);
}

.pub-gallery__main:hover img { transform: scale(1.03); }

.pub-gallery__badge-row {
  position: absolute;
  top: 16px; left: 16px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.pub-gallery__year {
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  color: #fff;
  font-family: var(--font-d);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--r-full);
}

.pub-gallery__prov {
  background: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding: 4px 12px;
  border-radius: var(--r-full);
}

.pub-gallery__km {
  position: absolute;
  bottom: 16px; right: 16px;
  background: rgba(255,255,255,.92);
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  padding: 4px 12px;
  border-radius: var(--r-full);
  box-shadow: 0 2px 8px rgba(0,0,0,.1);
}

.pub-gallery__count {
  position: absolute;
  bottom: 16px; left: 16px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  color: rgba(255,255,255,.85);
  font-size: 12px;
  font-weight: 500;
  padding: 4px 12px;
  border-radius: var(--r-full);
}

.pub-gallery__thumbs {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  min-width: 0;
}

.pub-gallery__thumbs::-webkit-scrollbar        { height: 3px; }
.pub-gallery__thumbs::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 2px; }

.pub-gallery__thumb {
  width: 88px;
  height: 60px;
  flex-shrink: 0;
  border-radius: var(--r-md);
  overflow: hidden;
  cursor: pointer;
  border: 2.5px solid transparent;
  transition: all .18s;
}

.pub-gallery__thumb img                  { width: 100%; height: 100%; object-fit: cover; }
.pub-gallery__thumb.active               { border-color: var(--p); box-shadow: 0 0 0 2px rgba(15,76,158,.2); }
.pub-gallery__thumb:hover:not(.active)   { border-color: var(--border2); }

.pub-gallery__placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: rgba(255,255,255,.2);
  font-size: 48px;
}


/* ══════════════════════════════════════
   6. CAR HEADER & BADGES
   ══════════════════════════════════════ */
.pub-car-header { margin-bottom: 24px; }

.pub-car-header__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}

.pub-car-header__name {
  font-family: var(--font-d);
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 6px;
  letter-spacing: -.02em;
}

.pub-car-header__dealer {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.pub-car-header__dealer i { color: var(--faint); }

.pub-car-header__price {
  font-family: var(--font-d);
  font-size: 30px;
  font-weight: 800;
  color: var(--p);
  text-align: right;
  flex-shrink: 0;
  letter-spacing: -.02em;
}

.pub-car-header__pm { font-size: 12px; color: var(--faint); text-align: right; margin-top: 2px; }

.pub-car-header__badges {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.pub-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  white-space: nowrap;
}

.pub-badge-verified { background: var(--gr-bg);  color: var(--green); border-color: var(--gr-b);  }
.pub-badge-desk     { background: var(--p-light); color: var(--p);     border-color: var(--p-b);   font-family: var(--font-d); }
.pub-badge-avail    { background: var(--gr-bg);  color: var(--green); border-color: var(--gr-b);  }
.pub-badge-paused   { background: var(--amb-bg); color: var(--amber); border-color: var(--amb-b); }
.pub-badge-sold     { background: var(--bg);     color: var(--faint); border-color: var(--border);}


/* ══════════════════════════════════════
   7. SPEC CHIPS
   ══════════════════════════════════════ */
.pub-spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.pub-spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: var(--r-full);
  box-shadow: var(--shadow-sm);
}

.pub-spec-chip i      { color: var(--p); font-size: 11px; }
.pub-spec-chip strong { font-weight: 700; }


/* ══════════════════════════════════════
   8. SPEC TABLE
   ══════════════════════════════════════ */
.pub-spec-section { margin-bottom: 28px; }

.pub-spec-section__title {
  font-family: var(--font-d);
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -.01em;
}

.pub-spec-section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
  opacity: .5;
}

.pub-spec-table {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.pub-spec-table__row {
  display: flex;
  align-items: center;
  padding: 11px 18px;
  border-bottom: 1px solid var(--border);
}

.pub-spec-table__row:last-child           { border-bottom: none; }
.pub-spec-table__row:nth-child(even)      { background: #fafcff; }

.pub-spec-table__key {
  font-size: 12px;
  color: var(--faint);
  width: 145px;
  flex-shrink: 0;
}

.pub-spec-table__val {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  flex: 1;
}

.pub-spec-table__val.highlight { color: var(--p); font-family: var(--font-d); }


/* ══════════════════════════════════════
   9. DESCRIPTION BLOCK
   ══════════════════════════════════════ */
.pub-desc-block {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.pub-desc-block__title {
  font-family: var(--font-d);
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 12px;
}

.pub-desc-block__text {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.75;
}

.pub-desc-block__text.clamped {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pub-desc-block__toggle {
  font-size: 12px;
  color: var(--p);
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
  background: none;
  border: none;
  font-family: var(--sans);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}


/* ══════════════════════════════════════
   10. DEALER CARD
   ══════════════════════════════════════ */
.pub-dealer-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
}

.pub-dealer-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.pub-dealer-card__icon {
  width: 42px;
  height: 42px;
  border-radius: var(--r-md);
  background: var(--p-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--p);
  font-size: 16px;
  flex-shrink: 0;
}

.pub-dealer-card__name {
  font-family: var(--font-d);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.pub-dealer-card__loc { font-size: 12px; color: var(--faint); margin-top: 2px; }

.pub-dealer-card__stats {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 12px;
}

.pub-dealer-stat           { text-align: center; flex: 1; }
.pub-dealer-stat__num      { font-family: var(--font-d); font-size: 18px; font-weight: 700; color: var(--text); }
.pub-dealer-stat__lbl      { font-size: 10px; color: var(--faint); margin-top: 2px; }


/* ══════════════════════════════════════
   11. STICKY ENQUIRY SIDEBAR
   ══════════════════════════════════════ */
.pub-enquiry-sticky { position: sticky; top: 80px; }

.pub-enquiry-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.pub-enquiry-card__head {
  background: linear-gradient(140deg, #08143c 0%, var(--p) 100%);
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.pub-enquiry-card__head::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(255,255,255,.07);
}

.pub-enquiry-card__head::after {
  content: '';
  position: absolute;
  bottom: -20px; left: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}

.pub-enquiry-card__price {
  font-family: var(--font-d);
  font-size: 28px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
  margin-bottom: 4px;
  letter-spacing: -.02em;
  position: relative;
  z-index: 1;
}

.pub-enquiry-card__pm {
  font-size: 12px;
  color: rgba(255,255,255,.5);
  position: relative;
  z-index: 1;
}

.pub-enquiry-card__commission {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: var(--r-full);
  padding: 6px 12px;
  margin-top: 14px;
  width: fit-content;
  position: relative;
  z-index: 1;
}

.pub-enquiry-card__comm-label { font-size: 11px; color: rgba(255,255,255,.65); }
.pub-enquiry-card__comm-val   { font-family: var(--font-d); font-size: 12px; font-weight: 700; color: #4ade80; }

.pub-enquiry-card__body { padding: 20px; }

.pub-enquiry-broker {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--p-light);
  border: 1px solid var(--p-b);
  border-radius: var(--r-md);
  padding: 10px 14px;
  margin-bottom: 16px;
}

.pub-enquiry-broker__av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.pub-enquiry-broker__name { font-size: 12px; font-weight: 600; color: var(--p); }
.pub-enquiry-broker__sub  { font-size: 11px; color: var(--muted); }

.pub-enquiry-trust {
  font-size: 11px;
  color: var(--faint);
  text-align: center;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.pub-enquiry-trust span {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.pub-enquiry-trust i { color: var(--p); }

.pub-enquiry-success { text-align: center; padding: 2rem 1rem; }

.pub-enquiry-success__icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--gr-bg);
  border: 2px solid var(--gr-b);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--green);
  margin: 0 auto 1rem;
}


/* ══════════════════════════════════════
   12. ENQUIRY FORM ELEMENTS
   ══════════════════════════════════════ */
.pub-form-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text);
  margin-bottom: 5px;
  text-transform: uppercase;
}

.pub-form-input {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: 13px;
  font-family: var(--sans);
  color: var(--text);
  background: #f8faff;
  outline: none;
  transition: border-color .18s, background .18s;
  margin-bottom: 12px;
  box-sizing: border-box;
}

.pub-form-input:focus {
  border-color: var(--p);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(15,76,158,.07);
}

.pub-form-input::placeholder { color: var(--faint); }

textarea.pub-form-input   { resize: none; }

select.pub-form-input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

.pub-form-submit {
  width: 100%;
  padding: 13px;
  background: var(--p);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: var(--sans);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.pub-form-submit:hover    { background: var(--p-dark); }
.pub-form-submit:disabled { opacity: .5; cursor: not-allowed; }

.pub-form-or {
  text-align: center;
  font-size: 12px;
  color: var(--faint);
  margin: 12px 0;
  position: relative;
}

.pub-form-or::before,
.pub-form-or::after {
  content: '';
  position: absolute;
  top: 50%;
  width: calc(50% - 22px);
  height: 1px;
  background: var(--border);
}

.pub-form-or::before { left: 0; }
.pub-form-or::after  { right: 0; }

.pub-form-whatsapp {
  width: 100%;
  padding: 11px;
  background: #25d366;
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sans);
  border: none;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background .18s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pub-form-whatsapp:hover { background: #1ebe5d; }

.pub-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 4px;
  margin-top: -4px;
}

.pub-form-consent input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  accent-color: var(--p);
}

.pub-form-error {
  font-size: 11px;
  color: var(--red);
  margin-top: -8px;
  margin-bottom: 8px;
}


/* ══════════════════════════════════════
   13. RELATED CARS GRID
   ══════════════════════════════════════ */
.pub-related { padding: 36px 0 12px; }

.pub-related__title {
  font-family: var(--font-d);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: -.01em;
}

.pub-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-inline: clamp(16px, 4vw, 48px);
  padding-inline: clamp(12px, 2vw, 24px);
}

.pub-rel-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,0,0,1), box-shadow .3s, border-color .18s;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.pub-rel-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15,76,158,.13);
  border-color: #c7d6f5;
}

.pub-rel-card__img {
  height: 150px;
  overflow: hidden;
  background: var(--bg);
}

.pub-rel-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s cubic-bezier(.2,0,0,1);
}

.pub-rel-card:hover .pub-rel-card__img img { transform: scale(1.07); }

.pub-rel-card__body  { padding: 12px; }
.pub-rel-card__name  { font-family: var(--font-d); font-size: 13px; font-weight: 700; color: var(--text); margin-bottom: 4px; }
.pub-rel-card__price { font-size: 14px; font-weight: 700; color: var(--p); font-family: var(--font-d); }
.pub-rel-card__meta  { font-size: 11px; color: var(--faint); margin-top: 4px; }


/* ══════════════════════════════════════
   14. BROKER STOREFRONT HERO
   ══════════════════════════════════════ */
.pub-broker-hero {
  background: linear-gradient(140deg, #08143c 0%, var(--p) 100%);
  border-radius: var(--r-xl);
  padding: 2.5rem;
  margin-bottom: 2rem;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.pub-broker-hero::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}

.pub-broker-hero__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-d);
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
  z-index: 1;
}

.pub-broker-hero__name {
  font-family: var(--font-d);
  font-size: 24px;
  font-weight: 800;
  margin-bottom: 4px;
  position: relative;
  z-index: 1;
  letter-spacing: -.02em;
}

.pub-broker-hero__tagline { font-size: 14px; color: rgba(255,255,255,.65); position: relative; z-index: 1; }

.pub-broker-hero__stats {
  display: flex;
  gap: 24px;
  margin-top: 1.25rem;
  position: relative;
  z-index: 1;
}

.pub-broker-hero__stat-num { font-family: var(--font-d); font-size: 22px; font-weight: 700; color: #fff; }
.pub-broker-hero__stat-lbl { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 1px; }


/* ══════════════════════════════════════
   15. BROWSE GRID — base definition
   browse.css overrides per breakpoint.
   ══════════════════════════════════════ */
.pub-browse-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.pub-browse-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform .3s cubic-bezier(.2,0,0,1), box-shadow .3s, border-color .18s;
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.pub-browse-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(15,76,158,.12);
  border-color: #c7d6f5;
}

.pub-browse-card__img {
  height: 180px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
  flex-shrink: 0;
}

.pub-browse-card__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s cubic-bezier(.2,0,0,1);
}

.pub-browse-card:hover .pub-browse-card__img img { transform: scale(1.06); }

.pub-browse-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  color: var(--faint);
}

.pub-browse-card__body {
  padding: 14px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pub-browse-card__name-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 4px;
}

.pub-browse-card__name {
  font-family: var(--font-d);
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.01em;
  line-height: 1.2;
  flex: 1;
  min-width: 0;
}

.pub-browse-card__price {
  font-family: var(--font-d);
  font-size: 17px;
  font-weight: 800;
  color: var(--p);
  letter-spacing: -.02em;
  flex-shrink: 0;
  white-space: nowrap;
}

.pub-browse-card__meta {
  font-size: 11px;
  color: var(--faint);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pub-browse-card__meta span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pub-browse-card__broker {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 5px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}


/* ══════════════════════════════════════
   16. SHARE SHEET OVERLAY
   ══════════════════════════════════════ */
.pub-share-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: var(--z-modal);
  align-items: flex-end;
  justify-content: center;
  padding: 0;
  backdrop-filter: blur(3px);
}

.pub-share-overlay.open { display: flex; }

.pub-share-sheet {
  background: var(--white);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  padding: 1.5rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 -8px 40px rgba(0,0,0,.18);
  animation: sheet-up .25s cubic-bezier(.2,0,0,1);
}

@keyframes sheet-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.pub-share-sheet__handle {
  width: 36px;
  height: 4px;
  background: var(--border2);
  border-radius: 2px;
  margin: 0 auto 1.25rem;
}

.pub-share-sheet__title {
  font-family: var(--font-d);
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -.01em;
}

.pub-share-sheet__sub {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
  margin-bottom: 0;
  line-height: 1.5;
}

.pub-share-sheet__url {
  display: flex;
  gap: 8px;
  margin: 1rem 0;
}

.pub-share-sheet__url input {
  flex: 1;
  min-width: 0;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  font-size: 12px;
  font-family: var(--mono);
  color: var(--text);
  background: var(--bg);
  outline: none;
}

.pub-share-options {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 1rem;
}

.pub-share-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all .18s;
  background: var(--bg);
  font-size: 11px;
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
}

.pub-share-option:hover { background: var(--p-light); border-color: var(--p-b); color: var(--p); text-decoration: none; }

.pub-share-option i { font-size: 18px; }

.pub-share-option.wa i { color: #25d366; }
.pub-share-option.fb i { color: #1877f2; }
.pub-share-option.tw i { color: #1da1f2; }
.pub-share-option.cp i { color: var(--p); }


/* ══════════════════════════════════════
   17. ANIMATIONS
   pub-reveal / pub-revealed used by index.php
   (homepage featured cards) and broker pages.
   NOT used on browse cards (FIX-7 removed it).
   ══════════════════════════════════════ */
@keyframes pub-fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

.pub-anim { animation: pub-fade-up .5s ease both; }
.pub-d1   { animation-delay: .05s; }
.pub-d2   { animation-delay: .15s; }
.pub-d3   { animation-delay: .25s; }
.pub-d4   { animation-delay: .35s; }

/* pub-reveal: IntersectionObserver-driven (public.js) */
.pub-reveal   { /* opacity set by JS on observe */ }
.pub-revealed { opacity: 1 !important; transform: none !important; }


/* ══════════════════════════════════════
   18. RESPONSIVE BREAKPOINTS
   ══════════════════════════════════════ */
@media (max-width: 1024px) {
  .pub-nav__links { display: none; }
}

@media (max-width: 960px) {
  .pub-detail-grid { grid-template-columns: 1fr; }

  .pub-detail-grid > div,
  .pub-gallery,
  .pub-gallery__main,
  .pub-gallery__thumbs {
    min-width: 0;
    width: 100%;
  }

  .pub-enquiry-sticky { position: static; }
  .pub-gallery__main  { height: 300px; }
  .pub-breadcrumb     { display: none; }
}

@media (max-width: 768px) {
  .pub-nav__signin   { display: none; }

  /* NOTE: pub-page-wide padding intentionally kept at 0 for the browse
     page — the .browse-layout inside it owns its own lateral spacing.
     Other page types (detail, broker) rely on their own inner shells. */
  .pub-page-wide  { padding: 0 0 48px; }
  .pub-page-narrow { padding: 16px 16px 48px; }

  .pub-gallery__main      { height: 260px; }
  .pub-car-header__name   { font-size: 20px; }
  .pub-car-header__price  { font-size: 22px; }
  .pub-browse-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
}

@media (max-width: 480px) {
  .pub-nav__account-btn .pub-nav-label { display: none; }
  .pub-nav__account-btn { padding: 8px 12px; }
  .pub-share-options    { grid-template-columns: repeat(2, 1fr); }
  .pub-broker-hero__stats { gap: 16px; }
}


/* ══════════════════════════════════════
   19. FOOTER UTILITIES
   (full sd-footer styles are in layout-public.php
    inline <style> block — kept inline for
    cache-busting in production)
   ══════════════════════════════════════ */
/* No rules here — avoids conflicting with layout-public.php inline block. */