/* =============================================================
   Carfare — Custom Design System
   Clean CSS without external UI libraries.
   Loaded on every page; Tailwind CDN handles auth/booking pages.
   ============================================================= */

/* ── 1. Custom properties ───────────────────────────────────── */
:root {
  /* Brand palette */
  --c-primary:         #0B3A75;   /* deep navy */
  --c-primary-dark:    #071F3D;   /* "ink" — darkest */
  --c-primary-hover:   #2563EB;   /* "accent" — bright blue */
  --c-primary-light:   #DBEAFE;   /* "soft" */
  --c-primary-50:      #EFF6FF;   /* "surface" tint */

  /* Semantic colours */
  --c-accent:          #f59e0b;   /* stars / highlights */
  --c-success:         #16a34a;
  --c-success-bg:      #f0fdf4;
  --c-error:           #dc2626;
  --c-error-bg:        #fef2f2;
  --c-warning:         #d97706;
  --c-warning-bg:      #fffbeb;

  /* Neutrals */
  --c-text:            #111827;
  --c-text-muted:      #6b7280;
  --c-text-light:      #9ca3af;
  --c-text-inverse:    #ffffff;

  --c-bg:              #f8fafc;
  --c-surface:         #ffffff;
  --c-border:          #e5e7eb;
  --c-border-strong:   #d1d5db;

  /* Shadows */
  --s-xs:  0 1px 2px  rgba(0, 0, 0, .05);
  --s-sm:  0 2px 6px  rgba(0, 0, 0, .07);
  --s-md:  0 4px 16px rgba(0, 0, 0, .09);
  --s-lg:  0 8px 32px rgba(0, 0, 0, .12);
  --s-xl:  0 16px 48px rgba(0, 0, 0, .15);

  /* Border radius */
  --r-xs:   4px;
  --r-sm:   6px;
  --r-md:   10px;
  --r-lg:   16px;
  --r-xl:   24px;
  --r-full: 9999px;

  /* Spacing scale (4 px base) */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  20px;
  --sp-6:  24px;
  --sp-8:  32px;
  --sp-10: 40px;
  --sp-12: 48px;
  --sp-16: 64px;

  /* Layout */
  --nav-h:      64px;
  --max-w:      1200px;
  --sidebar-w:  272px;

  /* Transitions */
  --t-fast: 120ms ease;
  --t-base: 200ms ease;
  --t-slow: 300ms ease;

  /* Typography */
  --font: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}


/* ── 2. Reset ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, select, textarea { font: inherit; }
ul, ol { list-style: none; }


/* ── 3. Accessibility ───────────────────────────────────────── */
*:focus-visible {
  outline: 2px solid var(--c-primary);
  outline-offset: 2px;
  border-radius: var(--r-xs);
}
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
[x-cloak] { display: none !important; }


/* ── 4. Page shell ──────────────────────────────────────────── */
.page-wrapper { display: flex; flex-direction: column; min-height: 100vh; }
.page-main    { flex: 1; }


/* ── 5. Container / layout utils ────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--sp-6);
}
.section        { padding-block: var(--sp-16); }
.section--sm    { padding-block: var(--sp-10); }
.section--gray  { background: #f1f5f9; }
.section--dark  {
  background: linear-gradient(135deg,
              var(--c-primary-dark) 0%,
              var(--c-primary) 60%,
              var(--c-primary-hover) 100%);
  color: var(--c-text-inverse);
  text-align: center;
}
.section--dark h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: 12px;
}
.section--dark p {
  color: rgba(255,255,255,.75);
  font-size: 1.0625rem;
  margin-bottom: 32px;
  max-width: 500px;
  margin-inline: auto;
}
.section--brand { background: var(--c-primary); color: var(--c-text-inverse); }

/* Reusable centered button row for CTAs (hero + section--dark + anywhere) */
.cta-row {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.section-header { text-align: center; margin-bottom: var(--sp-10); }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.025em;
}
.section-sub {
  margin-top: var(--sp-2);
  color: var(--c-text-muted);
  font-size: 1.0625rem;
}


/* ── 6. Navbar ───────────────────────────────────────────────── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--nav-h);
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  box-shadow: var(--s-xs);
}
.navbar > .container { height: 100%; }
.navbar__inner {
  display: flex;
  align-items: center;
  gap: var(--sp-8);
  height: 100%;
}
.navbar__brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  white-space: nowrap;
}
.navbar__brand:hover { opacity: 0.92; }

/* Two-tone CarFare wordmark */
.brand-wordmark {
  font-family: 'Nunito', Manrope, Inter, ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.6875rem;          /* matches "md" preset (~27px) */
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1;
  color: var(--c-primary);
}
.brand-wordmark__car  { color: var(--c-primary); }
.brand-wordmark__fare { color: var(--c-primary-hover); }   /* accent */

