/* ============================================================
   布局与公共组件样式：导航 / 页脚 / 车辆卡片 / Toast
   ============================================================ */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-main { flex: 1; }

/* ---------- 顶部导航 ---------- */
.app-nav {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
/* 头部导航：容器最宽 1200，而法/俄/西/葡语的导航文案远长于中文，
   横向 flex 不换行时会被撑出容器导致整页出现横向滚动条，所以这里收紧内距，
   并在 1200 以下直接收进汉堡菜单（见文件下方断点） */
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 66px; }
.logo { display: flex; align-items: center; gap: 9px; }
.logo-mark {
  display: flex; align-items: center; justify-content: center;
  width: 38px; height: 38px;
}
.logo-mark img { height: 24px; width: auto; display: block; }
.logo-text { display: inline-block; font-family: var(--font-display); font-size: 22px; font-weight: 800; letter-spacing: -.02em; color: var(--ink); transform: skewX(-10deg); transform-origin: left center; }
.logo-text em { font-style: normal; color: var(--mint-600); }
.nav-links {
  display: flex; align-items: center; gap: 0; margin-left: 14px; min-width: 0;
}
.nav-links a {
  padding: 8px 9px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500; color: var(--ink-soft);
  white-space: nowrap; transition: color .18s ease, background-color .18s ease;
}
.nav-links a:hover { color: var(--ink); background: var(--sage-100); }
.nav-links a.active {
  color: var(--prime); background: var(--prime-soft); font-weight: 600;
}
.nav-right { display: flex; align-items: center; gap: 6px; min-width: 0; }
.nav-login { padding: 8px 10px; font-weight: 600; }
.burger { display: none; background: none; border: none; color: var(--ink); width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 8px; }
.burger:hover { background: var(--bg-soft); }

/* 语言切换 */
.lang { position: relative; }
.lang-btn { background: none; border: none; font-size: 14px; color: var(--ink-soft); padding: 8px 10px; border-radius: 8px; display: flex; align-items: center; gap: 4px; font-weight: 500; }
.lang-btn:hover { background: var(--bg-soft); }
.lang-menu { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 130px; }
.lang-menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: none; background: none; border-radius: 8px; font-size: 14px; color: var(--ink-soft); }
.lang-menu button:hover { background: var(--bg-soft); }
.lang-menu button.on { color: var(--prime); font-weight: 700; background: var(--prime-soft); }

