/* ====== Base ====== */
:root {
  --primary: #0e63d8;
  --primary-dark: #0a4fad;
  --dark: #101828;
  --dark-2: #1d2939;
  --text: #344054;
  --muted: #667085;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --border: #e4e9f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(16, 24, 40, .08);
  --shadow-lg: 0 16px 48px rgba(16, 24, 40, .16);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container { width: min(1200px, 92%); margin: 0 auto; }

.section { padding: 88px 0; }
.section-alt { background: var(--bg-alt); }

.section-head { text-align: center; max-width: 720px; margin: 0 auto 48px; }
.section-tag {
  color: var(--primary);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 13px;
  margin-bottom: 10px;
}
.section-head h2, .about-text h2, .contact-info h2 {
  font-size: clamp(26px, 3.4vw, 38px);
  color: var(--dark);
  line-height: 1.25;
}
.section-desc { margin-top: 14px; color: var(--muted); }

.btn {
  display: inline-block;
  padding: 13px 28px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 15px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .25s ease;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-2px); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-block { width: 100%; }

/* ====== Top Bar ====== */
.topbar {
  background: var(--dark);
  color: #cbd5e1;
  font-size: 13px;
  padding: 8px 0;
}
.topbar-inner { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.topbar-right { display: flex; gap: 20px; }
.topbar-right a:hover { color: #fff; }

/* ====== Header ====== */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header.scrolled { box-shadow: var(--shadow); }
.header-inner { display: flex; align-items: center; gap: 28px; height: 76px; }

.logo { display: flex; align-items: center; gap: 10px; margin-right: auto; }
.logo-badge {
  background: linear-gradient(135deg, var(--primary), #35a2ff);
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: 1px;
  padding: 8px 12px;
  border-radius: 10px;
}
.logo-text { display: flex; flex-direction: column; line-height: 1.2; }
.logo-text strong { color: var(--dark); font-size: 17px; }
.logo-text small { color: var(--muted); font-size: 11.5px; }

.nav { display: flex; gap: 26px; }
.nav-link { font-weight: 600; font-size: 15px; color: var(--dark-2); position: relative; padding: 6px 0; }
.nav-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0; height: 2px;
  background: var(--primary);
  transition: width .25s;
}
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link.active { color: var(--primary); }

/* Language switch dropdown */
.lang-switch { position: relative; }
.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: #fff;
  font-weight: 700;
  font-size: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
}
.lang-btn:hover, .lang-switch.open .lang-btn { background: var(--primary); color: #fff; }
.lang-caret { transition: transform .2s; }
.lang-switch.open .lang-caret { transform: rotate(180deg); }

.lang-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 168px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
  list-style: none;
  margin: 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all .18s ease;
  z-index: 200;
}
.lang-switch.open .lang-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.lang-menu li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--dark-2);
  cursor: pointer;
}
.lang-menu li:hover { background: #eff6ff; color: var(--primary); }
.lang-menu .lm-check { color: var(--primary); opacity: 0; font-size: 13px; }
.lang-menu li.active .lm-check { opacity: 1; }

.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span { display: block; width: 24px; height: 2.5px; background: var(--dark); margin: 5px 0; border-radius: 2px; transition: .3s; }

/* ====== Hero ====== */
.hero {
  background:
    radial-gradient(1000px 500px at 85% -10%, rgba(14, 99, 216, .14), transparent 60%),
    radial-gradient(700px 400px at -10% 110%, rgba(14, 99, 216, .10), transparent 60%),
    var(--bg);
  padding: 80px 0 70px;
  overflow: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.hero-tag {
  color: var(--primary);
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  font-size: 13px;
  margin-bottom: 14px;
}
.hero h1 {
  font-size: clamp(32px, 4.6vw, 54px);
  color: var(--dark);
  line-height: 1.15;
  letter-spacing: -1px;
}
.hero .accent { color: var(--primary); }
.hero-sub { margin: 20px 0 28px; color: var(--muted); font-size: 17px; max-width: 560px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-points { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 30px; font-weight: 600; color: var(--dark-2); font-size: 14px; }
.hero-media img { border-radius: 18px; box-shadow: var(--shadow-lg); }

/* ====== Stats ====== */
.stats { background: var(--dark); padding: 34px 0; }
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; text-align: center; }
.stat strong { display: block; font-size: 28px; color: #4da3ff; }
.stat span { color: #cbd5e1; font-size: 14px; }

/* ====== Filter Tabs ====== */
.filter-tabs { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: 40px; }
.tab {
  padding: 10px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--dark-2);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all .2s;
}
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ====== Product Grid ====== */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 26px; }

.product-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.product-thumb { position: relative; padding: 18px; background: #fff; cursor: pointer; }
.product-thumb img { width: 100%; aspect-ratio: 1; object-fit: contain; }
.product-badge {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: .5px;
}
.product-body { padding: 18px 20px 20px; border-top: 1px solid var(--border); flex: 1; display: flex; flex-direction: column; }
.product-item { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: .5px; }
.product-body h3 { color: var(--dark); font-size: 16.5px; line-height: 1.35; margin: 5px 0 8px; min-height: 44px; }
.product-specs { font-size: 13.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }
.product-specs b { color: var(--dark-2); font-weight: 600; }
.product-actions { margin-top: auto; padding-top: 16px; display: flex; gap: 10px; }
.product-actions .btn { flex: 1; text-align: center; padding: 10px 0; font-size: 14px; }
.btn-ghost { border: 1.5px solid var(--border); color: var(--dark-2); background: #fff; }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }

/* ====== About ====== */
.about-inner { display: grid; grid-template-columns: .85fr 1.15fr; gap: 60px; align-items: center; }
.about-media img { border-radius: 18px; box-shadow: var(--shadow-lg); }
.about-text h2 { margin-bottom: 18px; }
.about-text p { margin-bottom: 14px; color: var(--muted); }
.about-list { margin: 18px 0 26px; display: grid; gap: 8px; }
.about-list li {
  padding-left: 26px;
  position: relative;
  color: var(--dark-2);
  font-size: 15px;
}
.about-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-weight: 800;
}

/* ====== Features ====== */
.features-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.feature {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .25s, box-shadow .25s;
}
.feature:hover { transform: translateY(-5px); box-shadow: var(--shadow); }
.feature-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  font-size: 26px;
  background: rgba(14, 99, 216, .1);
  border-radius: 12px;
  margin-bottom: 16px;
}
.feature h3 { color: var(--dark); font-size: 17px; margin-bottom: 8px; }
.feature p { color: var(--muted); font-size: 14.5px; }

/* ====== Contact ====== */
.contact-inner { display: grid; grid-template-columns: 1fr 1.1fr; gap: 60px; align-items: start; }
.contact-info h2 { margin-bottom: 16px; }
.contact-info > p { color: var(--muted); margin-bottom: 24px; }
.contact-list { display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 12px; color: var(--dark-2); font-weight: 600; }
.contact-list span { font-size: 20px; }

.contact-form {
  background: #fff;
  padding: 32px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  display: grid;
  gap: 14px;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  color: var(--dark-2);
  background: var(--bg-alt);
  outline: none;
  transition: border-color .2s;
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--primary); background: #fff; }
.form-tip { text-align: center; color: var(--muted); font-size: 13px; }

/* ====== Footer ====== */
.footer { background: var(--dark); color: #94a3b8; padding-top: 60px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.footer-col p { font-size: 14px; margin-top: 14px; }
.footer-col h4 { color: #fff; font-size: 15px; margin-bottom: 16px; }
.footer-col a { display: block; padding: 4px 0; font-size: 14px; transition: color .2s; }
.footer-col a:hover { color: #fff; }
.logo-light .logo-text strong { color: #fff; }
.logo-light .logo-text small { color: #94a3b8; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .08); padding: 18px 0; font-size: 13px; }

/* ====== Modal ====== */
.modal { position: fixed; inset: 0; z-index: 200; display: none; }
.modal.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(16, 24, 40, .6); backdrop-filter: blur(3px); }
.modal-box {
  position: relative;
  width: min(860px, 94%);
  max-height: 88vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  margin: 6vh auto;
  box-shadow: var(--shadow-lg);
  animation: pop .25s ease;
}
@keyframes pop { from { transform: scale(.96) translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-close {
  position: sticky;
  top: 0;
  margin-left: auto;
  display: block;
  background: var(--dark);
  color: #fff;
  border: none;
  width: 38px; height: 38px;
  border-radius: 0 16px 0 12px;
  font-size: 16px;
  cursor: pointer;
  z-index: 2;
}
.modal-body { padding: 0 34px 34px; margin-top: -38px; }

.pm-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 34px; padding-top: 26px; }
.pm-media img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }
.pm-item { color: var(--primary); font-weight: 700; letter-spacing: 1px; font-size: 13px; }
.pm-title { color: var(--dark); font-size: 24px; line-height: 1.3; margin: 6px 0 18px; }
.pm-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.pm-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
.pm-table td:first-child { color: var(--muted); width: 130px; font-weight: 600; }
.pm-table td:last-child { color: var(--dark-2); }
.pm-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

/* ====== Reveal animation ====== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ====== WeChat / in-app browser guide overlay ====== */
.wx-guide {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: none;
  background: rgba(16, 24, 40, .86);
}
.wx-guide.show { display: block; }
.wx-guide-arrow {
  position: absolute;
  top: 8px;
  right: 14px;
  animation: wxArrow 1.2s ease-in-out infinite;
}
@keyframes wxArrow {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(-6px, 8px); }
}
.wx-guide-box {
  position: absolute;
  top: 16%;
  left: 50%;
  transform: translateX(-50%);
  width: min(420px, 88%);
  background: #fff;
  border-radius: 16px;
  padding: 30px 28px;
  text-align: center;
}
.wx-guide-icon { font-size: 40px; margin-bottom: 10px; }
.wx-guide-box h3 { color: var(--dark); font-size: 22px; margin-bottom: 14px; }
.wx-step { color: var(--dark-2); font-size: 16px; line-height: 1.7; margin-bottom: 12px; }
.wx-step b { color: var(--primary); }
.wx-sub { color: var(--muted); font-size: 14px; line-height: 1.7; margin-bottom: 20px; }
.wx-guide-actions { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.wx-tip { font-size: 13px; color: var(--muted); line-height: 1.6; margin-top: 4px; }

/* ====== Draft resume bar ====== */
.draft-bar {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translate(-50%, 120%);
  z-index: 130;
  width: min(680px, 94%);
  background: var(--dark);
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  transition: transform .35s ease;
}
.draft-bar.show { transform: translate(-50%, 0); }
.draft-text { flex: 1; font-size: 14px; }
.btn-sm { padding: 9px 16px; font-size: 14px; white-space: nowrap; }
.draft-close {
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 8px;
  position: relative; z-index: 10; pointer-events: auto;
  min-width: 32px; min-height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.draft-close:hover { color: #fff; background: rgba(255,255,255,.1); border-radius: 6px; }

/* ====== PWA install prompt ====== */
.pwa-install {
  position: fixed;
  left: 50%;
  bottom: 80px;
  transform: translate(-50%, 120%);
  z-index: 145;
  width: min(680px, 94%);
  background: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-lg);
  transition: transform .35s ease;
}
.pwa-install.show { transform: translate(-50%, 0); }
.pwa-install-icon img {
  width: 44px; height: 44px; border-radius: 10px; object-fit: cover;
}
.pwa-install-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.pwa-install-text strong { font-size: 15px; color: var(--dark); }
.pwa-install-text span { font-size: 13px; color: var(--muted); }
.pwa-close {
  background: none; border: none; color: var(--muted);
  font-size: 16px; cursor: pointer; padding: 4px 8px;
  position: relative; z-index: 10; pointer-events: auto;
  min-width: 32px; min-height: 32px;
  display: flex; align-items: center; justify-content: center;
}
.pwa-close:hover { color: var(--dark); background: #f1f5f9; border-radius: 6px; }

/* ====== Responsive ====== */
@media (max-width: 1024px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .stats-grid { grid-template-columns: repeat(3, 1fr); row-gap: 26px; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; gap: 36px; }
  .contact-inner { grid-template-columns: 1fr; gap: 40px; }
  .pm-grid { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .section { padding: 64px 0; }
  .nav-cta { display: none; }
  .nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    width: min(300px, 78vw);
    background: #fff;
    flex-direction: column;
    padding: 90px 32px 32px;
    gap: 8px;
    box-shadow: var(--shadow-lg);
    transform: translateX(100%);
    transition: transform .3s ease;
    z-index: 99;
  }
  .nav.open { transform: none; }
  .nav-link { font-size: 17px; padding: 10px 0; }
  .hamburger { display: block; position: relative; z-index: 101; }
  .hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .hamburger.open span:nth-child(2) { opacity: 0; }
  .hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .topbar-left { display: none; }
  .topbar-inner { justify-content: center; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .modal-body { padding: 0 22px 24px; }
  .hero { padding: 56px 0; }
  .hero-points { flex-direction: column; gap: 8px; }
}

@media (max-width: 480px) {
  .footer-inner { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   RTL — 阿拉伯语从右到左布局
   flex/grid 会随 dir="rtl" 自动翻转，这里只覆盖物理方向属性
   ============================================================ */
[dir="rtl"] body { text-align: right; }

/* 顶栏 / 头部 */
[dir="rtl"] .logo { margin-right: 0; margin-left: auto; }
[dir="rtl"] .nav-link::after { left: auto; right: 0; }
[dir="rtl"] .lang-menu { right: auto; left: 0; text-align: right; }

/* Hero 标签字距（阿语不需要英文字距） */
[dir="rtl"] .hero-tag { letter-spacing: 0; }
[dir="rtl"] .hero h1 { letter-spacing: 0; }
[dir="rtl"] .pm-item { letter-spacing: 0; }

/* 产品卡片：角标移到右侧，规格标签顺序自动翻转 */
[dir="rtl"] .product-badge { left: auto; right: 12px; }

/* 关于我们：对勾移到右侧 */
[dir="rtl"] .about-list li { padding-left: 0; padding-right: 26px; }
[dir="rtl"] .about-list li::before { left: auto; right: 0; }

/* 弹窗关闭按钮：右上角 → 左上角，圆角镜像 */
[dir="rtl"] .modal-close {
  margin-left: 0;
  margin-right: auto;
  border-radius: 16px 0 12px 0;
}
[dir="rtl"] .pm-table td { text-align: right; }

/* 输入框文本方向跟随 RTL（数字/邮箱仍可自动 LTR 显示） */
[dir="rtl"] input,
[dir="rtl"] textarea,
[dir="rtl"] select { text-align: right; }

/* 移动端抽屉菜单：从右侧滑出 → 从左侧滑出 */
@media (max-width: 768px) {
  [dir="rtl"] .nav {
    right: auto;
    left: 0;
    transform: translateX(-100%);
  }
  [dir="rtl"] .nav.open { transform: none; }
}

/* 注意：微信引导遮罩的右上角箭头不翻转——
   微信的 ··· 菜单在物理右上角，与页面语言方向无关 */

