/**
 * Sayarat — theme on Bootstrap 5 (RTL). Font: Tajawal (partials/styles.php).
 *
 * Brand: violet primary + amber accent; page canvas is warm off-white.
 * Tokens: documentation/brand-colors.md
 */
:root {
  color-scheme: light;

  /* Sayarat brand tokens */
  --sayarat-brand: #5b21b6;
  --sayarat-brand-rgb: 91, 33, 182;
  --sayarat-brand-deep: #4c1d95;
  --sayarat-brand-bright: #7c3aed;
  --sayarat-accent: #b45309;
  --sayarat-accent-rgb: 180, 83, 9;
  --sayarat-accent-bright: #d97706;
  --sayarat-ink: #16131f;
  --sayarat-ink-rgb: 22, 19, 31;
  --sayarat-canvas: #faf8f5;
  --sayarat-line: #e8e4f0;
  --sayarat-header-bg: #ffffff;
  --sayarat-shadow-sm: 0 1px 2px rgba(var(--sayarat-ink-rgb), 0.06);
  --sayarat-shadow-brand: 0 0.5rem 1.5rem rgba(var(--sayarat-brand-rgb), 0.12);

  /* Bootstrap bridge */
  --bs-body-font-family: "Tajawal", system-ui, -apple-system, "Segoe UI", sans-serif;
  --bs-body-bg: var(--sayarat-canvas);
  --bs-body-color: var(--sayarat-ink);
  --bs-primary: var(--sayarat-brand);
  --bs-primary-rgb: var(--sayarat-brand-rgb);
  --bs-link-color: var(--sayarat-brand-bright);
  --bs-link-hover-color: var(--sayarat-brand-deep);
  --bs-border-color: var(--sayarat-line);
  --bs-border-radius: 0.5rem;
  --bs-border-radius-lg: 0.625rem;
  --bs-focus-ring-color: rgba(var(--sayarat-brand-rgb), 0.35);
}

body {
  -webkit-font-smoothing: antialiased;
}

/* Navbar: white bar + violet → amber strip */
.navbar.sayarat-nav {
  position: relative;
  box-shadow: var(--sayarat-shadow-sm);
  background: var(--sayarat-header-bg) !important;
}

/* RTL: on expanded (lg+) viewports we keep brand + links grouped on the right
   (inline-start). On mobile we keep Bootstrap's default `space-between` so the
   burger toggler ends up on the opposite edge (physical left under dir=rtl). */
@media (min-width: 992px) {
  .navbar.sayarat-nav > .container {
    justify-content: flex-start;
  }

  .navbar.sayarat-nav .navbar-collapse {
    flex-grow: 0;
  }
}

/* Mobile: pin the burger toggler to the physical left edge regardless of the
   source order, so the brand stays on the right and the toggler on the left. */
@media (max-width: 991.98px) {
  .navbar.sayarat-nav .navbar-toggler {
    margin-inline-start: auto;
  }
}

.navbar.sayarat-nav::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--sayarat-brand) 0%,
    var(--sayarat-brand-bright) 45%,
    var(--sayarat-accent-bright) 100%
  );
  pointer-events: none;
}

.navbar.sayarat-nav .navbar-brand {
  font-weight: 600;
  color: var(--sayarat-ink) !important;
  letter-spacing: -0.02em;
}

img.sayarat-tenant-logo {
  max-height: 40px;
  width: auto;
  max-width: 140px;
  object-fit: contain;
}

.navbar.sayarat-nav .nav-link {
  font-weight: 500;
  color: #57534e !important;
}

.navbar.sayarat-nav .nav-link:hover {
  color: var(--sayarat-brand) !important;
}

/* a.sayarat-listing-card + .sayarat-listing-thumb are defined further down
   in the public storefront polish section (with aspect-ratio media wrap). */

.sayarat-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .sayarat-gallery {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 0.625rem;
  }
}

.sayarat-gallery img,
.sayarat-gallery a img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--bs-border-radius-lg);
  border: 1px solid var(--bs-border-color);
}

@media (min-width: 576px) {
  .sayarat-gallery img,
  .sayarat-gallery a img {
    height: 140px;
  }
}

/* Listing detail: hero (primary) + smaller thumbs */
.sayarat-listing-hero-img {
  display: block;
  max-height: min(70vh, 520px);
  min-height: 200px;
  object-fit: cover;
  background: var(--sayarat-line);
}

