/* ==========================================================================
   OUYIGANG — 新站视觉（工业钢蓝 + 橙色强调）
   断点基线：390（手机） / 834（平板） / 1440（桌面）
   ========================================================================== */

:root {
  --navy:      #13293d;
  --navy-2:    #0b1c2b;
  --accent:    #ff7a1a;
  --accent-dk: #e06508;
  --ink:       #0f1e2e;
  --muted:     #64748b;
  --line:      #e2e8ef;
  --alt:       #f6f8fa;
  --white:     #ffffff;
  --ok:        #15803d;
  --radius:    8px;
  --shadow:    0 1px 2px rgba(15,30,46,.04), 0 8px 24px rgba(15,30,46,.06);
  --shadow-lg: 0 2px 6px rgba(15,30,46,.06), 0 18px 48px rgba(15,30,46,.10);
  --maxw:      1240px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy); text-decoration: none; }
a:hover { color: var(--accent-dk); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.65rem, 1.2rem + 2vw, 2.6rem); }
h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.8rem); }
h3 { font-size: 1.1rem; }
p  { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }

/* RTL：整站 dir 切到 rtl 时的最小修正 */
[dir="rtl"] ul, [dir="rtl"] ol { padding-left: 0; padding-right: 1.25em; }
[dir="rtl"] .row { flex-direction: row-reverse; }

