/* Whale Autos design tokens ------------------------------------------- */
:root {
  --navy: #0a2540;
  --navy-deep: #061a30;
  --ink: #1e2b3a;
  --muted: #5b6b7c;
  --line: #e3e9ef;
  --bg: #ffffff;
  --bg-tint: #f4f7fa;
  --accent: #2e9edc;        /* whale blue */
  --accent-dark: #1f7fb5;
  --amber: #f0a93b;          /* price highlight */
  --radius: 12px;
  --shadow: 0 2px 16px rgba(10, 37, 64, .08);
  --font-head: "Manrope", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  /* RTL 预留：阶段二阿语版切换 direction 即可 */
  --dir: ltr;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  direction: var(--dir);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
h1, h2, h3 { font-family: var(--font-head); color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); font-weight: 800; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 700; margin-bottom: .8em; }
h3 { font-size: 1.1rem; font-weight: 700; }

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 800px; }
.section { padding: 64px 0; }
.section-tint { background: var(--bg-tint); }

/* Header ----------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-head); font-weight: 800; font-size: 1.25rem; color: var(--navy); }
.brand em, .footer-brand em { font-style: normal; color: var(--accent); }
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a { color: var(--ink); font-weight: 500; }
.site-nav a:hover { color: var(--accent-dark); }
.nav-cta { background: var(--navy); color: #fff !important; padding: 8px 18px; border-radius: 999px; }
.nav-toggle { display: none; font-size: 1.4rem; background: none; border: 0; color: var(--navy); }

/* Hero --------------------------------------------------------------------*/
.hero {
  background:
    radial-gradient(1100px 480px at 80% -10%, rgba(46,158,220,.25), transparent 60%),
    radial-gradient(700px 380px at 10% 110%, rgba(46,158,220,.12), transparent 60%),
    var(--navy-deep);
  color: #d8e4ee; padding: 84px 0 64px;
}
.hero h1 { color: #fff; margin: 12px 0 16px; }
.hero-kicker { text-transform: uppercase; letter-spacing: .18em; font-size: .8rem; color: var(--accent); font-weight: 600; }
.hero-sub { max-width: 620px; font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; margin: 28px 0 36px; flex-wrap: wrap; }
.hero-facts { display: flex; gap: 40px; list-style: none; padding: 0; flex-wrap: wrap; }
.hero-facts li { display: grid; }
.hero-facts strong { color: #fff; font-family: var(--font-head); font-size: 1.05rem; }
.hero-facts span { font-size: .85rem; color: #9fb3c4; }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-block; padding: 12px 26px; border-radius: 999px;
  font-weight: 600; font-family: var(--font-head); transition: .15s;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-ghost { border: 1.5px solid currentColor; color: inherit; }
.btn-block { display: block; text-align: center; margin-top: 12px; }

/* Cards -------------------------------------------------------------------*/
.section-head { display: flex; justify-content: space-between; align-items: baseline; }
.link-more { font-weight: 600; }
.card-grid {
  display: grid; gap: 24px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  margin-top: 24px;
}
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; color: inherit; transition: .15s;
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.card-photo { position: relative; aspect-ratio: 4/3; overflow: hidden; }
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card-badge {
  position: absolute; top: 10px; inset-inline-start: 10px;
  background: rgba(6,26,48,.78); color: #fff; font-size: .72rem;
  padding: 3px 9px; border-radius: 6px; letter-spacing: .04em;
}
.card-body { padding: 16px 18px 18px; }
.card-body h3 { font-size: 1.05rem; }
.card-version { font-size: .85rem; color: var(--muted); margin: 2px 0 10px; min-height: 2.6em; }
.card-specs { display: flex; gap: 10px; list-style: none; padding: 0; flex-wrap: wrap; font-size: .78rem; color: var(--muted); }
.card-specs li { background: var(--bg-tint); padding: 2px 8px; border-radius: 5px; }
.card-price { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; }
.card-price span { font-family: var(--font-head); font-weight: 800; font-size: 1.15rem; color: var(--navy); font-variant-numeric: tabular-nums; }
.card-price em { font-style: normal; font-size: .75rem; color: var(--muted); }

/* Steps / checklist ---------------------------------------------------------*/
.steps { list-style: none; padding: 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps-vertical { grid-template-columns: 1fr; }
.steps li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.steps strong { font-family: var(--font-head); color: var(--navy); display: block; margin-bottom: 8px; }
.steps p { font-size: .92rem; color: var(--muted); }
.checklist { list-style: none; padding: 0; display: grid; gap: 14px; }
.checklist li { padding-inline-start: 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; inset-inline-start: 0; color: var(--accent); font-weight: 700; }

/* Trust / CTA ----------------------------------------------------------------*/
.trust-grid { display: grid; gap: 40px; grid-template-columns: 1.6fr 1fr; align-items: start; }
.cta-panel {
  background: var(--navy); color: #c9d8e4; border-radius: var(--radius);
  padding: 28px; position: sticky; top: 90px;
}
.cta-panel h3 { color: #fff; margin-bottom: 8px; }
.cta-panel .btn { margin-top: 16px; }
.cta-wide { position: static; margin-top: 40px; }

/* Page head -------------------------------------------------------------------*/
.page-head { background: var(--bg-tint); padding: 48px 0 36px; border-bottom: 1px solid var(--line); }
.page-head p { color: var(--muted); margin-top: 6px; }
.page-head-slim { padding: 32px 0 24px; }
.crumbs { font-size: .82rem; color: var(--muted); margin-bottom: 6px; }
.vehicle-version { color: var(--muted); }

/* Vehicle page ------------------------------------------------------------------*/
.vehicle-layout { display: grid; gap: 36px; grid-template-columns: 1.5fr 1fr; align-items: start; }
.gallery img#mainPhoto { border-radius: var(--radius); }
.thumbs { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 8px; }
.thumbs img { border-radius: 6px; cursor: pointer; aspect-ratio: 4/3; object-fit: cover; border: 2px solid transparent; }
.thumbs img:hover { border-color: var(--accent); }
.price-tag {
  font-family: var(--font-head); font-weight: 800; font-size: 1.9rem; color: var(--navy);
  display: grid; margin-bottom: 16px; font-variant-numeric: tabular-nums;
}
.price-tag span { font-size: .8rem; font-weight: 500; color: var(--muted); font-family: var(--font-body); }
.spec-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.spec-table th, .spec-table td { text-align: start; padding: 9px 4px; border-bottom: 1px solid var(--line); }
.spec-table th { color: var(--muted); font-weight: 500; width: 42%; }
.condition { margin: 18px 0; background: var(--bg-tint); border-radius: var(--radius); padding: 16px 18px; }
.condition p { font-size: .92rem; }
.fine-print { font-size: .76rem; color: var(--muted); margin-top: 14px; }

/* How to buy / FAQ -----------------------------------------------------------------*/
.terms-table { margin-bottom: 40px; }
.faq details { border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; }
.faq summary { font-weight: 600; font-family: var(--font-head); color: var(--navy); cursor: pointer; }
.faq p { margin-top: 10px; color: var(--muted); font-size: .94rem; }
.prose p { margin-bottom: 1em; }
.prose h2 { margin-top: 1.6em; }

/* Contact ----------------------------------------------------------------------------*/
.contact-layout { display: grid; gap: 48px; grid-template-columns: 1fr 1.2fr; align-items: start; }
.contact-alt { margin-top: 18px; color: var(--muted); }
.inquiry-form { background: var(--bg-tint); border-radius: var(--radius); padding: 28px; display: grid; gap: 14px; }
.inquiry-form label { display: grid; gap: 6px; font-size: .88rem; font-weight: 500; color: var(--navy); }
.inquiry-form input, .inquiry-form select, .inquiry-form textarea {
  font: inherit; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
}
.inquiry-form button { border: 0; cursor: pointer; font-size: 1rem; }

/* Footer ------------------------------------------------------------------------------*/
.site-footer { background: var(--navy-deep); color: #9fb3c4; margin-top: 64px; padding: 48px 0 24px; font-size: .9rem; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: 2fr 1fr 1.4fr; }
.footer-brand { font-family: var(--font-head); font-weight: 800; font-size: 1.2rem; color: #fff; margin-bottom: 8px; }
.footer-head { color: #fff; font-weight: 600; margin-bottom: 8px; }
.site-footer a { display: block; color: #9fb3c4; padding: 3px 0; }
.site-footer a:hover { color: #fff; }
.footer-legal { border-top: 1px solid rgba(255,255,255,.12); margin-top: 36px; padding-top: 18px; font-size: .78rem; }

/* WhatsApp float -----------------------------------------------------------------------*/
.wa-float {
  position: fixed; bottom: 22px; inset-inline-end: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25d366; color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 18px rgba(0,0,0,.25); transition: .15s;
}
.wa-float:hover { transform: scale(1.06); }

/* Guides -----------------------------------------------------------------------------*/
.guide-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); margin-bottom: 40px; }
.guide-card {
  display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; color: inherit; transition: .15s;
}
.guide-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.guide-card h3 { margin: 6px 0 10px; }
.guide-card p { color: var(--muted); font-size: .94rem; }
.guide-card .link-more { display: inline-block; margin-top: 14px; }
.guide-tag {
  display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-dark); background: var(--bg-tint);
  padding: 3px 10px; border-radius: 999px;
}
.guide-article h2 { margin-top: 1.8em; }
.guide-steps { padding-inline-start: 0; list-style: none; counter-reset: gstep; display: grid; gap: 14px; margin: 1em 0; }
.guide-steps li { background: var(--bg-tint); border-radius: 10px; padding: 16px 18px; font-size: .96rem; }
.guide-article .checklist { margin: 1em 0; }
.guide-article .faq { margin-top: 1em; }
.guide-article .cta-panel { margin-top: 48px; }
.guide-article > .fine-print { margin-top: 28px; }

/* Gallery counter ---------------------------------------------------------------------*/
.gallery-main { position: relative; }
.gallery-main img { border-radius: var(--radius); cursor: pointer; }
.gallery-count {
  position: absolute; bottom: 12px; inset-inline-end: 12px;
  background: rgba(6,26,48,.72); color: #fff; font-size: .78rem;
  padding: 3px 10px; border-radius: 999px; font-variant-numeric: tabular-nums;
}

/* Footer languages ----------------------------------------------------------------------*/
.footer-langs { margin-top: 14px; }
.footer-langs a { display: inline !important; padding: 0 2px !important; }

/* RTL (Arabic) ----------------------------------------------------------------------------*/
[dir="rtl"] .hero-kicker { letter-spacing: 0; }
[dir="rtl"] h1, [dir="rtl"] h2, [dir="rtl"] h3 { line-height: 1.45; }
[dir="rtl"] body, [dir="rtl"] .hero-sub, [dir="rtl"] .steps p { line-height: 1.85; }
[dir="rtl"] .card-version { min-height: auto; }

/* Responsive ------------------------------------------------------------------------------*/
@media (max-width: 860px) {
  .trust-grid, .vehicle-layout, .contact-layout, .footer-grid { grid-template-columns: 1fr; }
  .site-nav {
    display: none; position: absolute; top: 64px; left: 0; right: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    flex-direction: column; padding: 16px 20px; gap: 14px;
  }
  .site-nav.open { display: flex; }
  .nav-toggle { display: block; }
  .thumbs { grid-template-columns: repeat(4, 1fr); }
  .cta-panel { position: static; }
}
