@tailwind base;
@tailwind components;
@tailwind utilities;

/* ---------- Reset & tokens ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font-ui);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
:root {
  --bg: #FAF8F4;
  --bg-2: #F2EFE8;
  --card: #FFFFFF;
  --ink: #121212;
  --ink-2: #2B2B2B;
  --muted: #6B6B66;
  --line: #E6E2D8;
  --line-2: #D9D4C6;
  --accent: oklch(0.72 0.14 70);
  --accent-ink: #1A1208;
  --accent-soft: oklch(0.94 0.04 80);
  --ok: oklch(0.68 0.14 155);
  --font-ui: 'Inter', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Inter Tight', 'Inter', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 0 rgba(18,18,18,0.04), 0 1px 2px rgba(18,18,18,0.04);
  --shadow-md: 0 2px 6px rgba(18,18,18,0.05), 0 12px 24px rgba(18,18,18,0.06);
  --container: 1240px;
}
[data-theme="dark"] {
  --bg: #0F0F0E;
  --bg-2: #171715;
  --card: #1B1B19;
  --ink: #F4F1EA;
  --ink-2: #E4E0D6;
  --muted: #9A968A;
  --line: #2A2A27;
  --line-2: #3A3934;
  --accent-soft: oklch(0.28 0.06 75);
  --accent-ink: #0B0804;
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; letter-spacing: -0.02em; font-weight: 500; }
h1 { font-size: clamp(44px, 7vw, 104px); line-height: 0.95; letter-spacing: -0.035em; font-weight: 450; }
h2 { font-size: clamp(32px, 4vw, 56px); line-height: 1.02; letter-spacing: -0.028em; }
h3 { font-size: 22px; line-height: 1.15; }
p { margin: 0; line-height: 1.55; color: var(--ink-2); }
.mono { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.02em; color: var(--muted); text-transform: uppercase; }
.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }

/* ---------- Layout ---------- */
.container-x { max-width: var(--container); margin: 0 auto; padding: 0 28px; }
.row { display: flex; gap: 24px; align-items: center; }
.grid { display: grid; gap: 24px; }

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(140%) blur(16px);
  -webkit-backdrop-filter: saturate(140%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 32px;
  height: 72px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-weight: 500; letter-spacing: -0.025em;
  font-size: 20px; color: var(--ink);
  text-decoration: none;
  line-height: 1;
}
.brand-mark {
  width: 96px; height: 56px;
  background: transparent; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-word { display: inline-block; transform: translateY(-1px); }

.nav-links {
  display: flex; gap: 4px; justify-self: center;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
}
.nav-link {
  font-size: 13.5px;
  color: var(--muted);
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 999px;
  transition: color .15s ease, background .15s ease;
  line-height: 1;
  display: inline-flex; align-items: center;
  background: transparent;
  border: 0;
  font-family: var(--font-ui);
  cursor: pointer;
}
.nav-link:hover { color: var(--ink); }
.nav-link.active { color: var(--ink); background: var(--card); box-shadow: var(--shadow-sm); }

.nav-right { display: flex; align-items: center; gap: 12px; }

.nav-phone {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  transition: border-color .15s ease, color .15s ease;
}
.nav-phone:hover { border-color: var(--ink); color: var(--ink); }
.pulse { position: relative; width: 8px; height: 8px; display: inline-block; }
.pulse > span {
  position: absolute; inset: 0;
  border-radius: 999px; background: var(--ok);
}
.pulse::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 999px; background: var(--ok); opacity: 0.35;
  animation: pulseRing 1.8s ease-out infinite;
}
@keyframes pulseRing {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1.6); opacity: 0; }
}

/* Hamburger — hidden on desktop, shown on mobile */
.nav-burger {
  display: none;
  width: 40px; height: 40px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--ink);
  padding: 0;
  flex-shrink: 0;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 41;
}
.nav-burger:hover { border-color: var(--ink); }
.nav-burger span {
  position: relative;
  width: 16px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, opacity .2s ease;
  pointer-events: none;
}
.nav-burger span::before,
.nav-burger span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 16px; height: 1.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s ease, top .2s ease;
}
.nav-burger span::before { top: -5px; }
.nav-burger span::after { top: 5px; }
.nav-burger.open span { background: transparent; }
.nav-burger.open span::before { top: 0; transform: rotate(45deg); }
.nav-burger.open span::after { top: 0; transform: rotate(-45deg); }

/* Mobile menu panel — hidden by default, full-screen overlay when open */
.mobile-menu {
  display: none;
  position: fixed;
  top: 72px; left: 0; right: 0; bottom: 0;
  height: calc(100vh - 72px);
  height: calc(100dvh - 72px);
  z-index: 39;
  background: var(--bg);
  padding: 24px 20px calc(32px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  flex-direction: column;
  gap: 4px;
  border-top: 1px solid var(--line);
}
.mobile-menu.open { display: flex; }
.mobile-menu a,
.mobile-menu button {
  display: flex; align-items: center;
  padding: 16px 18px;
  border-radius: 12px;
  font-size: 17px;
  color: var(--ink);
  text-decoration: none;
  background: transparent;
  border: 1px solid transparent;
  font-family: var(--font-ui);
  cursor: pointer;
  text-align: left;
  width: 100%;
  gap: 10px;
}
.mobile-menu a.active { background: var(--bg-2); border-color: var(--line); }
.mobile-menu .mm-divider {
  height: 1px; background: var(--line);
  margin: 12px 4px;
}
.mobile-menu .mm-phone {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-mono); font-size: 13px;
  color: var(--ink-2); padding: 12px 18px;
  text-decoration: none;
  letter-spacing: 0.04em;
}
.mobile-menu .btn { width: 100%; justify-content: center; margin-top: 8px; height: 52px; font-size: 15px; }

@media (max-width: 860px) {
  .nav-inner { grid-template-columns: auto 1fr auto; gap: 8px; }
  .nav-links { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-right { gap: 8px; }
  .nav-right .btn-primary.hide-sm,
  .nav-right .nav-phone.hide-sm { display: none !important; }
}
@media (max-width: 480px) {
  .mobile-menu {
    top: 60px;
    height: calc(100vh - 60px);
    height: calc(100dvh - 60px);
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 18px;
  border-radius: 999px; border: 1px solid transparent;
  font-family: var(--font-ui); font-size: 14px; font-weight: 500;
  line-height: 1;
  cursor: pointer; text-decoration: none;
  white-space: nowrap;
  transition: transform .08s ease, background .15s ease, color .15s ease, border-color .15s ease;
  background: transparent; color: var(--ink);
}
.btn svg { flex-shrink: 0; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.4; transform: none; }
.btn-primary { background: var(--ink); color: var(--bg); }
.btn-primary:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); }
.btn-ghost:hover { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: var(--accent-ink); }
.btn-lg { height: 52px; padding: 0 24px; font-size: 15px; }
.btn-sm { height: 34px; padding: 0 12px; font-size: 13px; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2); background: transparent; cursor: pointer;
  color: var(--ink);
}
.icon-btn:hover { border-color: var(--ink); }