.navbar__nav {
  display: flex;
  align-items: center;
  gap: var(--sp-6);
  font-size: 0.9rem;
  font-weight: 500;
}
.navbar__nav a {
  color: var(--c-text-muted);
  transition: color var(--t-base);
  padding-block: var(--sp-1);
}
.navbar__nav a:hover,
.navbar__nav a[aria-current="page"] { color: var(--c-primary); }

.navbar__end {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  margin-left: auto;
}

/* Language switcher */
.lang-switcher { position: relative; }
.lang-btn {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--r-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-muted);
  transition: color var(--t-base), background var(--t-base);
}
.lang-btn:hover { color: var(--c-text); background: var(--c-bg); }
.lang-btn svg   { width: 14px; height: 14px; }

.lang-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 130px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--s-md);
  overflow: hidden;
  font-size: 0.875rem;
}
.lang-dropdown a {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-3);
  color: var(--c-text);
  transition: background var(--t-fast);
}
.lang-dropdown a:hover       { background: var(--c-bg); }
.lang-dropdown a.is-active   { font-weight: 600; color: var(--c-primary); }

/* Mobile nav toggle */
.navbar__burger {
  display: none;
  padding: var(--sp-2);
  border-radius: var(--r-sm);
  color: var(--c-text-muted);
  transition: background var(--t-fast);
}
.navbar__burger:hover { background: var(--c-bg); }
.navbar__burger svg   { width: 22px; height: 22px; }

/* Mobile drawer */
.navbar__mobile {
  background: var(--c-surface);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-4) var(--sp-6);
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  font-size: 0.9375rem;
}
.navbar__mobile a {
  padding: var(--sp-2) 0;
  color: var(--c-text);
  border-bottom: 1px solid transparent;
}
.navbar__mobile a:hover { color: var(--c-primary); }
.navbar__mobile-lang {
  display: flex;
  gap: var(--sp-4);
  padding-top: var(--sp-3);
  border-top: 1px solid var(--c-border);
  margin-top: var(--sp-2);
  font-size: 0.875rem;
  font-weight: 500;
}


/* ── 7. Buttons (ported from samferd for visual parity) ─────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 0.625rem 1.25rem;
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 700;
  letter-spacing: .01em;
  line-height: 1.2;
  border: 2px solid transparent;
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast),
              border-color var(--t-fast), box-shadow var(--t-fast),
              transform var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}
.btn:active { transform: scale(.97); }

/* Solid-filled primary uses the Duolingo-style lifted press effect:
   hard 4px-down shadow that compresses when the button is pressed. */
.btn-primary {
  background: var(--c-primary);
  color: #fff;
  border-color: var(--c-primary);
  box-shadow: 0 4px 0 var(--c-primary-dark);
  transition: transform 80ms ease, box-shadow 80ms ease,
              background var(--t-fast), border-color var(--t-fast);
}
.btn-primary:hover {
  background: var(--c-primary-dark);
  border-color: var(--c-primary-dark);
  box-shadow: 0 4px 0 var(--c-primary-dark);
  transform: translateY(-1px);
}
.btn-primary:active {
  box-shadow: 0 1px 0 var(--c-primary-dark);
  transform: translateY(3px);
}

.btn-outline {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-outline:hover { background: var(--c-primary-light); }

/* Alias: existing templates use .btn-secondary in the secondary-CTA role
   that samferd fills with .btn-outline. Map them to the same visuals. */
.btn-secondary {
  background: transparent;
  color: var(--c-primary);
  border-color: var(--c-primary);
}
.btn-secondary:hover { background: var(--c-primary-light); }

.btn-ghost {
  background: transparent;
  color: var(--c-text);
  border-color: transparent;
}
.btn-ghost:hover { background: var(--c-bg); }

.btn-danger {
  background: var(--c-error);
  color: #fff;
  border-color: var(--c-error);
}
.btn-danger:hover { background: #b91c1c; border-color: #b91c1c; }

.btn-danger-outline {
  background: transparent;
  color: var(--c-error);
  border-color: var(--c-error);
}
.btn-danger-outline:hover { background: var(--c-error-bg); }

.btn-sm  { padding: 0.4rem 0.875rem;   font-size: 0.875rem; border-radius: var(--r-sm); }
.btn-lg  { padding: 0.8125rem 1.75rem; font-size: 1rem;     border-radius: var(--r-md); }
.btn-block, .btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 0.5rem; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Dark-context buttons (hero + .section--dark): invert primary to
   white-on-dark and outline secondary in white so they're visible
   against the navy gradient. Mirrors the inline overrides that used
   to live in index.html. */
.hero .btn-primary,
.section--dark .btn-primary {
  background: #fff;
  color: var(--c-primary);
  border-color: #fff;
}
.hero .btn-primary:hover,
.section--dark .btn-primary:hover {
  background: var(--c-primary-light);
  border-color: var(--c-primary-light);
}
.hero .btn-secondary,
.section--dark .btn-secondary {
  background: transparent;
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.hero .btn-secondary:hover,
.section--dark .btn-secondary:hover {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.7);
}


/* ── 8. Form controls ────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: var(--sp-1); }
.field-label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field-input,
.field-select {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color var(--t-base), box-shadow var(--t-base);
  appearance: none;
}
.field-input:focus,
.field-select:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
  outline: none;
}
.field-input::placeholder { color: var(--c-text-light); }

/* Custom select arrow */
.field-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 2.5rem;
}

/* Checkbox */
.field-check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.9375rem;
  cursor: pointer;
  user-select: none;
}
.field-check input[type="checkbox"] {
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--c-border-strong);
  border-radius: var(--r-xs);
  accent-color: var(--c-primary);
  flex-shrink: 0;
  cursor: pointer;
}


