/* =============================================================
   ROEDEER 售后服务中心 · 全站样式
   设计令牌：深绿 #1a4d3b 主色 + 奶油白底 #f6f9f7
   ============================================================= */
:root {
  --brand-900: #0f2e23;
  --brand-800: #143d2f;
  --brand-700: #1a4d3b;
  --brand-600: #206049;
  --brand-500: #2d6a4f;
  --brand-100: #eef4f1;
  --brand-50:  #f6f9f7;
  --line: #e6eae8;
  --muted: #6b7280;
}

html { scroll-behavior: smooth; }
body { font-family: 'Noto Sans SC', 'Microsoft YaHei', 'PingFang SC', system-ui, -apple-system, 'Segoe UI', sans-serif; }

/* ---------- 横幅 ----------
   2026-11-16 横幅图优化：按页取图（2 尺寸方案）
   桌面 1920×640（3:1）/ 移动 1200×900（4:3 裁剪版）；page-bg 默认 = 主页晨光图兜底
   2026-11-19 横幅"白纱"减淡：原参数左半幅 78%~94% 白、68%/100% 处才透明（子页整幅残留 10% 白），
   背景图闷成灰白。现改为文字区压白后快速收窄、右侧/下侧完全透明（文字可读性保持，图明显清晰）
   2026-11-19 移动端定稿（v1.6，用户手调）：方向改 0deg（下→上）——底部纯白与下方白色内容卡融合，
   中段 0.72@30%、0.20@68%，顶部完全透明；桌面参数不变 */