/* ---------- Language menu + chips ---------- */
.lang-menu { position: relative; display: inline-flex; }
.lang-trigger {
  display: inline-flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg-2);
  color: var(--ink-2);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease, background .15s ease;
}
.lang-trigger:hover { border-color: var(--ink); color: var(--ink); }
.lang-trigger.open { border-color: var(--ink); color: var(--ink); background: var(--card); }
.lang-trigger .lang-current { line-height: 1; }
.lang-trigger .lang-caret {
  transition: transform .15s ease;
  opacity: 0.7;
}
.lang-trigger.open .lang-caret { transform: rotate(180deg); opacity: 1; }

.lang-popover {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 180px;
  list-style: none; margin: 0; padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  z-index: 50;
  animation: langMenuIn .12s ease-out;
}
@keyframes langMenuIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
.lang-option {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: 0; background: transparent;
  border-radius: 10px;
  cursor: pointer;
  color: var(--ink-2);
  text-align: left;
  font-family: var(--font-ui);
  font-size: 14px;
  transition: background .12s ease, color .12s ease;
}
.lang-option:hover { background: var(--bg-2); color: var(--ink); }
.lang-option.active { color: var(--ink); }
.lang-option .lang-short {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  min-width: 22px;
}
.lang-option.active .lang-short { color: var(--accent); }
.lang-option .lang-full { flex: 1; }
.lang-option svg:last-child { color: var(--accent); }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  height: 28px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--bg);
  font-size: 12px; color: var(--ink-2);
}
.chip .dot { width: 6px; height: 6px; border-radius: 999px; background: var(--ok); }

/* ---------- Inputs ---------- */
.field {
  display: flex; flex-direction: column; gap: 4px;
  padding: 14px 18px;
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); min-width: 0;
}
.field:focus-within { border-color: var(--ink); }
.field label {
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em;
  color: var(--muted); text-transform: uppercase;
}
.field input, .field select, .field textarea {
  border: 0; background: transparent; outline: none;
  font-family: var(--font-ui); font-size: 15px; color: var(--ink);
  padding: 2px 0; width: 100%;
}
.field input::placeholder { color: var(--muted); }

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--ink); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 96px;
  border-bottom: 1px solid var(--line);
  background-color: #0A0C10;
  background-image: var(--hero-img);
  background-size: cover;
  background-position: center 35%;
  overflow: hidden;
}
.hero > .container-x { position: relative; z-index: 2; }
.hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(10,12,16,0.55) 0%, rgba(10,12,16,0.75) 100%);
  z-index: 1;
}
.hero-grid {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: start;
}
@media (max-width: 960px) { .hero-grid { grid-template-columns: 1fr; } }

.hero-copy { color: #F6F3ED; }
.hero-copy h1 { color: #FFFFFF; }
.hero-copy .eyebrow { color: rgba(255,255,255,0.75); }
.hero h1 .amp { font-style: italic; font-family: 'Fraunces', serif; font-weight: 300; }
.hero-sub { max-width: 50ch; margin-top: 28px; color: rgba(255,255,255,0.82); font-size: 17px; }
.hero-stats { display: flex; gap: 36px; margin-top: 36px; flex-wrap: wrap; }
.hero-stats .stat .n { font-family: var(--font-display); font-size: 28px; letter-spacing: -0.02em; color: #FFFFFF; }
.hero-stats .stat .l { font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: 0.1em; }

.hero-tag {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  padding: 8px 12px; border-radius: 999px; font-size: 13px;
  color: #121212;
}
.hero-tag-inline { margin-top: 28px; }

/* Mobile hero — light background, dark text (overrides above) */
@media (max-width: 760px) {
  .hero {
    background-image: none;
    background-color: var(--bg);
  }
  .hero-overlay { display: none; }
  .hero-copy,
  .hero-copy h1 { color: var(--ink); }
  .hero-copy .eyebrow { color: var(--muted); }
  .hero-sub { color: var(--ink-2); }
  .hero-stats .stat .n { color: var(--ink); }
  .hero-stats .stat .l { color: var(--muted); }
}

/* ---------- Search card (hero booking widget) ---------- */
.search {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px -28px rgba(0,0,0,0.55), 0 6px 20px rgba(0,0,0,0.14);
  max-width: 520px;
  margin-left: auto;
  width: 100%;
  padding: 28px;
}
.search-head {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.search-head .eyebrow { margin-bottom: 10px; }
.search-head h3 {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--ink);
}
.search-body {
  display: flex; flex-direction: column; gap: 12px;
}
.search-row {
  display: grid; grid-template-columns: 1.4fr 0.9fr; gap: 12px;
}
.search .field {
  padding: 12px 16px;
}
.search-submit {
  width: 100%;
  justify-content: center;
  margin-top: 10px;
  height: 52px;
}

@media (max-width: 960px) {
  .search { max-width: 100%; margin-left: 0; padding: 24px; }
}
@media (max-width: 420px) {
  .search-row { grid-template-columns: 1fr; }
}

/* ---------- Sections ---------- */
.section { padding: 96px 0; border-bottom: 1px solid var(--line); }
.section-head {
  display: flex; align-items: end; justify-content: space-between;
  margin-bottom: 40px; gap: 24px; flex-wrap: wrap;
}
.section-head .t h2 { max-width: 16ch; }
.section-head .t p { margin-top: 12px; max-width: 46ch; }

/* ---------- Car card ---------- */
.car {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color .15s ease, transform .2s ease;
}
.car:hover { border-color: var(--ink); }
.car-img {
  aspect-ratio: 4/3;
  background: var(--bg-2) center/cover no-repeat;
  position: relative;
}
.car-img .badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--bg); color: var(--ink);
  font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em;
  padding: 6px 10px; border-radius: 999px;
  text-transform: uppercase;
}
.car-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 14px; }
.car-top { display: flex; justify-content: space-between; align-items: start; gap: 10px; }
.car-name { font-family: var(--font-display); font-size: 21px; letter-spacing: -0.02em; }
.car-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.car-price { text-align: right; }
.car-price .num { font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }
.car-price .per { color: var(--muted); font-size: 12px; font-family: var(--font-mono); }
.car-specs { display: flex; gap: 16px; flex-wrap: wrap; }
.car-specs .spec {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--ink-2);
}
.car-specs .spec svg { opacity: 0.7; }
.car-foot { display: flex; gap: 8px; margin-top: 4px; }

