/* ==========================================================================
   Xin Che Hang · xchehang.com — shared stylesheet
   Single CSS for all 6 pages (Home, About, Inventory, How We Work, Markets, Contact)
   ========================================================================== */

:root {
  --c-navy: #0B2545;
  --c-navy-2: #13315C;
  --c-gold: #C9A961;
  --c-gold-soft: #E9D8A6;
  --c-cream: #F8F5EC;
  --c-bg: #FFFFFF;
  --c-bg-soft: #F4F6F9;
  --c-border: #E5E7EB;
  --c-text: #1B2330;
  --c-muted: #6B7280;
  --c-success: #1F8A4C;
  --c-danger: #C0392B;
  --shadow-sm: 0 2px 6px rgba(11, 37, 69, .06);
  --shadow-md: 0 8px 24px rgba(11, 37, 69, .10);
  --shadow-lg: 0 18px 40px rgba(11, 37, 69, .14);
  --radius: 10px;
  --radius-lg: 16px;
  --container: 1200px;
  --header-h: 72px;
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Inter", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--c-navy); text-decoration: none; transition: color .15s var(--ease); }
a:hover { color: var(--c-gold); }
button { font-family: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-weight: 700; color: var(--c-navy); line-height: 1.2; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; color: var(--c-text); }
.muted { color: var(--c-muted); }
.eyebrow {
  display: inline-block;
  font-size: .82rem;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--c-gold);
  margin-bottom: .6em;
}

/* ===== Layout ===== */
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.section { padding: 72px 0; }
.section--soft { background: var(--c-bg-soft); }
.section--dark { background: var(--c-navy); color: #E6EAF0; }
.section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #C9D1DC; }
.section-title { text-align: center; max-width: 760px; margin: 0 auto 48px; }
.section-title p { color: var(--c-muted); }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.nav {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; color: var(--c-navy); font-size: 1.05rem; letter-spacing: .02em;
}
.brand-mark {
  width: 44px; height: 44px;
  background: url('../img/logo.svg') center/contain no-repeat;
  display: inline-block;
  font-size: 0; color: transparent;
  text-indent: -9999px; overflow: hidden;
}
.brand-name { display: inline-block; }
.brand-name span { color: var(--c-gold); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a {
  font-weight: 500; color: var(--c-text); font-size: .95rem;
  padding: 6px 0; border-bottom: 2px solid transparent;
}
.nav-links a.active, .nav-links a:hover { color: var(--c-navy); border-bottom-color: var(--c-gold); }
.nav-cta {
  background: var(--c-navy); color: #fff !important; padding: 10px 18px;
  border-radius: 999px; font-weight: 600; font-size: .9rem;
  display: inline-flex; align-items: center; gap: 8px;
  transition: transform .15s var(--ease), background .15s var(--ease);
}
.nav-cta:hover { background: var(--c-gold); color: var(--c-navy) !important; transform: translateY(-1px); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--c-navy); margin: 5px 0; transition: .25s var(--ease); }
@media (max-width: 900px) {
  .nav-links { display: none; position: absolute; top: var(--header-h); left: 0; right: 0;
    background: #fff; flex-direction: column; gap: 0; padding: 12px 24px 20px;
    border-bottom: 1px solid var(--c-border); box-shadow: var(--shadow-md); }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--c-border); }
  .nav-toggle { display: block; }
}

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; border: 0; transition: all .15s var(--ease);
}
.btn--primary { background: var(--c-navy); color: #fff; }
.btn--primary:hover { background: var(--c-gold); color: var(--c-navy); transform: translateY(-1px); }
.btn--gold { background: var(--c-gold); color: var(--c-navy); }
.btn--gold:hover { background: var(--c-navy); color: #fff; transform: translateY(-1px); }
.btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.4); }
.btn--ghost:hover { background: rgba(255,255,255,.1); }
.btn--outline { background: #fff; color: var(--c-navy); border: 1px solid var(--c-border); }
.btn--outline:hover { border-color: var(--c-gold); color: var(--c-gold); }
.btn--block { width: 100%; justify-content: center; }

/* ===== Hero ===== */
.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #0B2545 0%, #13315C 60%, #1c4475 100%);
  color: #fff;
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(1200px 600px at 80% -10%, rgba(201,169,97,.18), transparent 60%),
              radial-gradient(800px 400px at 10% 110%, rgba(201,169,97,.10), transparent 60%);
}
.hero-inner {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center;
  padding: 96px 0 88px; position: relative; z-index: 1;
}
.hero h1 { color: #fff; }
.hero h1 span { color: var(--c-gold); }
.hero p.lead { color: #DCE3EE; font-size: 1.12rem; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 24px; }
.hero-trust {
  margin-top: 32px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12);
  display: flex; gap: 28px; flex-wrap: wrap;
}
.hero-trust div { display: flex; align-items: center; gap: 8px; color: #C9D1DC; font-size: .92rem; }
.hero-trust .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c-gold); }
.hero-visual { position: relative; }
.hero-visual img {
  width: 100%; height: auto; border-radius: 14px;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,.35));
  object-fit: cover; aspect-ratio: 4/3;
  border: 1px solid rgba(255,255,255,.12);
}
@media (max-width: 900px) { .hero-inner { grid-template-columns: 1fr; gap: 32px; padding: 64px 0 56px; } }