/* ── Navbar booking bell ─────────────────────────────────────── */
.navbar__bell {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-md);
  color: var(--c-text-muted);
  transition: background var(--t-fast), color var(--t-fast);
}
.navbar__bell:hover {
  background: var(--c-surface-alt);
  color: var(--c-text);
}
.navbar__bell svg {
  display: block;
}
#booking-bell-badge {
  position: absolute;
  top: 2px;
  right: 2px;
}

/* ── Navbar notification badge (amber — booking requests) ────── */
.notif-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #f59e0b;
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1;
}

/* ── Navbar message unread badge ────────────────────────────── */
.msg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 9px;
  background: #ef4444;
  color: #fff;
  font-size: .6875rem;
  font-weight: 700;
  line-height: 1;
}


/* ── 9. Badges / pills ───────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}
.badge-available  { background: var(--c-success-bg);  color: var(--c-success); }
.badge-booked     { background: var(--c-error-bg);     color: var(--c-error); }
.badge-pending    { background: var(--c-warning-bg);   color: var(--c-warning); }

/* Car type badges */
.badge-type       { background: var(--c-primary-light); color: var(--c-primary-dark); }
.badge-type-suv   { background: #fef3c7; color: #92400e; }
.badge-type-electric { background: #d1fae5; color: #065f46; }
.badge-type-camper   { background: #ede9fe; color: #5b21b6; }
.badge-type-4x4      { background: #fce7f3; color: #9d174d; }
.badge-type-van      { background: #e0f2fe; color: #075985; }


/* ── 10. Star rating ─────────────────────────────────────────── */
.stars {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
.stars__icon { color: var(--c-accent); font-size: 0.9rem; }
.stars__icon--empty { color: #d1d5db; }
.stars__score {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--c-text);
  margin-left: 4px;
}
.stars__count {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
  margin-left: 2px;
}


/* ── 11. Car cards ───────────────────────────────────────────── */
.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
  gap: var(--sp-6);
}

.car-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow var(--t-base), transform var(--t-base);
}
.car-card:hover {
  box-shadow: var(--s-lg);
  transform: translateY(-3px);
}

.car-card__img-wrap {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #f1f5f9;
}
.car-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow);
}
.car-card:hover .car-card__img-wrap img { transform: scale(1.04); }
.car-card__img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: #cbd5e1;
}
.car-card__badges {
  position: absolute;
  top: var(--sp-2);
  left: var(--sp-2);
  display: flex;
  gap: var(--sp-1);
}
.car-card__avail-badge {
  position: absolute;
  top: var(--sp-2);
  right: var(--sp-2);
}

.car-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: var(--sp-4);
  gap: var(--sp-2);
}
.car-card__title {
  font-size: 1.0625rem;
  font-weight: 700;
  color: var(--c-text);
  letter-spacing: -0.01em;
  line-height: 1.3;
}
.car-card__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2) var(--sp-4);
  font-size: 0.875rem;
  color: var(--c-text-muted);
  align-items: center;
}
.car-card__meta-item {
  display: flex;
  align-items: center;
  gap: 4px;
}
.car-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-3) var(--sp-4);
  border-top: 1px solid var(--c-border);
  margin-top: auto;
}
.car-card__price {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.car-card__price-amount {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -0.02em;
}
.car-card__price-unit {
  font-size: 0.8125rem;
  color: var(--c-text-muted);
}


/* ── 12. Hero ────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg,
              var(--c-primary-dark) 0%,
              var(--c-primary) 60%,
              var(--c-primary-hover) 100%);
  color: #fff;
  padding-top: calc(var(--sp-16) * 1.25);
  padding-bottom: calc(var(--sp-16) * 1.75);
}
.hero__bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 20% 50%, rgba(99,179,237,.12) 0%, transparent 60%),
    radial-gradient(circle at 80% 20%, rgba(167,243,208,.08) 0%, transparent 50%);
  pointer-events: none;
}
.hero__content { position: relative; z-index: 1; text-align: center; }
.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
  backdrop-filter: blur(8px);
  padding: 6px 16px;
  border-radius: var(--r-full);
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: var(--sp-5);
}
.hero__title {
  font-family: 'Nunito', Manrope, Inter, ui-sans-serif, system-ui, -apple-system,
               BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.045em;
  margin-bottom: var(--sp-4);
}
.hero__title span { color: var(--c-primary-light); }
/* Hero-specific spacing for the shared .cta-row layout */
.hero .cta-row { margin-top: 20px; }
.hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: rgba(255,255,255,.8);
  max-width: 560px;
  margin-inline: auto;
  margin-bottom: var(--sp-8);
  line-height: 1.65;
}


