/* =========================================================================
   佳孚 JIAFU AUTO - 首页静态页样式（按设计稿图2/图4 改版）
   搜索区=4栏筛选同时展示+顶部搜索框；结果=3列×2行；品牌=SVG图标
   ========================================================================= */
:root {
  --primary: #ff6a00;        /* 设计稿橙色强调 */
  --primary-dark: #e05c00;
  --dark: #0f172a;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e7eaf0;
  --bg: #ffffff;
  --bg-soft: #f6f7fb;
  --radius: 12px;
  --shadow: 0 6px 22px rgba(15, 23, 42, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text); background: var(--bg); line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 20px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border-radius: 8px; font-size: 17px;  cursor: pointer; border: 1px solid transparent; padding: 10px 24px; transition: .2s; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-ghost { background: #fff;     color: #666666;  }
.btn-ghost:hover { border-color: var(--primary); }

/* ===== 顶部导航 ===== */
.site-header { position: sticky; top: 0; z-index: 100; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 66px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 800; color: var(--dark); }
.brand-img { height: 34px; width: auto; display: block; }
.brand small { font-weight: 600; font-size: 13px; color: var(--muted); letter-spacing: 2px; }
.main-nav { display: flex; align-items: center; gap: 6px; }
.nav-item { position: relative; }
.nav-item > a { display: inline-flex; align-items: center; gap: 5px; padding: 10px 14px; font-size: 15px; color: var(--text); border-radius: 8px; }
.nav-item > a:hover, .nav-item.open > a { color: var(--primary); background: var(--bg-soft); }
.nav-item .caret { font-size: 10px; transition: transform .2s; }
.nav-item.open .caret { transform: rotate(180deg); }
.dropdown { position: absolute; top: 100%; left: 0; min-width: 210px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(8px); transition: .18s; }
.nav-item.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 14px; color: var(--text); }
.dropdown a:hover { background: var(--bg-soft); color: var(--primary); }
/* 桌面端：鼠标悬停即展开子菜单（触屏与窄屏仍用点击箭头展开） */
@media (min-width: 769px) {
  .nav-item:hover > a { color: var(--primary); background: var(--bg-soft); }
  .nav-item:hover .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-item:hover .caret { transform: rotate(180deg); }
}
.header-actions { display: flex; align-items: center; gap: 12px; }
.act-link { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: var(--text); }
.act-link:hover { color: var(--primary); }
.act-vertical { flex-direction: column; align-items: center; justify-content: center; gap: 2px; line-height: 1.15; text-align: center; }
.header-actions button.act-link, .header-actions button.act-btn { border: none; background: none; padding: 0; cursor: pointer; }
.login-btn { padding: 8px 18px; }
.lang-switch { display: inline-flex; border-radius: 999px; overflow: hidden; margin-left: 8px; }
.lang-link { padding: 4px 13px; font-size: 13px; color: #333; background: #ededee; }
.lang-link.active { background: #6e6e6e; color: #fff; }
/* 滚动渐入动画 */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .65s ease, transform .65s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .fade-item { animation: none !important; opacity: 1; }
}
/* 卡片入场动画（View more / Show all 等逐张淡入上移） */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
.fade-item { animation: fadeInUp .5s ease both; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 42px; height: 42px; font-size: 20px; cursor: pointer; }

/* ===== Hero 轮播 ===== */
.hero { position: relative; overflow: hidden; }
.hero-slides { display: flex; transition: transform .6s ease; }
.hero-slide { position: relative; flex: 0 0 100%; height: clamp(420px, 58vw, 640px); }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; }
.hero-slide::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15,23,42,.28), rgba(15,23,42,.05)); }
.hero-caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; color: #fff; padding-bottom: 34px; }
.hero-caption .eyebrow { display: inline-block; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.4); padding: 4px 12px; border-radius: 999px; font-size: 13px; letter-spacing: 1px; margin-bottom: 12px; backdrop-filter: blur(4px); }
.hero-caption h1 { font-size: clamp(26px, 4.2vw, 46px); font-weight: 800; max-width: 720px; text-shadow: 0 2px 14px rgba(0,0,0,.25); }
.hero-caption p { margin-top: 10px; font-size: 16px; color: rgba(255,255,255,.92); max-width: 640px; }
.hero-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 3; width: 46px; height: 46px; border-radius: 50%; background: rgba(255,255,255,.9); border: none; font-size: 20px; color: var(--dark); cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); display: flex; align-items: center; justify-content: center; }
.hero-arrow.prev { left: 18px; }
.hero-arrow.next { right: 18px; }
.hero-arrow:hover { background: #fff; color: var(--primary); }
.hero-dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); z-index: 3; display: flex; gap: 8px; }
.hero-dots button { width: 10px; height: 10px; border-radius: 50%; border: none; background: rgba(255,255,255,.5); cursor: pointer; }
.hero-dots button.active { background: #fff; width: 26px; border-radius: 999px; }

/* ===== 区块通用 ===== */
.section { padding: 52px 0; }
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { font-size: clamp(22px, 3vw, 36.42px); font-weight: 400; color: #333333; }
.section-head p { color: var(--muted); margin-top: 8px; font-size: 15px; }
.section-sub { text-align: center; color: var(--muted); font-size: 14px; margin: -14px 0 26px; }

/* ===== 搜索模块（严格按图1：标题 + 圆角搜索框 + 橙色圆形按钮 + 四栏并列全部展示） ===== */
.search-module { margin-top: -58px; position: relative; z-index: 10; }
.search-card { background: #fff; border-radius: 16px; box-shadow: 0 18px 44px rgba(15,23,42,.14); border: 1px solid var(--line); padding: 24px 24px 14px; }
/* 选项卡在白卡外，位于下方白底上（严格按 PSD：卡片只含标题+搜索框） */
.filter-panel { padding: 22px 4px 10px; }
.search-title { font-size: 20px; font-weight: 400; color: var(--dark); text-align: center; margin-bottom: 20px; }
.keyword-row { display: flex; justify-content: center; margin-bottom: 24px; }
.keyword-box { display: flex; align-items: center; width: 100%; max-width: 560px; border: 1.5px solid #111; border-radius: 999px; padding-left: 24px; padding-right: 10px; background: #fff; }
.keyword-box input { flex: 1; min-width: 0; border: none; outline: none; font-size: 15px; padding: 17px 0; background: transparent; text-align: center; }
.keyword-box input::placeholder { color: var(--muted); }
.search-go { width: 44px; height: 44px; min-width: 44px; border-radius: 50%; background: var(--primary); color: #fff; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 12px rgba(255,106,0,.3); }
.search-go:hover { background: var(--primary-dark); }
.search-go svg { display: block; }
.filter-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.fcol { position: relative; }
.fcol-head { display: inline-flex; align-items: center; gap: 6px; padding: 7px 18px; border: none; border-radius: 999px; font-size: 14px;  background: #eef0f4; color: var(--muted); cursor: pointer; }
.fcol-head .ficon { height: 15px; width: auto; display: block; }
.fcol-head .caret { font-size: 10px; }
.fcol-head.open, .fcol:first-child .fcol-head.open { background: var(--primary); color: #fff; }
.fcol-head:hover { background: var(--primary); color: #fff; }
.fcol:first-child .fcol-head { background: var(--primary); color: #fff; }
/* 下拉容器：默认隐藏，点击按钮展开，内为可多选的项目符号列表（严格按图1样式） */
.drop { display: none; position: absolute; top: calc(100% + 8px); left: 0; min-width: 100%; width: max-content; max-width: 280px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 8px; z-index: 30; }
.drop.open { display: block; }
.drop .d-opt { display: flex; align-items: center; gap: 9px; padding: 7px 8px; border-radius: 6px; font-size: 14px; cursor: pointer; white-space: nowrap; }
.drop .d-opt::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #d3d9e3; flex: none; transition: .2s; }
.drop .d-opt:hover { background: var(--bg-soft); }
.drop .d-opt.sel::before { background: var(--primary); }
.drop .d-opt.sel { color: var(--primary-dark); font-weight: 600; }
.selected-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,106,0,.1); color: var(--primary-dark); font-size: 13px; padding: 5px 10px; border-radius: 999px; }
.chip button { border: none; background: none; color: var(--primary-dark); cursor: pointer; font-size: 14px; line-height: 1; }

/* ===== Choose the intended vehicle（3 列 × 最多 2 行=6） ===== */
.vehicle-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.vehicle-card { background: #f5f5f5; border-radius: 16px; padding: 20px 20px 18px; text-align: center; transition: .22s; }
.vehicle-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.vc-title { font-size: 21px;  color: var(--dark); text-align: center; }
.vc-tag { display: inline-block;
    /* background: #fff; */
    /* border: 1px solid #eee; */
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 15px;
    color: #787878;
    margin-top: 12px; }
.vc-media { position: relative; width: 88%; margin: 20px auto 0; }
.vc-media img { width: 100%; height: auto; display: block; }
.vc-hot { position: absolute; top: 0; right: 0; background: var(--primary); color: #fff; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 0 0 0 8px; }
.vc-foot { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 24px; }
.vc-price { font-size: 15px; font-weight: 700; color: var(--dark); }
.vc-price small { font-weight: 500; color: var(--muted); font-size: 12px; }
.vc-arrow { width: 34px; height: 34px; border-radius: 50%; background: #333; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; line-height: 1; transition: .2s; }
.vehicle-card:hover .vc-arrow { background: var(--primary); }
.load-more { text-align: center; margin-top: 26px; }
.load-more .dots { display: flex; justify-content: center; gap: 6px; margin-bottom: 14px; }
.load-more .dots i { width: 8px; height: 8px; border-radius: 50%; background: #d3d9e3; }
.load-more .dots i.on { background: var(--primary); }
.empty-state { text-align: center; color: var(--muted); padding: 40px 0; }

/* ===== Browse by brand（SVG 图标） ===== */
.brand-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.brand-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 26px 16px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: .2s; text-align: center; }
.brand-card:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.brand-logo { width: 150px; height: 70px; display: flex; align-items: center; justify-content: center; }
.brand-logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.brand-logo svg { width: 100%; height: 100%; }
.brand-card strong { font-size: 15px; color: var(--dark); }
.brand-card .brand-name { font-size: 16px; font-weight: 600; color: var(--dark); margin-top: 2px; }
.brand-item { display: flex; align-items: center; justify-content: center; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: .2s; }
.brand-item:hover { box-shadow: var(--shadow); border-color: var(--primary); }
.brand-item img { width: 100%; height: auto; display: block; border-radius: 4px; }
.brand-more { text-align: center; margin-top: 24px; }

/* ===== About（严格按图1/PSD：标题独立一行 + 居中圆角展厅大图） ===== */
.about-head { text-align: center; font-size: 30px; font-weight: 400; color: #222222; letter-spacing: 1px; margin-bottom: 34px; }
.about { position: relative; display: flex; justify-content: center; }
.about-img { width: 100%; max-width: 1200px; height: auto; border-radius: 16px; display: block; }

/* ===== Follow us（严格按图2/PSD：白底圆角卡片 + 顶部短横线，无深色页脚） ===== */
.follow { background: #ffffff; }
.follow-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 40px 20px 44px; text-align: center; max-width: 1200px; margin: 0 auto; box-shadow: var(--shadow); }
.follow-rule { width: 22px; height: 4px; background: #222222; border-radius: 2px; margin: 0 auto 24px; }
.follow-card h2 { font-size: 30px; font-weight: 500; color: #222; }
.follow-card p { color: #6b7280; margin-top: 12px; font-size: 15px; }
/* 社媒入口：6 个独立可点击项（原为一张整图，现拆开以便配置链接与悬停反馈）
   图标用 mask 着色，悬停时按各平台色变化，并轻微上移 —— 与整图视觉尺寸保持一致 */
.social-list { display: flex; flex-wrap: wrap; justify-content: center; align-items: flex-start; gap: 9px; max-width: 585px; margin: 26px auto 0; }
.social-item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 9px;
  width: 78px; padding: 6px 0 4px; border-radius: 10px;
  color: #1b2a4a; text-decoration: none;
  transition: color .22s ease, transform .22s ease, box-shadow .22s ease;
}
.social-item:hover, .social-item:focus-visible { color: var(--sc, #ee3c2e); transform: translateY(-4px); outline: none; }
.social-item:focus-visible { box-shadow: 0 0 0 3px rgba(27, 42, 74, .14); }
.social-ico {
  position: relative; width: 24px; height: 28px;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  transition: transform .22s ease;
}
/* 悬停态：品牌色图标叠在上层，靠透明度切换（不依赖 mask，兼容性最好） */
.social-ico-h {
  position: absolute; inset: 0;
  background-repeat: no-repeat; background-position: center; background-size: contain;
  opacity: 0; transition: opacity .2s ease;
}
.social-item:hover .social-ico, .social-item:focus-visible .social-ico { transform: scale(1.08); }
.social-item:hover .social-ico-h, .social-item:focus-visible .social-ico-h { opacity: 1; }
.social-name { font-size: 14px; line-height: 1.2; }

/* ===== 悬停二维码：气泡从按钮上方浮出（后台可逐个更换图片） ===== */
.social-qr {
  position: absolute; left: 50%; top: calc(100% + 9px); z-index: 20;
  width: 122px; padding: 8px 8px 6px; background: #fff;
  border: 1px solid #e6e8ec; border-radius: 10px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, .16);
  transform: translate(-50%, -8px) scale(.96);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}
.social-qr img { display: block; width: 100%; height: auto; border-radius: 6px; }
.social-qr em { display: block; margin-top: 5px; font-size: 11px; line-height: 1.35; color: #6b7280; font-style: normal; text-align: center; }
.social-qr::after {
  content: ""; position: absolute; left: 50%; top: -6px; width: 10px; height: 10px;
  margin-left: -5px; background: #fff;
  border-left: 1px solid #e6e8ec; border-top: 1px solid #e6e8ec;
  transform: rotate(45deg);
}
.social-item:hover .social-qr,
.social-item:focus-visible .social-qr { opacity: 1; visibility: visible; transform: translate(-50%, 0) scale(1); }
/* 触屏设备没有悬停，隐藏浮层，避免点击时被挡 */
@media (hover: none) { .social-qr { display: none; } }

/* ===== 响应式 ===== */
@media (max-width: 1024px) {
  .filter-grid { grid-template-columns: repeat(2, 1fr); }
  .vehicle-grid, .brand-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .nav-toggle { display: block; }
  .main-nav { position: fixed; top: 66px; right: 0; width: min(78vw, 320px); height: calc(100vh - 66px); background: #fff; flex-direction: column; align-items: stretch; gap: 4px; padding: 16px; transform: translateX(105%); transition: .28s; box-shadow: -10px 0 30px rgba(0,0,0,.1); overflow-y: auto; }
  .main-nav.open { transform: translateX(0); }
  .nav-item > a { padding: 12px 8px; font-size: 16px; }
  .dropdown { position: static; box-shadow: none; border: none; border-left: 2px solid var(--line); margin-left: 8px; opacity: 1; visibility: visible; transform: none; display: none; padding: 0 0 0 10px; }
  .nav-item.open .dropdown { display: block; }
  .header-actions { gap: 8px; }
  .act-saved { display: none; }
  .login-btn { padding: 7px 12px; font-size: 14px; }
  .search-module { margin-top: -34px; }
  .filter-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .vehicle-grid, .brand-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-slide { height: 52vh; }
}
@media (max-width: 480px) {
  .vehicle-grid, .brand-grid { grid-template-columns: 1fr; }
  .keyword-box { max-width: 100%; }
}