.sayarat-gallery-thumbs img,
.sayarat-gallery-thumbs a img {
  height: 100px;
}

@media (min-width: 576px) {
  .sayarat-gallery-thumbs img,
  .sayarat-gallery-thumbs a img {
    height: 112px;
  }
}

/* Public listing gallery (Swiper) */
/* Gallery frame — mirrors `.sayarat-listing-hero` so the media section feels
   like a sibling of the hero card (same tint, same border, same radius). */
.sayarat-gallery-stack {
  width: 100%;
  background: linear-gradient(
    135deg,
    rgba(var(--sayarat-brand-rgb), 0.06) 0%,
    rgba(var(--sayarat-accent-rgb), 0.05) 100%
  );
  border: 1px solid rgba(var(--sayarat-brand-rgb), 0.12);
  border-radius: var(--bs-border-radius-lg);
  padding: 0.5rem;
}

@media (min-width: 576px) {
  .sayarat-gallery-stack {
    padding: 0.75rem;
  }
}

/* Let the gradient show through loading/empty swiper slides instead of the
   pink-ish `--sayarat-line`. The swiper inner container still keeps its own
   dark bg for actual image letterboxing. */
.sayarat-swiper .swiper-slide {
  background: transparent;
}

.sayarat-swiper-main img {
  width: 100%;
  display: block;
  height: min(70vh, 520px);
  min-height: 220px;
  object-fit: cover;
}

.sayarat-swiper-main .swiper-pagination {
  bottom: 10px !important;
}

.sayarat-swiper .swiper-pagination-bullet {
  background: rgba(22, 19, 31, 0.35);
  opacity: 1;
}

.sayarat-swiper .swiper-pagination-bullet-active {
  background: rgba(var(--sayarat-brand-rgb), 0.9);
}

.sayarat-swiper-thumbs .swiper-slide {
  width: 78px;
  height: 56px;
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
  border: 1px solid var(--bs-border-color);
  opacity: 0.72;
}

.sayarat-swiper-thumbs .swiper-slide-thumb-active {
  opacity: 1;
  border-color: rgba(var(--sayarat-brand-rgb), 0.55);
  box-shadow: 0 0 0 2px rgba(var(--sayarat-brand-rgb), 0.18);
}

.sayarat-swiper-thumbs img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Navigation arrows on the main gallery — circular, tinted-glass buttons. */
.sayarat-swiper-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 12;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 0;
  background: rgba(22, 19, 31, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.15s ease, opacity 0.15s ease;
  backdrop-filter: blur(4px);
}

.sayarat-swiper-nav:hover,
.sayarat-swiper-nav:focus-visible {
  background: rgba(var(--sayarat-brand-rgb), 0.85);
  outline: none;
}

.sayarat-swiper-nav:active {
  transform: translateY(-50%) scale(0.96);
}

.sayarat-swiper-nav.swiper-button-disabled {
  opacity: 0;
  pointer-events: none;
}

/* RTL-aware positioning: "next" is on the left edge, "prev" on the right. */
.sayarat-swiper-nav--prev {
  inset-inline-start: 0.75rem;
}

.sayarat-swiper-nav--next {
  inset-inline-end: 0.75rem;
}

/* RTL: visual arrow should match text direction — flip the icon horizontally
   inside the button so the chevron always points the right way. */
[dir="rtl"] .sayarat-swiper-nav svg {
  transform: scaleX(-1);
}

/* Hide arrows on touch-first narrow viewports — rely on swipe gestures. */
@media (max-width: 575px) {
  .sayarat-swiper-nav {
    display: none;
  }
}

/* Slide counter pill: top corner of the gallery. */
.sayarat-slide-counter {
  position: absolute;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  z-index: 11;
  background: rgba(22, 19, 31, 0.6);
  color: #fff;
  border-radius: 999px;
  padding: 0.22rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  backdrop-filter: blur(4px);
  pointer-events: none;
  line-height: 1.4;
}

.sayarat-slide-counter .sep {
  opacity: 0.55;
  margin: 0 0.2rem;
}