/* ── 13. Search box (hero) ───────────────────────────────────── */
.search-box {
  background: var(--c-surface);
  border-radius: var(--r-xl);
  box-shadow: var(--s-xl);
  padding: var(--sp-5) var(--sp-6);
  max-width: 860px;
  margin-inline: auto;
}
.search-box__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr auto;
  gap: var(--sp-3);
  align-items: end;
}
.search-box__field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.search-box__label {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  display: flex;
  align-items: center;
  gap: 5px;
}
.search-box__label svg { width: 13px; height: 13px; }
.search-box__input,
.search-box__select,
.search-box__select-trigger {
  height: 3rem;           /* 48px — pin all four cells to the exact same height */
  box-sizing: border-box;
}
.search-box__input,
.search-box__select {
  padding: 0.6875rem 0.9375rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  color: var(--c-text);
  background: var(--c-surface);
  transition: border-color var(--t-base), box-shadow var(--t-base);
  appearance: none;
}
.search-box__input:focus,
.search-box__select:focus {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(29,78,216,.1);
  outline: none;
}
.search-box__input::placeholder { color: var(--c-text-light); }
.search-box__select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 2.25rem;
  cursor: pointer;
}
/* Custom dropdown — anchored below the field, never at the cursor */
.search-box__select-trigger {
  display: flex;
  align-items: center;
  padding: 0 0.9375rem;        /* min-height handles vertical sizing */
  padding-right: 2.25rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  line-height: 1.2;
  color: var(--c-text);
  background: var(--c-surface)
              url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E")
              no-repeat right 10px center;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: border-color var(--t-base), box-shadow var(--t-base);
}
.search-box__select-trigger > span {
  flex: 1;
  min-width: 0;                /* allow the span to shrink so ellipsis works */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-box__select-trigger:focus,
.search-box__select-trigger[aria-expanded="true"] {
  border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(11, 58, 117, .12);
  outline: none;
}
.search-box__select-trigger .is-placeholder { color: var(--c-text-light); }

.search-box__select-panel {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  box-shadow: var(--s-md);
  padding: 4px;
  max-height: 280px;
  overflow-y: auto;
  list-style: none;
  margin: 0;
}
.search-box__select-panel li {
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 0.9375rem;
  color: var(--c-text);
  cursor: pointer;
  transition: background var(--t-fast), color var(--t-fast);
}
.search-box__select-panel li:hover {
  background: var(--c-primary-50);
  color: var(--c-primary);
}
.search-box__select-panel li.is-selected {
  background: var(--c-primary-light);
  color: var(--c-primary);
  font-weight: 600;
}

.search-box__btn {
  padding: 0.75rem 1.5rem;
  background: var(--c-primary);
  color: #fff;
  font-weight: 700;
  font-size: 0.9375rem;
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  transition: background var(--t-base), box-shadow var(--t-base);
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(29,78,216,.35);
}
.search-box__btn:hover {
  background: var(--c-primary-hover);
  box-shadow: 0 4px 16px rgba(29,78,216,.45);
}
.search-box__btn svg { width: 18px; height: 18px; }
.search-box__divider {
  width: 1px;
  height: 36px;
  background: var(--c-border);
  align-self: end;
  margin-bottom: 2px;
}


/* ── 14. Stats strip ─────────────────────────────────────────── */
.stats-strip {
  background: var(--c-primary);
  padding: var(--sp-6) 0;
}
.stats-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  text-align: center;
  color: #fff;
}
.stats-strip__num {
  font-size: clamp(1.625rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stats-strip__label {
  font-size: 0.875rem;
  color: rgba(255,255,255,.75);
  margin-top: 4px;
}
.stats-strip__divider {
  width: 1px;
  background: rgba(255,255,255,.2);
  margin-inline: auto;
}


/* ── 15. "How it works" steps ────────────────────────────────── */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-8);
  position: relative;
}
.steps-grid::before {
  content: '';
  position: absolute;
  top: 28px;
  left: calc(16.66% + 40px);
  right: calc(16.66% + 40px);
  height: 2px;
  background: linear-gradient(90deg, var(--c-primary-light), var(--c-primary-light));
  background-size: 12px 2px;
  background-image: repeating-linear-gradient(90deg,
    var(--c-primary-light) 0, var(--c-primary-light) 6px,
    transparent 6px, transparent 12px);
}
.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.step__icon {
  width: 56px;
  height: 56px;
  background: var(--c-primary-50);
  border: 2px solid var(--c-primary-light);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.625rem;
  margin-bottom: var(--sp-4);
  position: relative;
  z-index: 1;
  background: #fff;
}
.step__num {
  position: absolute;
  top: -4px;
  right: -4px;
  width: 20px;
  height: 20px;
  background: var(--c-primary);
  color: #fff;
  font-size: 0.6875rem;
  font-weight: 700;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
}
.step__title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.step__desc {
  font-size: 0.9375rem;
  color: var(--c-text-muted);
  line-height: 1.65;
}


