/* Caravan UX pack — listings, favourites, filters, sticky CTA */
.listing-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  padding: 14px 18px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  margin-bottom: 24px;
  font-size: 0.875rem;
  color: var(--navy);
}
.filter-form .filter-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.filter-form label { display: block; font-size: 0.75rem; font-weight: 600; margin-bottom: 4px; color: var(--text-muted); }
.filter-more { margin-top: 12px; }
.filter-more summary { cursor: pointer; font-weight: 600; color: var(--navy); padding: 8px 0; }
.filter-check { display: flex; align-items: center; gap: 8px; font-size: 0.875rem; padding: 8px 0; }
.filter-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 20px; }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; background: #fff; border: 1px solid #d1d5db;
  border-radius: 20px; font-size: 0.8rem; text-decoration: none; color: var(--navy);
}
.filter-chip:hover { border-color: var(--orange); color: var(--orange); }
.listing-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.listing-sort select { margin-left: 8px; padding: 6px 10px; border-radius: 6px; border: 1px solid #d1d5db; }
.stock-alert-box {
  background: #fffbeb; border: 1px solid #fcd34d; border-radius: 8px;
  padding: 16px 18px; margin-bottom: 24px;
}
.stock-alert-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.stock-alert-email, .stock-alert-name { padding: 8px 12px; border: 1px solid #d1d5db; border-radius: 6px; min-width: 160px; }
.stock-alert-msg.success { color: #16a34a; }
.stock-alert-msg.error { color: #dc2626; }
.st-section-title { font-size: 1.25rem; margin: 0; }
.st-recent-section { margin-bottom: 32px; }
.st-recent-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.st-carousel-nav { display: flex; gap: 8px; flex-shrink: 0; }
.st-carousel-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid #d1d5db;
  background: #fff; color: var(--navy); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}
.st-carousel-btn:hover:not(:disabled) { border-color: var(--orange); color: var(--orange); }
.st-carousel-btn:disabled { opacity: 0.35; cursor: not-allowed; }
.st-recent-carousel { position: relative; margin: 0 -4px; }
.st-carousel-track {
  display: flex; gap: 20px; overflow-x: auto; overflow-y: hidden;
  scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
  padding: 4px 4px 12px;
}
.st-carousel-track::-webkit-scrollbar { display: none; }
.st-carousel-slide {
  flex: 0 0 min(280px, calc(100vw - 48px));
  scroll-snap-align: start;
  max-width: 300px;
}
.st-recent-card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  display: flex; flex-direction: column; height: 100%;
  transition: box-shadow 0.2s, border-color 0.2s;
}
.st-recent-card:hover { border-color: var(--orange); box-shadow: 0 8px 24px rgba(26, 46, 74, 0.1); }
.st-recent-card-link { text-decoration: none; color: inherit; flex: 1; display: flex; flex-direction: column; }
.st-recent-card-img {
  aspect-ratio: 4 / 3; background: #f1f5f9; overflow: hidden;
}
.st-recent-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.st-recent-no-img {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: 0.8rem;
}
.st-recent-card-body { padding: 14px 14px 10px; flex: 1; }
.st-recent-card-title {
  margin: 0 0 6px; font-size: 0.95rem; font-weight: 700; color: var(--navy);
  line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.st-recent-card-meta { margin: 0 0 6px; font-size: 0.8rem; color: var(--text-muted); }
.st-recent-card-price { margin: 0; font-size: 1.1rem; font-weight: 800; color: var(--orange); }
.st-recent-card-price.poa { color: var(--navy); font-size: 1rem; }
.st-recent-qv { margin: 0 14px 14px; align-self: flex-start; }
.st-skeleton-track.st-skeleton-track {
  min-height: 260px;
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%; animation: st-shimmer 1.2s infinite; border-radius: 8px;
}
.st-skeleton-grid .st-skeleton-card {
  min-height: 280px; background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%; animation: st-shimmer 1.2s infinite; border-radius: 8px;
}
@keyframes st-shimmer { to { background-position: -200% 0; } }
@media (min-width: 960px) {
  .st-carousel-slide { flex-basis: 280px; }
}
.listing-empty { text-align: center; padding: 80px 0; }
.caravan-fav-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, 0.95); color: var(--navy);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12); transition: color 0.2s, transform 0.15s;
}
.caravan-fav-btn:hover { transform: scale(1.06); }
.caravan-fav-btn.is-saved { color: #f97316; }
.caravan-fav-btn.is-saved svg { fill: #f97316; stroke: #f97316; }
.card-media-badges {
  display: flex; flex-wrap: wrap; gap: 6px;
}
.card-media-badge {
  font-size: 0.7rem; font-weight: 700; padding: 3px 8px;
  border-radius: 4px; background: rgba(26, 46, 74, 0.85); color: #fff;
}
.header-saved-link {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 6px; color: var(--navy); text-decoration: none; border-radius: 6px;
}
.header-saved-link:hover { background: #f3f4f6; }
.header-saved-link .saved-count {
  position: absolute; top: 0; right: 0; min-width: 16px; height: 16px;
  padding: 0 4px; font-size: 0.65rem; font-weight: 800; line-height: 16px;
  text-align: center; background: var(--orange); color: var(--navy); border-radius: 8px;
}
.detail-breadcrumb { margin-bottom: 16px; font-size: 0.875rem; color: var(--text-muted); }
.detail-action-bar { margin-bottom: 20px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.detail-action-bar .caravan-fav-btn { position: static; box-shadow: none; border: 1px solid var(--border); }
.detail-similar { margin-top: 64px; }
.detail-similar h2 { margin-bottom: 28px; }
.detail-contact-btns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.detail-contact-btns .btn {
  width: 100%;
  justify-content: center;
  padding-left: 12px;
  padding-right: 12px;
  font-size: 0.875rem;
}
.btn-whatsapp {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
}
.btn-whatsapp:hover {
  background: #20b558;
  border-color: #20b558;
  color: #fff;
}
.detail-sticky-cta {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 950;
  background: #fff; border-top: 1px solid #e5e7eb;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
  padding: 10px 0;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
}
.detail-sticky-inner {
  display: flex; align-items: center; gap: 12px;
}
.detail-sticky-title {
  flex: 1; min-width: 0; font-size: 0.85rem; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.detail-sticky-price { font-weight: 800; color: var(--orange); font-size: 1rem; flex-shrink: 0; }
.detail-sticky-actions {
  display: flex; gap: 8px; flex-shrink: 0;
  padding-right: 0;
}
.caravan-qv-lightbox-trigger {
  border: none; padding: 0; background: none; cursor: zoom-in; display: block; width: 100%; height: 100%;
}
.caravan-qv-lightbox {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(0, 0, 0, 0.92); display: flex; align-items: center; justify-content: center; padding: 20px;
}
.caravan-qv-lightbox[hidden] { display: none !important; }
.caravan-qv-lightbox img { max-width: 100%; max-height: 90vh; object-fit: contain; }
.caravan-qv-lightbox-close {
  position: absolute; top: 16px; right: 16px; width: 44px; height: 44px;
  border: none; border-radius: 50%; background: rgba(255, 255, 255, 0.15);
  color: #fff; font-size: 1.5rem; cursor: pointer;
}
.caravan-qv-enquire-wrap { margin-top: 12px; flex-shrink: 0; }
.caravan-qv-enquire-form { margin-top: 12px; }
.caravan-qv-enquire-form .form-group { margin-bottom: 10px; }
.caravan-qv-enquire-msg.success { color: #16a34a; font-size: 0.875rem; }
.caravan-qv-enquire-msg.error { color: #dc2626; font-size: 0.875rem; }
.caravan-nl-cta { background: linear-gradient(135deg, #1a2e4a 0%, #0f1e33 100%); padding: 52px 0; }
.caravan-nl-inner { display: flex; align-items: center; gap: 40px; flex-wrap: wrap; }
.caravan-nl-text { display: flex; align-items: flex-start; gap: 16px; flex: 1 1 300px; color: #fff; }
.caravan-nl-icon { font-size: 2.2rem; line-height: 1; flex-shrink: 0; }
.caravan-nl-text h2 { margin: 0 0 6px; font-size: 1.4rem; font-weight: 800; color: #fff; }
.caravan-nl-text p { margin: 0; font-size: 0.92rem; color: rgba(255, 255, 255, 0.72); }
.caravan-nl-form { display: flex; gap: 8px; flex-wrap: wrap; flex: 1 1 360px; }
.caravan-nl-cta .caravan-nl-input {
  flex: 1 1 160px; padding: 12px 16px; border: 1.5px solid rgba(255, 255, 255, 0.25);
  border-radius: 8px; background: rgba(255, 255, 255, 0.1); color: #fff;
}
.caravan-nl-msg.success { color: #86efac; }
.caravan-nl-msg.error { color: #fca5a5; }
.card-badge.reduced { background: #16a34a; color: #fff; }
.caravan-unfav-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid #fca5a5;
  color: #dc2626;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}
.caravan-unfav-btn:hover {
  background: #fef2f2;
  border-color: #dc2626;
}
.caravan-unfav-btn svg {
  flex-shrink: 0;
  fill: #f97316;
  stroke: #f97316;
}
.caravan-card-saved .caravan-card-actions {
  flex-wrap: wrap;
}
/* Lift floating WhatsApp above sticky enquire/call bar on caravan detail */
body.sticky-cta-visible {
  padding-bottom: calc(68px + env(safe-area-inset-bottom));
}
body.sticky-cta-visible .whatsapp-float {
  bottom: calc(76px + env(safe-area-inset-bottom));
  right: 16px;
  width: 52px;
  height: 52px;
}
body.sticky-cta-visible .detail-sticky-actions {
  padding-right: 0;
}
@media (max-width: 720px) {
  .detail-sticky-title { display: none; }
  .detail-sticky-inner {
    gap: 10px;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .detail-sticky-price { font-size: 0.95rem; }
  .detail-sticky-actions { flex-shrink: 0; }
  .detail-sticky-actions .btn {
    flex: 0 1 auto;
    min-width: 0;
    justify-content: center;
    white-space: nowrap;
  }
  .caravan-nl-inner { flex-direction: column; }
  body.sticky-cta-visible .whatsapp-float {
    bottom: calc(80px + env(safe-area-inset-bottom));
    right: 16px;
    left: auto;
  }
}