/* 用户菜单 */
.user-wrap { position: relative; }
.user-btn { display: flex; align-items: center; gap: 8px; background: none; border: none; padding: 5px 8px 5px 5px; border-radius: 10px; }
.user-btn:hover { background: var(--bg-soft); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--ink-800); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-size: 15px; }
.uname { font-size: 14px; font-weight: 600; color: var(--ink); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu { position: absolute; right: 0; top: 48px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 170px; }
.user-menu a, .user-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: none; background: none; border-radius: 8px; font-size: 14px; color: var(--ink); }
.user-menu a:hover, .user-menu button:hover { background: var(--bg-soft); color: var(--prime); }
.user-menu .menu-logout { color: var(--danger); }
.user-menu .menu-logout:hover { color: var(--danger); background: #fdeeee; }

/* 返回管理员身份（身份模拟模式） */
.nav-back-admin {
  background: linear-gradient(135deg, var(--gold), var(--warning)); color: var(--ink-950);
  border: none; font-weight: 700; white-space: nowrap;
}
.nav-back-admin:hover { filter: brightness(1.05); color: #fff; }
/* 导航栏汇率 chip：全站 USD 报价，常驻当前牌价（悬停看更新时间） */
.nav-fx {
  display: inline-flex; align-items: center; gap: 4px; white-space: nowrap;
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
  background: var(--sage-100); border-radius: 999px; padding: 5px 10px; cursor: help;
}
@media (max-width: 1180px) { .nav-fx { display: none; } }
.user-menu .menu-back-admin { color: #b45309; font-weight: 600; }
.user-menu .menu-back-admin:hover { background: #fef3c7; color: #b45309; }

/* 移动端 */
.mobile-menu { display: none; border-top: 1px solid var(--line); background: #fff; padding: 12px 20px 20px; }
.mobile-menu a { display: block; padding: 12px 6px; font-size: 16px; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--bg-soft); }
.mobile-menu a.active { color: var(--prime); }
.mobile-auth { display: flex; gap: 12px; margin-top: 16px; }

@media (max-width: 1200px) {
  .nav-links { display: none; }
  .burger { display: inline-flex; }
  .mobile-menu { display: block; }
  .app-nav.open { border-bottom: none; }
}
@media (max-width: 640px) { .nav-login { display: none; } }

/* 中窄屏：导航项已收进汉堡菜单，这里只收紧右侧按钮组，避免头部把整页撑出横向滚动条 */
@media (max-width: 1180px) {
  .nav-links { margin-left: 16px; gap: 2px; }
  .nav-links a { padding: 8px 9px; font-size: 14px; }
  .nav-right { gap: 6px; }
  .ctry-name { display: none; }
}
/* 手机：顶部 CTA 收进汉堡菜单（菜单里已有登录/注册），避免整页横向溢出 */
@media (max-width: 520px) {
  .nav-right > .btn-primary.btn-sm { display: none; }
}

/* ---------- 车辆卡片 ---------- */
.car-card { overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--line); display: flex; flex-direction: column; }
.car-card .card-media { position: relative; display: block; }
/* 真实车辆照片：实拍原图为 4:3（原图 1280×960 / 缩略图 720×540），
   容器用 4/3 可完整呈现整台车而不再上下裁切；CarVisual 占位 SVG 同步为 360:270 */
.car-photo { display: block; width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #eef2f6; }
.card-content { cursor: pointer; }
.grade-badge { position: absolute; top: 12px; left: 12px; z-index: 4; padding: 4px 10px; border-radius: var(--radius-xs); font-size: 11px; font-weight: 800; letter-spacing: .06em; color: var(--accent-dark); background: var(--cream); box-shadow: 0 1px 3px rgba(10,59,44,.2); }
.badge-new { position: absolute; top: 42px; left: 12px; z-index: 3; }
.badge-hot { position: absolute; top: 42px; left: 12px; z-index: 3; }
.status-pill { position: absolute; bottom: 12px; right: 12px; z-index: 3; font-weight: 700; }
.fav-btn {
  position: absolute; top: 12px; right: 12px; z-index: 3; width: 36px; height: 36px; border-radius: 50%;
  background: rgba(0,0,0,.35); border: none; display: flex; align-items: center; justify-content: center; transition: all .2s;
}
.fav-btn:hover, .fav-btn.on { background: var(--accent); transform: scale(1.08); }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.car-title-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.car-name { font-size: 18px; font-weight: 700; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.car-year { font-size: 12px; color: var(--ink-mute); background: var(--bg-soft); padding: 3px 8px; border-radius: 6px; font-weight: 600; white-space: nowrap; }
/* 规格改为 2×2 网格：四项（里程/变速箱/燃料/位置）固定两行两列，
   卡片高度可预测、各卡片规格区上下对齐，取代原先的自由换行 */
.car-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; margin: 10px 0 0; color: var(--ink-soft); font-size: 13px; }
.car-specs span { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; white-space: nowrap; }
.car-specs .icon { opacity: .75; }
.car-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.car-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 10px; border-top: 1px solid var(--bg-soft); margin-top: auto; }
.price { display: flex; flex-direction: column; }
.price-main { font-family: var(--font-display); font-size: 22px; font-weight: 800; color: var(--ink); line-height: 1.1; }
.price-usd { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
/* 价格旁的汇率提示：全站展示美元，这里给出「1 USD ≈ 本币」口径 */
.price-fx { font-size: 11px; color: var(--ink-mute); letter-spacing: .01em; border-bottom: 1px dotted rgba(15,23,42,.18); padding-bottom: 1px; cursor: help; }

/* 列表模式 */
.car-card.list { display: grid; grid-template-columns: 360px 1fr; }
.car-card.list .card-media { display: block; }
/* 列表（横排）卡片足够宽：规格回到单行弹性排布，2×2 网格在大宽卡上反而松散 */
.car-card.list .car-specs { display: flex; flex-wrap: wrap; }
@media (max-width: 760px) { .car-card.list { grid-template-columns: 1fr; } }

/* 单列特价车：整幅横图卡片（图片贯穿左右，图上信息下） */
/* 特价车横图：按图片原始比例（1920×520）完整展示，避免裁掉车与文案 */
.car-card.banner .car-photo { aspect-ratio: 1920/520; }
@media (max-width: 640px) { .car-card.banner .car-photo { aspect-ratio: 1920/520; } }
/* 特价车 banner：图片不叠角标，下方文字仅保留车名（左）与「约等于」美元价（右，美元价 ×1.7） */
.car-card.banner .card-body { padding: 12px 16px 14px; }
.car-card.banner .car-name { font-size: 18px; }
.car-card.banner .car-price-deal { font-family: var(--font-display); font-size: 20px; font-weight: 800; color: var(--prime); white-space: nowrap; }

/* ---------- 页脚 ---------- */
.site-footer { position: relative; overflow: hidden; }
.footer-watermark { position: absolute; right: 16px; bottom: 64px; font-size: 120px; font-weight: 800; letter-spacing: 2px; line-height: 1; color: rgba(255,255,255,.05); pointer-events: none; user-select: none; }
.footer-grid { position: relative; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.3fr; gap: 28px; padding: 40px 20px 28px; }
.footer-logo { margin-bottom: 12px; }
.footer-logo .logo-text { color: #fff; }
.footer-desc { font-size: 14px; line-height: 1.8; max-width: 340px; color: var(--dark-muted); }
.socials { display: flex; gap: 10px; margin-top: 14px; }
.soc { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.08); display: flex; align-items: center; justify-content: center; color: var(--dark-muted); transition: all .2s; }
.soc:hover { background: var(--mint-500); color: var(--ink-800); transform: translateY(-2px); }
.footer-col h4 { color: #fff; font-size: 16px; margin-bottom: 12px; font-weight: 700; }
.footer-col a, .footer-col p { display: block; padding: 5px 0; font-size: 14px; color: var(--dark-muted); }
.footer-col a:hover { color: var(--mint-300); padding-left: 4px; }
.footer-col .contact-row { display: flex; align-items: center; gap: 8px; }
.footer-col .contact-row .icon { color: var(--mint-400); flex-shrink: 0; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.08); padding: 16px 0; }
.footer-company { margin: 0 0 10px; font-size: 13px; color: var(--dark-muted); letter-spacing: .2px; }
.footer-links { display: flex; gap: 22px; font-size: 13px; }
.footer-links a:hover { color: var(--mint-300); }
/* 版本编号：与启动画面同源，报障时用户看一眼页脚就能说出是哪一版 */
.footer-ver {
  display: inline-block; margin-left: 10px; padding: 1px 8px;
  font-size: 11px; font-weight: 600; letter-spacing: .8px; line-height: 18px;
  color: var(--mint-300); border: 1px solid rgba(109, 235, 175, .35); border-radius: 999px;
  background: rgba(109, 235, 175, .08); font-variant-numeric: tabular-nums; white-space: nowrap;
}
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- 移动浮层 ---------- */
/* 断点与汉堡菜单保持一致：1200 以下的导航都收进菜单，展开时同样要吸顶与投影 */
@media (max-width: 1200px) {
  .app-nav.open { position: sticky; top: 0; z-index: 45; }
  .mobile-menu { box-shadow: 0 14px 30px rgba(0,0,0,.12); }
}

/* ---------- 全平台自适应 增强 ---------- */
.mobile-menu { max-height: calc(100vh - 66px); overflow-y: auto; }
@media (max-width: 480px) {
  .nav-inner { height: 58px; }
  .logo-text { font-size: 19px; }
  .mobile-menu { padding: 8px 16px 16px; }
  .mobile-menu a { padding: 11px 6px; font-size: 15px; }
  .lang-btn, .user-btn { padding: 6px; }
  .user-menu, .lang-menu { top: 42px; }
  .footer-grid { gap: 26px; }
  .footer-col h4 { margin-bottom: 12px; }
  .car-name { font-size: 16px; }
}

/* ---------- 大屏（1080p / 2K / 4K）：导航与页脚按比例放大 ----------
   容器变宽、正文字号放大后，66px 高的导航和 14px 的页脚链接会显得又扁又小，
   这里按视口分级补齐，保证大屏下的视觉重量与版式比例一致。 */
@media (min-width: 1600px) {
  .nav-inner { height: 72px; }
  .logo-text { font-size: 24px; }
  .nav-links a { font-size: 16px; padding: 9px 16px; }
  .footer-grid { gap: 36px; padding: 48px 24px 32px; }
  .footer-desc { font-size: 15px; max-width: 400px; }
  .footer-col h4 { font-size: 17px; }
  .footer-col a, .footer-col p { font-size: 15px; }
  .footer-company, .footer-links { font-size: 14px; }
}
@media (min-width: 2200px) {
  .nav-inner { height: 80px; }
  .logo-text { font-size: 27px; }
  .logo-mark { width: 44px; height: 44px; }
  .logo-mark img { height: 28px; }
  .nav-links a { font-size: 17px; padding: 10px 18px; }
  .footer-grid { gap: 44px; padding: 56px 28px 36px; }
  .footer-desc { font-size: 16px; max-width: 460px; }
  .footer-col h4 { font-size: 18px; }
  .footer-col a, .footer-col p { font-size: 16px; }
  .footer-company, .footer-links { font-size: 15px; }
}

/* ============================================================
   全站 AI 导购助手（前台）：右下角悬浮麦克风 + 对话面板
   ============================================================ */
.va-root { position: fixed; right: 20px; bottom: 22px; z-index: 1200; }
.va-fab {
  display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border: none; border-radius: 50%;
  color: var(--ink-950); cursor: pointer;
  background: var(--mint-500);
  box-shadow: 0 10px 24px rgba(61,229,148,.38);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.va-fab:hover { background: var(--mint-600); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(61,229,148,.45); }
.va-fab.on { animation: va-pulse 1.4s infinite; }
.va-fab.busy { opacity: .7; cursor: progress; }
@keyframes va-pulse {
  0% { box-shadow: 0 0 0 0 rgba(61,229,148,.5); }
  70% { box-shadow: 0 0 0 16px rgba(61,229,148,0); }
  100% { box-shadow: 0 0 0 0 rgba(61,229,148,0); }
}

.va-panel {
  position: absolute; right: 0; bottom: 66px;
  width: 372px; max-height: min(72vh, 620px);
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(13,27,42,.18); overflow: hidden;
}
.va-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.va-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--ink); }
.va-tts { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-soft); cursor: pointer; user-select: none; }
.va-x { background: none; border: none; padding: 0 2px; font-size: 20px; line-height: 1; color: var(--ink-mute); cursor: pointer; }
.va-x:hover { color: var(--ink); }
.va-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; }
.va-hint { font-size: 13px; line-height: 1.75; color: var(--ink-mute); }
.va-heard { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--prime-dark); }
.va-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--prime); animation: va-blink 1s infinite; }
@keyframes va-blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.va-card { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 13px; }
.va-answer { font-size: 14px; line-height: 1.8; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.va-busy { color: var(--ink-mute); }
.va-trace-toggle { margin-top: 10px; font-size: 12px; color: var(--prime-dark); cursor: pointer; }
.va-trace-toggle:hover { text-decoration: underline; }
.va-trace { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.va-trace-item { display: flex; gap: 8px; font-size: 12px; color: var(--ink-soft); }
.va-args { color: var(--ink-mute); word-break: break-all; }
.va-err { font-size: 13px; line-height: 1.7; color: var(--danger); }
.va-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.va-input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none;
}
.va-input:focus { border-color: var(--prime); box-shadow: 0 0 0 3px var(--prime-soft); }
.va-btn { height: 38px; padding: 0 14px; font-size: 14px; font-weight: 600; border: 1px solid transparent; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; }
.va-btn.prime { background: var(--prime-fill); color: var(--ink-950); }
.va-btn.prime:hover:not(:disabled) { background: var(--prime-fill-dark); }
.va-btn.ghost { background: #fff; border-color: var(--line); color: var(--ink); }
.va-btn.ghost:hover:not(:disabled) { border-color: var(--prime); color: var(--prime-dark); }
.va-btn:disabled { opacity: .6; cursor: not-allowed; }

/* 移动端：上移悬浮球避开底部互动区，面板占满可用宽度 */
@media (max-width: 640px) {
  .va-root { right: 14px; bottom: 78px; }
  .va-fab { width: 50px; height: 50px; }
  .va-panel { width: calc(100vw - 28px); bottom: 62px; max-height: min(66vh, 540px); }
  .va-input { font-size: 16px; }
}

/* ============================================================
   全站在线咨询（前台）：右下角聊天气泡 + 实时聊天面板
   ============================================================ */
.cw-root { position: fixed; right: 20px; bottom: 88px; z-index: 1190; }
.cw-fab {
  position: relative; display: flex; align-items: center; justify-content: center;
  width: 54px; height: 54px; border: none; border-radius: 50%;
  color: #fff; cursor: pointer; background: var(--prime);
  box-shadow: 0 10px 24px rgba(14,156,99,.35);
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}
.cw-fab:hover { background: var(--prime-dark); transform: translateY(-2px); box-shadow: 0 14px 30px rgba(14,156,99,.45); }
.cw-dot { position: absolute; right: -1px; top: -1px; width: 14px; height: 14px; border-radius: 50%; background: #2BD04B; border: 2px solid #fff; }
.cw-dot.off { background: var(--ink-mute); }

.cw-panel {
  position: absolute; right: 0; bottom: 66px;
  width: 372px; max-height: min(72vh, 620px);
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 18px 44px rgba(13,27,42,.18); overflow: hidden;
}
.cw-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--bg-soft); }
.cw-title { flex: 1; font-size: 15px; font-weight: 700; color: var(--ink); }
.cw-state { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-soft); }
.cw-state-dot { width: 8px; height: 8px; border-radius: 50%; background: #2BD04B; }
.cw-state.off .cw-state-dot { background: var(--ink-mute); }
.cw-x { background: none; border: none; padding: 0 2px; font-size: 20px; line-height: 1; color: var(--ink-mute); cursor: pointer; }
.cw-x:hover { color: var(--ink); }

.cw-body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 14px; overflow-y: auto; }
.cw-queue { font-size: 12px; color: var(--prime-dark); background: var(--prime-soft); border-radius: var(--radius-sm); padding: 6px 10px; }
.cw-scroll { flex: 1; display: flex; flex-direction: column; gap: 10px; overflow-y: auto; min-height: 220px; }
.cw-note { font-size: 13px; line-height: 1.75; color: var(--ink-mute); }
.cw-langs { margin-top: 6px; font-size: 12px; line-height: 1.7; color: var(--ink-soft); }
.cw-sys { align-self: center; font-size: 12px; color: var(--ink-mute); background: var(--bg-soft); border-radius: 10px; padding: 4px 10px; }
.cw-row { display: flex; }
.cw-row.in { justify-content: flex-end; }
.cw-row.out { justify-content: flex-start; }
.cw-bubble {
  max-width: 78%; padding: 9px 12px; font-size: 14px; line-height: 1.6;
  white-space: pre-wrap; word-break: break-word; border-radius: 12px;
}
.cw-row.in .cw-bubble { background: var(--prime); color: #fff; border-bottom-right-radius: 4px; }
.cw-row.out .cw-bubble { background: var(--bg-soft); color: var(--ink); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.cw-time { display: block; margin-top: 4px; font-size: 11px; opacity: .7; }
/* 客服回复翻译中：三点跳动占位（避免把中文原文直接暴露给非中文访客） */
.cw-typing { display: inline-flex; align-items: center; gap: 4px; padding: 4px 2px; }
.cw-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-mute); animation: cw-typing-bounce 1.2s infinite ease-in-out; }
.cw-typing i:nth-child(2) { animation-delay: .15s; }
.cw-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes cw-typing-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
.cw-err { font-size: 13px; line-height: 1.7; color: var(--danger); }
.cw-foot { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
.cw-input {
  flex: 1; min-width: 0; height: 38px; padding: 0 12px; font-size: 14px; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none;
}
.cw-input:focus { border-color: var(--prime); box-shadow: 0 0 0 3px var(--prime-soft); }
.cw-send { height: 38px; padding: 0 14px; font-size: 14px; font-weight: 600; border: none; border-radius: var(--radius-sm); cursor: pointer; white-space: nowrap; background: var(--prime); color: #fff; }
.cw-send:hover:not(:disabled) { background: var(--prime-dark); }
.cw-send:disabled { opacity: .6; cursor: not-allowed; }
.cw-voice { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--ink-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.cw-voice:hover { color: var(--prime-dark); border-color: var(--prime); }
.cw-voice.on { color: #fff; background: var(--danger); border-color: var(--danger); animation: cw-mic-pulse 1.2s ease-in-out infinite; }
@keyframes cw-mic-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, .45); } 50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); } }