/* ── 16. Why-us features ─────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.feature {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: box-shadow var(--t-base);
}
.feature:hover { box-shadow: var(--s-md); }
.feature__icon {
  font-size: 2rem;
  flex-shrink: 0;
  line-height: 1;
}
.feature__title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: var(--sp-1);
}
.feature__desc {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}


/* ── 17. Cars listing page layout ────────────────────────────── */
.cars-layout {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  gap: var(--sp-8);
  align-items: start;
}
.cars-layout__sidebar { position: sticky; top: calc(var(--nav-h) + 16px); }


/* ── 18. Filter panel ────────────────────────────────────────── */
.filter-panel {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.filter-panel__header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.filter-panel__title {
  font-size: 0.9375rem;
  font-weight: 700;
}
.filter-panel__clear {
  font-size: 0.8125rem;
  color: var(--c-primary);
  font-weight: 500;
}
.filter-panel__clear:hover { text-decoration: underline; }

.filter-group {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--c-border);
}
.filter-group:last-child { border-bottom: none; }
.filter-group__label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-3);
}
.filter-group__checks {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.filter-check {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.9rem;
  cursor: pointer;
  user-select: none;
}
.filter-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--c-primary);
  cursor: pointer;
  flex-shrink: 0;
}
.filter-check__count {
  margin-left: auto;
  font-size: 0.75rem;
  color: var(--c-text-light);
  background: var(--c-bg);
  padding: 1px 6px;
  border-radius: var(--r-full);
}

.price-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-2);
}
.price-inputs .field-input { padding: 0.5rem 0.625rem; }

.filter-panel__actions {
  padding: var(--sp-4) var(--sp-5);
  display: flex;
  gap: var(--sp-2);
}


/* ── 19. Cars results area ───────────────────────────────────── */
.cars-results__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-5);
  min-height: 32px;
}
.cars-results__count {
  font-size: 0.9375rem;
  color: var(--c-text-muted);
}
.cars-results__count strong { color: var(--c-text); font-weight: 700; }
.cars-results__sort {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.875rem;
}
.cars-results__sort .field-select {
  padding: 0.375rem 2rem 0.375rem 0.625rem;
  font-size: 0.875rem;
}

/* HTMX loading indicator */
.results-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: var(--sp-3);
  padding: var(--sp-12);
  color: var(--c-text-muted);
  font-size: 0.9375rem;
}
.htmx-request .results-loading   { display: flex; }
.htmx-request .cars-grid          { opacity: .4; pointer-events: none; transition: opacity var(--t-slow); }

/* Spinner */
.spinner {
  width: 22px; height: 22px;
  border: 2.5px solid var(--c-border);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Empty state */
.empty-state {
  text-align: center;
  padding: var(--sp-16) var(--sp-8);
  color: var(--c-text-muted);
}
.empty-state__icon { font-size: 4rem; margin-bottom: var(--sp-4); }
.empty-state__title {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--c-text);
  margin-bottom: var(--sp-2);
}
.empty-state__sub { font-size: 0.9375rem; }

/* Mobile filter toggle */
.filter-toggle-btn {
  display: none;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--c-border);
  border-radius: var(--r-md);
  background: var(--c-surface);
  margin-bottom: var(--sp-4);
}
.filter-toggle-btn svg { width: 18px; height: 18px; }


/* ── 20. Page headers ────────────────────────────────────────── */
.page-header {
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
  padding: var(--sp-8) 0 var(--sp-6);
}
.page-header__title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--sp-1);
}
.page-header__sub { color: var(--c-text-muted); font-size: 0.9375rem; }
.page-header__breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 0.875rem;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-3);
}
.page-header__breadcrumb a { color: var(--c-primary); }
.page-header__breadcrumb a:hover { text-decoration: underline; }