/* ===== Stats ===== */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 28px; text-align: center; transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-gold-soft); }
.stat .num { font-size: 2.2rem; font-weight: 800; color: var(--c-navy); display: block; letter-spacing: -.02em; }
.stat .num small { color: var(--c-gold); font-size: 1.1rem; margin-left: 2px; }
.stat .label { color: var(--c-muted); font-size: .92rem; margin-top: 6px; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ===== Cards / Grids ===== */
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr; } .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 28px; transition: all .2s var(--ease);
}
.card:hover { box-shadow: var(--shadow-md); border-color: var(--c-gold-soft); transform: translateY(-2px); }
.card .icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--c-cream); color: var(--c-navy);
  display: grid; place-items: center; margin-bottom: 16px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--c-muted); font-size: .96rem; }

.feature-list { list-style: none; padding: 0; margin: 0; }
.feature-list li { display: flex; gap: 12px; padding: 10px 0; align-items: flex-start; }
.feature-list li .tick {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: var(--c-gold); color: #fff; display: grid; place-items: center;
  font-size: .8rem; font-weight: 700;
}

/* ===== Tags ===== */
.tag {
  display: inline-block; padding: 4px 10px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; background: var(--c-cream); color: var(--c-navy);
  margin: 0 4px 4px 0;
}
.tag--gold { background: var(--c-gold); color: var(--c-navy); }
.tag--green { background: #E8F6EE; color: var(--c-success); }
.tag--blue { background: #E8F0FB; color: var(--c-navy-2); }

/* ===== Inventory Page ===== */
.inventory-toolbar {
  display: grid; grid-template-columns: repeat(4, 1fr) auto; gap: 12px;
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 18px; margin-bottom: 32px; box-shadow: var(--shadow-sm);
}
.inventory-toolbar select, .inventory-toolbar input {
  height: 44px; padding: 0 14px; border: 1px solid var(--c-border); border-radius: 8px;
  font-size: .92rem; background: #fff; color: var(--c-text); outline: none;
  font-family: inherit;
}
.inventory-toolbar select:focus, .inventory-toolbar input:focus { border-color: var(--c-gold); }
.inventory-toolbar .btn { height: 44px; }
@media (max-width: 900px) { .inventory-toolbar { grid-template-columns: 1fr 1fr; } }

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

.car-card {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  overflow: hidden; transition: all .2s var(--ease); display: flex; flex-direction: column;
}
.car-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--c-gold-soft); }
.car-card .img {
  aspect-ratio: 16/10; background: linear-gradient(135deg, #1B3A6B 0%, #2C5282 100%);
  position: relative; overflow: hidden;
}
.car-card .img svg { width: 100%; height: 100%; }
.car-card .badge {
  position: absolute; top: 12px; left: 12px;
  background: rgba(11,37,69,.85); color: #fff; padding: 4px 10px;
  border-radius: 999px; font-size: .75rem; font-weight: 600;
}
.car-card .body { padding: 18px 20px 20px; flex: 1; display: flex; flex-direction: column; }
.car-card h3 { margin: 0 0 4px; font-size: 1.1rem; }
.car-card .sub { color: var(--c-muted); font-size: .85rem; margin-bottom: 14px; }
.car-card .specs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; font-size: .86rem; color: var(--c-muted); margin-bottom: 16px; }
.car-card .specs span b { color: var(--c-text); font-weight: 600; }
.car-card .price { display: flex; justify-content: space-between; align-items: baseline; padding-top: 14px; border-top: 1px solid var(--c-border); }
.car-card .price .p { font-weight: 800; color: var(--c-navy); font-size: 1.15rem; }
.car-card .price .c { font-size: .75rem; color: var(--c-muted); }