/* ---------- Video slide (YouTube) ---------- */
.sayarat-video-slide {
  position: relative;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.sayarat-video-slide,
.sayarat-video-slide .sayarat-video-poster,
.sayarat-video-slide .sayarat-video-frame {
  width: 100%;
  height: min(70vh, 520px);
  min-height: 220px;
}

.sayarat-video-poster {
  border: 0;
  padding: 0;
  margin: 0;
  background: #000;
  position: relative;
  cursor: pointer;
  display: block;
}

.sayarat-video-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.4s ease;
}

.sayarat-video-poster:hover img,
.sayarat-video-poster:focus-visible img {
  opacity: 1;
  transform: scale(1.02);
}

.sayarat-video-poster:focus-visible {
  outline: 2px solid rgba(var(--sayarat-brand-rgb), 0.8);
  outline-offset: -2px;
}

.sayarat-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.sayarat-video-play svg {
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}

.sayarat-video-play svg .yt-bg {
  transition: fill 0.2s ease, fill-opacity 0.2s ease;
}

.sayarat-video-poster:hover .sayarat-video-play svg,
.sayarat-video-poster:focus-visible .sayarat-video-play svg {
  transform: scale(1.06);
}

.sayarat-video-poster:hover .sayarat-video-play svg .yt-bg {
  fill: var(--sayarat-brand);
  fill-opacity: 0.95;
}

.sayarat-video-frame {
  border: 0;
  display: block;
  background: #000;
}

/* Video thumbnail: darker overlay + small play badge so users know it's a video. */
.sayarat-thumb-video {
  position: relative;
}

.sayarat-thumb-video::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(0, 0, 0, 0) 0%,
    rgba(0, 0, 0, 0.35) 100%
  );
  pointer-events: none;
}

.sayarat-thumb-video-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  z-index: 2;
  pointer-events: none;
}

.sayarat-thumb-video-play svg {
  filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.55));
}

.sayarat-swiper-thumbs .sayarat-thumb-video.swiper-slide-thumb-active::after {
  background: linear-gradient(
    180deg,
    rgba(var(--sayarat-brand-rgb), 0) 0%,
    rgba(var(--sayarat-brand-rgb), 0.4) 100%
  );
}

.sayarat-admin-photo-pick {
  height: 120px;
  object-fit: cover;
  display: block;
  background: var(--sayarat-line);
}

/* Small square preview used in the admin listings table — keeps rows
   compact while still giving a glanceable visual of each listing. */
.sayarat-admin-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--sayarat-line);
  display: flex;
  align-items: center;
  justify-content: center;
}

.sayarat-admin-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sayarat-admin-thumb-empty {
  color: #8b8680;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

/* Prices: amber — warmth / value, distinct from violet CTAs */
.sayarat-price {
  font-weight: 700;
  color: var(--sayarat-accent);
}

.form-label {
  font-weight: 500;
  color: #57534e;
  font-size: 0.875rem;
}

.table.sayarat-table > :not(caption) > * > * {
  vertical-align: middle;
}

.table-responsive {
  border-radius: var(--bs-border-radius-lg);
}

.btn-primary {
  --bs-btn-bg: var(--sayarat-brand);
  --bs-btn-border-color: var(--sayarat-brand);
  --bs-btn-hover-bg: var(--sayarat-brand-deep);
  --bs-btn-hover-border-color: var(--sayarat-brand-deep);
  --bs-btn-active-bg: var(--sayarat-brand-deep);
  --bs-btn-active-border-color: var(--sayarat-brand-deep);
  --bs-btn-focus-shadow-rgb: var(--sayarat-brand-rgb);
}

/* ===========================================================================
 * Sayarat — public storefront polish (listings home + detail + contact).
 * Keeps brand tokens (violet primary, amber accent, Tajawal) and extends
 * Bootstrap with small, reusable components so views stay clean.
 * =========================================================================*/

/* Section titles: small accent bar before the heading for visual rhythm. */
.sayarat-section-title {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  margin: 0;
  font-weight: 600;
}

.sayarat-section-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 1.1em;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--sayarat-brand) 0%,
    var(--sayarat-accent-bright) 100%
  );
}

/* Breadcrumb: chevron separator that flips automatically in RTL. */
.sayarat-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.8125rem;
  color: #6b7280;
}

.sayarat-breadcrumb a {
  color: inherit;
  text-decoration: none;
}

.sayarat-breadcrumb a:hover {
  color: var(--sayarat-brand);
}