/* ── 21. Footer ──────────────────────────────────────────────── */
.footer {
  background: #0f172a;
  color: rgba(255,255,255,.7);
}
.footer__main {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--sp-10);
  padding: var(--sp-12) 0;
}
.footer__brand { color: #fff; font-size: 1.125rem; font-weight: 700; }
.footer__tagline {
  margin-top: var(--sp-2);
  font-size: 0.875rem;
  color: rgba(255,255,255,.5);
  line-height: 1.65;
}
.footer__col-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: var(--sp-4);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.footer__links { display: flex; flex-direction: column; gap: var(--sp-3); }
.footer__links a {
  font-size: 0.9rem;
  transition: color var(--t-base);
}
.footer__links a:hover { color: #fff; }
.footer__lang-btns { display: flex; gap: var(--sp-3); }
.footer__lang-btn {
  font-size: 0.875rem;
  padding: 4px 10px;
  border-radius: var(--r-sm);
  transition: background var(--t-fast), color var(--t-fast);
}
.footer__lang-btn:hover       { background: rgba(255,255,255,.1); color: #fff; }
.footer__lang-btn.is-active   { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }

.footer__bar {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: var(--sp-4) 0;
  font-size: 0.8125rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
}


/* ── 22. Flash messages ──────────────────────────────────────── */
.flash {
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--r-md);
  font-size: 0.9375rem;
  font-weight: 500;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.flash-success {
  background: var(--c-success-bg);
  color: #166534;
  border-color: #bbf7d0;
}
.flash-error {
  background: var(--c-error-bg);
  color: #991b1b;
  border-color: #fecaca;
}
.flash-wrap { padding: var(--sp-3) 0 0; }


/* ── 23. Responsive — tablet ─────────────────────────────────── */
@media (max-width: 1024px) {
  :root { --sidebar-w: 240px; }
  .search-box__grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
  }
  .search-box__field:first-child { grid-column: 1 / -1; }
  .search-box__btn { grid-column: 1 / -1; justify-content: center; }

  .steps-grid::before { display: none; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .hosting-features { grid-template-columns: 1fr 1fr; }
  .footer__main { grid-template-columns: 1fr 1fr; }
}

/* ── 24. Responsive — mobile ─────────────────────────────────── */
@media (max-width: 768px) {
  :root { --max-w: 100%; }

  .navbar__nav,
  .navbar__end > .btn { display: none; }
  .navbar__burger { display: flex; }

  .search-box {
    padding: var(--sp-4);
    border-radius: var(--r-lg);
    margin-inline: var(--sp-2);
  }
  .search-box__grid {
    grid-template-columns: 1fr;
  }
  .search-box__field:first-child { grid-column: auto; }
  .search-box__divider { display: none; }

  .cars-layout {
    grid-template-columns: 1fr;
  }
  .cars-layout__sidebar {
    position: static;
    display: none;
  }
  .cars-layout__sidebar.is-open { display: block; }
  .filter-toggle-btn { display: flex; }

  .stats-strip__grid { gap: var(--sp-2); }

  .steps-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .features-grid { grid-template-columns: 1fr; }
  .hosting-features { grid-template-columns: 1fr; }
  .hosting-reqs { grid-template-columns: 1fr; gap: var(--sp-6); }
  .host-banner__inner { grid-template-columns: 1fr; }
  .host-banner__cards { flex-direction: row; flex-wrap: wrap; }

  .footer__main { grid-template-columns: 1fr; gap: var(--sp-6); }
  .footer__bar  { flex-direction: column; text-align: center; }

  .cars-grid { grid-template-columns: 1fr; }
  .cars-grid--two { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 480px) {
  .container { padding-inline: var(--sp-4); }
  .hero { padding-top: var(--sp-10); padding-bottom: var(--sp-12); }
  .hero__title { font-size: 2rem; }
  .search-box { margin-inline: 0; border-radius: var(--r-md); }
}


/* ── 25. Host banner (homepage) ─────────────────────────────── */
.host-banner {
  background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 100%);
  color: #fff;
  padding: var(--sp-16) 0;
}
.host-banner__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-12);
  align-items: center;
}
.host-banner__eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.6);
  margin-bottom: var(--sp-3);
}
.host-banner__title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-4);
}
.host-banner__desc {
  font-size: 1rem;
  color: rgba(255,255,255,.8);
  line-height: 1.7;
  max-width: 480px;
}
.host-banner__cards {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.host-banner__card {
  display: flex;
  align-items: center;
  gap: var(--sp-4);
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--r-lg);
  padding: var(--sp-4) var(--sp-5);
  backdrop-filter: blur(4px);
}
.host-banner__card-icon {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,.15);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #fff;
}
.host-banner__card-label {
  font-size: 0.9375rem;
  font-weight: 600;
  color: #fff;
}

