/* =========================================================
   通达包装 · 全站样式系统 (tongda.css)
   设计语言：高端工业灰 + 通达红 · 克制圆角 · 卡片化布局
   适用：cn_* / index.asp+en_* / jp_* 三语站点（根目录平铺）
   ========================================================= */

:root {
  /* 品牌色 */
  --red: #C8102E;
  --red-dark: #9E0C24;
  --red-soft: #FBE9EC;

  /* 墨色 / 中性 */
  --ink: #0E1116;
  --ink-2: #161B22;
  --gray-900: #1F2937;
  --gray-700: #374151;
  --gray-500: #6B7280;
  --gray-400: #9CA3AF;
  --gray-200: #E5E7EB;
  --gray-100: #EEF0F3;
  --gray-50: #F5F6F8;
  --white: #FFFFFF;

  /* 尺度 */
  --container: 1200px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(14,17,22,.06), 0 1px 3px rgba(14,17,22,.08);
  --shadow: 0 6px 18px rgba(14,17,22,.08);
  --shadow-lg: 0 18px 40px rgba(14,17,22,.14);

  /* 字体 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    "Hiragino Kaku Gothic ProN", "Noto Sans CJK SC", "Noto Sans JP",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.7;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ===================== 顶栏 / 导航 ===================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--gray-200);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}
.brand { display: flex; align-items: center; gap: 12px; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 10px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  color: #fff; font-weight: 800; font-size: 20px;
  display: flex; align-items: center; justify-content: center;
  letter-spacing: -1px;
}
.brand .name { font-weight: 800; font-size: 19px; color: var(--ink); letter-spacing: .5px; }
.brand .name small { display: block; font-weight: 500; font-size: 11px; color: var(--gray-500); letter-spacing: 2px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  font-weight: 600;
  font-size: 15px;
  transition: color .2s, background .2s;
}
.nav a:hover { color: var(--red); background: var(--gray-50); }
.nav a.active { color: var(--red); background: var(--red-soft); }

.lang-switch {
  position: relative;
}
.lang-switch select {
  appearance: none;
  border: 1px solid var(--gray-200);
  background: var(--gray-50);
  color: var(--gray-700);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 34px 9px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.lang-switch::after {
  content: "";
  position: absolute; right: 14px; top: 50%;
  width: 7px; height: 7px;
  border-right: 2px solid var(--gray-400);
  border-bottom: 2px solid var(--gray-400);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  background: var(--white);
  cursor: pointer;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block; width: 20px; height: 2px; margin: 0 auto;
  background: var(--ink); position: relative;
}
.nav-toggle span::before, .nav-toggle span::after {
  content: ""; position: absolute; left: 0;
}
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }

/* ===================== 英雄区 ===================== */
.hero {
  position: relative;
  color: #fff;
  background: linear-gradient(120deg, rgba(14,17,22,.86), rgba(14,17,22,.55)),
              url("img/topbg.png") center/cover no-repeat;
  background-color: var(--ink);
}
.hero-inner {
  padding: 96px 24px 104px;
  max-width: 760px;
}
.hero .eyebrow {
  display: inline-block;
  font-size: 13px; letter-spacing: 3px; text-transform: uppercase;
  color: #ffd9df; font-weight: 700; margin-bottom: 18px;
}
.hero h1 {
  font-size: clamp(30px, 5vw, 52px);
  line-height: 1.2;
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: .5px;
}
.hero p {
  font-size: clamp(15px, 2.2vw, 19px);
  color: rgba(255,255,255,.86);
  max-width: 620px;
  margin: 0 0 30px;
}
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 999px;
  font-weight: 700; font-size: 15px;
  transition: transform .2s, box-shadow .2s, background .2s;
  cursor: pointer; border: 1px solid transparent;
}
.btn-primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(200,16,46,.32); }
.btn-primary:hover { background: var(--red-dark); transform: translateY(-2px); }
.btn-ghost { background: rgba(255,255,255,.10); color:#fff; border-color: rgba(255,255,255,.4); }
.btn-ghost:hover { background: rgba(255,255,255,.18); }

/* ===================== 内页标题区 ===================== */
.pagehero {
  background: linear-gradient(120deg, rgba(14,17,22,.88), rgba(14,17,22,.58)),
              url("img/topbg.png") center/cover no-repeat;
  background-color: var(--ink);
  color: #fff;
}
.pagehero .inner { padding: 60px 24px 52px; }
.pagehero .kicker { color: #ffd9df; font-weight: 800; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; }
.pagehero h1 { margin: 8px 0 0; font-size: clamp(26px, 4vw, 38px); font-weight: 800; letter-spacing: .5px; }
.pagehero p { margin: 12px 0 0; color: rgba(255,255,255,.82); max-width: 640px; }

/* ===================== 内容区块 ===================== */
.section { padding: 78px 0; }
.section.alt { background: var(--gray-50); }
.section-head { margin-bottom: 40px; max-width: 760px; }
.section-head .kicker {
  color: var(--red); font-weight: 800; font-size: 13px;
  letter-spacing: 3px; text-transform: uppercase;
}
.section-head h2 {
  font-size: clamp(24px, 3.4vw, 34px);
  margin: 10px 0 12px; color: var(--ink); font-weight: 800;
}
.section-head p { color: var(--gray-500); margin: 0; font-size: 16px; }

.lead { font-size: 16px; color: var(--gray-700); }

/* 两栏：图文 */
.split {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 48px;
  align-items: center;
}
.split.reverse { grid-template-columns: .85fr 1.15fr; }
.split .media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--gray-200);
  background: var(--gray-100);
}
.split .media img { width: 100%; height: 100%; object-fit: cover; }
.prose p { margin: 0 0 16px; color: var(--gray-700); }
.prose strong { color: var(--ink); }

