@import 'design-tokens.css';

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--qd-font-body);
  font-size: var(--qd-fs-base);
  line-height: var(--qd-lh-normal);
  color: var(--qd-color-text);
  background: var(--qd-color-bg);
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--qd-font-heading); font-weight: var(--qd-fw-bold); line-height: var(--qd-lh-tight); margin: 0 0 var(--qd-space-3); }
p { margin: 0 0 var(--qd-space-4); }
a { color: inherit; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--qd-color-focus-ring);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---- Layout primitives ---- */
.qd-container {
  max-width: var(--qd-container-max);
  margin-inline: auto;
  padding-inline: var(--qd-space-5);
}

.qd-visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.qd-skip-link {
  position: absolute;
  left: var(--qd-space-4);
  top: -100px;
  background: var(--qd-color-primary);
  color: var(--qd-color-text-inverse);
  padding: var(--qd-space-3) var(--qd-space-4);
  border-radius: var(--qd-radius-sm);
  z-index: 100;
  transition: top var(--qd-duration-base) var(--qd-ease-standard);
}
.qd-skip-link:focus { top: var(--qd-space-4); }

/* ---- Buttons ----
   Sentence case, no letter-spacing shout — bold uppercase block buttons
   read as generic rental-fleet chrome (Avis/Hertz/Budget). Refined weight
   and a thin underline-style outline variant instead. */
.qd-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--qd-space-2);
  border: none;
  border-radius: var(--qd-radius-sm);
  padding: var(--qd-space-3) var(--qd-space-6);
  font-weight: var(--qd-fw-semibold);
  font-size: var(--qd-fs-sm);
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  overflow: hidden;
  transition: background-color var(--qd-duration-fast) var(--qd-ease-standard),
              color var(--qd-duration-fast) var(--qd-ease-standard),
              transform var(--qd-duration-fast) var(--qd-ease-standard);
}
.qd-btn:active { transform: translateY(1px); }
.qd-btn--primary {
  background: var(--qd-color-accent);
  color: var(--qd-white);
}
.qd-btn--primary:hover { background: var(--qd-color-accent-hover); }
.qd-btn--secondary { background: var(--qd-color-primary); color: var(--qd-white); }
.qd-btn--secondary:hover { background: var(--qd-color-primary-hover); }
.qd-btn--outline { background: transparent; color: var(--qd-color-primary); box-shadow: inset 0 0 0 1px var(--qd-color-border); }
.qd-btn--outline:hover { box-shadow: inset 0 0 0 1px var(--qd-color-primary); }
.qd-btn--block { width: 100%; }

/* Understated text link with an animating underline — used where a boxed
   button would add unwanted visual weight (editorial tiles, link rows). */
.qd-link-arrow {
  display: inline-flex;
  align-items: center;
  gap: var(--qd-space-2);
  color: var(--qd-color-primary);
  text-decoration: none;
  font-weight: var(--qd-fw-semibold);
  font-size: var(--qd-fs-sm);
  border-bottom: 1px solid var(--qd-color-border);
  padding-bottom: 2px;
  transition: border-color var(--qd-duration-fast) var(--qd-ease-standard), gap var(--qd-duration-base) var(--qd-ease-standard);
}
.qd-link-arrow:hover { border-color: var(--qd-color-primary); gap: var(--qd-space-3); }

/* ---- Alert bar ---- */
.qd-alert-bar {
  background: var(--qd-navy-900);
  color: var(--qd-white);
  font-size: var(--qd-fs-sm);
  text-align: center;
  padding: var(--qd-space-2) var(--qd-space-4);
}
.qd-alert-bar a { color: var(--qd-coral-400); font-weight: var(--qd-fw-semibold); text-decoration: underline; }

/* ---- Header ---- */
.qd-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--qd-navy-700);
  transition: box-shadow var(--qd-duration-base) var(--qd-ease-standard),
              border-color var(--qd-duration-base) var(--qd-ease-standard);
}
.qd-header.is-scrolled {
  border-color: transparent;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}
.qd-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--qd-header-height);
  gap: var(--qd-space-5);
  transition: height var(--qd-duration-base) var(--qd-ease-standard);
}
.qd-header.is-scrolled .qd-header__inner { height: 60px; }
.qd-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  white-space: nowrap;
  transition: transform var(--qd-duration-base) var(--qd-ease-standard);
}
.qd-logo img {
  height: 58px;
  width: auto;
  transition: height var(--qd-duration-base) var(--qd-ease-standard);
}
.qd-header.is-scrolled .qd-logo img { height: 46px; }