/* ── 26. Hosting page ────────────────────────────────────────── */
.hosting-hero {
  background: linear-gradient(135deg, var(--c-primary-dark) 0%, var(--c-primary) 100%);
  color: #fff;
  padding: calc(var(--sp-16) * 1.25) 0 calc(var(--sp-16) * 1.5);
}
.hosting-hero__eyebrow {
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: rgba(255,255,255,.6);
  margin-bottom: var(--sp-4);
}
.hosting-hero__title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.04em;
  margin-bottom: var(--sp-5);
}
.hosting-hero__sub {
  font-size: clamp(1rem, 1.5vw, 1.125rem);
  color: rgba(255,255,255,.8);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: var(--sp-8);
}
.hosting-steps {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.hosting-step {
  display: flex;
  gap: var(--sp-6);
  padding: var(--sp-6) 0;
  border-bottom: 1px solid var(--c-border);
}
.hosting-step:last-child { border-bottom: none; }
.hosting-step__num {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9375rem;
  font-weight: 800;
  margin-top: 2px;
}
.hosting-step__title {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: var(--sp-2);
}
.hosting-step__desc {
  font-size: 0.9375rem;
  color: var(--c-text-muted);
  line-height: 1.65;
}
.hosting-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-6);
}
.hosting-feature {
  display: flex;
  gap: var(--sp-4);
  padding: var(--sp-5);
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  transition: box-shadow var(--t-base);
}
.hosting-feature:hover { box-shadow: var(--s-md); }
.hosting-feature__icon {
  width: 2.75rem;
  height: 2.75rem;
  min-width: 2.75rem;
  background: var(--c-primary-50);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c-primary);
}
.hosting-feature__title {
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: var(--sp-1);
}
.hosting-feature__desc {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
}
.hosting-reqs {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: var(--sp-12);
  align-items: start;
}
.hosting-req-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--sp-5);
}
.hosting-req {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.hosting-req svg {
  color: var(--c-success);
  flex-shrink: 0;
  margin-top: 2px;
}
.hosting-req strong {
  display: block;
  font-size: 0.9375rem;
  font-weight: 700;
  margin-bottom: 2px;
}
.hosting-req p {
  font-size: 0.875rem;
  color: var(--c-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* ── 25. Animations ──────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.anim-fade-in { animation: fadeIn 0.4s ease both; }

/* Stagger car cards */
.cars-grid .car-card:nth-child(1)  { animation: fadeIn .3s .05s forwards; }
.cars-grid .car-card:nth-child(2)  { animation: fadeIn .3s .10s forwards; }
.cars-grid .car-card:nth-child(3)  { animation: fadeIn .3s .15s forwards; }
.cars-grid .car-card:nth-child(4)  { animation: fadeIn .3s .20s forwards; }
.cars-grid .car-card:nth-child(5)  { animation: fadeIn .3s .25s forwards; }
.cars-grid .car-card:nth-child(6)  { animation: fadeIn .3s .30s forwards; }
.cars-grid .car-card:nth-child(n+7){ animation: fadeIn .3s .35s forwards; }

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, .anim-fade-in, .cars-grid .car-card { animation: none !important; transition: none !important; }
}


/* ── 26. Utilities ───────────────────────────────────────────── */
.text-muted  { color: var(--c-text-muted); }
.text-sm     { font-size: 0.875rem; }
.text-xs     { font-size: 0.8125rem; }
.font-bold   { font-weight: 700; }
.d-flex      { display: flex; }
.align-center{ align-items: center; }
.gap-2       { gap: var(--sp-2); }
.gap-3       { gap: var(--sp-3); }
.mt-2        { margin-top: var(--sp-2); }
.mt-4        { margin-top: var(--sp-4); }
.mb-4        { margin-bottom: var(--sp-4); }
.mb-6        { margin-bottom: var(--sp-6); }
.p-4         { padding: var(--sp-4); }
.rounded     { border-radius: var(--r-md); }

/* Car type icon map used in badges */
.icon-pin::before    { content: "📍"; margin-right: 3px; font-size: .85em; }
.icon-seats::before  { content: "👥"; margin-right: 3px; font-size: .85em; }
.icon-star::before   { content: "★"; margin-right: 2px; }


/* ── Host dashboard ──────────────────────────────────────────── */
.host-dash__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-8);
}
.host-dash__title {
  font-family: 'Nunito', Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--c-text);
}
.host-dash__sub { color: var(--c-text-muted); margin-top: 4px; }
.host-dash__header-actions { display: flex; gap: var(--sp-3); flex-wrap: wrap; }

.host-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-8);
}
.host-kpi {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.host-kpi__label {
  font-size: .8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  margin-bottom: var(--sp-2);
}
.host-kpi__value {
  font-size: 1.625rem;
  font-weight: 800;
  color: var(--c-primary);
  letter-spacing: -.02em;
}
.host-kpi__hint {
  font-size: .8125rem;
  color: var(--c-text-light);
  margin-top: var(--sp-2);
}

.host-card {
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-lg);
  padding: var(--sp-6);
  margin-bottom: var(--sp-6);
}
.host-card__head { margin-bottom: var(--sp-5); }
.host-card__title { font-size: 1.125rem; font-weight: 700; color: var(--c-text); }
.host-card__sub { font-size: .8125rem; color: var(--c-text-muted); margin-top: 2px; }

