/* ==========================================================
   เยียนเฉิง เป่ยกง ออโตเมชั่น — 泰语独立站样式
   断点规则（严格执行）：
   桌面端      ：主推 PRDS 通栏，下方 4 款产品 2×2 网格
   ≤ 960px    ：主推产品上下堆叠，下方产品保持 2×2
   ≤ 720px    ：所有产品模块单列堆叠
   ========================================================== */

/* ---------- 本地可变字体（完全离线） ---------- */
@font-face {
  font-family: 'Noto Sans Thai';
  src: url('../fonts/NotoSansThai-Variable.ttf') format('truetype-variations'),
       url('../fonts/NotoSansThai-Variable.ttf') format('truetype');
  font-weight: 100 900;
  font-stretch: 75% 125%;
  font-style: normal;
  font-display: swap;
}

/* ---------- 设计变量 ---------- */
:root {
  --navy-900: #0a1626;
  --navy-800: #0f2036;
  --navy-700: #16324f;
  --navy-600: #1e4266;
  --steel: #33465e;
  --accent: #00b4d8;
  --accent-dark: #0093b3;
  --accent-soft: rgba(0, 180, 216, .12);
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1e2a38;
  --muted: #5b6b7d;
  --line: #dbe4ec;
  --whatsapp: #25d366;
  --lineapp: #06c755;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(10, 22, 38, .08);
  --shadow-md: 0 8px 28px rgba(10, 22, 38, .14);
  --header-h: 68px;
  --topbar-h: 36px;
}