.sayarat-breadcrumb .sep {
  color: #c4b5fd;
  font-weight: 500;
}

/* Share button sits in the topbar next to the breadcrumb. Kept as a
   compact outline pill so it reads as a secondary control while still
   being discoverable. The label has its own class so JS can flip it to
   "تم النسخ" / "تعذّر النسخ" without touching the icon.

   We re-point Bootstrap's outline-button CSS variables at the tenant
   brand palette so the border + text + icon (whose SVG uses
   `stroke="currentColor"`) all match the tinted icons in
   `.sayarat-footer-info-list .ico` instead of defaulting to the blue
   primary. Overriding the --bs-btn-* custom properties keeps every
   state (rest / hover / active / focus) consistent without having to
   re-declare each rule. */
/* Shared pill-button look used by the listing share button, the
   listing "back to all cars" CTA, and any future compact brand-tinted
   actions. Both selectors are listed so existing `.sayarat-share-btn`
   markup keeps working; new buttons should prefer `.sayarat-pill-btn`
   and opt into `.sayarat-share-btn` only if they genuinely need the
   share click handler wired in from the listing page script. */
.sayarat-pill-btn,
.sayarat-share-btn {
  --bs-btn-color: var(--sayarat-brand);
  --bs-btn-border-color: var(--sayarat-brand);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: var(--sayarat-brand);
  --bs-btn-hover-border-color: var(--sayarat-brand);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: var(--sayarat-brand-deep);
  --bs-btn-active-border-color: var(--sayarat-brand-deep);
  --bs-btn-focus-shadow-rgb: var(--sayarat-brand-rgb);
  border-radius: 999px;
  font-size: 0.8125rem;
  padding-inline: 0.75rem;
  padding-block: 0.3rem;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sayarat-pill-btn:hover,
.sayarat-share-btn:hover {
  transform: translateY(-1px);
}

/* Intentionally no explicit `color` — the label inherits from the
   button so it tracks the same brand / white-on-hover state as the
   icon next to it. */
.sayarat-share-btn-label {
  font-weight: 500;
  min-width: 3.25rem;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.sayarat-breadcrumb .current {
  color: var(--sayarat-ink);
  font-weight: 500;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Condition / status pills — used on cards (overlay) and on detail page. */
.sayarat-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.8rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.2;
  border: 1px solid transparent;
  background: #fff;
  color: var(--sayarat-ink);
  box-shadow: var(--sayarat-shadow-sm);
  white-space: nowrap;
}

@media (min-width: 576px) {
  .sayarat-badge {
    padding: 0.4rem 0.9rem;
    font-size: 0.875rem;
  }
}

/* Make/model pill — slightly wider, LTR-aware content may wrap on narrow
   cards so allow graceful text wrap while keeping the pill shape. */
.sayarat-badge--vehicle {
  background: rgba(var(--sayarat-brand-rgb), 0.06);
  color: var(--sayarat-brand-deep);
  border-color: rgba(var(--sayarat-brand-rgb), 0.15);
  white-space: normal;
  max-width: 100%;
  text-align: start;
}

.sayarat-badge--new {
  background: rgba(var(--sayarat-brand-rgb), 0.08);
  color: var(--sayarat-brand-deep);
  border-color: rgba(var(--sayarat-brand-rgb), 0.2);
}

.sayarat-badge--used {
  background: rgba(var(--sayarat-accent-rgb), 0.08);
  color: var(--sayarat-accent);
  border-color: rgba(var(--sayarat-accent-rgb), 0.22);
}

.sayarat-badge--muted {
  background: #f3f1ec;
  color: #57534e;
  border-color: #e7e2d6;
}

.sayarat-badge--year {
  background: #f3f1ec;
  color: #44403c;
  border-color: #e7e2d6;
  font-variant-numeric: tabular-nums;
}

.sayarat-badge--price {
  background: rgba(var(--sayarat-accent-rgb), 0.1);
  color: var(--sayarat-accent);
  border-color: rgba(var(--sayarat-accent-rgb), 0.28);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.sayarat-badge--price .currency {
  font-size: 0.7rem;
  font-weight: 500;
  opacity: 0.8;
  margin-inline-start: 0.15rem;
}

/* When a listing has no set price we render "السعر عند الطلب" instead of
   a dollar amount. Keep it in the same pill family but dial back the
   font weight so it reads as informational rather than a numeric offer. */
.sayarat-badge--price-on-request {
  font-weight: 600;
  letter-spacing: 0;
}

/* Hero price block on the listing detail page. `price--on-request`
   downshifts the size a notch so the Arabic phrase fits comfortably
   where a short "$12,500" used to sit. */
.price--on-request {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sayarat-accent);
}

/* Meta pills used to show year / mileage / fuel under card titles. */
.sayarat-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  font-size: 0.8125rem;
  color: #57534e;
}

.sayarat-meta > span {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.sayarat-meta > span + span::before {
  content: "•";
  color: #c7c2b7;
  padding-inline-end: 0.35rem;
}

/* Listing card: crisper elevation + badge overlay + image aspect ratio. */
a.sayarat-listing-card {
  background: #fff;
  border-radius: var(--bs-border-radius-lg);
  transition: box-shadow 0.22s ease, transform 0.22s ease, border-color 0.22s ease;
  border: 1px solid transparent;
  position: relative;
}

a.sayarat-listing-card:hover {
  box-shadow: var(--sayarat-shadow-brand) !important;
  transform: translateY(-3px);
  border-color: rgba(var(--sayarat-brand-rgb), 0.14);
}

a.sayarat-listing-card:focus-visible {
  outline: none;
  border-color: rgba(var(--sayarat-brand-rgb), 0.45);
  box-shadow: 0 0 0 0.2rem rgba(var(--sayarat-brand-rgb), 0.2) !important;
}

.sayarat-listing-thumb-wrap {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: var(--sayarat-line);
  border-top-left-radius: var(--bs-border-radius-lg);
  border-top-right-radius: var(--bs-border-radius-lg);
}

.sayarat-listing-thumb-wrap .sayarat-listing-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

a.sayarat-listing-card:hover .sayarat-listing-thumb-wrap .sayarat-listing-thumb {
  transform: scale(1.03);
}

.sayarat-listing-thumb-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b8680;
  font-size: 0.875rem;
  background: repeating-linear-gradient(
    135deg,
    #eeeae0,
    #eeeae0 10px,
    #f5f1e6 10px,
    #f5f1e6 20px
  );
}

.sayarat-listing-badges {
  position: absolute;
  top: 0.625rem;
  inset-inline-start: 0.625rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  z-index: 2;
}

/* Overlay badges sit on top of the photo, so the translucent tinted
   backgrounds used on white surfaces lose contrast. Force an opaque
   surface here while keeping the tinted text/border for color coding. */
.sayarat-listing-badges .sayarat-badge {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.sayarat-listing-badges .sayarat-badge--new {
  color: var(--sayarat-brand-deep);
  border-color: rgba(var(--sayarat-brand-rgb), 0.35);
}

.sayarat-listing-badges .sayarat-badge--used {
  color: var(--sayarat-accent);
  border-color: rgba(var(--sayarat-accent-rgb), 0.4);
}

.sayarat-listing-card-body {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.9rem 1rem 1rem;
}

.sayarat-listing-title {
  font-weight: 700;
  color: var(--sayarat-ink);
  font-size: 1.1rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

@media (min-width: 576px) {
  .sayarat-listing-title {
    font-size: 1.15rem;
  }
}

/* Make + model: primary identifier — louder than the seller-written title. */
.sayarat-listing-vehicle {
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--sayarat-ink);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

/* Listing-detail hero subtitle: the make/model line (bilingual). */
.sayarat-listing-hero-vehicle {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--sayarat-ink);
  line-height: 1.35;
}

@media (min-width: 576px) {
  .sayarat-listing-hero-vehicle {
    font-size: 1.2rem;
  }
}

.sayarat-listing-price {
  display: flex;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.1rem;
  color: var(--sayarat-accent);
  font-weight: 700;
  font-size: 1.125rem;
  font-variant-numeric: tabular-nums;
}

.sayarat-listing-price .currency {
  font-size: 0.75rem;
  font-weight: 500;
  color: #8b8680;
}

/* Filters card: subtle accent strip on top, breathing room. */
.sayarat-filters {
  background: #fff;
  border-radius: var(--bs-border-radius-lg);
  overflow: hidden;
  position: relative;
  border: 1px solid var(--sayarat-line);
}

.sayarat-filters::before {
  content: "";
  display: block;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--sayarat-brand) 0%,
    var(--sayarat-brand-bright) 55%,
    var(--sayarat-accent-bright) 100%
  );
}