/* ---------- Filter rail ---------- */
.rail {
  position: sticky; top: 84px;
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; background: var(--card);
}
.rail h4 { font-family: var(--font-display); font-size: 16px; margin-bottom: 16px; letter-spacing: -0.01em; }
.rail .group { border-top: 1px solid var(--line); padding: 18px 0; }
.rail .group:first-of-type { border-top: 0; padding-top: 0; }
.rail .group .label { font-family: var(--font-mono); font-size: 11px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 12px; }
.check { display: flex; justify-content: space-between; align-items: center; font-size: 14px; padding: 6px 0; cursor: pointer; }
.check input { accent-color: var(--ink); }
.check .count { color: var(--muted); font-family: var(--font-mono); font-size: 12px; }

/* ---------- Booking flow ---------- */
.flow {
  display: grid; grid-template-columns: 1fr 380px; gap: 40px;
  padding: 40px 0 96px;
}
@media (max-width: 900px) { .flow { grid-template-columns: 1fr; } }
.steps {
  display: flex; gap: 0; margin-bottom: 32px;
  border: 1px solid var(--line); border-radius: 999px;
  padding: 4px; background: var(--card); width: fit-content;
  flex-wrap: wrap;
}
.step {
  padding: 8px 16px; font-size: 13px; color: var(--muted);
  border-radius: 999px; cursor: pointer; display: flex; align-items: center; gap: 8px;
  border: 0; background: transparent; font-family: var(--font-ui);
}
.step .n { font-family: var(--font-mono); }
.step.active { background: var(--ink); color: var(--bg); }
.step.done { color: var(--ink); }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 32px; }
.panel h2 { font-size: 30px; margin-bottom: 8px; }
.panel .intro { color: var(--muted); margin-bottom: 28px; }