/* ===== Process Steps ===== */
.steps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; position: relative; }
@media (max-width: 900px) { .steps { grid-template-columns: repeat(2, 1fr); } }
.step {
  background: #fff; border-radius: var(--radius-lg); padding: 24px;
  text-align: center; border: 1px solid var(--c-border); position: relative;
  transition: all .2s var(--ease);
}
.step:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.step .num {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--c-navy); color: var(--c-gold);
  display: grid; place-items: center; font-weight: 800; margin: 0 auto 14px;
  font-size: 1.1rem;
}
.step h4 { margin: 0 0 6px; font-size: 1rem; }
.step p { font-size: .88rem; color: var(--c-muted); margin: 0; }

/* ===== Markets ===== */
.market-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .market-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .market-grid { grid-template-columns: 1fr; } }
.market {
  background: #fff; border: 1px solid var(--c-border); border-radius: var(--radius-lg);
  padding: 24px;
}
.market h3 { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: 1.1rem; }
.market .flag { width: 28px; height: 20px; border-radius: 4px; background: var(--c-bg-soft); display: inline-block; flex: none; overflow: hidden; }
.market .row { display: flex; justify-content: space-between; padding: 6px 0; font-size: .88rem; border-top: 1px dashed var(--c-border); }
.market .row:first-of-type { border-top: 1px solid var(--c-border); margin-top: 10px; }
.market .row b { color: var(--c-text); font-weight: 600; }
.market .row span { color: var(--c-muted); }