.qd-nav { display: none; }
.qd-nav__list {
  display: flex;
  gap: var(--qd-space-5);
  list-style: none;
  margin: 0; padding: 0;
}
.qd-nav__list a {
  position: relative;
  display: inline-block;
  padding-block: 4px;
  text-decoration: none;
  font-weight: var(--qd-fw-semibold);
  font-size: var(--qd-fs-sm);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--qd-grey-200);
  transition: color var(--qd-duration-fast) var(--qd-ease-standard);
}
.qd-nav__list a::after {
  content: '';
  position: absolute;
  left: 50%; right: 50%; bottom: 0;
  height: 2px;
  background: var(--qd-coral-500);
  transition: left var(--qd-duration-base) var(--qd-ease-premium), right var(--qd-duration-base) var(--qd-ease-premium);
}
.qd-nav__list a:hover { color: var(--qd-white); }
.qd-nav__list a:hover::after { left: 0; right: 0; }

.qd-header__actions { display: flex; align-items: center; gap: var(--qd-space-3); }
.qd-header__link {
  display: none;
  text-decoration: none;
  color: var(--qd-grey-200);
  font-size: var(--qd-fs-sm);
  font-weight: var(--qd-fw-medium);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}
.qd-header__link:hover { color: var(--qd-white); }
@media (min-width: 640px) { .qd-header__link { display: inline-block; } }

.qd-menu-toggle {
  display: inline-flex;
  background: none; border: none; cursor: pointer;
  padding: var(--qd-space-2);
  color: var(--qd-white);
}

@media (min-width: 1024px) {
  .qd-nav { display: block; }
  .qd-menu-toggle { display: none; }
}

/* ---- Hero (split layout, per brief §2) ---- */
/* ---- Hero ----
   Full-bleed single image with overlaid copy — not a split grid with a
   separate boxed/rounded "art panel" beside the text, which is the exact
   Avis/Hertz/Sixt homepage template pattern. The search widget lives in
   its own slim bar below, not floating as a white card on top of the
   image. min-height keeps this immersive without being a full 100vh
   wall on short mobile viewports. */
.qd-hero {
  position: relative;
  min-height: 78vh;
  display: flex;
  align-items: flex-end;
  color: var(--qd-white);
  overflow: hidden;
}
.qd-hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.qd-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.qd-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.35) 0%, rgba(10,10,10,0.1) 32%, rgba(10,10,10,0.92) 100%);
}
.qd-hero__grid {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-block: var(--qd-space-10) var(--qd-space-8);
  min-width: 0;
}
.qd-hero__copy { max-width: 640px; min-width: 0; }
.qd-hero__eyebrow {
  display: block;
  font-size: var(--qd-fs-xs);
  font-weight: var(--qd-fw-medium);
  letter-spacing: 0.08em;
  color: var(--qd-grey-300);
  margin-bottom: var(--qd-space-4);
}
.qd-hero__copy h1 {
  font-family: var(--qd-font-display);
  font-size: clamp(2.25rem, 1.7rem + 2.4vw, 3.75rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
  max-width: 14ch;
  overflow-wrap: break-word;
}
.qd-hero__copy h1 em {
  font-style: italic;
  font-weight: 500;
  color: var(--qd-coral-400);
}
.qd-hero__copy p {
  font-size: var(--qd-fs-md);
  color: var(--qd-grey-300);
  max-width: 46ch;
  line-height: var(--qd-lh-relaxed);
  margin-top: var(--qd-space-4);
}

/* Staggered word-by-word reveal, driven by JS wrapping each word in a span
   with an incrementing --i custom property. */
.qd-hero__copy h1 .qd-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.4em);
  animation: qd-word-in var(--qd-duration-slow) var(--qd-ease-premium) forwards;
  animation-delay: calc(var(--i, 0) * 60ms);
}
@keyframes qd-word-in {
  to { opacity: 1; transform: none; }
}

@keyframes qd-fade-slide-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Choreographed hero entrance: eyebrow, then headline words (see
   .qd-word above), then copy settles in after. */