.sayarat-filters .form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: #57534e;
  letter-spacing: 0.01em;
}

.sayarat-filters .form-control,
.sayarat-filters .form-select {
  border-color: #ece7db;
}

.sayarat-filters .form-control:focus,
.sayarat-filters .form-select:focus {
  border-color: rgba(var(--sayarat-brand-rgb), 0.45);
  box-shadow: 0 0 0 0.2rem rgba(var(--sayarat-brand-rgb), 0.18);
}

/* Collapsible filter panel (<details>/<summary>). The summary doubles as the
   "click to open" caption; the form body is revealed when details is open. */
.sayarat-filters-trigger {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  cursor: pointer;
  user-select: none;
  list-style: none;
  color: var(--sayarat-ink);
  transition: background-color 0.15s ease;
}

.sayarat-filters-trigger::-webkit-details-marker { display: none; }

.sayarat-filters-trigger:hover,
.sayarat-filters-trigger:focus-visible {
  background: rgba(var(--sayarat-brand-rgb), 0.04);
  outline: none;
}

.sayarat-filters-trigger .ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--sayarat-brand-rgb), 0.1);
  color: var(--sayarat-brand);
}

.sayarat-filters-trigger .ico svg {
  width: 16px;
  height: 16px;
  display: block;
}

.sayarat-filters-trigger .text {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.95rem;
  color: #57534e;
}

