/* =====================================================================
   CAR RENTALS — /car-rentals and one vehicle's page.

   Laid out after the reference: a filter panel down the left, and the same
   fleet offered three ways on the right — by type, by budget, by seating —
   each row with its own tabs. In the site's own navy and gold rather than the
   reference's blue.

   Prefix .crl- throughout.
   ===================================================================== */
.crl {
  /* Follows Admin → Branding; the designed colours are the fallback. */
  --crl-navy: var(--brand-primary, #2e4755);
  --crl-ink: #1f3441;
  --crl-muted: #5f7380;
  --crl-gold: var(--brand-accent, #BD830D);
  --crl-line: #E4E9EC;
  --crl-panel: #F7F9FA;
  --crl-ease: cubic-bezier(.22, .61, .36, 1);
  color: var(--crl-ink);
}
.crl *, .crl-detail * { box-sizing: border-box; }
.crl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* -------------------------------- the head -------------------------------- */
.crl-crumbs { margin: 0 0 18px; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; }
.crl-crumbs ol { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.crl-crumbs li + li::before { content: "›"; margin-right: 8px; color: #9DAEB7; }
.crl-crumbs a { color: var(--crl-gold, #BD830D); text-decoration: none; font-weight: 700; }
.crl-crumbs a:hover { text-decoration: underline; }
.crl-crumbs [aria-current] { color: #8C9CA5; font-weight: 700; }

.crl-head {
  padding: clamp(22px, 3vw, 34px) clamp(20px, 3vw, 36px);
  border-radius: 16px;
  background: linear-gradient(180deg, #EEF4F7, #F8FAFB);
}
.crl-head__eyebrow { margin: 0 0 8px; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--crl-gold); }
.crl-head__h1 { margin: 0; font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; letter-spacing: -.01em; color: var(--crl-navy); }
.crl-head__sub { margin: 10px 0 0; max-width: 56ch; font-size: .92rem; line-height: 1.65; color: var(--crl-muted); }

/* ------------------------------- the layout ------------------------------- */
.crl-layout {
  display: grid;
  grid-template-columns: minmax(0, 258px) minmax(0, 1fr);
  gap: clamp(18px, 2.4vw, 34px);
  align-items: start;
  margin-top: clamp(20px, 2.6vw, 32px);
  padding-bottom: clamp(40px, 5vw, 72px);
}

/* ------------------------------ the filters ------------------------------- */
.crl-filters__toggle { display: none; }

.crl-filters {
  position: sticky;
  top: 90px;
  padding: 18px;
  border: 1px solid var(--crl-line);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 0 10px 30px rgba(16, 28, 36, .06);
}
.crl-fg + .crl-fg { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--crl-line); }
.crl-fg__h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0 0 10px;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--crl-navy);
}
.crl-fg__h--btn { padding: 0; border: 0; background: none; font-family: inherit; cursor: pointer; }
.crl-fg__h svg { width: 15px; height: 15px; color: var(--crl-muted); transition: transform .2s var(--crl-ease); }
.crl-fg__h[aria-expanded="false"] svg { transform: rotate(-90deg); }
.crl-fg [data-crl-foldbody][hidden] { display: none; }

/* ---- the budget slider ---- */
.crl-range__ends { display: flex; justify-content: space-between; font-size: .74rem; font-weight: 700; color: var(--crl-muted); }
.crl-fg--range input[type="range"] {
  width: 100%;
  margin: 8px 0 6px;
  accent-color: var(--crl-navy);
  cursor: pointer;
}
.crl-range__val { margin: 0; font-size: .8rem; color: var(--crl-muted); }
.crl-range__val b { color: var(--crl-gold); }

/* ---- search ---- */
.crl-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 12px;
  height: 42px;
  border: 1px solid var(--crl-line);
  border-radius: 10px;
  background: var(--crl-panel);
}
.crl-search svg { flex: none; width: 16px; height: 16px; color: var(--crl-muted); }
.crl-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .88rem;
  color: var(--crl-ink);
}
.crl-search input:focus { outline: none; }
.crl-search:focus-within { border-color: var(--crl-navy); background: #FFFFFF; }

/* ---- checkbox lists ---- */
.crl-checks { margin: 0; padding: 0; list-style: none; max-height: 232px; overflow-y: auto; }
.crl-check { display: flex; align-items: center; gap: 9px; padding: 6px 0; font-size: .87rem; color: var(--crl-ink); cursor: pointer; }
.crl-check input { flex: none; width: 15px; height: 15px; accent-color: var(--crl-navy); cursor: pointer; }
.crl-check span { flex: 1 1 auto; min-width: 0; }
.crl-check i { font-style: normal; font-size: .76rem; font-weight: 700; color: #9DAEB7; }
.crl-check:hover { color: var(--crl-navy); }

.crl-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  margin-top: 18px;
  padding: 11px 14px;
  border: 1px solid var(--crl-line);
  border-radius: 10px;
  background: var(--crl-panel);
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  color: var(--crl-navy);
  cursor: pointer;
  transition: background-color .18s var(--crl-ease), border-color .18s var(--crl-ease);
}
.crl-clear svg { width: 15px; height: 15px; }
.crl-clear:hover { border-color: var(--crl-navy); background: #EEF3F6; }

/* -------------------------------- the rows -------------------------------- */
.crl-main { min-width: 0; }
.crl-row {
  padding: clamp(18px, 2.4vw, 28px) clamp(16px, 2vw, 26px) clamp(20px, 2.6vw, 30px);
  border-radius: 16px;
  background: var(--crl-panel);
  text-align: center;
}
.crl-row + .crl-row { margin-top: clamp(18px, 2.4vw, 30px); }
.crl-row__eyebrow { margin: 0; font-size: .68rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: var(--crl-gold); }
.crl-row__h2 { margin: 4px 0 0; font-size: clamp(1.35rem, 2.2vw, 1.75rem); font-weight: 800; color: var(--crl-navy); }

.crl-tabs { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 16px 0 20px; }
.crl-tab {
  padding: 8px 18px;
  border: 1px solid var(--crl-line);
  border-radius: 999px;
  background: #FFFFFF;
  font: inherit;
  font-size: .82rem;
  font-weight: 700;
  color: var(--crl-navy);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color .18s var(--crl-ease), color .18s var(--crl-ease), border-color .18s var(--crl-ease);
}
.crl-tab:hover { border-color: #C6D3D9; background: #F1F5F7; }
.crl-tab.is-on { background: var(--crl-navy); border-color: var(--crl-navy); color: #FFFFFF; }

.crl-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(226px, 1fr));
  gap: clamp(12px, 1.4vw, 18px);
  text-align: left;
}

.crl-empty { margin: 22px 0 0; font-size: .88rem; color: var(--crl-muted); }
.crl-more {
  margin: 18px auto 0;
  padding: 10px 22px;
  border: 1px solid var(--crl-navy);
  border-radius: 999px;
  background: #FFFFFF;
  font: inherit;
  font-size: .8rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--crl-navy);
  cursor: pointer;
}
.crl-more:hover { background: var(--crl-navy); color: #FFFFFF; }

/* -------------------------------- the card -------------------------------- */
.crl-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--crl-line);
  border-radius: 14px;
  background: #FFFFFF;
  transition: transform .22s var(--crl-ease), box-shadow .22s var(--crl-ease);
}
.crl-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(16, 28, 36, .13); }
.crl-card[hidden] { display: none !important; }

/* Not a link any more, so it has to be told to behave like a block. */
.crl-card__media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #E9EFF2; }
.crl-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--crl-ease); }
.crl-card:hover .crl-card__media img { transform: scale(1.05); }