.qd-hero__eyebrow { animation: qd-fade-slide-in var(--qd-duration-base) var(--qd-ease-premium) both; }
.qd-hero__copy > p { animation: qd-fade-slide-in var(--qd-duration-slow) var(--qd-ease-premium) 620ms both; }
.qd-hero__bg { animation: qd-hero-art-in 1100ms var(--qd-ease-premium) both; }
@keyframes qd-hero-art-in {
  from { opacity: 0; transform: scale(1.04); }
  to { opacity: 1; transform: none; }
}

/* ---- Search bar ----
   A slim, borderless horizontal strip docked below the hero — not a
   floating white card with pill tabs stacked on top of an image, which
   reads as generic rental-fleet chrome. Fields are underlined, not
   boxed, echoing an airline/hotel booking bar rather than a form widget. */
/* ---- Page hero (interior pages) ----
   Compact version of the homepage hero pattern: full-bleed image with a
   dark scrim and overlaid title, no boxed two-column art panel. */
.qd-page-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  color: var(--qd-white);
  overflow: hidden;
}
.qd-page-hero__bg { position: absolute; inset: 0; }
.qd-page-hero__bg img { width: 100%; height: 100%; object-fit: cover; }
.qd-page-hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10,10,10,0.25) 0%, rgba(10,10,10,0.15) 30%, rgba(10,10,10,0.9) 100%);
}
.qd-page-hero__body { position: relative; z-index: 1; width: 100%; padding-block: var(--qd-space-8); min-width: 0; }
.qd-page-hero__body h1 { font-family: var(--qd-font-display); font-weight: 500; font-size: var(--qd-fs-3xl); letter-spacing: -0.01em; max-width: 20ch; }
.qd-page-hero__body p { color: var(--qd-grey-300); max-width: 50ch; margin-top: var(--qd-space-3); }

.qd-search-bar-section { position: relative; z-index: 2; }
.qd-search {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: var(--qd-space-5) var(--qd-space-6);
  padding-block: var(--qd-space-5);
  border-bottom: 1px solid var(--qd-color-border);
  min-width: 0;
}
.qd-search__tabs {
  display: flex;
  gap: var(--qd-space-5);
  width: 100%;
  border-bottom: 1px solid var(--qd-color-border);
  padding-bottom: var(--qd-space-4);
  margin-bottom: var(--qd-space-1);
}
.qd-search__tab {
  border: none;
  background: none;
  padding: 0 0 var(--qd-space-2);
  font-weight: var(--qd-fw-semibold);
  font-size: var(--qd-fs-sm);
  cursor: pointer;
  color: var(--qd-color-text-muted);
  border-bottom: 2px solid transparent;
}
.qd-search__tab[aria-selected="true"] {
  color: var(--qd-color-text);
  border-bottom-color: var(--qd-color-accent);
}
.qd-search__grid {
  display: grid;
  gap: var(--qd-space-5) var(--qd-space-6);
  grid-template-columns: 1fr;
  flex: 1 1 100%;
  min-width: 0;
}
@media (min-width: 640px) {
  .qd-search__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .qd-search__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.qd-field { display: flex; flex-direction: column; gap: var(--qd-space-2); min-width: 0; }
.qd-field label { font-size: var(--qd-fs-xs); font-weight: var(--qd-fw-semibold); color: var(--qd-color-text-muted); }
.qd-field input, .qd-field select {
  width: 100%;
  min-width: 0;
  border: none;
  border-bottom: 1px solid var(--qd-color-border);
  border-radius: 0;
  padding: var(--qd-space-2) 0;
  font-size: var(--qd-fs-base);
  background: transparent;
  color: var(--qd-color-text);
}
.qd-field input:focus, .qd-field select:focus { border-bottom-color: var(--qd-color-primary); }
.qd-search__toggle-row {
  display: flex;
  align-items: center;
  gap: var(--qd-space-2);
  font-size: var(--qd-fs-sm);
  color: var(--qd-color-text-muted);
  flex: 1 1 100%;
}
.qd-duration-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--qd-space-2);
  flex: 1 1 100%;
}
.qd-duration-chip {
  border: 1px solid var(--qd-color-border);
  background: none;
  border-radius: var(--qd-radius-sm);
  padding: var(--qd-space-1) var(--qd-space-3);
  font-size: var(--qd-fs-xs);
  cursor: pointer;
  color: var(--qd-color-text-muted);
}
.qd-duration-chip[aria-pressed="true"] {
  border-color: var(--qd-color-accent);
  color: var(--qd-color-accent);
}
.qd-search__submit { flex: 0 0 auto; margin-left: auto; }