/* 附件：气泡内渲染 + 输入区待发送预览 */
.cw-atts { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.cw-att { display: block; text-decoration: none; }
.cw-att-img { max-width: 180px; max-height: 140px; border-radius: 8px; display: block; border: 1px solid rgba(0,0,0,.08); }
.cw-att-file { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 5px 8px; border-radius: 6px; background: rgba(0,0,0,.06); color: inherit; word-break: break-all; }
.cw-row.in .cw-att-file { background: rgba(255,255,255,.18); }
.cw-pending { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 12px; }
.cw-pending-item { position: relative; display: inline-flex; align-items: center; gap: 4px; }
.cw-pending-img { width: 42px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.cw-pending-file { font-size: 12px; color: var(--ink-soft); background: var(--bg-soft); padding: 4px 8px; border-radius: 6px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cw-pending-del { position: absolute; top: -6px; right: -6px; width: 18px; height: 18px; border: none; border-radius: 50%; background: var(--danger); color: #fff; font-size: 12px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.cw-attach { flex: none; width: 38px; height: 38px; display: inline-flex; align-items: center; justify-content: center; background: #fff; color: var(--ink-soft); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: color .15s, border-color .15s, background .15s; }
.cw-attach:hover:not(:disabled) { color: var(--prime-dark); border-color: var(--prime); }
.cw-attach:disabled { opacity: .6; cursor: not-allowed; }

/* 离线降级：无值班客服时的留言 / 邮件入口 */
.cw-body.cw-off { align-items: center; justify-content: center; text-align: center; padding: 26px 20px; }
.cw-off-ic { font-size: 34px; line-height: 1; }
.cw-off-title { margin-top: 10px; font-size: 15px; font-weight: 700; color: var(--ink); }
.cw-off-sub { margin-top: 6px; font-size: 13px; line-height: 1.7; color: var(--ink-mute); }
.cw-btn { display: inline-flex; align-items: center; justify-content: center; height: 40px; padding: 0 18px; font-size: 14px; font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; text-decoration: none; margin-top: 12px; width: 100%; max-width: 220px; }
.cw-btn.prime { background: var(--prime); color: #fff; border: none; }
.cw-btn.prime:hover { background: var(--prime-dark); }
.cw-btn.ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.cw-btn.ghost:hover { border-color: var(--prime); color: var(--prime-dark); }

/* 结束咨询：底部操作栏 + 星级评价弹层 + 已结束提示 */
.cw-actions { display: flex; justify-content: flex-end; padding: 0 12px 10px; }
.cw-end { background: none; border: none; font-size: 12px; color: var(--ink-mute); cursor: pointer; text-decoration: underline; }
.cw-end:hover { color: var(--danger); }
.cw-ended { align-self: center; font-size: 12px; color: var(--ink-mute); background: var(--bg-soft); border-radius: 10px; padding: 6px 10px; }
.cw-rate-mask { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; background: rgba(13,27,42,.4); }
.cw-rate { position: relative; width: calc(100% - 32px); background: #fff; border-radius: var(--radius); padding: 20px 16px 16px; box-shadow: 0 14px 36px rgba(13,27,42,.28); }
.cw-rate-close { position: absolute; top: 10px; right: 12px; background: none; border: none; font-size: 20px; line-height: 1; color: var(--ink-mute); cursor: pointer; }
.cw-rate-close:hover { color: var(--ink); }
.cw-rate-title { font-size: 15px; font-weight: 700; color: var(--ink); text-align: center; }
.cw-stars { display: flex; justify-content: center; gap: 6px; margin-top: 12px; }
.cw-star { background: none; border: none; padding: 0; font-size: 30px; line-height: 1; color: #d7dde3; cursor: pointer; transition: color .15s, transform .15s; }
.cw-star:hover { transform: scale(1.15); }
.cw-star.on { color: #f5a623; }
.cw-rate-comment { width: 100%; min-height: 58px; margin-top: 12px; padding: 10px 12px; font-size: 14px; color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius-sm); outline: none; resize: vertical; font-family: inherit; box-sizing: border-box; }
.cw-rate-comment:focus { border-color: var(--prime); box-shadow: 0 0 0 3px var(--prime-soft); }
.cw-rate-row { display: flex; gap: 8px; margin-top: 12px; }
.cw-rate-row .cw-btn { flex: 1; width: auto; max-width: none; margin-top: 0; }
.cw-rate-email { display: flex; gap: 8px; margin-top: 10px; }
.cw-rate-email .cw-input { flex: 1; min-width: 0; }
.cw-rate-email .cw-btn { flex: none; width: auto; max-width: none; margin-top: 0; height: 38px; padding: 0 12px; }
.cw-rate-notice { margin-top: 10px; font-size: 12px; line-height: 1.6; color: var(--prime-dark); text-align: center; }

/* 移动端：聊天气泡上移避开底部互动区，面板占满可用宽度 */
@media (max-width: 640px) {
  .cw-root { right: 14px; bottom: 132px; }
  .cw-fab { width: 50px; height: 50px; }
  .cw-panel { width: calc(100vw - 28px); bottom: 62px; max-height: min(66vh, 540px); }
  .cw-input { font-size: 16px; }
}

/* ===== 国家切换器（业务区 → 国家 两级） ===== */
.ctry { position: relative; }
.ctry-btn { background: none; border: none; font-size: 14px; color: var(--ink-soft); padding: 8px 10px; border-radius: 8px; display: flex; align-items: center; gap: 5px; font-weight: 500; cursor: pointer; }
.ctry-btn:hover { background: var(--bg-soft); }
.ctry-flag { font-size: 16px; line-height: 1; }
.ctry-menu { position: absolute; right: 0; top: 44px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 8px; min-width: 268px; max-height: 74vh; overflow: hidden; display: flex; flex-direction: column; z-index: 60; }
.ctry-sec { font-size: 11px; font-weight: 700; color: var(--ink-mute); letter-spacing: .04em; text-transform: uppercase; padding: 8px 10px 4px; }
.ctry-scroll { overflow-y: auto; max-height: 46vh; }
.ctry-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; padding: 8px 10px; border: none; background: none; border-radius: 8px; font-size: 14px; color: var(--ink-soft); cursor: pointer; }
.ctry-item:hover { background: var(--bg-soft); }
.ctry-item.on { background: var(--bg-soft); color: var(--ink); font-weight: 600; }
.ctry-cn { flex: 1; }
.ctry-cur { font-size: 11px; color: var(--ink-mute); }
.ctry-region-h { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 10px; border: none; background: none; font-size: 13px; font-weight: 600; color: var(--ink); cursor: pointer; border-radius: 8px; }
.ctry-region-h:hover { background: var(--bg-soft); }
.ctry-region-body { padding-left: 6px; }
.ctry-reset { margin-top: 6px; padding: 8px 10px; border: none; background: none; font-size: 12px; color: var(--ink-mute); cursor: pointer; text-align: left; border-top: 1px solid var(--line); }
.ctry-reset:hover { color: var(--ink); }
@media (max-width: 640px) { .ctry-name { display: none; } .ctry-menu { right: -40px; min-width: 250px; } }

/* ===== RTL（阿拉伯语）基础镜像 ===== */
[dir="rtl"] body { text-align: right; }
[dir="rtl"] .nav-inner { flex-direction: row-reverse; }
[dir="rtl"] .nav-links { flex-direction: row-reverse; }
[dir="rtl"] .nav-right { flex-direction: row-reverse; }
[dir="rtl"] .lang-menu, [dir="rtl"] .ctry-menu, [dir="rtl"] .user-menu { right: auto; left: 0; }
[dir="rtl"] .mobile-langs, [dir="rtl"] .footer-main { flex-direction: row-reverse; }
[dir="rtl"] .cs-head { flex-direction: row-reverse; }
[dir="rtl"] .spec, [dir="rtl"] .contact-row, [dir="rtl"] .cs-meta span { flex-direction: row-reverse; }
[dir="rtl"] .sec-head, [dir="rtl"] .box-head { flex-direction: row-reverse; }
[dir="rtl"] .input, [dir="rtl"] .fm-input, [dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select { text-align: right; }

/* ===== AI 导购助手 · 购车之旅（需求 → 推荐 → 预算 → 询盘 闭环） ===== */
.va-tour { margin-inline-start: 6px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 20px; background: #fff; color: var(--prime); font: inherit; font-size: 12px; cursor: pointer; }
.va-tour:hover { background: var(--prime-soft); border-color: var(--prime); }
.va-steps { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.va-step { font-size: 12px; color: var(--text-500); padding: 3px 9px; border-radius: 20px; background: var(--bg-soft); }
.va-step.on { background: var(--prime-fill); color: #04231A; font-weight: 600; }
.va-jform { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.va-jl { display: flex; flex-direction: column; gap: 5px; font-size: 12px; color: var(--text-500); }
.va-jnext { width: 100%; margin-top: 12px; }