.sayarat-filters-trigger .chev {
  flex-shrink: 0;
  color: #a59d91;
  transition: transform 0.2s ease;
}

.sayarat-filters[open] > .sayarat-filters-trigger .chev {
  transform: rotate(180deg);
}

.sayarat-filters[open] > form {
  border-top: 1px solid var(--sayarat-line);
}

/* Empty state card, used when there are no listings / no matches. */
.sayarat-empty {
  text-align: center;
  padding: 2.5rem 1.25rem;
  background: #fff;
  border-radius: var(--bs-border-radius-lg);
  border: 1px dashed #e3ddcd;
  color: #6b6156;
}

.sayarat-empty .sayarat-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: rgba(var(--sayarat-brand-rgb), 0.08);
  color: var(--sayarat-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

/* Listing detail: price / CTA hero card. */
.sayarat-listing-hero {
  background: linear-gradient(
    135deg,
    rgba(var(--sayarat-brand-rgb), 0.06) 0%,
    rgba(var(--sayarat-accent-rgb), 0.05) 100%
  );
  border: 1px solid rgba(var(--sayarat-brand-rgb), 0.12);
  border-radius: var(--bs-border-radius-lg);
  padding: 1.1rem 1.25rem;
}

.sayarat-listing-hero .price {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--sayarat-accent);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.sayarat-listing-hero .price-note {
  font-size: 0.75rem;
  color: #6b6156;
}

@media (min-width: 576px) {
  .sayarat-listing-hero .price {
    font-size: 2rem;
  }
}

/* Spec tiles: label (small, muted) stacked over value (bold). Bigger click/touch target. */
.sayarat-spec {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  background: #fff;
  border: 1px solid var(--sayarat-line);
  border-radius: var(--bs-border-radius-lg);
  padding: 0.7rem 0.85rem;
  min-height: 68px;
  justify-content: center;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sayarat-spec:hover {
  border-color: rgba(var(--sayarat-brand-rgb), 0.22);
  box-shadow: var(--sayarat-shadow-sm);
}

.sayarat-spec-label {
  font-size: 0.72rem;
  color: #8b8680;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.sayarat-spec-value {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sayarat-ink);
  font-variant-numeric: tabular-nums;
}

.sayarat-spec-value[dir="ltr"] {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-weight: 500;
  font-size: 0.85rem;
}

/* Sticky bottom CTA bar on mobile for phone/WhatsApp (listing detail). */
.sayarat-cta-bar {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 1030;
  padding: 0.65rem 0.75rem calc(env(safe-area-inset-bottom, 0) + 0.65rem);
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--sayarat-line);
  backdrop-filter: saturate(150%) blur(6px);
  box-shadow: 0 -4px 16px rgba(var(--sayarat-ink-rgb), 0.08);
  display: flex;
  gap: 0.5rem;
}

.sayarat-cta-bar .btn {
  flex: 1 1 0;
  font-weight: 600;
}

/* Keep the sticky bar out of the way on desktop. */
@media (min-width: 768px) {
  .sayarat-cta-bar {
    display: none;
  }
}

/* Leave padding below <main> so the CTA bar doesn't overlap footer/content on mobile. */
body.has-sticky-cta main {
  padding-bottom: 5.5rem;
}

@media (min-width: 768px) {
  body.has-sticky-cta main {
    padding-bottom: 1.5rem;
  }
}

/* Contact page: icon hero tiles. */
.sayarat-contact-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--sayarat-brand-rgb), 0.08);
  color: var(--sayarat-brand);
  flex-shrink: 0;
}