/* ---- Stat line ----
   The 3-locations / 8-models facts, as a single quiet inline row rather
   than a boxed 3-column stat-card strip (another instantly-recognizable
   template pattern). */
.qd-stat-line {
  display: flex;
  flex-wrap: wrap;
  gap: var(--qd-space-2) var(--qd-space-3);
  padding-block: var(--qd-space-5);
  font-size: var(--qd-fs-sm);
  color: var(--qd-color-text-muted);
}
.qd-stat-line strong { color: var(--qd-color-text); font-weight: var(--qd-fw-semibold); }
.qd-stat-line__sep { color: var(--qd-color-border); }

/* ---- Sections ---- */
.qd-section { padding-block: var(--qd-space-12); }
.qd-section--roomy { padding-block: var(--qd-space-16); }
.qd-section--subtle { background: var(--qd-color-bg-subtle); }
.qd-section__header { margin-bottom: var(--qd-space-8); max-width: 60ch; }
.qd-section__header h2 { font-size: var(--qd-fs-2xl); letter-spacing: -0.01em; }
.qd-section__header p { color: var(--qd-color-text-muted); font-size: var(--qd-fs-md); }

/* ---- Card grid (fleet catalog) ---- */
.qd-card-grid {
  display: grid;
  gap: var(--qd-space-5);
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.qd-card {
  background: var(--qd-color-bg);
  border: 1px solid var(--qd-color-border);
  border-radius: var(--qd-radius-lg);
  overflow: hidden;
  box-shadow: var(--qd-shadow-sm);
  min-width: 0;
  transition: transform var(--qd-duration-base) var(--qd-ease-standard), box-shadow var(--qd-duration-base) var(--qd-ease-standard), border-color var(--qd-duration-base) var(--qd-ease-standard);
}
.qd-card:hover { transform: translateY(-2px); box-shadow: var(--qd-shadow-md); border-color: var(--qd-grey-300); }
.qd-card:hover .qd-card__img img { transform: scale(1.05); }
.qd-card__img { aspect-ratio: 4 / 3; background: var(--qd-color-bg-subtle); overflow: hidden; }
.qd-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--qd-duration-slow) var(--qd-ease-standard); }
.qd-card__body { padding: var(--qd-space-4); }
.qd-card__eyebrow { font-size: var(--qd-fs-xs); font-weight: var(--qd-fw-medium); color: var(--qd-color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.qd-card__title { font-size: var(--qd-fs-md); margin-block: var(--qd-space-1); }
.qd-card__meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: var(--qd-space-3); }
.qd-card__price { font-family: var(--qd-font-heading); font-weight: var(--qd-fw-bold); color: var(--qd-color-primary); }
.qd-card__price small { font-weight: var(--qd-fw-regular); font-size: var(--qd-fs-xs); color: var(--qd-color-text-muted); }

/* ---- Editorial tile (promo) ----
   Borderless image + text, asymmetric proportions — not a pair of
   matching bordered/shadowed cards side by side. */
.qd-editorial {
  display: grid;
  gap: var(--qd-space-6);
  min-width: 0;
}
@media (min-width: 768px) {
  .qd-editorial { grid-template-columns: 1.3fr 1fr; align-items: center; }
  .qd-editorial--reverse { grid-template-columns: 1fr 1.3fr; }
  .qd-editorial--reverse .qd-editorial__img { order: 2; }
}
.qd-editorial__img { aspect-ratio: 4 / 3; overflow: hidden; background: var(--qd-color-bg-subtle); min-width: 0; }
.qd-editorial__img img { width: 100%; height: 100%; object-fit: cover; }
.qd-editorial__eyebrow { font-size: var(--qd-fs-xs); font-weight: var(--qd-fw-medium); color: var(--qd-color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.qd-editorial__title { font-family: var(--qd-font-display); font-size: var(--qd-fs-xl); font-weight: 500; margin-block: var(--qd-space-2) var(--qd-space-3); letter-spacing: -0.005em; }
.qd-editorial__body p { color: var(--qd-color-text-muted); max-width: 42ch; }

/* ---- Link row ----
   Plain text links in a row, divided by a hairline — not a repeat of
   the card-grid pattern already used for the fleet catalog above. */
.qd-link-row {
  display: grid;
  gap: var(--qd-space-8);
  grid-template-columns: 1fr;
}
@media (min-width: 768px) {
  .qd-link-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.qd-link-row__item {
  display: block;
  text-decoration: none;
  color: inherit;
  padding-top: var(--qd-space-5);
  border-top: 1px solid var(--qd-color-border);
  min-width: 0;
}
.qd-link-row__eyebrow { font-size: var(--qd-fs-xs); font-weight: var(--qd-fw-medium); color: var(--qd-color-text-muted); text-transform: uppercase; letter-spacing: 0.06em; }
.qd-link-row__title { font-family: var(--qd-font-display); font-size: var(--qd-fs-lg); font-weight: 500; margin-block: var(--qd-space-2) var(--qd-space-2); letter-spacing: -0.005em; }
.qd-link-row__item p { color: var(--qd-color-text-muted); font-size: var(--qd-fs-sm); margin-bottom: var(--qd-space-4); }

/* ---- Testimonial ----
   One large pull-quote at a time, not a grid of matching bordered cards. */
.qd-pull-quote {
  max-width: 62ch;
  margin-inline: auto;
  text-align: center;
}
.qd-pull-quote__quote {
  font-family: var(--qd-font-display);
  font-size: clamp(1.375rem, 1.15rem + 1vw, 1.875rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.qd-pull-quote__author {
  color: var(--qd-color-text-muted);
  font-size: var(--qd-fs-sm);
  margin-top: var(--qd-space-5);
}
.qd-quote-row {
  display: grid;
  gap: var(--qd-space-6);
  max-width: 62ch;
  margin: var(--qd-space-10) auto 0;
  padding-top: var(--qd-space-6);
  border-top: 1px solid var(--qd-color-border);
  font-size: var(--qd-fs-sm);
  color: var(--qd-color-text-muted);
  text-align: left;
}
@media (min-width: 640px) { .qd-quote-row { grid-template-columns: 1fr 1fr; } }
.qd-quote-row span { display: block; margin-top: var(--qd-space-2); font-size: var(--qd-fs-xs); text-transform: uppercase; letter-spacing: 0.05em; }

/* .qd-link-row__item can be a <div> (informational) or <a> (linked) —
   the anchor variant needs the reset plus a hover cue. */
a.qd-link-row__item:hover .qd-link-row__title { color: var(--qd-color-accent); }
a.qd-link-row__item .qd-link-arrow { pointer-events: none; }

/* ---- Footer ---- */
.qd-footer {
  background: var(--qd-navy-900);
  color: var(--qd-grey-300);
  padding-block: var(--qd-space-10) var(--qd-space-6);
}
.qd-footer__brand {
  display: flex;
  align-items: center;
  gap: var(--qd-space-3);
  margin-bottom: var(--qd-space-8);
  padding-bottom: var(--qd-space-8);
  border-bottom: 1px solid var(--qd-navy-700);
}
.qd-footer__brand-mark {
  height: 64px; width: auto;
  flex-shrink: 0;
}
.qd-footer__brand-tag {
  display: block;
  font-size: var(--qd-fs-xs);
  color: var(--qd-grey-500);
  margin-top: 2px;
}
.qd-footer__grid {
  display: grid;
  gap: var(--qd-space-6);
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}
.qd-footer h3 { color: var(--qd-white); font-size: var(--qd-fs-sm); text-transform: uppercase; letter-spacing: 0.04em; }
.qd-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--qd-space-2); }
.qd-footer a { text-decoration: none; color: var(--qd-grey-300); font-size: var(--qd-fs-sm); }
.qd-footer a:hover { color: var(--qd-white); }
.qd-footer__bottom {
  margin-top: var(--qd-space-8);
  padding-top: var(--qd-space-5);
  border-top: 1px solid var(--qd-navy-700);
  font-size: var(--qd-fs-xs);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--qd-space-3);
}

/* ---- Prose (CMS-driven static pages) ---- */
.qd-prose { line-height: var(--qd-lh-relaxed); }
.qd-prose h2 { font-size: var(--qd-fs-lg); margin-top: var(--qd-space-6); }
.qd-prose h3 { font-size: var(--qd-fs-md); margin-top: var(--qd-space-5); }
.qd-prose p { margin-bottom: var(--qd-space-4); }
.qd-prose ul { margin: 0 0 var(--qd-space-4); padding-left: var(--qd-space-5); }
.qd-prose li { margin-bottom: var(--qd-space-2); }
.qd-prose a { color: var(--qd-color-accent); }
.qd-prose strong { font-weight: var(--qd-fw-semibold); }

/* ---- Utility ---- */
.qd-grid-2 { display: grid; gap: var(--qd-space-5); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 768px) { .qd-grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }

/* Safety net for the CSS Grid overflow trap: grid items default to
   min-width:auto, so unbreakable content (long headline words, native
   date/select inputs) can force a track wider than the viewport. Found
   via a real overflow on the 375px hero. Applies broadly since the same
   trap can recur in any grid container. */
.qd-hero__grid, .qd-search__grid, .qd-card-grid, .qd-link-row, .qd-editorial, .qd-grid-2 { min-width: 0; }
.qd-hero__grid > *, .qd-search__grid > *, .qd-card-grid > *, .qd-link-row > *, .qd-editorial > *, .qd-grid-2 > * { min-width: 0; }

/* ---- Search summary bar (results page) ---- */
.qd-search-summary {
  position: sticky;
  top: var(--qd-header-height);
  z-index: 40;
  background: var(--qd-color-bg-subtle);
  border-bottom: 1px solid var(--qd-color-border);
}
.qd-search-summary__inner {
  display: flex;
  align-items: center;
  gap: var(--qd-space-5);
  padding-block: var(--qd-space-3);
  font-size: var(--qd-fs-sm);
}

/* ---- Results layout ---- */
.qd-results-layout {
  display: grid;
  gap: var(--qd-space-6);
  grid-template-columns: 1fr;
}
@media (min-width: 900px) {
  .qd-results-layout { grid-template-columns: 260px 1fr; }
}
.qd-filters {
  display: flex;
  flex-direction: column;
  gap: var(--qd-space-4);
  align-self: start;
}
@media (min-width: 900px) {
  .qd-filters {
    position: sticky;
    top: calc(var(--qd-header-height) + 60px);
    max-height: calc(100vh - var(--qd-header-height) - 80px);
    overflow-y: auto;
  }
}
.qd-results-grid {
  display: grid;
  gap: var(--qd-space-5);
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

/* ---- FAQ accordion ---- */
.qd-faq-item {
  background: var(--qd-color-bg);
  border: 1px solid var(--qd-color-border);
  border-radius: var(--qd-radius-md);
  padding: var(--qd-space-4);
  margin-bottom: var(--qd-space-3);
}
.qd-faq-item summary { font-weight: var(--qd-fw-semibold); cursor: pointer; }
.qd-faq-item p { margin-top: var(--qd-space-3); color: var(--qd-color-text-muted); }

/* ---- Vehicle detail ---- */
.qd-vehicle-detail {
  display: grid;
  gap: var(--qd-space-6);
  grid-template-columns: 1fr;
  padding-block: var(--qd-space-6);
}
@media (min-width: 900px) {
  .qd-vehicle-detail { grid-template-columns: 1.2fr 1fr; }
}
.qd-gallery-main { aspect-ratio: 4/3; border-radius: var(--qd-radius-lg); overflow: hidden; background: var(--qd-color-bg-subtle); }
.qd-gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.qd-gallery-thumbs { display: flex; gap: var(--qd-space-2); margin-top: var(--qd-space-3); }
.qd-gallery-thumb { width: 64px; height: 64px; border-radius: var(--qd-radius-sm); overflow: hidden; border: 1px solid var(--qd-color-border); padding: 0; cursor: pointer; background: none; }
.qd-gallery-thumb img { width: 100%; height: 100%; object-fit: cover; }

.qd-spec-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--qd-space-4); font-size: var(--qd-fs-sm); }

.qd-booking-panel { max-width: 760px; margin-inline: auto; display: flex; flex-direction: column; gap: var(--qd-space-5); }
.qd-booking-panel h2 { font-size: var(--qd-fs-lg); margin-top: var(--qd-space-5); }

/* ---- Protection tier cards ---- */
.qd-tier-grid { display: grid; gap: var(--qd-space-4); grid-template-columns: 1fr; }
@media (min-width: 720px) { .qd-tier-grid { grid-template-columns: repeat(3, 1fr); } }

.qd-tier-card {
  display: block;
  position: relative;
  border: 2px solid var(--qd-color-border);
  border-radius: var(--qd-radius-lg);
  padding: var(--qd-space-4);
  cursor: pointer;
  transition: border-color var(--qd-duration-fast) var(--qd-ease-standard);
}
.qd-tier-card.is-selected,
.qd-tier-card:has(input:checked) {
  border-color: var(--qd-color-accent);
  box-shadow: var(--qd-shadow-md);
}
.qd-tier-card__stars { color: var(--qd-amber-500); letter-spacing: 2px; }
.qd-tier-card__name { font-size: var(--qd-fs-md); margin-block: var(--qd-space-2) var(--qd-space-1); }
.qd-tier-card__badge {
  position: absolute; top: var(--qd-space-3); right: var(--qd-space-3);
  background: var(--qd-color-accent); color: var(--qd-white);
  border-radius: var(--qd-radius-pill); padding: 2px var(--qd-space-2);
  font-size: var(--qd-fs-xs); font-weight: var(--qd-fw-bold);
}
.qd-tier-card__price { font-size: var(--qd-fs-sm); margin-bottom: var(--qd-space-2); }
.qd-tier-card__price s { color: var(--qd-color-text-muted); margin-right: var(--qd-space-1); }
.qd-tier-card__included { color: var(--qd-color-success); font-weight: var(--qd-fw-semibold); }
.qd-tier-card__excess { font-size: var(--qd-fs-sm); font-weight: var(--qd-fw-semibold); margin-bottom: var(--qd-space-3); }
.qd-tier-card__no-excess { color: var(--qd-color-success); }
.qd-tier-card__checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--qd-space-2); font-size: var(--qd-fs-sm); }
.qd-tier-card__checklist li.is-included { color: var(--qd-color-text); }
.qd-tier-card__checklist li.is-excluded { color: var(--qd-color-text-muted); }
.qd-tooltip-icon { position: relative; margin-left: var(--qd-space-1); cursor: help; font-size: var(--qd-fs-xs); }
.qd-tooltip-bubble {
  display: none;
  position: absolute; bottom: 130%; left: 50%; transform: translateX(-50%);
  width: 200px; background: var(--qd-navy-900); color: var(--qd-white);
  padding: var(--qd-space-2) var(--qd-space-3); border-radius: var(--qd-radius-sm);
  font-size: var(--qd-fs-xs); z-index: 20;
}
.qd-tooltip-icon:hover .qd-tooltip-bubble,
.qd-tooltip-icon:focus .qd-tooltip-bubble { display: block; }