.wrap  { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 860px; }
.section { padding: 56px 0; }
.section--alt { background: var(--alt); }
.section--navy { background: var(--navy); color: #fff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.lead { font-size: 1.08rem; color: var(--muted); max-width: 720px; }
.muted { color: var(--muted); }
.small { font-size: .88rem; }
.center { text-align: center; }

/* ---------- 头部 ---------- */
.topbar { background: var(--navy-2); color: #cbd5e1; font-size: .82rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #cbd5e1; }
.topbar a:hover { color: #fff; }

.site-header { position: sticky; top: 0; z-index: 60; background: #fff; border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand-mark {
  width: 38px; height: 38px; flex: none; border-radius: 7px; object-fit: contain;
  /* 图片自带颜色和内容，去掉文字方块的背景/字体样式 */
}
.brand-text strong { display: block; font-size: 1.06rem; letter-spacing: .02em; line-height: 1.1; }
.brand-text span { display: block; font-size: .7rem; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }

.nav { margin-left: auto; }
.nav > ul { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav > ul > li { position: relative; }
.nav a {
  display: block; padding: 10px 12px; font-size: .94rem; font-weight: 600;
  color: var(--navy); border-radius: 6px; white-space: nowrap;
}
.nav a:hover, .nav .is-open > a { background: var(--alt); color: var(--accent-dk); }
.nav .has-sub > a::after { content: ""; display: inline-block; margin-left: 5px; border: 4px solid transparent; border-top-color: currentColor; transform: translateY(2px); }
.nav .sub {
  position: absolute; top: 100%; left: 0; min-width: 300px; z-index: 70;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 8px; list-style: none; margin: 0; display: none;
}
.nav li:hover > .sub, .nav li:focus-within > .sub { display: block; }
.nav .sub a { font-weight: 500; font-size: .88rem; padding: 8px 10px; white-space: normal; }

.header-cta { display: flex; align-items: center; gap: 10px; flex: none; }
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 6px; font-weight: 700;
  font-size: .92rem; border: 1px solid transparent; cursor: pointer; transition: .15s;
  background: var(--accent); color: #fff;
}
.btn:hover { background: var(--accent-dk); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--navy); color: var(--navy); background: transparent; }
.btn--light { background: #fff; color: var(--navy); }
.btn--block { display: block; width: 100%; text-align: center; }

.lang-switch { position: relative; }
.lang-switch > button {
  background: transparent; border: 1px solid var(--line); border-radius: 6px;
  padding: 8px 11px; font: inherit; font-size: .86rem; font-weight: 600; color: var(--navy); cursor: pointer;
}
.lang-switch ul {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 80; min-width: 168px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); list-style: none; margin: 0; padding: 6px; display: none;
  max-height: 320px; overflow: auto;
}
.lang-switch:hover ul, .lang-switch:focus-within ul { display: block; }
.lang-switch a { display: block; padding: 7px 10px; font-size: .88rem; border-radius: 5px; }
.lang-switch a:hover { background: var(--alt); }
.lang-switch a.is-on { font-weight: 700; color: var(--accent-dk); }

.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; cursor: pointer; color: var(--navy); }

/* ---------- 首页 Hero ---------- */
/* hero 图用 <img> 而非 CSS background —— background 要等 CSS 解析完才被发现，
   会拖慢 LCP；<img> 在 HTML 里可被预加载扫描器立刻发现。 */
.hero { position: relative; color: #fff; overflow: hidden; background: var(--navy); }
.hero-img { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(100deg, rgba(11,28,43,.95) 0%, rgba(11,28,43,.84) 52%, rgba(11,28,43,.58) 100%);
}
.hero .wrap { position: relative; padding: 86px 20px 78px; }
.hero h1 { color: #fff; max-width: 20ch; margin-bottom: 16px; }
.hero p.lead { color: #d7e0ea; max-width: 62ch; font-size: 1.12rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 34px; }
.hero-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 18px; max-width: 720px; }
.hero-stats div { border-left: 3px solid var(--accent); padding-left: 14px; }
.hero-stats b { display: block; font-size: 1.7rem; line-height: 1.1; color: #fff; }
.hero-stats span { font-size: .84rem; color: #b9c6d4; }

/* ---------- 卡片 / 网格 ---------- */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1000px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px)  { .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: flex; flex-direction: column; transition: .18s;
}
.card:hover { border-color: #cbd5e1; box-shadow: var(--shadow); transform: translateY(-2px); }
.card-media { aspect-ratio: 4 / 3; background: var(--alt); overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-media .ph {
  width: 100%; height: 100%; display: grid; place-items: center; color: #94a3b8;
  font-size: .82rem; background: repeating-linear-gradient(45deg, #f1f5f9, #f1f5f9 10px, #e8eef4 10px, #e8eef4 20px);
}
.card-body { padding: 16px 18px 18px; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1rem; margin-bottom: 6px; }
.card-body h3 a { color: var(--navy); }
.card-body p { font-size: .88rem; color: var(--muted); margin-bottom: 12px; }
.card-foot { margin-top: auto; font-size: .82rem; color: var(--accent-dk); font-weight: 700; }

/* ---------- 面包屑 ---------- */
.crumbs { font-size: .82rem; color: var(--muted); padding: 14px 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: #cbd5e1; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent-dk); }

/* ---------- 页面头 ---------- */
.page-head { background: var(--navy); color: #fff; padding: 44px 0 40px; }
.page-head h1 { color: #fff; margin-bottom: 10px; }
.page-head .lead { color: #c3d0dd; }

/* ---------- 正文排版 ---------- */
.entry { max-width: 820px; }
.entry h2 { margin-top: 1.6em; }
.entry h3 { margin-top: 1.3em; }
.entry img { border-radius: var(--radius); margin: 18px 0; }
.entry table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: .93rem; }
.entry th, .entry td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; vertical-align: top; }
.entry th { background: var(--alt); width: 34%; font-weight: 600; }
.entry blockquote { border-left: 3px solid var(--accent); margin: 18px 0; padding: 4px 0 4px 16px; color: var(--muted); }

/* 规格表 */
.spec-table { width: 100%; border-collapse: collapse; font-size: .93rem; margin: 14px 0 0; }
.spec-table th, .spec-table td { border-bottom: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.spec-table th { width: 36%; color: var(--muted); font-weight: 600; background: var(--alt); }

/* ---------- 布局：内容 + 侧栏 ---------- */
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
@media (max-width: 1000px) { .cols { grid-template-columns: 1fr; } }
.side-card { background: var(--alt); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 22px; }
.side-card h3 { font-size: 1rem; margin-bottom: 10px; }
.side-card ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.side-card li { padding: 7px 0; border-bottom: 1px solid var(--line); }
.side-card li:last-child { border-bottom: 0; }
.side-card--navy { background: var(--navy); color: #fff; border-color: var(--navy); }
.side-card--navy h3 { color: #fff; }
.side-card--navy a { color: #ffd9b8; }
.side-card--navy a:hover { color: #fff; }

/* ---------- 表单 ---------- */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: .84rem; font-weight: 700; margin-bottom: 5px; }
.field label .req { color: var(--accent); }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px;
  font: inherit; font-size: .94rem; background: #fff; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid rgba(255,122,26,.35); border-color: var(--accent);
}
.field textarea { min-height: 110px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .8rem; color: var(--muted); margin-top: 10px; }
.form-msg { padding: 12px 14px; border-radius: 6px; font-size: .9rem; margin-bottom: 14px; display: none; }
.form-msg--ok  { background: #eaf7ee; color: var(--ok); border: 1px solid #bfe3cb; }
.form-msg--err { background: #fdeceb; color: #b3261e; border: 1px solid #f5c6c2; }

/* ---------- 联系信息 ---------- */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 20px; }
.contact-item { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.contact-item b { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.contact-item a, .contact-item span { font-size: 1rem; font-weight: 600; color: var(--navy); }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--navy-2); color: #cbd5e1; padding: 48px 0 0; margin-top: 0; }
.site-footer h4 { color: #fff; font-size: .86rem; text-transform: uppercase; letter-spacing: .07em; margin-bottom: 14px; }
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: #fff; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 32px; }
@media (max-width: 900px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer ul { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
.site-footer li { padding: 4px 0; }
.footer-bottom {
  margin-top: 36px; border-top: 1px solid rgba(255,255,255,.12); padding: 18px 0;
  font-size: .82rem; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between;
}

/* ---------- 页脚社交图标 ---------- */
.footer-social__t {
  color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .07em;
  margin: 22px 0 10px; font-weight: 600;
}
.social-links { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; }
.social-links a {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(255,255,255,.09); color: #cbd5e1;
  transition: background .15s ease, color .15s ease, transform .15s ease;
}
.social-links a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.social-links svg { width: 18px; height: 18px; fill: currentColor; display: block; }

/* ---------- 分页 ---------- */
.pager { display: flex; gap: 8px; justify-content: center; margin-top: 32px; flex-wrap: wrap; }
.pager a, .pager span {
  padding: 8px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: .9rem; font-weight: 600;
}
.pager .on { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ---------- 404 ---------- */
.error-404 { padding: 70px 0; text-align: center; }
.error-404 .search-form { display: flex; gap: 8px; max-width: 520px; margin: 24px auto; }
.error-404 .search-form input { flex: 1; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; font: inherit; }

/* ---------- 右下角悬浮联系方式（全尺寸常驻）----------
   老站这里是常驻的客服条（两个 WhatsApp 号 + 电话 + 邮箱 + Ask + 回顶）。
   新版对齐老站：WhatsApp / WhatsApp 备用号 / 邮箱 / 电话 / RFQ / 回顶。
   图标全部内联 SVG，不依赖图标字体（避免 woff 加载失败整站图标变空白）。 */
.float-cta { position: fixed; right: 16px; bottom: 16px; z-index: 90; display: flex; flex-direction: column; gap: 8px; }
.float-cta .fc {
  position: relative;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  box-shadow: var(--shadow-lg);
  transition: transform .15s ease, box-shadow .15s ease;
}
.float-cta .fc:hover { transform: translateY(-2px); }
.float-cta .fc svg { width: 22px; height: 22px; fill: currentColor; display: block; }
.float-cta .fc--wa   { background: #25d366; color: #fff; }
.float-cta .fc--wa2  { background: #128c7e; color: #fff; }
.float-cta .fc--mail { background: var(--navy-2); color: #fff; }
.float-cta .fc--tel  { background: var(--navy-2); color: #fff; }
.float-cta .fc--contact { background: var(--accent); color: #fff; }
.float-cta .fc--top  { background: #fff; color: var(--navy-2); }
.float-cta .fc__dot {
  position: absolute; top: -2px; right: -2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; color: #128c7e;
  font-size: .62rem; font-weight: 700; line-height: 16px; text-align: center;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
/* 手机（≤560px） */
@media (max-width: 560px) {
  .float-cta { right: 12px; bottom: 12px; gap: 6px; }
  .float-cta .fc { width: 42px; height: 42px; }
  .float-cta .fc svg { width: 20px; height: 20px; }
}

/* 平板（561–1024px）：布局与桌面完全一致，只把外边距收 2px，避免大屏平板上贴边太近。 */
@media (min-width: 561px) and (max-width: 1024px) {
  .float-cta { right: 14px; bottom: 14px; }
}

/* 矮屏保护（视口高 ≤ 640px —— 手机横屏、小平板横屏）：
   浮动条现在只有 6 个主按钮（社交账号已挪去页脚），总高 ≈ 6×46 + 5×8 = 316px，
   横屏视口 375–420px 高本就不顶了；这里再缩一档，避免小屏手机被主按钮挤掉点击热区。 */
@media (max-height: 640px) {
  .float-cta { gap: 5px; }
  .float-cta .fc { width: 38px; height: 38px; }
  .float-cta .fc svg { width: 18px; height: 18px; }
}

/* ---------- 后台 ---------- */
.admin-body { background: #f1f5f9; }
.admin-wrap { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.admin-side { background: var(--navy-2); color: #cbd5e1; padding: 18px 0; }
.admin-side h1 { color: #fff; font-size: 1rem; padding: 0 18px 14px; margin: 0; }
.admin-side a { display: block; padding: 9px 18px; color: #cbd5e1; font-size: .9rem; }
.admin-side a:hover, .admin-side a.on { background: rgba(255,255,255,.08); color: #fff; }
.admin-side .grp { font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; padding: 16px 18px 6px; color: #7f93a8; }
.admin-main { padding: 22px 26px; }
.admin-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; gap: 12px; flex-wrap: wrap; }
.admin-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin-bottom: 20px; }
table.admin-tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.admin-tbl th, table.admin-tbl td { border-bottom: 1px solid var(--line); padding: 9px 10px; text-align: left; vertical-align: middle; }
table.admin-tbl th { background: var(--alt); font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.badge { display: inline-block; padding: 2px 8px; border-radius: 20px; font-size: .74rem; font-weight: 700; }
.badge--on  { background: #eaf7ee; color: var(--ok); }
.badge--off { background: #f1f5f9; color: var(--muted); }
.login-box { max-width: 380px; margin: 90px auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.login-box h1 { font-size: 1.3rem; margin-bottom: 18px; }

/* ---------- 响应式 ---------- */
@media (max-width: 1000px) {
  .nav { display: none; }
  .nav.is-open {
    display: block; position: absolute; top: 68px; left: 0; right: 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow); max-height: 76vh; overflow: auto; padding: 10px;
  }
  .nav.is-open > ul { display: block; }
  .nav.is-open > ul > li > a { padding: 12px; font-size: 1rem; }
  .nav.is-open .sub { position: static; display: block; box-shadow: none; border: 0; border-left: 2px solid var(--line); border-radius: 0; margin: 0 0 6px 10px; padding: 0 0 0 6px; min-width: 0; }
  .nav-toggle { display: block; margin-left: auto; }
  .header-cta .btn--ghost { display: none; }
}
@media (max-width: 560px) {
  .hero .wrap { padding: 56px 20px 48px; }
  .section { padding: 40px 0; }
  .brand-text span { display: none; }
}