/* ===== Forms ===== */
.form { display: grid; gap: 14px; }
.form label { display: block; font-size: .86rem; color: var(--c-muted); margin-bottom: 4px; font-weight: 500; }
.form input, .form select, .form textarea {
  width: 100%; height: 46px; padding: 0 14px;
  border: 1px solid var(--c-border); border-radius: 8px;
  font-size: .96rem; font-family: inherit; background: #fff; color: var(--c-text);
  outline: none; transition: border .15s var(--ease);
}
.form textarea { height: 130px; padding: 12px 14px; resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { border-color: var(--c-gold); box-shadow: 0 0 0 3px rgba(201,169,97,.18); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }
.form-status {
  padding: 12px 16px; border-radius: 8px; font-size: .9rem; display: none;
}
.form-status.show { display: block; }
.form-status.ok { background: #E8F6EE; color: var(--c-success); }
.form-status.err { background: #FBEAE8; color: var(--c-danger); }

/* ===== Footer ===== */
.site-footer {
  background: #0a1f3a; color: #B8C2D0; padding: 56px 0 24px; margin-top: 80px;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; letter-spacing: .02em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer ul li { margin-bottom: 10px; }
.site-footer a { color: #B8C2D0; }
.site-footer a:hover { color: var(--c-gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08); margin-top: 40px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: .86rem; color: #8090A0;
}
.footer-meta { font-size: .82rem; color: #8090A0; line-height: 1.7; }
.footer-icp {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: .82rem; color: #8090A0;
}
.footer-icp a {
  color: #8090A0; text-decoration: none;
  transition: color .15s ease;
}
.footer-icp a:hover { color: var(--c-gold); }
.icp-icon {
  width: 14px; height: 14px; flex-shrink: 0; opacity: .85;
}
@media (max-width: 560px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ===== Floating WhatsApp ===== */
.float-wa {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 56px; height: 56px; border-radius: 50%;
  background: #25D366; color: #fff;
  display: grid; place-items: center; box-shadow: 0 10px 24px rgba(37,211,102,.4);
  transition: transform .2s var(--ease);
}
.float-wa:hover { transform: scale(1.08); }
.float-wa svg { width: 28px; height: 28px; }

/* ===== Utility ===== */
.text-center { text-align: center; }
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.fade-in { opacity: 0; transform: translateY(12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }

/* ===== Language switcher (EN / 中文) ===== */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: #fff;
  flex: 0 0 auto;
}
.lang-switch button {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--c-muted);
  padding: 4px 11px;
  border-radius: 999px;
  line-height: 1.45;
  white-space: nowrap;
  transition: background .18s var(--ease), color .18s var(--ease);
}
.lang-switch button:hover { color: var(--c-navy); }
.lang-switch button.is-active { background: var(--c-navy); color: #fff; }
.lang-switch button.is-active:hover { color: #fff; }

@media (max-width: 900px) {
  .lang-switch { align-self: flex-start; margin: 6px 0 2px; }
}

/* ===== Gallery (about) ===== */
.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px;
  grid-auto-flow: dense;
}
.gallery-item {
  margin: 0; position: relative; border-radius: 12px; overflow: hidden;
  background: var(--c-cream); aspect-ratio: 1/1;
  box-shadow: var(--shadow-sm);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s var(--ease); }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(11,37,69,.85) 100%);
  color: #fff; font-size: .82rem; padding: 18px 14px 10px;
  opacity: 0; transition: opacity .25s var(--ease);
}
.gallery-item:hover figcaption { opacity: 1; }
.gallery-item--tall { grid-row: span 2; aspect-ratio: 1/2; }
.gallery-item--wide { grid-column: span 2; aspect-ratio: 2/1; }
@media (max-width: 720px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-item--tall, .gallery-item--wide { grid-column: auto; grid-row: auto; aspect-ratio: 1/1; }
}

/* ===== Honors / Awards (about) ===== */
.honors-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.honors-item {
  margin: 0; position: relative; border-radius: 12px; overflow: hidden;
  background: var(--c-cream); box-shadow: var(--shadow-sm);
}
.honors-item img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3; }
.honors-item figcaption {
  padding: 10px 14px; font-size: .85rem; color: var(--c-muted);
  background: #fff; border-top: 1px solid var(--c-line);
}
@media (max-width: 720px) { .honors-grid { grid-template-columns: 1fr; } }

/* ===== Video wrap (about) ===== */
.video-wrap {
  position: relative; max-width: 960px; margin: 0 auto;
  border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-lg);
  background: #000;
}
.video-wrap video { width: 100%; height: auto; display: block; }

/* ===== Contact rep card (contact) ===== */
.contact-rep { display: flex; gap: 18px; align-items: center; }
.contact-rep__avatar {
  width: 96px; height: 96px; border-radius: 50%;
  object-fit: cover; flex-shrink: 0;
  border: 3px solid var(--c-gold-soft);
  box-shadow: var(--shadow-sm);
}
.contact-rep__body { flex: 1; min-width: 0; }
@media (max-width: 520px) {
  .contact-rep { flex-direction: column; align-items: flex-start; text-align: left; }
  .contact-rep__avatar { width: 80px; height: 80px; }
}
.fade-in.visible { opacity: 1; transform: translateY(0); }