/* ---- Add-ons toggle list ---- */
.qd-addon-list { display: flex; flex-direction: column; gap: var(--qd-space-3); }
.qd-addon-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--qd-space-3);
  padding: var(--qd-space-3);
  border: 1px solid var(--qd-color-border);
  border-radius: var(--qd-radius-md);
}
.qd-addon-row__body { display: flex; flex-direction: column; }
.qd-addon-row__name { font-weight: var(--qd-fw-semibold); }
.qd-addon-row__price { font-size: var(--qd-fs-sm); color: var(--qd-color-text-muted); }
.qd-addon-row__details { grid-column: 1 / -1; font-size: var(--qd-fs-sm); color: var(--qd-color-text-muted); margin: 0; }
.qd-addon-row__qty { grid-column: 1 / -1; width: 5rem; }
.qd-details-link { background: none; border: none; color: var(--qd-color-primary); text-decoration: underline; cursor: pointer; font-size: var(--qd-fs-sm); }

.qd-toggle { display: inline-flex; }
.qd-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.qd-toggle__track {
  width: 42px; height: 24px; border-radius: var(--qd-radius-pill);
  background: var(--qd-grey-300); position: relative; display: inline-block;
  transition: background-color var(--qd-duration-fast) var(--qd-ease-standard);
}
.qd-toggle__thumb {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--qd-white);
  transition: transform var(--qd-duration-fast) var(--qd-ease-standard);
}
.qd-toggle input:checked + .qd-toggle__track { background: var(--qd-color-accent); }
.qd-toggle input:checked + .qd-toggle__track .qd-toggle__thumb { transform: translateX(18px); }
.qd-toggle input:focus-visible + .qd-toggle__track { outline: 3px solid var(--qd-color-focus-ring); outline-offset: 2px; }