.sayarat-contact-icon--accent {
  background: rgba(var(--sayarat-accent-rgb), 0.1);
  color: var(--sayarat-accent);
}

.sayarat-contact-card {
  border: 1px solid var(--sayarat-line);
  border-radius: var(--bs-border-radius-lg);
  background: #fff;
  padding: 1rem 1.1rem;
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.sayarat-contact-card:hover {
  border-color: rgba(var(--sayarat-brand-rgb), 0.18);
  box-shadow: var(--sayarat-shadow-sm);
}

/* ===========================================================================
 * Tenant public footer — columns layout with iconographic contact details.
 * Shared shell between all dealer pages; hosts phone/WhatsApp/social buttons.
 * =========================================================================*/
.sayarat-footer {
  margin-top: 2rem;
  background: #ffffff;
  border-top: 1px solid var(--sayarat-line);
  color: var(--sayarat-ink);
  position: relative;
}

.sayarat-footer::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    var(--sayarat-brand) 0%,
    var(--sayarat-brand-bright) 45%,
    var(--sayarat-accent-bright) 100%
  );
  pointer-events: none;
}

.sayarat-footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem;
  padding: 2rem 0 1.25rem;
}

@media (min-width: 576px) {
  .sayarat-footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 992px) {
  .sayarat-footer-grid {
    grid-template-columns: 1.3fr 1fr 1fr;
  }
}

.sayarat-footer-heading {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--sayarat-ink);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.sayarat-footer-heading::before {
  content: "";
  display: inline-block;
  width: 3px;
  height: 0.95em;
  border-radius: 2px;
  background: linear-gradient(
    180deg,
    var(--sayarat-brand) 0%,
    var(--sayarat-accent-bright) 100%
  );
}

.sayarat-footer-brand-name {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--sayarat-ink);
  letter-spacing: -0.01em;
}

.sayarat-footer-tagline {
  font-size: 0.875rem;
  color: #57534e;
  margin: 0.35rem 0 0;
  line-height: 1.6;
}

.sayarat-footer-info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: #45403a;
}

.sayarat-footer-info-list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
}

.sayarat-footer-info-list .ico {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--sayarat-brand-rgb), 0.07);
  color: var(--sayarat-brand);
}

.sayarat-footer-info-list .ico--accent {
  background: rgba(var(--sayarat-accent-rgb), 0.1);
  color: var(--sayarat-accent);
}

.sayarat-footer-info-list .content {
  flex: 1 1 auto;
  min-width: 0;
  padding-top: 0.2rem;
}

/* Action row — phone / WhatsApp with text + icon. */
/* Circular social icon button grid (Facebook, Instagram, TikTok, ...). */
.sayarat-social-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.sayarat-social-btn {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--sayarat-ink);
  border: 1px solid var(--sayarat-line);
  text-decoration: none;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease,
    transform 0.15s ease, box-shadow 0.15s ease;
}

.sayarat-social-btn svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sayarat-social-btn:hover,
.sayarat-social-btn:focus-visible {
  outline: none;
  transform: translateY(-1px);
  box-shadow: var(--sayarat-shadow-sm);
  border-color: currentColor;
}