.crl-flag {
  position: absolute;
  top: 10px;
  left: 0;
  padding: 4px 12px 4px 10px;
  border-radius: 0 999px 999px 0;
  background: var(--crl-gold);
  font-size: .64rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: #FFFFFF;
}
.crl-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  display: inline-flex;
  align-items: center;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(46, 71, 85, .92);
  font-size: .68rem;
  font-weight: 700;
  color: #FFFFFF;
}

.crl-save {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--crl-navy);
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(16, 28, 36, .18);
  transition: color .18s var(--crl-ease), transform .18s var(--crl-ease);
}
.crl-save svg { width: 17px; height: 17px; }
.crl-save:hover { transform: scale(1.09); }
.crl-save[aria-pressed="true"] { color: #C0392B; }
.crl-save[aria-pressed="true"] svg { fill: currentColor; }

.crl-card__body { display: flex; flex-direction: column; gap: 6px; padding: 13px 14px 15px; }
.crl-card__name { margin: 0; font-size: .97rem; font-weight: 800; line-height: 1.3; color: var(--crl-navy); }
/* The one line of hard facts, clamped so two- and three-fact cards line up. */
.crl-card__meta {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.6em;
  margin: 0;
  font-size: .78rem;
  line-height: 1.3;
  color: var(--crl-muted);
}

/* The price on its own line with the button under it: side by side, the two
   crowd each other and "/ day" drops onto a second line. */
.crl-card__foot { display: flex; flex-direction: column; align-items: stretch; gap: 10px; margin-top: 4px; }
.crl-card__price { margin: 0; line-height: 1.1; white-space: nowrap; }
.crl-card__price b { font-size: 1.16rem; font-weight: 800; color: var(--crl-navy); }
.crl-card__price small { margin-left: 4px; font-size: .72rem; color: var(--crl-muted); }
.crl-card__ask { font-size: .95rem !important; color: var(--crl-gold) !important; }
/* ---- add to cart ----
   The card's only action. The two states swap in place, so the row height
   never jumps when something is added. */
.crl-card__act { position: relative; display: block; }
.crl-add,
.crl-added {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: .79rem;
  font-weight: 800;
  white-space: nowrap;
  text-decoration: none;
}
.crl-add {
  border: 1.5px solid var(--crl-navy);
  background: var(--crl-navy);
  color: #FFFFFF;
  cursor: pointer;
  transition: background-color .18s var(--crl-ease), border-color .18s var(--crl-ease), transform .18s var(--crl-ease);
}
.crl-add svg { width: 14px; height: 14px; }
.crl-add:hover { background: var(--crl-gold); border-color: var(--crl-gold); transform: translateY(-1px); }
.crl-add[hidden] { display: none !important; }

.crl-added {
  border: 1.5px solid #2F7D5B;
  background: #EDF7F1;
  color: #2F7D5B;
}
.crl-added[hidden] { display: none !important; }
.crl-added svg { width: 14px; height: 14px; }
.crl-added button {
  display: grid;
  place-items: center;
  width: 17px;
  height: 17px;
  margin-left: 2px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(47, 125, 91, .14);
  color: inherit;
  cursor: pointer;
}
.crl-added button svg { width: 10px; height: 10px; }
.crl-added button:hover { background: rgba(47, 125, 91, .28); }

/* The short glow the cart flashes on the row it was added from. */
.crl-card__act.is-added .crl-added { animation: crl-pop .6s var(--crl-ease); }
@keyframes crl-pop {
  0% { transform: scale(.9); opacity: .4; }
  60% { transform: scale(1.04); }
  100% { transform: none; opacity: 1; }
}
.crl-card__km { margin: 2px 0 0; font-size: .72rem; color: #9DAEB7; }

/* ------------------------- one vehicle's own page ------------------------- */
.crl-detail .crl-crumbs { margin-bottom: 14px; }
.crl-rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; }
.crl-rate { padding: 16px 18px; border: 1px solid #BD830D; border-radius: 14px; background: #FAF8F3; }
.crl-rate__lab { display: block; font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #8A7134; }
.crl-rate__val { display: block; margin: 5px 0 4px; font-size: 1.5rem; font-weight: 800; color: #2e4755; }
.crl-rate small { font-size: .78rem; line-height: 1.5; color: rgba(46, 71, 85, .69); }
.crl-rates__note { margin: 12px 0 0; font-size: .82rem; line-height: 1.6; color: rgba(46, 71, 85, .69); }

.crl-incl { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 9px 20px; margin: 0; padding: 0; list-style: none; }
.crl-incl li { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; line-height: 1.5; }
.crl-incl svg { flex: none; width: 18px; height: 18px; margin-top: 2px; color: #2e4755; }

.crl-row--rel { margin-top: clamp(28px, 4vw, 48px); }

/* ------------------------------- responsive ------------------------------- */
@media (max-width: 1080px) {
  .crl-layout { grid-template-columns: minmax(0, 1fr); }
  .crl-filters__toggle {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 11px 20px;
    border: 1px solid var(--crl-navy);
    border-radius: 999px;
    background: #FFFFFF;
    font: inherit;
    font-size: .84rem;
    font-weight: 800;
    color: var(--crl-navy);
    cursor: pointer;
  }
  .crl-filters__toggle svg { width: 17px; height: 17px; }
  .crl-filters__n { display: grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--crl-gold); font-size: .7rem; color: #FFFFFF; }
  .crl-filters__n[hidden] { display: none; }
  /* Closed by default on a narrow screen; the button above opens it. */
  .crl-filters { position: static; margin-top: 14px; }
  .crl-filters[hidden] { display: none; }
}

@media (max-width: 560px) {
  .crl-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); }
  .crl-head { padding: 20px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .crl-card, .crl-card__media img, .crl-save, .crl-card__go svg { transition: none; }
  .crl-card:hover { transform: none; }
  .crl-card:hover .crl-card__media img { transform: none; }
}