/* ---- Price breakdown ---- */
.qd-price-breakdown {
  background: var(--qd-color-bg-subtle);
  border-radius: var(--qd-radius-lg);
  padding: var(--qd-space-4);
}
.qd-price-breakdown ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--qd-space-2); }
.qd-price-breakdown li { display: flex; justify-content: space-between; font-size: var(--qd-fs-sm); }
.qd-price-breakdown__total {
  display: flex; justify-content: space-between;
  font-family: var(--qd-font-heading); font-weight: var(--qd-fw-bold);
  font-size: var(--qd-fs-lg); margin-top: var(--qd-space-4);
  padding-top: var(--qd-space-3); border-top: 1px solid var(--qd-color-border);
  color: var(--qd-color-primary);
}

/* ---- Booking step indicator ---- */
.qd-steps {
  display: flex;
  list-style: none;
  margin: 0 0 var(--qd-space-8);
  padding: 0;
  max-width: 760px;
  margin-inline: auto;
}
.qd-steps__item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--qd-space-2);
  text-align: center;
  position: relative;
}
.qd-steps__item:not(:first-child)::before {
  content: '';
  position: absolute;
  top: 16px; left: -50%; width: 100%; height: 2px;
  background: var(--qd-color-border);
  z-index: 0;
}
.qd-steps__item.is-done:not(:first-child)::before,
.qd-steps__item.is-current:not(:first-child)::before {
  background: var(--qd-color-accent);
}
.qd-steps__dot {
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--qd-color-bg-subtle);
  border: 2px solid var(--qd-color-border);
  font-weight: var(--qd-fw-bold); font-size: var(--qd-fs-sm);
  color: var(--qd-color-text-muted);
  z-index: 1;
  transition: all var(--qd-duration-base) var(--qd-ease-standard);
}
.qd-steps__item.is-current .qd-steps__dot {
  background: var(--qd-color-accent);
  border-color: var(--qd-color-accent);
  color: var(--qd-white);
  transform: scale(1.1);
}
.qd-steps__item.is-done .qd-steps__dot {
  background: var(--qd-color-success);
  border-color: var(--qd-color-success);
  color: var(--qd-white);
}
.qd-steps__label {
  font-size: var(--qd-fs-xs);
  color: var(--qd-color-text-muted);
  font-weight: var(--qd-fw-medium);
}
.qd-steps__item.is-current .qd-steps__label { color: var(--qd-color-text); font-weight: var(--qd-fw-semibold); }