.summary { position: sticky; top: 84px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 28px; }
.summary .car-row { display: flex; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.summary .car-row .img { width: 88px; height: 64px; border-radius: 10px; background-size: cover; background-position: center; flex-shrink: 0; }
.summary .line { display: flex; justify-content: space-between; padding: 8px 0; font-size: 14px; color: var(--ink-2); }
.summary .line.total { font-size: 18px; color: var(--ink); border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; font-family: var(--font-display); }

/* ---------- Extras ---------- */
.extras { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 700px) { .extras { grid-template-columns: 1fr; } }
.extra {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: border-color .12s ease, background .12s ease;
  background: var(--card);
}
.extra:hover { border-color: var(--ink); }
.extra.selected { border-color: var(--ink); background: var(--bg-2); }
.extra .label { font-weight: 500; font-size: 15px; }
.extra .desc { color: var(--muted); font-size: 13px; margin-top: 3px; }
.extra .price { font-family: var(--font-display); font-size: 16px; }

.radios { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
@media (max-width: 700px) { .radios { grid-template-columns: 1fr; } }
.radio {
  padding: 18px; border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; transition: all .12s ease; background: var(--card);
}
.radio:hover { border-color: var(--ink); }
.radio.selected { border-color: var(--ink); background: var(--bg-2); }
.radio .r-title { font-weight: 500; margin-bottom: 4px; }
.radio .r-price { font-family: var(--font-display); font-size: 18px; margin-top: 10px; }
.radio .r-desc { color: var(--muted); font-size: 12.5px; }

/* ---------- Car detail ---------- */
.detail-hero { display: grid; grid-template-columns: 1.4fr 1fr; gap: 24px; padding: 40px 0; }
@media (max-width: 900px) { .detail-hero { grid-template-columns: 1fr; } }
.detail-hero .big { aspect-ratio: 5/4; background-size: cover; background-position: center; border-radius: var(--radius-lg); }
.detail-hero .thumbs { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.detail-hero .thumbs .t { aspect-ratio: 4/3; background-size: cover; background-position: center; border-radius: var(--radius); }

.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--card); }
@media (max-width: 700px) { .spec-grid { grid-template-columns: 1fr 1fr; } }
.spec-grid .cell { padding: 22px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec-grid .cell:last-child { border-right: 0; }
.spec-grid .cell .l { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.spec-grid .cell .v { font-family: var(--font-display); font-size: 24px; margin-top: 8px; letter-spacing: -0.02em; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: var(--bg); padding: 72px 0 48px; }
.footer a { color: var(--bg); text-decoration: none; opacity: 0.75; font-size: 14px; }
.footer a:hover { opacity: 1; }
.footer h5 { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.14em; color: rgba(255,255,255,0.5); text-transform: uppercase; margin: 0 0 16px; font-weight: 500; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; }
.footer-brand { font-family: var(--font-display); font-size: 56px; letter-spacing: -0.03em; line-height: 1; margin-bottom: 24px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Misc ---------- */
.divider-line { height: 1px; background: var(--line); margin: 24px 0; }
.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }
.feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 40px; list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.feature-list li .k { color: var(--muted); font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; min-width: 110px; }

/* Marquee of destinations */
.marquee {
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 28px 0; overflow: hidden;
  display: flex; gap: 48px; font-family: var(--font-display); font-size: 28px;
  letter-spacing: -0.02em; color: var(--ink);
  white-space: nowrap;
}
.marquee-track { display: flex; gap: 48px; animation: scroll 38s linear infinite; flex-shrink: 0; }
.marquee-track .dot { color: var(--accent); }
@keyframes scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.how {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--card);
}
@media (max-width: 700px) { .how { grid-template-columns: 1fr; } }
.how .step-card { padding: 36px 32px; border-right: 1px solid var(--line); }
.how .step-card:last-child { border-right: 0; }
.how .step-card .num { font-family: var(--font-display); font-size: 48px; color: var(--accent); letter-spacing: -0.03em; line-height: 1; }
.how .step-card h3 { margin: 20px 0 10px; font-family: var(--font-display); font-size: 22px; letter-spacing: -0.02em; }

/* utility */
.hide-sm { display: inline-flex; }
@media (max-width: 700px) { .hide-sm { display: none; } }
.spacer-lg { height: 96px; }

/* ---------- Admin shell ---------- */
.admin-shell { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar { background: #121212; color: #E8E5DB; padding: 24px 18px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; }
.sidebar .brand { color: #fff; font-size: 20px; margin-bottom: 32px; }
.sidebar .brand-mark { background: transparent; color: var(--accent); }
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.side-nav a, .side-nav button { background: transparent; border: 0; color: rgba(255,255,255,0.65); text-align: left; padding: 10px 12px; border-radius: 10px; cursor: pointer; font-family: var(--font-ui); font-size: 14px; display: flex; align-items: center; gap: 10px; text-decoration: none; }
.side-nav a:hover, .side-nav button:hover { background: rgba(255,255,255,0.06); color: #fff; }
.side-nav a.active, .side-nav button.active { background: rgba(255,255,255,0.1); color: #fff; }
.side-foot { padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.1); font-family: var(--font-mono); font-size: 11px; color: rgba(255,255,255,0.45); letter-spacing: 0.08em; }
.admin-main { padding: 32px 40px 80px; max-width: 1400px; background: #F4F2EC; min-height: 100vh; }
.admin-main h1 { font-size: 40px; letter-spacing: -0.03em; }
.admin-topbar { display: flex; justify-content: space-between; align-items: end; margin-bottom: 28px; gap: 24px; flex-wrap: wrap; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 32px; }
@media (max-width: 1000px) { .kpis { grid-template-columns: 1fr 1fr; } }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 20px 22px; }
.kpi .l { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.kpi .v { font-family: var(--font-display); font-size: 38px; letter-spacing: -0.025em; margin-top: 10px; }
.kpi .d { font-size: 12px; color: var(--muted); margin-top: 6px; font-family: var(--font-mono); }
.kpi .d .up { color: oklch(0.62 0.14 155); }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.table-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.table-head h3 { font-family: var(--font-display); font-size: 18px; letter-spacing: -0.01em; }
.admin-main table { width: 100%; border-collapse: collapse; }
.admin-main th { text-align: left; padding: 12px 22px; background: #FAF8F3; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line); font-weight: 500; }
.admin-main td { padding: 16px 22px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.admin-main tr:last-child td { border-bottom: 0; }
.admin-main tr.clickable:hover td { background: #FAF8F3; cursor: pointer; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-family: var(--font-mono); letter-spacing: 0.04em; border: 1px solid var(--line); }
.pill.pending { background: #FFF7E6; border-color: #F5D99A; color: #7A5A0F; }
.pill.confirmed { background: #E8F5EA; border-color: #BADFC1; color: #1F5A2B; }
.pill.cancelled { background: #FBE9E9; border-color: #E9B5B5; color: #7A1E1E; }
.pill .dot { width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.thumb { width: 52px; height: 36px; border-radius: 6px; background-size: cover; background-position: center; flex-shrink: 0; }
.row-car { display: flex; align-items: center; gap: 12px; }
.row-car .name { font-weight: 500; font-size: 14px; }
.row-car .sub { font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.id-mono { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.ibtn { height: 28px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: 12px; cursor: pointer; font-family: var(--font-ui); color: var(--ink); }
.ibtn:hover { border-color: var(--ink); }
.ibtn.danger:hover { border-color: #C43B3B; color: #C43B3B; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 520px; max-width: 95vw; background: #fff; border-left: 1px solid var(--line); box-shadow: -20px 0 40px rgba(0,0,0,0.08); padding: 28px 32px; overflow-y: auto; transform: translateX(100%); transition: transform .24s ease; z-index: 100; }
.drawer.open { transform: translateX(0); }
.drawer h2 { font-size: 26px; letter-spacing: -0.02em; }
.drawer .close { position: absolute; top: 20px; right: 20px; width: 32px; height: 32px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; }
.kv { display: grid; grid-template-columns: 130px 1fr; gap: 10px 20px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.kv .k { font-family: var(--font-mono); font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; padding-top: 2px; }

.import-box { border: 1.5px dashed var(--line-2); border-radius: 14px; padding: 28px; background: #fff; text-align: center; margin-bottom: 20px; }
.import-box p { color: var(--muted); font-size: 13px; margin-top: 8px; font-family: var(--font-mono); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); font-size: 14px; }

.modal-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.3); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 20px; }
.modal { background: #fff; border-radius: 16px; width: 560px; max-width: 100%; padding: 28px 32px; max-height: 88vh; overflow-y: auto; }
.modal h3 { font-size: 22px; margin-bottom: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.form-grid .field { padding: 10px 14px; }

@media (max-width: 760px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    height: auto;
    padding: 12px 14px;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }
  .sidebar .brand { margin-bottom: 0; font-size: 17px; margin-right: auto; }
  .side-nav {
    flex-direction: row;
    overflow-x: auto;
    gap: 4px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    flex: initial;
    order: 2;
    width: 100%;
    padding-bottom: 2px;
  }
  .side-nav::-webkit-scrollbar { display: none; }
  .side-nav a, .side-nav button {
    padding: 8px 12px;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 999px;
    flex-shrink: 0;
  }
  .side-foot {
    order: 3;
    width: auto;
    padding-top: 0;
    border-top: 0;
    display: inline-flex;
    gap: 10px;
    align-items: center;
  }
  .side-foot br { display: none; }
  .side-foot form { display: inline; }
  .admin-main { padding: 20px 16px 60px; }
  .admin-main h1 { font-size: 28px; }
}

/* ---------- Admin tables — compact + card view on small screens ---------- */
@media (max-width: 900px) {
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .admin-main th, .admin-main td { padding: 12px 14px; font-size: 13px; }
  .admin-main table { min-width: 640px; }
}
/* Card-style rows on true mobile */
@media (max-width: 640px) {
  .admin-main table.cards { min-width: 0; }
  .admin-main table.cards,
  .admin-main table.cards tbody,
  .admin-main table.cards tr,
  .admin-main table.cards td { display: block; width: 100%; }
  .admin-main table.cards thead { display: none; }
  .admin-main table.cards tr { border-bottom: 1px solid var(--line); padding: 14px 16px; cursor: pointer; }
  .admin-main table.cards tr:last-child { border-bottom: 0; }
  .admin-main table.cards td {
    border: 0 !important;
    padding: 4px 0 !important;
    text-align: left !important;
  }
  .admin-main table.cards td[data-label]::before {
    content: attr(data-label);
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    min-width: 88px;
    margin-right: 10px;
  }
  .admin-main table.cards td.card-primary {
    padding: 0 0 8px !important;
    font-family: var(--font-display);
    font-size: 16px;
    color: var(--ink);
  }
  .admin-main table.cards td.card-primary::before { display: none; }
  .admin-main table.cards td.row-actions {
    display: flex !important;
    gap: 8px;
    padding: 10px 0 0 !important;
    text-align: left !important;
  }
  .admin-main table.cards td.row-actions::before { display: none; }
  .admin-main table.cards td.row-actions .ibtn { flex: 1; height: 34px; padding: 0 12px; }
  .admin-main .table-head { padding: 14px 16px; flex-wrap: wrap; }
}

/* ---------- Admin KPI grid responsive ---------- */
@media (max-width: 720px) {
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 24px; }
  .kpi { padding: 16px; }
  .kpi .v { font-size: 28px; }
}
@media (max-width: 420px) {
  .kpis { grid-template-columns: 1fr; }
}

/* ---------- Admin topbar stacks buttons below heading ---------- */
@media (max-width: 640px) {
  .admin-topbar { flex-direction: column; align-items: stretch; gap: 14px; }
  .admin-topbar > div:first-child h1 { font-size: 26px; }
  .admin-topbar > div:last-child { display: flex; gap: 8px; flex-wrap: wrap; }
  .admin-topbar input.ibtn { width: 100% !important; }
  .admin-topbar select.ibtn { flex: 1; }
  .admin-topbar .btn { flex: 1; justify-content: center; }
}

/* ---------- Admin modal / drawer on mobile ---------- */
@media (max-width: 640px) {
  .drawer { width: 100%; max-width: 100%; padding: 20px 16px 80px; }
  .drawer h2 { font-size: 22px; }
  .kv { grid-template-columns: 110px 1fr; gap: 6px 12px; padding: 10px 0; font-size: 13px; }
  .modal-bg { padding: 0; align-items: flex-end; }
  .modal { width: 100%; max-width: 100%; border-radius: 16px 16px 0 0; padding: 20px 18px 28px; max-height: 92vh; }
  .form-grid { grid-template-columns: 1fr; gap: 10px; }
}

/* ---------- Admin settings form grid responsive ---------- */
@media (max-width: 520px) {
  .table-wrap .form-grid { grid-template-columns: 1fr; }
}

/* ---------- Booking step pill: show only numbers on mobile ---------- */
.step-label { margin-left: 6px; }
@media (max-width: 640px) {
  .step-label { display: none; }
  .step { padding: 8px 12px; }
  .step.active { padding: 8px 14px; }
  .step.active .step-label { display: inline; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .step .n { font-weight: 500; }
}

/* ---------- Booking flow layout refinements for mobile ---------- */
@media (max-width: 900px) {
  .flow { display: flex; flex-direction: column; gap: 20px; padding: 24px 0 120px; }
  .summary { position: static; padding: 20px; order: 0; }
  .summary .car-row { padding-bottom: 14px; margin-bottom: 14px; }
  .summary .line { font-size: 13px; padding: 6px 0; }
  .summary .line.total { font-size: 17px; }
}

/* Sticky action bar on mobile for booking flow + fleet page */
.mobile-cta-bar {
  display: none;
}
@media (max-width: 640px) {
  .mobile-cta-bar {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 50;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background: color-mix(in oklab, var(--bg) 92%, transparent);
    backdrop-filter: saturate(140%) blur(16px);
    -webkit-backdrop-filter: saturate(140%) blur(16px);
    border-top: 1px solid var(--line);
    gap: 10px;
    align-items: center;
  }
  .mobile-cta-bar .total {
    flex: 1;
    font-family: var(--font-display);
    font-size: 20px;
    letter-spacing: -0.02em;
  }
  .mobile-cta-bar .total .label {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.1em;
    color: var(--muted);
    text-transform: uppercase;
  }
  .mobile-cta-bar .btn { flex: 0 0 auto; }
  .flow { padding-bottom: 180px; }
}

/* Confirmation panel breathing room on mobile */
@media (max-width: 640px) {
  .confirmation-panel { padding: 28px 20px !important; }
  .confirmation-panel h2 { font-size: 26px; }
}

/* Detail page wrapper */
.detail-page { padding-top: 32px; padding-bottom: 96px; }
@media (max-width: 700px) {
  .detail-page { padding-top: 20px; padding-bottom: 64px; }
}

/* Detail page — header + price block stack on mobile */
.detail-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  color: var(--ink);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 24px;
}
.detail-back:hover { border-color: var(--ink); }
.detail-bottom { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; margin-top: 56px; }
.detail-included-card {
  padding: 28px;
  background: var(--bg-2);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

@media (max-width: 900px) {
  .detail-bottom { grid-template-columns: 1fr; gap: 28px; margin-top: 32px; }
}

@media (max-width: 700px) {
  .detail-header-row { flex-direction: column !important; align-items: stretch !important; gap: 14px !important; margin-bottom: 20px !important; }
  .detail-header-row .price-block { text-align: left !important; }
  .detail-header-row .price-block .btn { width: 100%; }
  .detail-back { height: 44px; padding: 0 16px; font-size: 14px; margin-bottom: 18px; }
  .detail-spec-wrap { margin: 24px 0 !important; }
  .detail-hero .big { aspect-ratio: 4/3; }
  .detail-included-card { padding: 22px; }
  .feature-list { grid-template-columns: 1fr !important; gap: 0 !important; }
  .feature-list li { padding: 12px 0; }
  .feature-list li .k { min-width: 42px; }
}
@media (max-width: 420px) {
  .detail-header-row h1 { font-size: clamp(30px, 8vw, 44px) !important; line-height: 1.05 !important; }
}

/* Car card footer buttons — keep side-by-side, taller + balanced on mobile */
@media (max-width: 640px) {
  .car-foot { gap: 10px; }
  .car-foot .btn {
    height: 48px;
    font-size: 14.5px;
    padding: 0 14px;
    flex: 1 1 0;
    min-width: 0;
  }
}
@media (max-width: 360px) {
  .car-foot .btn { font-size: 13.5px; padding: 0 10px; }
}

/* Extras + insurance radios stack nicely */
@media (max-width: 520px) {
  .radios { gap: 10px; }
  .extras { gap: 10px; }
  .extra { padding: 14px; }
  .radio { padding: 14px; }
}

/* ---------- Responsive grid utilities ---------- */
.grid-3 { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1000px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px)  { .grid-3 { grid-template-columns: 1fr; } }

.grid-2 { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px)  { .grid-2 { grid-template-columns: 1fr; } }

.form-row-2 { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; }
@media (max-width: 520px) { .form-row-2 { grid-template-columns: 1fr; } }

.locations-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: 56px; align-items: start; }
@media (max-width: 900px) {
  .locations-wrap { grid-template-columns: 1fr; gap: 32px; }
}

.locations-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0; list-style: none; padding: 0; margin: 0; }
@media (max-width: 520px) {
  .locations-list { grid-template-columns: 1fr; }
}
.locations-list li { padding: 18px 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 14px; font-size: 16px; }
.locations-list li .num { font-family: var(--font-mono); font-size: 12px; color: var(--muted); width: 28px; flex-shrink: 0; }

.map-wrap {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: stretch;
}
.map-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
}
.map-frame iframe { width: 100%; height: 100%; }
.map-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--card);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
@media (max-width: 900px) {
  .map-wrap { grid-template-columns: 1fr; }
  .map-frame { aspect-ratio: 4 / 3; }
}

.cta-box {
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--radius-lg);
  padding: 72px 56px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  align-items: end;
}
@media (max-width: 900px) {
  .cta-box { grid-template-columns: 1fr; padding: 48px 28px; gap: 28px; }
}
@media (max-width: 520px) {
  .cta-box { padding: 36px 22px; border-radius: var(--radius); }
}

/* ---------- Mobile refinements for existing blocks ---------- */
@media (max-width: 700px) {
  .section { padding: 56px 0; }
  .how .step-card { padding: 28px 22px; }
  .how .step-card .num { font-size: 36px; }
  .hero { padding: 40px 0 36px; }
  .hero-sub { font-size: 15.5px; }
  .hero-stats { gap: 20px 24px; margin-top: 24px; }
  .hero-stats .stat .n { font-size: 24px; }
  .hero-tag { font-size: 12px; padding: 6px 10px; }
  .container-x { padding: 0 20px; }
  .section-head { margin-bottom: 28px; }
  h1 { font-size: clamp(38px, 9vw, 72px) !important; }
  h2 { font-size: clamp(28px, 7vw, 44px); }
  .panel { padding: 22px; }
  .panel h2 { font-size: 24px; }
  .footer { padding: 56px 0 40px; }
  .footer-grid { gap: 32px; }
  .footer-brand { font-size: 40px; margin-bottom: 16px; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
}

/* Search card — tighten padding on small mobile */
@media (max-width: 560px) {
  .search { padding: 20px; }
  .search-head { padding-bottom: 16px; margin-bottom: 16px; }
  .search-head h3 { font-size: 22px; }
}

/* Car card internals — prevent name/price overlap on narrow widths */
.car-top { flex-wrap: wrap; }
.car-name { font-size: 19px; line-height: 1.15; }
@media (max-width: 420px) {
  .car-body { padding: 18px 18px 20px; }
  .car-name { font-size: 20px; }
  .car-specs { gap: 12px; }
}

/* Fleet page — filter rail + car grid responsive */
@media (max-width: 900px) {
  .fleet-grid { grid-template-columns: 1fr !important; gap: 24px !important; }
  .rail { position: static !important; }
}

/* Step pill in booking flow — let it wrap without overflowing */
@media (max-width: 640px) {
  .steps { width: 100%; flex-wrap: wrap; }
  .step { font-size: 12px; padding: 6px 10px; }
  .flow { padding: 24px 0 72px; gap: 24px; }
  .summary { padding: 20px; }
}

/* Nav — tighten on narrow screens */
@media (max-width: 480px) {
  .nav-inner { height: 60px; gap: 8px; }
  .brand { font-size: 17px; }
  .brand-mark { transform: scale(0.88); }
  .lang-trigger { height: 32px; padding: 0 10px; font-size: 11px; }
  .icon-btn { width: 32px; height: 32px; }
}

/* Spec grid — 2-col on mobile already set, tighten cell padding */
@media (max-width: 700px) {
  .spec-grid .cell { padding: 16px; }
  .spec-grid .cell .v { font-size: 20px; }
}

/* Detail hero — already stacks at 900px, tighten heading */
@media (max-width: 700px) {
  .detail-hero { gap: 16px; padding: 24px 0; }
  .detail-hero .thumbs { gap: 10px; }
}

/* Make sure nothing horizontally overflows the viewport */
html, body { overflow-x: hidden; max-width: 100%; }

/* ---------- Mobile filter drawer (fleet page) ---------- */
.filter-toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-ui);
  font-size: 14px;
  color: var(--ink);
  cursor: pointer;
  margin-bottom: 16px;
}
.filter-toggle .count {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.08em;
}
.filter-scrim {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 90;
  animation: fadeIn .18s ease;
}
.filter-scrim.open { display: block; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 900px) {
  .filter-toggle { display: flex; }
  .rail.rail-mobile {
    position: fixed !important;
    left: 0; right: 0; bottom: 0; top: auto;
    z-index: 91;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    max-height: 86vh;
    overflow-y: auto;
    padding: 20px 20px calc(28px + env(safe-area-inset-bottom, 0px));
    transform: translateY(100%);
    transition: transform .28s ease;
    box-shadow: 0 -20px 50px rgba(0,0,0,0.12);
    display: block;
  }
  .rail.rail-mobile.open { transform: translateY(0); }
  .rail.rail-mobile:not(.open) { display: none; }
  .rail-close {
    display: flex !important;
    width: 100%;
    justify-content: center;
    padding: 16px 0 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
  }
  .rail-close::before {
    content: "";
    width: 40px; height: 4px;
    border-radius: 999px;
    background: var(--line-2);
  }
}
.rail-close { display: none; }

/* ---------- Detail price block — responsive font ---------- */
.price-block .price-num {
  font-family: var(--font-display);
  font-size: clamp(36px, 7vw, 48px);
  letter-spacing: -0.03em;
  line-height: 1;
}
.price-block .btn { margin-top: 18px; }
@media (max-width: 700px) {
  .price-block .btn { margin-top: 14px; }
}

/* Detail "About" heading responsive */
.detail-about-h { font-size: clamp(26px, 5vw, 36px); letter-spacing: -0.025em; }

/* ---------- Booking flow — selected car preview responsive ---------- */
.booking-preview {
  display: flex;
  gap: 20px;
  padding: 20px;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--bg-2);
  flex-wrap: wrap;
  align-items: stretch;
}
.booking-preview .img {
  width: 160px;
  aspect-ratio: 4/3;
  border-radius: 10px;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.booking-preview .meta { flex: 1 1 200px; min-width: 0; }
.booking-preview .name {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.02em;
  margin: 4px 0;
  line-height: 1.1;
}
.booking-preview .specs {
  display: flex; gap: 14px;
  color: var(--muted); font-size: 13px;
  flex-wrap: wrap;
}
.booking-preview .price {
  text-align: right;
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.02em;
  line-height: 1;
}
@media (max-width: 560px) {
  .booking-preview { gap: 14px; padding: 16px; }
  .booking-preview .img { width: 100%; max-width: none; aspect-ratio: 16/10; }
  .booking-preview .meta { flex: 1 1 auto; }
  .booking-preview .name { font-size: 22px; }
  .booking-preview .price { text-align: left; font-size: 26px; }
}

/* ---------- Marquee — reduce on mobile ---------- */
@media (max-width: 700px) {
  .marquee { font-size: 22px; padding: 20px 0; gap: 28px; }
  .marquee-track { gap: 28px; }
  .marquee-track > span { gap: 28px !important; }
}

/* ---------- Confirmation info rows — stack on very narrow phones ---------- */
@media (max-width: 420px) {
  .confirmation-info { padding: 18px !important; }
  .confirmation-info .info-row {
    flex-direction: column !important;
    gap: 2px !important;
    align-items: flex-start !important;
    padding: 4px 0;
  }
  .confirmation-info .info-row + .info-row { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
}

/* ---------- Fleet page category pill row — horizontal scroll on mobile ---------- */
@media (max-width: 640px) {
  .pill-row {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 6px;
    margin-left: -20px;
    margin-right: -20px;
    padding-left: 20px;
    padding-right: 20px;
  }
  .pill-row::-webkit-scrollbar { display: none; }
  .pill-row .btn { flex-shrink: 0; }
}

/* ---------- Fleet sort select wraps correctly ---------- */
@media (max-width: 560px) {
  .fleet-topbar { width: 100%; }
  .fleet-topbar select { flex: 1; min-width: 0; }
}

/* ---------- Booking preview 'change car' link touch-friendly ---------- */
.booking-preview .btn-sm { min-height: 36px; }

/* ---------- Ensure tap targets on select elements ---------- */
select, input, textarea, button { font-family: inherit; }
@media (max-width: 640px) {
  .field input, .field select, .field textarea { font-size: 16px; } /* prevent iOS zoom */
}


/* PHP-build additions */
[hidden] { display: none !important; }
.radio.selected { border-color: var(--ink); background: var(--bg-2); }
.extra.selected { border-color: var(--ink); background: var(--bg-2); }
.lang-pop { list-style: none; }

.field-invalid input,
.field-invalid select,
input.field-invalid,
select.field-invalid { border-color: #C0392B !important; background: #FBE9E9; }
.field.field-invalid label { color: #C0392B; }

.agree-wrap { margin-top: 20px; }
.agree-label { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; color: var(--ink-2); cursor: pointer; padding: 10px 12px; border: 1px solid transparent; border-radius: 8px; transition: border-color .15s, background .15s; }
.agree-label input[type="checkbox"] { margin-top: 3px; flex-shrink: 0; width: 16px; height: 16px; cursor: pointer; }
.agree-wrap.field-invalid .agree-label { border-color: #C0392B; background: #FBE9E9; color: #7A1E1E; }
.agree-wrap.field-invalid .agree-label input[type="checkbox"] { outline: 2px solid #C0392B; outline-offset: 2px; }
.agree-error { margin-top: 8px; padding: 8px 12px; color: #7A1E1E; background: #FBE9E9; border: 1px solid #E9B5B5; border-radius: 6px; font-size: 13px; }

.date-range { display: flex; flex-direction: column; gap: 10px; }
.date-range .date-field { display: flex; flex-direction: column; gap: 4px; }
.date-range .date-field span { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.date-range .date-field input[type="date"] { width: 100%; padding: 9px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; background: var(--bg); color: var(--ink); font-family: inherit; line-height: 1.2; min-height: 38px; box-sizing: border-box; }
.date-range .date-field input[type="date"]:focus { outline: none; border-color: var(--ink); }
.date-range .date-field input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: 0.6; padding: 0; }
.date-range .date-field input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.date-clear { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); padding-bottom: 1px; }
.date-clear:hover { color: var(--ink); border-bottom-color: var(--ink); }

/* =========================================================
   Mobile refinements (additive — overrides earlier rules)
   ========================================================= */

/* Hero tag — readable on mobile light hero (white tag would vanish on cream bg) */
@media (max-width: 760px) {
  .hero-tag {
    background: var(--card);
    border: 1px solid var(--line);
    color: var(--ink);
    backdrop-filter: none;
  }
}

/* Language popover — never overflow viewport on small screens */
@media (max-width: 480px) {
  .lang-popover {
    right: 0;
    left: auto;
    min-width: 0;
    width: max-content;
    max-width: calc(100vw - 24px);
  }
}

/* Nav — extra tightening on very narrow phones */
@media (max-width: 380px) {
  .nav-inner { gap: 6px; }
  .brand-mark { width: 72px; height: 44px; transform: none; }
  .brand-word { font-size: 15px; }
  .lang-trigger { padding: 0 8px; gap: 6px; }
  .lang-trigger .lang-current { font-size: 10.5px; }
  .nav-burger { width: 36px; height: 36px; }
  .icon-btn { width: 32px; height: 32px; }
  .nav-right { gap: 6px; }
}

/* Search card — keep date+time paired down to 380px (was unpaired below 420) */
@media (max-width: 420px) and (min-width: 381px) {
  .search-row { grid-template-columns: 1.2fr 1fr; gap: 10px; }
  .search .field { padding: 10px 12px; }
}
@media (max-width: 420px) {
  .search-body { gap: 10px; }
  .search-submit { height: 50px; }
}

/* Search card field sizing — make labels readable + select tap-friendly */
@media (max-width: 640px) {
  .search .field label { font-size: 10px; }
  .search .field select, .search .field input { font-size: 16px; }
}

/* Mobile menu — close affordance + safe scroll */
.mobile-menu { -webkit-overflow-scrolling: touch; }
.mobile-menu a:active,
.mobile-menu button:active { background: var(--bg-2); }

/* Booking flow — dedup CTA on mobile (cta-bar covers next/submit) */
@media (max-width: 640px) {
  .panel-actions { gap: 0 !important; justify-content: flex-start !important; margin-top: 24px !important; }
  .panel-actions [data-next],
  .panel-actions [data-submit] { display: none !important; }
  .panel-actions [data-back] { width: 100%; justify-content: center; height: 48px; }
}

/* Detail page thumbs — horizontal scroll on mobile (cleaner than wrap) */
@media (max-width: 640px) {
  .detail-thumbs {
    flex-wrap: nowrap !important;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-left: -20px;
    margin-right: -20px;
    padding: 4px 20px 8px;
    scroll-snap-type: x mandatory;
  }
  .detail-thumbs::-webkit-scrollbar { display: none; }
  .detail-thumb {
    width: 96px !important;
    height: 64px !important;
    flex-shrink: 0;
    scroll-snap-align: start;
  }
}

/* Confirmation page — tighter vertical rhythm on mobile */
@media (max-width: 640px) {
  .confirmation-panel + * { display: none; }
}
@media (max-width: 640px) {
  .container-x.confirmation-wrap,
  body .panel.confirmation-panel { /* placeholder for specificity */ }
}

/* Admin sidebar — clean side-foot on mobile (was running together) */
@media (max-width: 760px) {
  .side-foot { font-size: 10.5px; gap: 8px; align-items: center; white-space: nowrap; }
  .side-foot .side-foot-user { display: none; }
  .side-foot a { font-size: 11px; margin-top: 0 !important; padding: 6px 10px; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; text-decoration: none !important; }
  .side-foot form button { padding: 6px 10px; border: 1px solid rgba(255,255,255,0.18) !important; border-radius: 999px; text-decoration: none !important; margin-top: 0 !important; }
}

/* Admin topbar form — full width search on mobile */
@media (max-width: 640px) {
  .admin-topbar form { width: 100%; gap: 8px !important; }
  .admin-topbar form input[name="q"] { width: 100% !important; flex: 1 1 100%; min-width: 0; }
  .admin-topbar form select { flex: 1 1 auto; }
  .admin-topbar form .btn { flex: 1 1 auto; }
}

/* Admin import box — better mobile padding */
@media (max-width: 640px) {
  .import-box { padding: 18px 14px; }
  .import-box p { font-size: 11.5px; line-height: 1.4; }
}

/* Admin modal form gallery — keep thumbs from getting too small */
@media (max-width: 480px) {
  .modal #gallery > div { width: 96px !important; height: 64px !important; }
  .modal #imgInput { font-size: 14px; min-width: 0 !important; }
}

/* Locations image card — restrict height so it doesn't dominate viewport */
@media (max-width: 700px) {
  #loc .locations-wrap > div:first-child > div[style*="aspect-ratio"] {
    aspect-ratio: 16/10 !important;
    margin-top: 20px !important;
  }
}

/* Map card — better stacked rhythm on mobile */
@media (max-width: 640px) {
  .map-card { padding: 22px; }
  .map-card h3 { font-size: 19px !important; }
  .map-card .btn { width: 100%; justify-content: center; }
}

/* Locations delivery card — reduce top spacer on mobile */
@media (max-width: 700px) {
  .locations-wrap > div:last-child > div[style*="border-radius:var(--radius-lg)"] {
    margin-top: 24px !important;
    padding: 22px !important;
  }
}

/* Hero stats — never let labels wrap awkwardly */
@media (max-width: 480px) {
  .hero-stats { gap: 18px 22px; margin-top: 20px; }
  .hero-stats .stat .n { font-size: 22px; }
  .hero-stats .stat .l { font-size: 10px; letter-spacing: 0.08em; }
}

/* Section heading "see all" button stays full-width when wrapped */
@media (max-width: 640px) {
  .section-head { gap: 16px; }
  .section-head > a.btn { width: 100%; justify-content: center; }
}

/* Fleet detail header — price block tightens on extra-small phones */
@media (max-width: 380px) {
  .detail-header-row .price-num { font-size: 32px !important; }
  .detail-header-row { gap: 10px !important; }
}

/* Booking summary on mobile — compact car preview */
@media (max-width: 640px) {
  .summary .car-row { gap: 10px; }
  .summary .car-row .img { width: 72px; height: 52px; }
  .summary > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
}

/* Booking driver flight field — span single col cleanly on tiny phones */
@media (max-width: 520px) {
  .form-row-2 > .field[style*="grid-column"] { grid-column: 1 / -1 !important; }
}

/* Form fields — bigger tap targets on touch */
@media (max-width: 640px) {
  .field { padding: 12px 14px; }
  .field input, .field select, .field textarea { padding: 4px 0; min-height: 28px; }
  .date-range .date-field input[type="date"] { min-height: 44px; padding: 10px 12px; font-size: 16px; }
}

/* Filter rail mobile — submit button sticks at bottom for easy reach */
@media (max-width: 900px) {
  .rail.rail-mobile form { padding-bottom: 12px; }
  .rail.rail-mobile button[type="submit"] { height: 50px; font-size: 15px; }
}

/* Footer — tidy two-col -> one-col with brand on top */
@media (max-width: 480px) {
  .footer-brand { font-size: 32px; }
  .footer h5 { font-size: 10.5px; margin-bottom: 12px; }
  .footer-grid { gap: 28px; }
}

/* Marquee — tighter on very small screens */
@media (max-width: 480px) {
  .marquee { font-size: 18px; padding: 16px 0; gap: 22px; }
  .marquee-track { gap: 22px; }
  .marquee-track > span { gap: 22px !important; }
}

/* Mobile CTA bar — protect against tall iOS keyboards (safe-area already handled) */
@media (max-width: 640px) {
  .mobile-cta-bar .total { font-size: 18px; }
  .mobile-cta-bar .btn { height: 46px; padding: 0 16px; font-size: 14px; }
}

/* Step pill — center-align scroll on mobile and prevent overflow */
@media (max-width: 640px) {
  .steps {
    overflow-x: auto;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    width: 100%;
  }
  .steps::-webkit-scrollbar { display: none; }
  .step { flex-shrink: 0; }
}

/* Booking preview — cleaner price column on tighter widths */
@media (max-width: 480px) {
  .booking-preview .price { font-size: 24px; align-self: flex-start; }
  .booking-preview .meta .name { font-size: 20px; }
}

/* CTA box (home) — heading line height + button full-width */
@media (max-width: 520px) {
  .cta-box .btn-accent { width: 100%; justify-content: center; }
}

/* Reduce padding on confirmation top wrapper at mobile */
@media (max-width: 700px) {
  .container-x[style*="max-width:720px"] { padding-top: 32px !important; padding-bottom: 64px !important; }
}

/* Prevent iOS auto-zoom on remaining inputs */
@media (max-width: 640px) {
  input[type="email"], input[type="tel"], input[type="text"],
  input[type="password"], input[type="number"], input[type="search"],
  textarea { font-size: 16px !important; }
}

/* Admin drawer focus card — tighten inner padding on mobile */
@media (max-width: 640px) {
  #focus[class*="drawer"] { padding: 22px 18px !important; }
  #focus h2 { font-size: 22px !important; }
  #focus .row-car { padding: 12px !important; }
  #focus .row-car .name { font-size: 15px !important; }
}

/* Admin booking action buttons — full width on tight phones */
@media (max-width: 480px) {
  #focus form .btn,
  #focus form .ibtn { width: 100%; justify-content: center; }
  #focus > div[style*="display:flex"][style*="margin-top:24px"] form { width: 100%; }
}

/* Settings form — full width on mobile */
@media (max-width: 640px) {
  form.table-wrap[style*="max-width"] { padding: 18px !important; max-width: 100% !important; }
  form.table-wrap .form-grid { grid-template-columns: 1fr !important; }
}
