/* Pre-Owned Cars & Dealer Landing Pages */
:root {
  --po-green: #00754a;
  --po-green-dark: #0e3a2f;
  --po-green-soft: #f2f8f5;
  --po-border: #e3ece7;
  --po-text: #14261f;
  --po-muted: #6b7b74;
  --po-radius: 16px;
  --po-shadow: 0 6px 24px rgba(14, 58, 47, 0.07);
}

/* Grid and flex children must be allowed to shrink below their intrinsic
   content width, otherwise Swiper measures a runaway container width. */
.preowned-listing > *,
.preowned-detail-grid > *,
.preowned-detail-lower > *,
.dealer-landing-grid > * {
  min-width: 0;
}

.btn {
  display: inline-block;
  text-align: center;
  padding: 11px 22px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}
.btn.green { background: var(--po-green); color: #fff; }
.btn.green:hover { background: #005c3a; }
.btn.white { background: #fff; color: var(--po-green); border-color: var(--po-green); }
.btn.white:hover { background: var(--po-green-soft); }

/* ---------- Hero ---------- */
.preowned-hero {
  position: relative;
  min-height: 260px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  color: #fff;
}
.preowned-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 40, 25, 0.65);
}
.preowned-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
}
.preowned-hero-inner h1 {
  font-size: 2.4rem;
  margin: 0 0 8px;
}

/* ---------- Listing ---------- */
.preowned-listing {
  max-width: 1400px;
  margin: 0 auto;
  padding: 40px 20px;
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
}
.preowned-filters {
  background: #fff;
  border: 1px solid #d7e3dc;
  border-radius: 14px;
  padding: 16px;
  height: fit-content;
  position: sticky;
  top: 100px;
  box-shadow: 0 4px 18px rgba(14, 58, 47, 0.06);
}
.preowned-filter-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.preowned-filter-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6eee9;
}
.preowned-filters h3 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--po-text);
  letter-spacing: 0.01em;
}
.preowned-filter-reset {
  font-size: 12px;
  font-weight: 600;
  color: var(--po-green);
  text-decoration: none;
}
.preowned-filter-reset:hover { text-decoration: underline; }

.preowned-filters .filter-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 0;
}
.preowned-filters .filter-field label,
.preowned-filters label:not(.checkbox-label) {
  display: block;
  margin: 0 !important;
  padding: 0;
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  color: #3d5349 !important;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.preowned-filters .filter-field input,
.preowned-filters .filter-field select,
.preowned-filters input:not([type="checkbox"]),
.preowned-filters select {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 42px;
  margin: 0 !important;
  padding: 0 12px !important;
  border: 1.5px solid #c5d5cc !important;
  border-radius: 8px !important;
  background: #f7faf8 !important;
  color: var(--po-text) !important;
  font-size: 14px !important;
  font-weight: 500;
  line-height: 40px !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.preowned-filters .filter-field select,
.preowned-filters select {
  padding-right: 36px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2300754a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-color: #f7faf8 !important;
  cursor: pointer;
}
.preowned-filters .filter-field input::placeholder {
  color: #8a9b93;
  font-weight: 400;
}
.preowned-filters .filter-field input:hover,
.preowned-filters .filter-field select:hover,
.preowned-filters input:not([type="checkbox"]):hover,
.preowned-filters select:hover {
  border-color: #9bb8a9 !important;
  background: #fff !important;
}
.preowned-filters .filter-field input:focus,
.preowned-filters .filter-field select:focus,
.preowned-filters input:not([type="checkbox"]):focus,
.preowned-filters select:focus {
  outline: none !important;
  border-color: var(--po-green) !important;
  background: #fff !important;
  box-shadow: 0 0 0 3px rgba(0, 117, 74, 0.15) !important;
}
.preowned-filters .filter-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
}
.preowned-filters .checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0 !important;
  padding: 10px 12px;
  border: 1.5px solid #c5d5cc;
  border-radius: 8px;
  background: #f7faf8;
  font-size: 13px !important;
  font-weight: 600 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  color: var(--po-text) !important;
  cursor: pointer;
  line-height: 1.3 !important;
}
.preowned-filters .checkbox-label input {
  width: 16px !important;
  height: 16px !important;
  margin: 0 !important;
  padding: 0 !important;
  accent-color: var(--po-green);
  flex-shrink: 0;
}
.preowned-filters .checkbox-label:hover {
  border-color: #9bb8a9;
  background: #fff;
}
.preowned-filter-actions {
  margin-top: 4px;
  padding-top: 4px;
}
.preowned-filters .btn {
  display: block;
  margin: 0;
  width: 100%;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
}