.sayarat-social-btn--facebook:hover,
.sayarat-social-btn--facebook:focus-visible { color: #1877f2; }
.sayarat-social-btn--instagram:hover,
.sayarat-social-btn--instagram:focus-visible { color: #e1306c; }
.sayarat-social-btn--tiktok:hover,
.sayarat-social-btn--tiktok:focus-visible { color: #010101; }

/* Row-list pattern (contact page) — each list item is a full-width clickable
   row that shows a platform/channel name + readable handle and opens the
   corresponding destination. Used for both direct contact (phone/WhatsApp)
   and social profiles. */
.sayarat-contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sayarat-contact-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: var(--bs-border-radius-lg);
  border: 1px solid var(--sayarat-line);
  background: #fff;
  color: var(--sayarat-ink);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.sayarat-contact-row:hover,
.sayarat-contact-row:focus-visible {
  outline: none;
  border-color: currentColor;
  box-shadow: var(--sayarat-shadow-sm);
  transform: translateY(-1px);
}

.sayarat-contact-row .ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(var(--sayarat-brand-rgb), 0.08);
  color: var(--sayarat-brand);
  transition: background 0.15s ease, color 0.15s ease;
}

.sayarat-contact-row .ico svg {
  width: 18px;
  height: 18px;
  display: block;
}

.sayarat-contact-row .info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4rem;
  color: var(--sayarat-ink);
  line-height: 1.3;
}

.sayarat-contact-row .label {
  font-weight: 600;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sayarat-contact-row .value {
  font-size: 0.9rem;
  color: #6b6156;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.sayarat-contact-row .chev {
  color: #a59d91;
  flex-shrink: 0;
  transition: color 0.15s ease, transform 0.15s ease;
}

/* RTL: the chevron should visually point toward inline-end ("go forward"),
   which under dir=rtl means to the left. Flip horizontally. */
[dir="rtl"] .sayarat-contact-row .chev svg {
  transform: scaleX(-1);
}

.sayarat-contact-row:hover .chev,
.sayarat-contact-row:focus-visible .chev {
  color: currentColor;
  transform: translateX(-2px);
}

[dir="rtl"] .sayarat-contact-row:hover .chev,
[dir="rtl"] .sayarat-contact-row:focus-visible .chev {
  transform: translateX(2px);
}

/* Per-channel tinting: the row adopts the brand color on hover/focus, and
   the icon tile recolors to a matching soft tint. */
.sayarat-contact-row--phone .ico {
  background: rgba(var(--sayarat-brand-rgb), 0.1);
  color: var(--sayarat-brand);
}
.sayarat-contact-row--phone:hover,
.sayarat-contact-row--phone:focus-visible { color: var(--sayarat-brand-deep); }
.sayarat-contact-row--phone:hover .ico,
.sayarat-contact-row--phone:focus-visible .ico {
  background: rgba(var(--sayarat-brand-rgb), 0.18);
  color: var(--sayarat-brand-deep);
}

.sayarat-contact-row--whatsapp:hover,
.sayarat-contact-row--whatsapp:focus-visible { color: #128c7e; }
.sayarat-contact-row--whatsapp:hover .ico,
.sayarat-contact-row--whatsapp:focus-visible .ico {
  background: rgba(18, 140, 126, 0.16);
  color: #128c7e;
}

.sayarat-contact-row--facebook:hover,
.sayarat-contact-row--facebook:focus-visible { color: #1877f2; }
.sayarat-contact-row--facebook:hover .ico,
.sayarat-contact-row--facebook:focus-visible .ico {
  background: rgba(24, 119, 242, 0.12);
  color: #1877f2;
}

.sayarat-contact-row--instagram:hover,
.sayarat-contact-row--instagram:focus-visible { color: #c13584; }
.sayarat-contact-row--instagram:hover .ico,
.sayarat-contact-row--instagram:focus-visible .ico {
  background: linear-gradient(45deg, rgba(240, 148, 51, 0.16), rgba(193, 53, 132, 0.16));
  color: #c13584;
}

.sayarat-contact-row--tiktok:hover,
.sayarat-contact-row--tiktok:focus-visible { color: #010101; }
.sayarat-contact-row--tiktok:hover .ico,
.sayarat-contact-row--tiktok:focus-visible .ico {
  background: rgba(0, 0, 0, 0.08);
  color: #010101;
}

/* Bottom bar: copyright / pricing note / tiny admin link. */
.sayarat-footer-bar {
  border-top: 1px solid var(--sayarat-line);
  padding: 0.9rem 0 1.25rem;
  font-size: 0.78rem;
  color: #6b6156;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
}

.sayarat-footer-bar a {
  color: inherit;
  text-decoration: none;
}

.sayarat-footer-bar a:hover {
  color: var(--sayarat-brand);
}