.more-link { color: var(--red); font-weight: 700; }
.more-link:hover { text-decoration: underline; }

/* ===================== 卡片 / 网格 ===================== */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--red-soft); }

.card-link { display: block; text-decoration: none; color: inherit; cursor: pointer; border-radius: var(--radius); transition: transform .25s, box-shadow .25s, border-color .25s; }
.card-link:hover .style-card { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--red-soft); }
.product-card .thumb {
  aspect-ratio: 4/5;
  background: var(--gray-50);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid var(--gray-100);
}
.product-card .thumb img { max-height: 86%; max-width: 100%; width: auto; object-fit: contain; }
.product-card .body { padding: 18px 18px 22px; }
.product-card .body h3 { margin: 0 0 4px; font-size: 17px; color: var(--ink); }
.product-card .body .en { color: var(--gray-400); font-size: 13px; margin: 0 0 10px; }
.product-card .body p { margin: 0; color: var(--gray-500); font-size: 14px; }
.product-card { min-width: 0; }

/* 款式卡片（产品内联） */
.style-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s;
}
.style-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.style-card .pic {
  width: 120px; height: 150px; object-fit: contain;
  background: var(--gray-50); border-radius: var(--radius-sm);
  border: 1px solid var(--gray-100);
}
.style-card h4 { margin: 0 0 6px; font-size: 16px; color: var(--ink); }
.style-card p { margin: 0; font-size: 13.5px; color: var(--gray-500); line-height: 1.6; }

/* 列表型（优势 / 目标） */
.info-list { display: grid; gap: 16px; }
.info-item {
  display: grid; grid-template-columns: 44px 1fr; gap: 16px;
  align-items: start;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.info-item .num {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--red-soft); color: var(--red);
  font-weight: 800; font-size: 18px;
  display: flex; align-items: center; justify-content: center;
}
.info-item h4 { margin: 0 0 6px; color: var(--ink); font-size: 16px; }
.info-item p { margin: 0; color: var(--gray-500); font-size: 14.5px; }

/* 资质 / 设备图廊 */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.gallery a {
  border: 1px solid var(--gray-200); border-radius: var(--radius-sm);
  overflow: hidden; background: #fff; box-shadow: var(--shadow-sm);
}
.gallery a img { width: 100%; height: 130px; object-fit: cover; }
.gallery.certs a { background: var(--gray-50); }
.gallery.certs a img { height: 150px; object-fit: contain; padding: 8px; }