.preowned-results-head p { color: var(--po-muted); margin: 0 0 16px; }
.preowned-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.preowned-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 18px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--po-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.preowned-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(14, 58, 47, 0.12);
}
.preowned-card-image {
  position: relative;
  aspect-ratio: 16/10;
  background: #f2f2f2;
}
.preowned-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.preowned-card-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 160px;
  color: #888;
  background: #eef3f0;
}
.preowned-card-body { padding: 16px; }
.preowned-card-body h3 { margin: 0 0 8px; font-size: 1.1rem; }
.preowned-card-meta, .preowned-card-dealer { color: var(--po-muted); font-size: 13px; margin: 0 0 6px; }
.preowned-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}
.preowned-card-footer .price { color: var(--po-green); font-size: 1.15rem; }
.preowned-card-footer .cta { color: var(--po-green); font-size: 13px; font-weight: 600; }

/* ---------- Badges ---------- */
.badge-featured,
.badge-certified,
.badge-booked,
.badge-sold,
.badge-negotiable,
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--po-green);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 6px 10px;
  border-radius: 20px;
  white-space: nowrap;
}
.badge-certified { background: #0b5ed7; }
.badge-booked { background: #b45309; }
.badge-sold { background: #6b7280; }
.badge-negotiable { background: #0f5132; }
.badge-status { background: #334155; }

/* Only inside an image frame are badges pinned to a corner. */
.preowned-card-image .badge-featured,
.preowned-card-image .badge-certified,
.preowned-card-image .badge-booked,
.preowned-card-image .badge-sold {
  position: absolute;
  top: 10px;
  left: 10px;
}
.preowned-card-image .badge-certified { left: auto; right: 10px; }
.preowned-card-image .badge-booked,
.preowned-card-image .badge-sold { top: 42px; }

.preowned-empty { grid-column: 1 / -1; text-align: center; padding: 60px 20px; }
.preowned-pagination { margin-top: 28px; }
.preowned-pager { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.preowned-pager a, .preowned-pager span {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid #d5e0da;
  text-decoration: none;
  color: var(--po-green);
}
.preowned-pager .active { background: var(--po-green); color: #fff; border-color: var(--po-green); }
.preowned-pager .disabled { opacity: .45; }

/* ---------- Detail: breadcrumb bar ---------- */
.preowned-breadcrumb-bar {
  background: var(--po-green-soft);
  border-bottom: 1px solid var(--po-border);
}
.preowned-breadcrumb-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.breadcrumbs { font-size: 13px; color: var(--po-muted); }
.breadcrumbs a { color: var(--po-green); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.breadcrumbs span[aria-current] { color: var(--po-text); }
.preowned-back-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--po-green);
  text-decoration: none;
  white-space: nowrap;
}

/* ---------- Detail: layout ---------- */
.preowned-detail { max-width: 1200px; margin: 0 auto; padding: 28px 20px 60px; }
.preowned-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 34px;
  align-items: start;
}

/* ---------- Detail: gallery ---------- */
.preowned-gallery { position: relative; }
.preowned-gallery .swiper { width: 100%; }
.preowned-gallery-main {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  background: #eef3f0;
  box-shadow: var(--po-shadow);
}
.preowned-gallery-main .swiper-slide {
  aspect-ratio: 16/10;
  background: #eef3f0;
}
.preowned-gallery-main .swiper-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  cursor: zoom-in;
}
.preowned-gallery-main .preowned-card-placeholder { min-height: 280px; }
.preowned-gallery-flags {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: calc(100% - 28px);
}
.preowned-gallery-count {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 3;
  background: rgba(14, 38, 31, .78);
  color: #fff;
  font-size: 12px;
  padding: 6px 11px;
  border-radius: 20px;
}
.preowned-gallery-main .swiper-button-prev,
.preowned-gallery-main .swiper-button-next {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .18);
  color: var(--po-green-dark);
}
.preowned-gallery-main .swiper-button-prev::after,
.preowned-gallery-main .swiper-button-next::after { font-size: 15px; font-weight: 700; }

.preownedThumbsSwiper { margin-top: 12px; }
.preownedThumbsSwiper .swiper-slide {
  opacity: .55;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid transparent;
  transition: opacity .2s ease, border-color .2s ease;
}
.preownedThumbsSwiper .swiper-slide:hover { opacity: .85; }
.preownedThumbsSwiper .swiper-slide-thumb-active {
  opacity: 1;
  border-color: var(--po-green);
}
.preownedThumbsSwiper img {
  width: 100%;
  height: 74px;
  object-fit: cover;
  display: block;
}

/* ---------- Detail: summary panel ---------- */
.preowned-summary {
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  padding: 24px;
  background: #fff;
  box-shadow: var(--po-shadow);
}
.preowned-summary-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.preowned-summary h1 {
  margin: 0 0 6px;
  font-size: 1.7rem;
  line-height: 1.25;
  color: var(--po-text);
}
.preowned-summary-sub {
  color: var(--po-muted);
  font-size: 14px;
  margin: 0 0 18px;
}
.preowned-price-block {
  border-top: 1px solid var(--po-border);
  border-bottom: 1px solid var(--po-border);
  padding: 16px 0;
  margin-bottom: 18px;
}
.preowned-price-block .price {
  font-size: 2rem;
  color: var(--po-green);
  font-weight: 700;
  line-height: 1.1;
  display: inline-block;
  margin-right: 10px;
}
.preowned-price-block .original {
  text-decoration: line-through;
  color: #9aa8a2;
  font-size: 1rem;
}
.preowned-price-block .saving {
  display: inline-block;
  background: #e6f6ed;
  color: #0f5132;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 9px;
  border-radius: 20px;
  margin-left: 8px;
}
.preowned-price-block .emi {
  display: block;
  color: var(--po-muted);
  font-size: 13px;
  margin-top: 8px;
}
.preowned-price-block .emi a { color: var(--po-green); font-weight: 600; text-decoration: none; }

.preowned-specs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
.preowned-specs-grid div {
  background: var(--po-green-soft);
  border-radius: 12px;
  padding: 12px 10px;
  text-align: center;
}
.preowned-specs-grid i { color: var(--po-green); font-size: 15px; }
.preowned-specs-grid strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--po-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 6px 0 3px;
}
.preowned-specs-grid span { font-size: 14px; font-weight: 600; color: var(--po-text); }

.preowned-cta-row { display: flex; flex-wrap: wrap; gap: 10px; }
.preowned-cta-row > * { flex: 1 1 160px; }
.preowned-whatsapp-btn,
.preowned-phone-btn,
.preowned-enquire-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 18px;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  border: 1px solid transparent;
  cursor: pointer;
}
.preowned-whatsapp-btn { background: #25d366; color: #fff; }
.preowned-whatsapp-btn:hover { background: #1fb956; }
.preowned-phone-btn { background: var(--po-green); color: #fff; }
.preowned-phone-btn:hover { background: #005c3a; }
.preowned-enquire-btn { background: #fff; color: var(--po-green); border-color: var(--po-green); }
.preowned-enquire-btn:hover { background: var(--po-green-soft); }

.preowned-share {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--po-border);
  font-size: 13px;
  color: var(--po-muted);
}
.preowned-share a, .preowned-share button {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--po-border);
  background: #fff;
  color: var(--po-green-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  text-decoration: none;
  transition: background .2s ease, color .2s ease;
}
.preowned-share a:hover, .preowned-share button:hover {
  background: var(--po-green);
  color: #fff;
  border-color: var(--po-green);
}

.preowned-dealer-card {
  background: var(--po-green-soft);
  border-radius: 14px;
  padding: 16px;
  margin-top: 18px;
}
.preowned-dealer-card h4 {
  margin: 0 0 8px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--po-muted);
}
.preowned-dealer-card a { color: var(--po-green); text-decoration: none; }
.preowned-dealer-card strong { display: block; margin-bottom: 6px; }
.preowned-dealer-card p { margin: 0 0 6px; font-size: 13px; color: var(--po-muted); line-height: 1.5; }

/* ---------- Detail: trust strip ---------- */
.preowned-trust {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 34px;
  padding: 22px;
  background: var(--po-green-dark);
  border-radius: var(--po-radius);
  color: #fff;
}
.preowned-trust div { display: flex; align-items: center; gap: 12px; }
.preowned-trust i { font-size: 20px; color: #78faae; flex-shrink: 0; }
.preowned-trust strong { display: block; font-size: 14px; }
.preowned-trust span { font-size: 12px; color: #b9cfc6; }

/* ---------- Detail: lower content ---------- */
.preowned-detail-lower {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 34px;
  margin-top: 40px;
  align-items: start;
}
.preowned-block {
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  padding: 24px;
  margin-bottom: 24px;
  background: #fff;
}
.preowned-block > h2 {
  margin: 0 0 16px;
  font-size: 1.25rem;
  color: var(--po-text);
  display: flex;
  align-items: center;
  gap: 9px;
}
.preowned-block > h2 i { color: var(--po-green); font-size: 1rem; }
.preowned-description { color: #43544c; line-height: 1.7; }

.preowned-features {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 20px;
  list-style: none;
  padding: 0;
  margin: 0;
}
.preowned-features li {
  position: relative;
  padding-left: 26px;
  font-size: 14px;
  color: #43544c;
  line-height: 1.5;
}
.preowned-features li::before {
  content: "\f058";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  position: absolute;
  left: 0;
  top: 1px;
  color: var(--po-green);
  font-size: 13px;
}

.preowned-spec-group + .preowned-spec-group { margin-top: 24px; }
.preowned-spec-group h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--po-muted);
  margin: 0 0 10px;
}
.preowned-spec-table { width: 100%; border-collapse: collapse; }
.preowned-spec-table th,
.preowned-spec-table td {
  border-bottom: 1px solid var(--po-border);
  padding: 11px 4px;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}
.preowned-spec-table th {
  font-weight: 500;
  color: var(--po-muted);
  width: 46%;
}
.preowned-spec-table td { color: var(--po-text); font-weight: 600; }

/* ---------- Detail: EMI calculator ---------- */
.preowned-emi-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.preowned-emi-field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--po-muted);
  margin-bottom: 6px;
}
.preowned-emi-field output {
  display: block;
  font-size: 15px;
  font-weight: 700;
  color: var(--po-text);
  margin-bottom: 8px;
}
.preowned-emi-field input[type="range"] { width: 100%; accent-color: var(--po-green); }
.preowned-emi-result {
  margin-top: 20px;
  background: var(--po-green-soft);
  border-radius: 12px;
  padding: 16px 18px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.preowned-emi-result span { color: var(--po-muted); font-size: 13px; }
.preowned-emi-result strong { font-size: 1.6rem; color: var(--po-green); }
.preowned-emi-note { font-size: 12px; color: var(--po-muted); margin: 10px 0 0; }

/* ---------- Detail: enquiry aside ---------- */
.preowned-enquiry-aside {
  background: #fff;
  border: 1px solid var(--po-border);
  border-radius: var(--po-radius);
  padding: 24px;
  height: fit-content;
  position: sticky;
  top: 100px;
  box-shadow: var(--po-shadow);
}
.preowned-enquiry-aside h3 { margin: 0 0 4px; font-size: 1.2rem; }
.preowned-enquiry-aside .aside-sub { color: var(--po-muted); font-size: 13px; margin: 0 0 16px; }
.preowned-enquiry-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.preowned-enquiry-form .form-row.full { grid-template-columns: 1fr; }
.preowned-enquiry-form input,
.preowned-enquiry-form textarea,
.preowned-enquiry-form select {
  width: 100%;
  padding: 12px;
  border: 1px solid #d5e0da;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
}
.preowned-enquiry-form input:focus,
.preowned-enquiry-form textarea:focus {
  outline: none;
  border-color: var(--po-green);
  box-shadow: 0 0 0 3px rgba(0, 117, 74, .1);
}
.preowned-enquiry-form .book-btn {
  width: 100%;
  background: var(--po-green);
  color: #fff;
  border: none;
  border-radius: 30px;
  padding: 13px 18px;
  cursor: pointer;
  font-weight: 600;
  font-size: 14px;
  margin-top: 4px;
}
.preowned-enquiry-form .book-btn:hover { background: #005c3a; }
.preowned-form-note { font-size: 11px; color: var(--po-muted); margin: 10px 0 0; text-align: center; }
.preowned-toast {
  margin-bottom: 14px;
  background: #e8f8ef;
  color: #0f5132;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
  border: 1px solid #c3e8d3;
}
.preowned-toast.error { background: #fde8e8; color: #842029; border-color: #f5c2c7; }

.preowned-related { margin-top: 50px; }
.preowned-related h2 { margin-bottom: 18px; }

/* ---------- Detail: mobile sticky action bar ---------- */
.preowned-sticky-bar { display: none; }

/* ---------- Lightbox ---------- */
.preowned-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(8, 20, 16, .93);
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
}
.preowned-lightbox.open { display: flex; }
.preowned-lightbox img {
  max-width: 92vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 10px;
}
.preowned-lightbox button {
  position: absolute;
  background: rgba(255, 255, 255, .12);
  border: none;
  color: #fff;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.preowned-lightbox button:hover { background: rgba(255, 255, 255, .25); }
.preowned-lightbox .lb-close { top: 22px; right: 22px; }
.preowned-lightbox .lb-prev { left: 22px; }
.preowned-lightbox .lb-next { right: 22px; }
.preowned-lightbox .lb-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  color: #cfe3da;
  font-size: 13px;
}

/* ---------- Dealers ---------- */
.dealers-listing { max-width: 1200px; margin: 0 auto; padding: 40px 20px 60px; }
.dealers-state-block { margin-bottom: 40px; }
.dealers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
}
.dealer-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--po-shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.dealer-card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(14, 58, 47, .12); }
.dealer-card-image { aspect-ratio: 16/10; background: #eef3f0; }
.dealer-card-image img { width: 100%; height: 100%; object-fit: cover; }
.dealer-card-body { padding: 16px; }
.dealer-card-body h3 { margin: 0 0 8px; }
.dealer-card-body .phone { color: var(--po-green); font-weight: 600; }
.dealer-card-body .cta { color: var(--po-green); font-weight: 600; }

.dealer-landing { max-width: 1200px; margin: 0 auto; padding: 30px 20px 60px; }
.dealer-landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.dealer-description { line-height: 1.7; color: #43544c; }
.dealer-info-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0;
}
.info-card {
  background: var(--po-green-soft);
  border-radius: 14px;
  padding: 16px;
}
.info-card h4 { margin: 0 0 10px; font-size: 14px; }
.info-card p { margin: 0 0 6px; font-size: 13px; line-height: 1.5; }
.info-card a { color: var(--po-green); text-decoration: none; }
.info-card .preowned-cta-row > * { flex: 0 1 auto; padding: 10px 16px; font-size: 13px; }
.dealer-map iframe { width: 100%; min-height: 320px; border: 0; border-radius: 14px; }
.dealer-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
}
.dealer-gallery-grid img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: 12px;
}

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .preowned-detail-grid,
  .preowned-detail-lower,
  .dealer-landing-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .preowned-enquiry-aside { position: static; }
  .preowned-trust { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 768px) {
  .preowned-listing { grid-template-columns: minmax(0, 1fr); }
  .preowned-filters { position: static; }
  .preowned-specs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dealer-info-cards { grid-template-columns: minmax(0, 1fr); }
  .preowned-features { grid-template-columns: minmax(0, 1fr); }
  .preowned-emi-grid { grid-template-columns: minmax(0, 1fr); }
  .preowned-hero-inner h1 { font-size: 1.8rem; }
  .preowned-summary { padding: 20px; }
  .preowned-summary h1 { font-size: 1.4rem; }
  .preowned-price-block .price { font-size: 1.6rem; }
  .preowned-block { padding: 20px; }
  .preowned-detail { padding-bottom: 96px; }

  /* Keeps the last of the page clear of the fixed action bar. */
  body:has(.preowned-sticky-bar) { padding-bottom: 66px; }

  .preowned-sticky-bar {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    background: #fff;
    border-top: 1px solid var(--po-border);
    box-shadow: 0 -4px 18px rgba(0, 0, 0, .1);
    /* Right padding reserves room for the floating chat widget. */
    padding: 10px 78px 10px 14px;
    gap: 10px;
    align-items: center;
  }
  .preowned-sticky-bar .sticky-price { flex: 0 0 auto; line-height: 1.2; }
  .preowned-sticky-bar .sticky-price small { display: block; font-size: 10px; color: var(--po-muted); }
  .preowned-sticky-bar .sticky-price strong { font-size: 15px; color: var(--po-green); }
  .preowned-sticky-bar .sticky-actions { display: flex; gap: 8px; margin-left: auto; }
  .preowned-sticky-bar a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 14px;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    color: #fff;
  }
  .preowned-sticky-bar .sticky-wa { background: #25d366; }
  .preowned-sticky-bar .sticky-call { background: var(--po-green); }
}

@media (max-width: 480px) {
  .preowned-cta-row { flex-direction: column; }
  .preowned-cta-row > * { flex: 1 1 auto; }
  .preowned-specs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .preowned-trust { grid-template-columns: minmax(0, 1fr); }
  .preownedThumbsSwiper img { height: 58px; }
  .preowned-lightbox .lb-prev { left: 8px; }
  .preowned-lightbox .lb-next { right: 8px; }
}