.hero-bg {
  background-image: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.66) 32%, rgba(255,255,255,0.32) 54%, rgba(255,255,255,0) 100%),
                    url('../img/hero-home-1920.jpg');
  background-size: cover;
  background-position: center;
}
.page-bg {
  background-image: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.68) 32%, rgba(255,255,255,0.06) 54%, rgba(255,255,255,0) 62%),
                    url('../img/hero-home-1920.jpg');
  background-size: cover;
  background-position: center;
}
.bg-warranty     { background-image: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.68) 32%, rgba(255,255,255,0.06) 54%, rgba(255,255,255,0) 62%), url('../img/hero-warranty-1920.jpg'); }
.bg-support      { background-image: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.68) 32%, rgba(255,255,255,0.06) 54%, rgba(255,255,255,0) 62%), url('../img/hero-support-1920.jpg'); }
.bg-ordersupport { background-image: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.68) 32%, rgba(255,255,255,0.06) 54%, rgba(255,255,255,0) 62%), url('../img/hero-ordersupport-1920.jpg'); }
.bg-subscribe    { background-image: linear-gradient(90deg, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0.68) 32%, rgba(255,255,255,0.06) 54%, rgba(255,255,255,0) 62%), url('../img/hero-subscribe-1920.jpg'); }
@media (max-width: 768px) {
  .hero-bg, .page-bg {
    background-image: linear-gradient(0deg, rgba(255,255,255,1) 0%, rgba(255,255,255,0.72) 40%, rgba(255,255,255,0.50) 68%, rgba(255,255,255,0) 100%),
                      url('../img/hero-home-1200.jpg');
  }
  .bg-warranty     { background-image: linear-gradient(0deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.72) 40%, rgba(255,255,255,0.20) 68%, rgba(255,255,255,0) 100%), url('../img/hero-warranty-1200.jpg'); }
  .bg-support      { background-image: linear-gradient(0deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.72) 40%, rgba(255,255,255,0.20) 68%, rgba(255,255,255,0) 100%), url('../img/hero-support-1200.jpg'); }
  .bg-ordersupport { background-image: linear-gradient(0deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.72) 40%, rgba(255,255,255,0.20) 68%, rgba(255,255,255,0) 100%), url('../img/hero-ordersupport-1200.jpg'); }
  .bg-subscribe    { background-image: linear-gradient(0deg, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0.72) 40%, rgba(255,255,255,0.20) 68%, rgba(255,255,255,0) 100%), url('../img/hero-subscribe-1200.jpg'); }
}

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 1px 2px rgba(20,61,47,.04);
}
.card-hover { transition: transform .25s ease, box-shadow .25s ease; }
.card-hover:hover { transform: translateY(-4px); box-shadow: 0 12px 24px rgba(20,61,47,.10); }
.icon-ring { transition: background-color .25s ease, color .25s ease; }
.card-hover:hover .icon-ring { background-color: var(--brand-800); color: #fff; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand-700); color: #fff; font-weight: 600; font-size: 14px;
  border-radius: 12px; padding: 12px 26px; border: 1px solid transparent;
  transition: background-color .2s ease, transform .1s ease; cursor: pointer;
}
.btn:hover { background: var(--brand-800); }
.btn:active { transform: translateY(1px); }
.btn-outline { background: #fff; color: var(--brand-800); border-color: #cfdad5; }
.btn-outline:hover { background: var(--brand-50); }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------- 表单 ---------- */
.label { display: block; font-size: 13px; font-weight: 600; color: #374151; margin-bottom: 6px; }
.inp {
  width: 100%; border: 1px solid #dde3e0; border-radius: 12px; padding: 11px 14px;
  font-size: 14px; background: #fff; color: #1f2937; transition: border-color .2s, box-shadow .2s;
}
.inp:focus { outline: none; border-color: var(--brand-600); box-shadow: 0 0 0 3px rgba(45,106,79,.12); }
.inp[readonly] { background: #f4f6f5; color: #4b5563; }
textarea.inp { min-height: 118px; resize: vertical; line-height: 1.6; }
.field-err { color: #b91c1c; font-size: 12px; margin-top: 6px; display: none; }
.field-err.show { display: block; }

/* ---------- 说明块 / 提示条 ---------- */
.notice { background: #fffaf0; border: 1px solid #f0e2c4; border-radius: 16px; padding: 18px 20px; }
.notice .dot { width: 8px; height: 8px; border-radius: 9999px; background: #b45309; margin-top: 7px; flex: none; }
.tip { background: var(--brand-50); border: 1px solid var(--brand-100); border-radius: 14px; padding: 14px 16px; font-size: 13px; color: #475569; line-height: 1.7; }
.badge { display: inline-flex; align-items: center; gap: 6px; background: var(--brand-700); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 9999px; }
.badge-soft { background: var(--brand-100); color: var(--brand-800); }


/* ---------- 步骤指示 ---------- */
.step-dot { width: 24px; height: 24px; border-radius: 9999px; background: #dfe5e2; display: flex; align-items: center; justify-content: center; font-size: 12px; color: #fff; font-weight: 700; flex: none; }
.step-dot.on { background: var(--brand-700); }
.step-dot.done { background: var(--brand-500); }
.step-line { height: 2px; background: #dfe5e2; width: 40px; flex: none; }
.step-line.done { background: var(--brand-500); }

/* ---------- 星级 ---------- */
.stars { display: inline-flex; gap: 4px; cursor: pointer; }
.stars i { font-style: normal; font-size: 26px; color: #d7dcda; transition: color .15s, transform .15s; }
.stars i.on { color: #f59e0b; }
.stars i:hover { transform: scale(1.08); }
/* 只读星级（展示上一步的选择，不能改动） */
.stars-readonly { cursor: default; }
.stars-readonly i { cursor: default; }
.stars-readonly i:hover { transform: none; }

/* ---------- 弹窗 ---------- */
/* 弹窗打开时（App.modal() 给 <html> 加 .modal-open）锁死底层页面滚动。
   注意：不要在遮罩上写 touch-action:none —— 它与后代的 touch-action 取交集，
   会连带把弹窗内部内容的触摸滚动一起禁掉；背景不跟随滚动交给 overflow + JS 处理。 */
html.modal-open,
html.modal-open body { overflow: hidden !important; overscroll-behavior: none; }

.mask {
  position: fixed; inset: 0; background: rgba(15,46,35,.45);
  display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 90;
  animation: fade .15s ease;
  overscroll-behavior: contain;
}
.modal {
  background: #fff; border-radius: 18px; width: 100%; max-width: 460px; padding: 24px;
  box-shadow: 0 24px 48px rgba(15,46,35,.22); animation: pop .18s ease; max-height: 88vh; overflow: auto;
  overscroll-behavior: contain;   /* 弹窗内容滚到底也不穿透到底层页面 */
  -webkit-overflow-scrolling: touch;
}
.modal-lg { max-width: 540px; }
.modal-sheet { border-radius: 18px 18px 0 0; align-self: flex-end; padding-bottom: 32px; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.98) } to { opacity: 1; transform: none } }
@media (max-width: 640px) {
  .mask { align-items: flex-end; padding: 0; }
  .modal { border-radius: 18px 18px 0 0; max-width: none; padding-bottom: 28px; }
}

/* ---------- Toast ---------- */
/* 居中靠 transform: translateX(-50%)，所以动画必须用专用 keyframes：
   用通用的 pop（transform: translateY(10px) / none）会把 -50% 覆盖掉，
   动画期间元素右移半个身位，动画结束后又弹回中间 —— 就是那个「位置跳变」。 */
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%);
  background: rgba(15,46,35,.94); color: #fff; font-size: 14px; padding: 10px 18px;
  border-radius: 9999px; z-index: 120; box-shadow: 0 8px 20px rgba(15,46,35,.28);
  animation: toast-pop .18s ease;
}
@keyframes toast-pop {
  from { opacity: 0; transform: translate(-50%, 10px) scale(.98); }
  to   { opacity: 1; transform: translate(-50%, 0) scale(1); }
}

/* ---------- 上传 ---------- */
.upload {
  border: 1.5px dashed #cbd5d1; border-radius: 14px; padding: 22px; text-align: center;
  background: #fbfcfc; cursor: pointer; transition: border-color .2s, background .2s;
}
.upload:hover { border-color: var(--brand-600); background: var(--brand-50); }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); }
.thumb-item { position: relative; }
.thumb-item .thumb-remove {
  position: absolute; top: -7px; right: -7px; width: 22px; height: 22px;
  border-radius: 50%; background: rgba(17,24,39,.85); color: #fff;
  font-size: 15px; line-height: 1; display: none; align-items: center; justify-content: center;
  border: none; cursor: pointer; padding: 0;
}
.thumb-item.on .thumb-remove { display: flex; }
.thumb-item.on .thumb { opacity: .65; border-color: var(--brand-600); }

/* ---------- 全屏加载遮罩（App.loading） ---------- */
.loading-box {
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  background: #fff; border-radius: 16px; padding: 28px 40px;
  box-shadow: 0 24px 48px rgba(15,46,35,.22); animation: pop .18s ease;
}
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid #e5e7eb; border-top-color: var(--brand-600);
  animation: spin .7s linear infinite;
}
.loading-text { font-size: 14px; color: #374151; margin: 0; }
@keyframes spin { to { transform: rotate(360deg) } }

/* ---------- 通用列表 ---------- */
.kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 9px 0; border-bottom: 1px dashed #eef1f0; }
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--muted); }
.kv .v { font-weight: 600; color: #1f2937; word-break: break-all; }

/* ---------- RTL（阿拉伯语）覆盖段 ----------
   作用域全部限定 [dir="rtl"]，只在 ar 语言模式下生效；
   处理浏览器 dir=rtl 自动镜像覆盖不了的方向性残留（见 docs/RTL开发方案.md D2）。 */
[dir="rtl"] .fa-arrow-right,
[dir="rtl"] .fa-arrow-up-right-dots { transform: scaleX(-1); }
[dir="rtl"] #langMenu { left: 0; right: auto; }
[dir="rtl"] .lang-opt,
[dir="rtl"] #mobileMenu a { text-align: right; }
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select { unicode-bidi: plaintext; text-align: start; }