/* Bar chart — pure CSS, no Chart.js dependency */
.host-chart {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  align-items: end;
  height: 180px;
  padding: 0 var(--sp-2);
}
.host-chart__col {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  gap: 6px;
}
.host-chart__bar-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  background: var(--c-bg);
  border-radius: var(--r-sm);
  overflow: hidden;
}
.host-chart__bar {
  width: 100%;
  min-height: 2px;          /* show a sliver even at 0 */
  background: linear-gradient(180deg,
              var(--c-primary-hover) 0%,
              var(--c-primary) 100%);
  border-radius: var(--r-sm);
  transition: height var(--t-base);
}
.host-chart__label {
  text-align: center;
  font-size: .6875rem;
  font-weight: 600;
  color: var(--c-text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* Occupancy list */
.host-occ { display: flex; flex-direction: column; gap: var(--sp-3); }
.host-occ__row {
  display: grid;
  grid-template-columns: minmax(140px, 1.6fr) 4fr 56px;
  gap: var(--sp-4);
  align-items: center;
}
.host-occ__name {
  font-weight: 600;
  color: var(--c-text);
  text-decoration: none;
}
.host-occ__name:hover { color: var(--c-primary); }
.host-occ__bar-wrap {
  height: 8px;
  background: var(--c-bg);
  border-radius: var(--r-full);
  overflow: hidden;
}
.host-occ__bar {
  height: 100%;
  background: linear-gradient(90deg,
              var(--c-primary) 0%,
              var(--c-primary-hover) 100%);
  border-radius: var(--r-full);
  transition: width var(--t-base);
}
.host-occ__pct {
  text-align: right;
  font-weight: 700;
  color: var(--c-primary);
}

/* Upcoming bookings list */
.host-upcoming { display: flex; flex-direction: column; gap: var(--sp-3); }
.host-upcoming__row {
  display: grid;
  grid-template-columns: minmax(140px, auto) 1fr auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-3);
  background: var(--c-bg);
  border-radius: var(--r-md);
}
.host-upcoming__dates {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-weight: 700;
  color: var(--c-primary);
}
.host-upcoming__sep { color: var(--c-text-light); font-weight: 400; }
.host-upcoming__car {
  font-weight: 600;
  color: var(--c-text);
  text-decoration: none;
}
.host-upcoming__car:hover { color: var(--c-primary); }
.host-upcoming__renter { font-size: .875rem; color: var(--c-text-muted); }

.host-empty {
  color: var(--c-text-muted);
  text-align: center;
  padding: var(--sp-6);
}


/* Sidebar pickup-location dropdown — anchor the popover panel
   relative to the field group so it drops directly below the trigger. */
.filter-pickup { position: relative; }


/* ── Favorite (heart) button ─────────────────────────────────── */
.fav-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--c-text-muted);
  box-shadow: var(--s-sm);
  cursor: pointer;
  transition: color var(--t-fast), background var(--t-fast),
              transform var(--t-fast), box-shadow var(--t-fast);
}
.fav-btn:hover {
  color: var(--c-error);
  transform: scale(1.08);
  box-shadow: var(--s-md);
}
.fav-btn--on        { color: var(--c-error); background: #fff; }
.fav-btn--on:hover  { color: #b91c1c; }
.fav-btn:active     { transform: scale(.92); }

/* Card-level positioning: top-right inside the image area */
.car-card { position: relative; }
.car-card__fav {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
}

/* On the detail page the fav button sits inline with the title row,
   pushed to the far right via margin-left:auto on its wrapper. */


/* ── Host calendar ───────────────────────────────────────────── */
.cal-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-4);
  margin-bottom: var(--sp-4);
  flex-wrap: wrap;
}
.cal-nav__title {
  font-family: 'Nunito', Manrope, Inter, ui-sans-serif, system-ui, sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: -.02em;
  color: var(--c-text);
}
.cal-nav__right { display: flex; gap: var(--sp-2); align-items: center; }

.cal-legend {
  display: flex;
  gap: var(--sp-5);
  flex-wrap: wrap;
  margin: 0 0 var(--sp-4);
  font-size: .8125rem;
  color: var(--c-text-muted);
}
.cal-legend li { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend__swatch {
  width: 14px; height: 14px;
  border-radius: 4px;
  border: 1px solid var(--c-border);
  display: inline-block;
}

.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  background: var(--c-border);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
}
.cal-weekday {
  background: var(--c-surface);
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--c-text-muted);
  padding: 8px 4px;
}

.cal-cell {
  background: var(--c-surface);
  min-height: 88px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  font-size: .875rem;
}
.cal-cell__day {
  font-weight: 600;
  color: var(--c-text);
  font-size: .8125rem;
}
.cal-cell--out-of-month { background: var(--c-bg); }
.cal-cell--out-of-month .cal-cell__day { color: var(--c-text-light); }
.cal-cell--past .cal-cell__day { color: var(--c-text-light); }
.cal-cell--today .cal-cell__day {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--c-primary);
  color: #fff;
}

/* Status backgrounds (only apply to in-month, non-day-shading layer) */
.cal-cell--booked          { background: #DBEAFE; }   /* primary-light */
.cal-cell--blocked         { background: #fef3c7; }   /* warm warning */
.cal-cell--outside         { background: #f3f4f6; }   /* neutral grey */
.cal-cell--free            { background: var(--c-surface); }
.cal-cell--out-of-month.cal-cell--booked,
.cal-cell--out-of-month.cal-cell--blocked,
.cal-cell--out-of-month.cal-cell--outside { background: var(--c-bg); }

.cal-cell__pill {
  display: block;
  font-size: .6875rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--r-sm);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cal-cell__pill--booking {
  background: var(--c-primary);
  color: #fff;
}
.cal-cell__pill--block {
  background: #d97706;
  color: #fff;
}

.cal-foot {
  margin-top: var(--sp-4);
  font-size: .8125rem;
  color: var(--c-text-muted);
  text-align: center;
}