/* ---------- 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-padding-top: calc(var(--header-h) + var(--topbar-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: 'Noto Sans Thai', 'Leelawadee UI', Tahoma, sans-serif;
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; display: block; }
a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy-800);
  margin: 0 0 .6em;
}

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

.section { padding: 84px 0; }

.section-head {
  text-align: center;
  max-width: 820px;
  margin: 0 auto 48px;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); }
.section-intro { color: var(--muted); margin: 0; }
.section-head-light h2, .section-head-light .section-intro { color: #fff; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-dark); box-shadow: 0 6px 18px rgba(0, 180, 216, .35); }
.btn-outline { border-color: rgba(255, 255, 255, .75); color: #fff; background: transparent; }
.btn-outline:hover { background: rgba(255, 255, 255, .12); }
.btn-light { background: #fff; color: var(--navy-800); }
.btn-light:hover { box-shadow: 0 6px 18px rgba(255, 255, 255, .3); }
.btn-lg { padding: 15px 34px; font-size: 1.06rem; }
.btn-block { width: 100%; }
.btn-whatsapp { background: var(--whatsapp); color: #fff; margin-top: 14px; }
.btn-whatsapp:hover { background: #1eb856; }

/* ---------- 页头 ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
}
.topbar {
  background: var(--navy-900);
  color: #c7d4e2;
  font-size: .85rem;
  height: var(--topbar-h);
  display: flex;
  align-items: center;
}
.topbar-inner { display: flex; gap: 28px; align-items: center; }
.topbar a { color: #e8f0f8; }
.topbar-hours { margin-left: auto; }

.mainbar {
  background: var(--navy-800);
  height: var(--header-h);
  display: flex;
  align-items: center;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.mainbar-inner { display: flex; align-items: center; gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff;
  font-weight: 800;
  font-size: 1.05rem;
  border-radius: 9px;
  letter-spacing: .5px;
}
.brand-text { font-weight: 700; line-height: 1.25; font-size: 1rem; }
.brand-text small { font-weight: 400; font-size: .78rem; color: #a9bdd2; }

.main-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.main-nav ul {
  list-style: none;
  display: flex;
  gap: 26px;
  margin: 0;
  padding: 0;
}
.nav-link {
  color: #d5e1ee;
  font-weight: 500;
  font-size: .96rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
.nav-link:hover, .nav-link.active {
  color: #fff;
  border-bottom-color: var(--accent);
  text-decoration: none;
}
.nav-cta { padding: 9px 20px; font-size: .92rem; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .35);
  border-radius: 8px;
  cursor: pointer;
  padding: 10px;
}
.nav-toggle span {
  display: block;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: calc(var(--header-h) + var(--topbar-h) + 48px) 0 80px;
  background:
    linear-gradient(105deg, rgba(10, 22, 38, .93) 0%, rgba(15, 32, 54, .82) 45%, rgba(22, 50, 79, .55) 100%),
    url('../image/hero-bg.jpg') center / cover no-repeat;
  color: #fff;
}
.hero-inner { max-width: 860px; }
.hero-tagline {
  display: inline-block;
  color: var(--accent);
  font-weight: 600;
  letter-spacing: .4px;
  border: 1px solid rgba(0, 180, 216, .45);
  background: rgba(0, 180, 216, .1);
  padding: 6px 16px;
  border-radius: 999px;
  font-size: .92rem;
  margin: 0 0 22px;
}
.hero-title {
  color: #fff;
  font-size: clamp(1.7rem, 4.2vw, 2.9rem);
  font-weight: 800;
  margin-bottom: 20px;
}
.hero-sub {
  color: #cfdaea;
  font-size: clamp(1rem, 1.6vw, 1.13rem);
  max-width: 760px;
  margin: 0 0 34px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 16px; }

/* ---------- 实力数据栏 ---------- */
.stats {
  background: var(--navy-800);
  padding: 44px 0;
  color: #fff;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}
.stat-item { text-align: center; padding: 0 12px; }
.stat-item + .stat-item { border-left: 1px solid rgba(255, 255, 255, .12); }
.stat-num {
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  font-weight: 800;
  color: var(--accent);
  line-height: 1.2;
}
.stat-num span { font-size: .55em; font-weight: 600; }
.stat-item p { margin: 8px 0 0; color: #b9c8da; font-size: .92rem; line-height: 1.6; }

/* ---------- 产品矩阵 ---------- */
.products { background: var(--bg); }

/* 主推通栏卡片：桌面端左右布局占满整行 */
.product-featured {
  display: grid;
  grid-template-columns: 46% 54%;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--line);
  margin-bottom: 32px;
}
.featured-media { min-height: 100%; }
.featured-media img { width: 100%; height: 100%; object-fit: cover; }
.featured-body { padding: 42px 44px; }
.product-kicker {
  color: var(--accent-dark);
  font-weight: 700;
  font-size: .88rem;
  letter-spacing: .6px;
  text-transform: uppercase;
  margin: 0 0 10px;
}
.featured-body h3 { font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
.featured-body > p { color: var(--muted); }
.product-highlight {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 10px 16px;
  border-radius: 0 8px 8px 0;
  color: var(--navy-700) !important;
  font-weight: 500;
}
.spec-chips {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0;
  margin: 20px 0 26px;
}
.spec-chips li {
  background: #eef4f9;
  border: 1px solid var(--line);
  color: var(--steel);
  font-size: .86rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
}

/* 下方 4 款：桌面端 2×2 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.product-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card-media { aspect-ratio: 4 / 3; overflow: hidden; }
.card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.product-card:hover .card-media img { transform: scale(1.04); }
.card-body { padding: 26px 28px 30px; }
.card-body h3 { font-size: 1.14rem; }
.card-body > p { color: var(--muted); font-size: .95rem; }
.card-body .product-highlight { font-size: .9rem; }

/* ---------- 行业方案 ---------- */
.industries { background: #fff; }
.industry-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.industry-card {
  display: grid;
  grid-template-columns: 200px 1fr;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.industry-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.industry-card .card-media { aspect-ratio: auto; height: 100%; }
.industry-card .card-body { padding: 24px 26px; }
.industry-card h3 { font-size: 1.08rem; }
.industry-challenge, .industry-solution { font-size: .9rem; color: var(--muted); margin: 0 0 10px; }
.industry-solution strong { color: var(--accent-dark); }
.industry-challenge strong { color: var(--navy-700); }

/* ---------- Why Choose ---------- */
.why { background: var(--bg); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.why-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease;
}
.why-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.why-icon {
  width: 54px; height: 54px;
  display: grid; place-items: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 1.6rem;
  font-weight: 800;
  border-radius: 12px;
  margin-bottom: 18px;
}
.why-card h3 { font-size: 1.05rem; }
.why-card p { color: var(--muted); font-size: .92rem; margin: 0; }

/* ---------- CTA 横幅 ---------- */
.cta-band {
  background:
    linear-gradient(100deg, rgba(10, 22, 38, .94), rgba(22, 50, 79, .88)),
    url('../image/hero-bg.jpg') center / cover no-repeat fixed;
  color: #fff;
  padding: 76px 0;
  text-align: center;
}
.cta-inner { max-width: 780px; }
.cta-band h2 { color: #fff; font-size: clamp(1.4rem, 2.8vw, 2rem); }
.cta-band p { color: #cfdaea; }
.cta-contact a { color: var(--accent); font-weight: 600; }
.cta-band .btn { margin-top: 18px; }

/* ---------- 关于我们 ---------- */
.about { background: #fff; }
.about-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 48px;
  align-items: center;
  margin-bottom: 64px;
}
.about-grid-alt { grid-template-columns: 1fr 1.15fr; }
.about-text h2 { font-size: clamp(1.35rem, 2.6vw, 1.8rem); }
.about-text p { color: var(--muted); }
.about-media img {
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  aspect-ratio: 4 / 3;
  object-fit: cover;
  width: 100%;
}

.qa-block { margin-bottom: 56px; }
.qa-title { text-align: center; font-size: clamp(1.3rem, 2.4vw, 1.7rem); margin-bottom: 34px; }
.qa-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}
.qa-item {
  background: var(--bg);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 10px;
  padding: 22px 26px;
}
.qa-item h3 { font-size: 1.02rem; margin-bottom: 6px; }
.qa-item p { color: var(--muted); font-size: .92rem; margin: 0; }

.mission {
  background: var(--navy-800);
  border-radius: var(--radius);
  padding: 44px 48px;
  color: #cfdaea;
  text-align: center;
}
.mission h2 { color: #fff; font-size: clamp(1.3rem, 2.4vw, 1.7rem); }
.mission p { margin: 0; }

/* ---------- 质控与服务 ---------- */
.quality { background: var(--bg); }
.quality-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 26px;
}
.quality-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--shadow-sm);
}
.quality-card h3 {
  font-size: 1.1rem;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--accent);
  margin-bottom: 18px;
}
.quality-card ul { list-style: none; margin: 0; padding: 0; }
.quality-card li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: .92rem;
}
.quality-card li::before {
  content: '';
  position: absolute;
  left: 0; top: .62em;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.quality-card li strong { color: var(--navy-700); }

/* ---------- 联系 + RFQ ---------- */
.contact {
  background:
    linear-gradient(100deg, rgba(10, 22, 38, .95), rgba(15, 32, 54, .9)),
    url('../image/hero-bg.jpg') center / cover no-repeat;
}
.contact-grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 34px;
  align-items: start;
}
.info-card {
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .16);
  backdrop-filter: blur(4px);
  border-radius: var(--radius);
  padding: 32px 30px;
  color: #dbe6f2;
}
.info-card h3 { color: #fff; font-size: 1.2rem; }
.info-en { color: #8fa5bd; font-size: .88rem; margin-top: -6px; }
.info-list { list-style: none; margin: 18px 0 0; padding: 0; }
.info-list li { padding: 9px 0; border-bottom: 1px dashed rgba(255, 255, 255, .14); font-size: .95rem; }
.info-list li:last-child { border-bottom: 0; }
.info-list strong { color: #fff; }
.info-list a { color: var(--accent); }

.rfq-form {
  background: var(--card);
  border-radius: var(--radius);
  padding: 36px 38px;
  box-shadow: var(--shadow-md);
}
.rfq-form h3 { font-size: 1.3rem; }
.form-note { color: var(--muted); font-size: .92rem; }
.rfq-form fieldset {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 20px 22px 24px;
  margin: 22px 0 0;
}
.rfq-form legend {
  font-weight: 700;
  color: var(--navy-700);
  font-size: .98rem;
  padding: 0 10px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-row-3 { grid-template-columns: repeat(3, 1fr); }
.form-field { margin-bottom: 16px; }
.form-field label, .field-label {
  display: block;
  font-weight: 600;
  font-size: .88rem;
  color: var(--steel);
  margin-bottom: 6px;
}
.form-field input[type="text"],
.form-field input[type="tel"],
.form-field input[type="email"],
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: #fbfdff;
  transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 180, 216, .18);
}
.check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 400 !important;
  color: var(--muted) !important;
  margin: 4px 20px 4px 0 !important;
  cursor: pointer;
}
.check input { accent-color: var(--accent-dark); width: 16px; height: 16px; }
.rfq-form .btn-block { margin-top: 26px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--navy-900); color: #a9bdd2; }
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.1fr;
  gap: 44px;
  padding: 64px 0 44px;
}
.footer-col h3 { color: #fff; font-size: 1.05rem; margin-bottom: 16px; }
.footer-col p, .footer-col li { font-size: .92rem; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 9px; }
.footer-col a { color: #a9bdd2; }
.footer-col a:hover { color: var(--accent); text-decoration: none; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1);
  padding: 18px 0;
  font-size: .85rem;
  text-align: center;
  color: #7c92aa;
}

/* ---------- 悬浮按钮 ---------- */
.float-contact {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.float-btn {
  width: 54px; height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}
.float-btn:hover { transform: scale(1.08); text-decoration: none; }
.float-whatsapp { background: var(--whatsapp); }
.float-line { background: var(--lineapp); }

/* ---------- 渐显动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .65s ease, transform .65s ease;
}
.reveal.visible { opacity: 1; transform: none; }

/* ==========================================================
   响应式
   ========================================================== */

/* ---------- ≤ 1080px：行业卡与 Why 微调 ---------- */
@media (max-width: 1080px) {
  .industry-card { grid-template-columns: 1fr; }
  .industry-card .card-media { aspect-ratio: 16 / 9; height: auto; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- ≤ 960px 平板端 ----------
   主推产品改为上下堆叠；下方产品保持 2×2 网格 */
@media (max-width: 960px) {
  :root { --topbar-h: 0px; }
  .topbar { display: none; }

  .nav-toggle { display: flex; margin-left: auto; }
  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--navy-800);
    border-top: 1px solid rgba(255, 255, 255, .12);
    box-shadow: 0 14px 24px rgba(0, 0, 0, .3);
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s ease;
  }
  .main-nav.open { max-height: 520px; }
  .main-nav ul { flex-direction: column; gap: 0; padding: 8px 0; }
  .nav-link { display: block; padding: 13px 6%; border-bottom: 1px solid rgba(255, 255, 255, .07); }
  .nav-link:hover, .nav-link.active { border-bottom-color: rgba(255, 255, 255, .07); background: rgba(0, 180, 216, .12); }
  .nav-cta { margin: 14px 6% 18px; text-align: center; }

  /* 主推：上下堆叠 */
  .product-featured { grid-template-columns: 1fr; }
  .featured-media img { aspect-ratio: 16 / 9; height: auto; }
  .featured-body { padding: 32px 28px; }

  /* 下方产品：保持 2×2 */
  .product-grid { grid-template-columns: repeat(2, 1fr); gap: 22px; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 26px 18px; }
  .stat-item:nth-child(3) { border-left: 0; }

  .quality-grid { grid-template-columns: 1fr; }
  .about-grid, .about-grid-alt { grid-template-columns: 1fr; gap: 30px; margin-bottom: 48px; }
  .about-grid-alt .about-media { order: -1; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 34px; }
  .section { padding: 64px 0; }
}

/* ---------- ≤ 720px 移动端：所有产品模块单列堆叠 ---------- */
@media (max-width: 720px) {
  body { font-size: 15px; }

  .hero { min-height: auto; padding-bottom: 64px; }
  .hero-actions .btn { width: 100%; text-align: center; }

  /* 产品全部单列 */
  .product-grid { grid-template-columns: 1fr; }
  .industry-grid { grid-template-columns: 1fr; }
  .why-grid { grid-template-columns: 1fr; }
  .qa-grid { grid-template-columns: 1fr; }

  .stats-grid { grid-template-columns: 1fr; gap: 18px; }
  .stat-item + .stat-item { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; }

  .form-row, .form-row-3 { grid-template-columns: 1fr; gap: 0; }
  .rfq-form { padding: 26px 20px; }

  .footer-grid { grid-template-columns: 1fr; gap: 28px; padding: 48px 0 34px; }
  .mission { padding: 32px 24px; }
  .section { padding: 52px 0; }
  .section-head { margin-bottom: 36px; }
}

/* ---------- 动效偏好 ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