/* ---- Alerts ---- */
.qd-alert-error {
  background: #fdecec;
  border: 1px solid var(--qd-coral-400);
  color: var(--qd-coral-600);
  border-radius: var(--qd-radius-md);
  padding: var(--qd-space-4);
  margin-bottom: var(--qd-space-5);
  max-width: 760px;
  margin-inline: auto;
}
.qd-alert-error ul { margin: 0; padding-left: var(--qd-space-5); }

/* ---- Payment stub ---- */
.qd-payment-stub {
  background: var(--qd-color-bg-subtle);
  border: 1px dashed var(--qd-color-border);
  border-radius: var(--qd-radius-md);
  padding: var(--qd-space-4);
  font-size: var(--qd-fs-sm);
  color: var(--qd-color-text-muted);
}

/* ---- Confirmation ---- */
.qd-confirmation-check {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--qd-color-success); color: var(--qd-white);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--qd-fs-2xl); margin: 0 auto var(--qd-space-4);
  animation: qd-fade-slide-in var(--qd-duration-slow) var(--qd-ease-standard) both;
}
/* ---- Account / booking management ---- */
.qd-badge {
  display: inline-block;
  font-size: var(--qd-fs-xs);
  font-weight: var(--qd-fw-bold);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 2px var(--qd-space-2);
  border-radius: var(--qd-radius-sm);
  margin-left: var(--qd-space-2);
}
.qd-badge--confirmed { background: #e6f4ee; color: var(--qd-color-success); }
.qd-badge--pending { background: #fff4e0; color: var(--qd-amber-500); }
.qd-badge--cancelled { background: #f0f0f0; color: var(--qd-grey-500); }
.qd-badge--completed { background: #e6eefc; color: var(--qd-navy-800); }

.qd-booking-list { display: flex; flex-direction: column; gap: var(--qd-space-3); }
.qd-booking-list__item {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: var(--qd-space-3);
  padding: var(--qd-space-4);
  text-decoration: none;
  color: var(--qd-color-text);
}

.qd-confirmation-ref {
  font-family: var(--qd-font-heading);
  font-size: var(--qd-fs-2xl);
  font-weight: var(--qd-fw-bold);
  letter-spacing: 0.05em;
  color: var(--qd-color-accent);
}