/* 内衬袋图廊（带名称） */
.liner-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.liner-grid figure { margin: 0; background: #fff; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); }
.liner-grid figure a { display: block; }
.liner-grid figure img { width: 100%; height: 120px; object-fit: contain; padding: 10px; background: var(--gray-50); }
.liner-grid figcaption { padding: 10px; text-align: center; font-weight: 600; color: var(--gray-700); font-size: 14px; }

/* 子导航标签 */
.subtabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.subtabs a {
  padding: 9px 18px; border-radius: 999px;
  border: 1px solid var(--gray-200); color: var(--gray-700);
  font-weight: 600; font-size: 14px; transition: all .2s;
}
.subtabs a:hover { border-color: var(--red); color: var(--red); }
.subtabs a.active { background: var(--red); border-color: var(--red); color: #fff; }

/* ===================== 联系页 ===================== */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 40px; align-items: start; }
.contact-info { display: grid; gap: 14px; }
.contact-row {
  display: grid; grid-template-columns: 96px 1fr; gap: 12px;
  padding: 16px 18px; background: #fff;
  border: 1px solid var(--gray-200); border-radius: var(--radius);
}
.contact-row .label { color: var(--gray-400); font-weight: 700; }
.contact-row .value { color: var(--ink); font-weight: 600; }
.contact-media { border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--gray-200); }
.contact-media img { width: 100%; }

/* ===================== 页脚 ===================== */
.site-footer { background: var(--ink); color: rgba(255,255,255,.72); margin-top: 0; }
.site-footer .top {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px;
  padding: 54px 0;
}
.site-footer .f-brand .name { color: #fff; font-weight: 800; font-size: 18px; margin-bottom: 14px; }
.site-footer .f-brand p { margin: 0 0 6px; font-size: 14px; }
.site-footer .f-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 24px; }
.site-footer .f-links .label { color:#fff; font-weight:700; font-size:14px; margin-bottom:8px; }
.site-footer .f-links a { color: rgba(255,255,255,.7); font-size: 14px; white-space: nowrap; }
.site-footer .f-links a:hover { color: #fff; }
.site-footer .bottom {
  border-top: 1px solid rgba(255,255,255,.10);
  padding: 20px 0 28px;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  font-size: 13px; flex-wrap: wrap;
}
.site-footer .lang-imgs img { height: 26px; opacity: .9; }
.site-footer .lang-imgs a { margin-left: 10px; }

/* ===================== 入场动画 ===================== */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ===================== 响应式 ===================== */
@media (max-width: 980px) {
  .split, .split.reverse { grid-template-columns: 1fr; gap: 28px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(3, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .site-footer .top { grid-template-columns: 1fr; }
}

/* 首页集装袋系列：平板/中小屏改 2 列，避免 3 列过窄导致文字被遮挡（视口 ≥1200px 才恢复 3 列） */
@media (max-width: 1199px) {
  .grid-3.product-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .nav {
    position: fixed; inset: 76px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--gray-200);
    padding: 8px 16px 16px; display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 14px 8px; border-bottom: 1px solid var(--gray-100); }
  .nav-toggle { display: block; }
  .lang-switch { margin: 10px 8px 4px; }
  .lang-switch select { width: 100%; }
  .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; }
  /* 首页集装袋系列：移动端单列，避免产品卡片被压窄导致文字被遮挡 */
  .grid-3.product-grid { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .style-card { grid-template-columns: 1fr; }
  .style-card .pic { width: 100%; height: 180px; }
  .hero-inner { padding: 70px 50px 78px; }
  .section { padding: 54px 0; }
  /* 移动端：标题区文字距离屏幕边框至少 50px，避免文字贴边 */
  .pagehero .inner { padding: 60px 50px 52px; }
}
@media (max-width: 480px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
}

/* ===== 产品卡片链接：网格中正确等高显示 ===== */
.card-link { display: flex; }
.card-link .style-card { flex: 1; }

/* ===== 顶栏 LOGO 图片 ===== */
.logo-img {
  height: 50px; width: auto; display: block;
}

/* ===== 设备图廊：统一预览尺寸（使用清晰大图）+ 点击放大 ===== */
.equip-thumb {
  width: 100%; height: 200px; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--gray-100);
  display: block; transition: transform .25s, box-shadow .25s;
}
a.zoom { display: block; overflow: hidden; border-radius: var(--radius-sm); cursor: zoom-in; }
a.zoom:hover .equip-thumb { transform: scale(1.04); box-shadow: var(--shadow); }

/* ===== 灯箱（点击查看全图） ===== */
.lightbox {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(8,10,14,.88);
  display: none; align-items: center; justify-content: center;
  padding: 40px;
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 92vw; max-height: 88vh;
  border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.lightbox-close {
  position: absolute; top: 16px; right: 24px;
  background: none; border: 0; color: #fff;
  font-size: 36px; line-height: 1; cursor: pointer;
}
