/* ==========================================================
   ThinkWo Default Theme
   外贸企业站默认主题 · 零外部依赖 · 首屏不依赖 JS
   ========================================================== */

:root {
  --nav: #12254d;
  --nav-dark: #0b1730;
  --accent: #e0762e;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e8ee;
  --bg: #ffffff;
  --bg-alt: #f6f8fb;
  --radius: 10px;
  --wrap: 1200px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}

img { max-width: 100%; height: auto; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--nav); }

h1, h2, h3, h4 { margin: 0; font-weight: 600; line-height: 1.3; color: var(--nav); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 46px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: .18s;
  white-space: nowrap;
}
.btn-sm { height: 38px; padding: 0 18px; font-size: 13px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: #c9651f; color: #fff; }
.btn-ghost { background: transparent; color: var(--nav); border-color: rgba(18,37,77,.28); }
.btn-ghost:hover { background: var(--nav); color: #fff; border-color: var(--nav); }

/* ================= 头部 ================= */
.hd {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.hd-in { display: flex; align-items: center; gap: 26px; height: 74px; }

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-img { height: 40px; width: auto; }
.brand-txt { font-size: 19px; font-weight: 600; color: var(--nav); letter-spacing: .2px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.nav-item { position: relative; }
.nav-link {
  display: block;
  padding: 10px 14px;
  font-size: 14.5px;
  color: #374151;
  border-radius: 6px;
}
.nav-link:hover, .nav-link.is-active { color: var(--nav); background: var(--bg-alt); }

.nav-sub {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 190px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17,24,39,.09);
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: .16s;
}
.nav-item:hover .nav-sub { opacity: 1; visibility: visible; transform: translateY(0); }
.nav-sub a { display: block; padding: 8px 12px; font-size: 13.5px; color: var(--muted); border-radius: 6px; }
.nav-sub a:hover { background: var(--bg-alt); color: var(--nav); }

.hd-act { display: flex; align-items: center; gap: 12px; margin-left: auto; }

.lang { position: relative; }
.lang-btn {
  height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}
.lang-btn i { width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid #9ca3af; }
.lang-list {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 150px;
  padding: 6px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(17,24,39,.09);
  display: none;
  z-index: 10;
}
.lang.is-open .lang-list { display: block; }
.lang-list a { display: block; padding: 8px 12px; font-size: 13.5px; color: var(--muted); border-radius: 6px; }
.lang-list a:hover, .lang-list a.is-active { background: var(--bg-alt); color: var(--nav); }

.burger { display: none; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 6px; background: #fff; cursor: pointer; padding: 11px 10px; }
.burger span { display: block; height: 2px; background: var(--nav); margin: 4px 0; }

/* ================= 首屏 ================= */
.hero {
  background: var(--nav);
  background-image:
    linear-gradient(100deg, rgba(9,19,42,.93) 0%, rgba(18,37,77,.84) 46%, rgba(18,37,77,.45) 100%),
    url(../img/hero.jpg);
  background-size: auto, cover;
  background-position: center, center;
  color: #fff;
  padding: 108px 0 118px;
}
.hero-tag { font-size: 13px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.6); margin: 0 0 14px; }
.hero h1 { color: #fff; font-size: clamp(28px, 4vw, 44px); max-width: 760px; }
.hero-desc { max-width: 620px; margin: 18px 0 0; color: rgba(255,255,255,.78); font-size: 16px; }
.hero-act { display: flex; gap: 12px; margin-top: 32px; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .btn-ghost:hover { background: #fff; color: var(--nav); }

/* ================= 区块 ================= */
.sec { padding: 74px 0; }
.sec-alt { background: var(--bg-alt); }
.sec-head { margin-bottom: 34px; }
.sec-head h2 { font-size: clamp(22px, 2.4vw, 30px); }
.sec-head p { margin: 10px 0 0; color: var(--muted); }

/* 分类 */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.cat {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 24px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: .18s;
}
.cat:hover { border-color: var(--nav); transform: translateY(-2px); box-shadow: 0 10px 24px rgba(17,24,39,.06); }
.cat img { width: 42px; height: 42px; object-fit: contain; }
.cat-dot { width: 34px; height: 4px; border-radius: 2px; background: var(--accent); }
.cat b { font-size: 15.5px; color: var(--nav); font-weight: 600; }
.cat em { font-style: normal; font-size: 13px; color: var(--muted); }

/* 产品卡片 */
.p-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.pcard {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: .18s;
}
.pcard:hover { box-shadow: 0 14px 30px rgba(17,24,39,.08); transform: translateY(-2px); }
.pcard-img { display: flex; align-items: center; justify-content: center; aspect-ratio: 4 / 3; background: var(--bg-alt); overflow: hidden; }
.pcard-img img { width: 100%; height: 100%; object-fit: cover; }
.pcard-ph {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 44px; font-weight: 600; color: #aab4c5;
  background:
    radial-gradient(circle at 28% 22%, rgba(255,255,255,.85), transparent 55%),
    linear-gradient(150deg, #eef1f6 0%, #dfe4ed 100%);
  letter-spacing: 1px;
}
.pcard-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.pcard-body h3 { font-size: 16px; margin-bottom: 8px; }
.pcard-body h3 a:hover { color: var(--accent); }
.pcard-desc { margin: 0; font-size: 13.5px; color: var(--muted); flex: 1; }
.pcard-foot { margin-top: 14px; font-size: 13px; color: var(--accent); font-weight: 500; }

/* 关于 */
.about-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: 56px; align-items: center; }
.about-txt h2 { font-size: clamp(22px, 2.4vw, 30px); }
.about-txt p { color: var(--muted); margin: 14px 0 0; }
.about-list { margin: 20px 0 26px; padding-left: 20px; color: var(--muted); }
.about-list li { margin-bottom: 8px; }
.about-media img {
  width: 100%; display: block;
  border-radius: var(--radius); aspect-ratio: 16 / 10; object-fit: cover;
  box-shadow: 0 18px 44px rgba(17,24,39,.14);
}
.about-stat { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 18px; }
.about-stat > div { background: #fff; padding: 28px 22px; }
.about-stat b { display: block; font-size: 30px; color: var(--nav); font-weight: 600; }
.about-stat span { font-size: 13px; color: var(--muted); }

/* CTA */
.cta { background: var(--nav); color: #fff; padding: 56px 0; }
.cta-in { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta h2 { color: #fff; font-size: 26px; }
.cta p { margin: 8px 0 0; color: rgba(255,255,255,.72); }

/* 内页 banner */
.banner {
  background:
    radial-gradient(760px 220px at 88% 120%, rgba(224,118,46,.22), transparent 70%),
    linear-gradient(115deg, #0f1f42 0%, #12254d 55%, #1b3769 100%);
  color: #fff; padding: 52px 0;
}
.banner h1 { color: #fff; font-size: clamp(24px, 3vw, 34px); }
.banner p { margin: 10px 0 0; color: rgba(255,255,255,.72); }

/* 面包屑 */
.tw-crumb { padding: 18px 0; font-size: 13px; color: var(--muted); }
.tw-crumb a { color: var(--muted); }
.tw-crumb a:hover { color: var(--nav); }
.tw-crumb em { font-style: normal; margin: 0 8px; color: #c3c9d4; }

/* 列表页 */
.list-in { display: grid; grid-template-columns: 240px 1fr; gap: 34px; padding-bottom: 70px; }
.side h3 { font-size: 15px; padding-bottom: 12px; border-bottom: 2px solid var(--nav); margin-bottom: 14px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { padding: 10px 12px; font-size: 14px; color: #4b5563; border-radius: 6px; }
.side nav a:hover, .side nav a.is-active { background: var(--bg-alt); color: var(--nav); font-weight: 500; }
.side-cta { margin-top: 26px; padding: 20px; background: var(--bg-alt); border-radius: var(--radius); }
.side-cta b { display: block; font-size: 14px; color: var(--nav); }
.side-cta p { margin: 8px 0 14px; font-size: 13px; color: var(--muted); }

/* 分页 */
.tw-pager { display: flex; align-items: center; gap: 8px; justify-content: center; margin-top: 40px; flex-wrap: wrap; }
.tw-pager-item {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  color: #4b5563;
  background: #fff;
}
.tw-pager-item:hover { border-color: var(--nav); color: var(--nav); }
.tw-pager-item.is-active { background: var(--nav); border-color: var(--nav); color: #fff; }
.tw-pager-dot { color: #b0b6c1; }

/* 详情页 */
.detail { padding: 8px 0 20px; }
.detail-head { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; }
.gallery-main { aspect-ratio: 4 / 3; background: var(--bg-alt); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; overflow: hidden; border: 1px solid var(--line); }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-ph { font-size: 64px; color: #c7cedb; }
.gallery-thumbs { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.gallery-thumbs img { width: 76px; height: 76px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; }
.gallery-thumbs img:hover { border-color: var(--nav); }

.detail-info h1 { font-size: clamp(22px, 2.6vw, 30px); }
.detail-sub { color: var(--muted); margin: 10px 0 0; }
.spec { margin: 24px 0 0; border-top: 1px solid var(--line); }
.spec > div { display: flex; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.spec dt { width: 110px; color: var(--muted); margin: 0; flex-shrink: 0; }
.spec dd { margin: 0; font-weight: 500; }
.spec .price { color: var(--accent); }
.detail-tip { font-size: 12.5px; color: var(--muted); margin: 14px 0 0; }
.detail-act { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.detail-tags { margin-top: 20px; display: flex; gap: 8px; flex-wrap: wrap; }
.detail-tags span { padding: 4px 12px; background: var(--bg-alt); border-radius: 20px; font-size: 12.5px; color: var(--muted); }

.detail-body { margin-top: 46px; padding-top: 34px; border-top: 1px solid var(--line); font-size: 15px; line-height: 1.85; }
.detail-body h2 { font-size: 21px; margin: 30px 0 12px; }
.detail-body h3 { font-size: 17px; margin: 24px 0 10px; }
.detail-body p { margin: 0 0 14px; }
.detail-body ul, .detail-body ol { margin: 0 0 16px; padding-left: 22px; }
.detail-body li { margin-bottom: 6px; }
.detail-body img { border-radius: 8px; margin: 16px 0; }
.detail-body table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14px; }
.detail-body th, .detail-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; }
.detail-body th { background: var(--bg-alt); font-weight: 500; }

.detail-nav { display: flex; gap: 20px; margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.detail-nav a:hover { color: var(--nav); }

/* 单页 */
.page { padding: 10px 0 70px; max-width: 860px; }
.page h2 { font-size: 26px; margin-bottom: 20px; }
.page-body { font-size: 15px; line-height: 1.9; color: #374151; }
.page-body h2 { font-size: 20px; margin: 28px 0 12px; }
.page-body h3 { font-size: 17px; margin: 22px 0 10px; }
.page-body img { border-radius: 8px; margin: 16px 0; }
.page-body table { width: 100%; border-collapse: collapse; margin: 18px 0; }
.page-body th, .page-body td { border: 1px solid var(--line); padding: 10px; text-align: left; }

/* 询盘表单 */
.inq { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 30px; }
.inq-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.inq p { margin: 0; }
.inq label { display: block; font-size: 13px; color: #4b5563; margin-bottom: 6px; }
.inq label em { color: var(--accent); font-style: normal; }
.inq input[type=text], .inq input[type=email], .inq textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
}
.inq input:focus, .inq textarea:focus { outline: none; border-color: var(--nav); }
.inq textarea { resize: vertical; }
.inq-full { margin-top: 18px !important; }
.inq-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.inq-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-top: 20px; flex-wrap: wrap; }
.inq-code { display: flex; align-items: center; gap: 10px; }
.inq-code label { margin: 0; white-space: nowrap; }
.inq-code input { width: 120px; }
.inq-code img { height: 44px; border-radius: 6px; border: 1px solid var(--line); cursor: pointer; }
.inq-msg { margin-top: 14px; font-size: 13.5px; min-height: 20px; }
.inq-msg.ok { color: #15803d; }
.inq-msg.err { color: #c62828; }

/* 联系页 */
.contact-in { display: grid; grid-template-columns: 340px 1fr; gap: 40px; padding-bottom: 70px; }
.contact-info { background: var(--nav); color: #fff; border-radius: var(--radius); padding: 34px 30px; align-self: start; }
.contact-info h2 { color: #fff; font-size: 20px; margin-bottom: 20px; }
.contact-info dl { margin: 0; }
.contact-info dl > div { margin-bottom: 16px; }
.contact-info dt { font-size: 12px; color: rgba(255,255,255,.55); margin-bottom: 3px; }
.contact-info dd { margin: 0; font-size: 14px; color: rgba(255,255,255,.92); }
.contact-info a { color: #fff; }

/* 搜索 */
.search-form { display: flex; gap: 10px; max-width: 620px; margin-bottom: 26px; }
.search-form input { flex: 1; padding: 12px 16px; border: 1px solid var(--line); border-radius: 6px; font-size: 15px; font-family: inherit; }
.search-form input:focus { outline: none; border-color: var(--nav); }
.search-tip { color: var(--muted); font-size: 13.5px; }

/* 空状态 */
.empty { text-align: center; padding: 70px 0; color: var(--muted); font-size: 14px; }

/* 404 */
.nf { text-align: center; padding: 100px 0 120px; }
.nf-code { font-size: 96px; font-weight: 600; color: var(--line); margin: 0; line-height: 1; }
.nf h1 { font-size: 26px; margin: 20px 0 10px; }
.nf-desc { color: var(--muted); margin: 0 0 26px; }

/* 页脚 */
.ft { background: var(--nav-dark); color: rgba(255,255,255,.66); padding: 56px 0 0; margin-top: 20px; }
.ft-in { display: grid; grid-template-columns: 1.6fr 1fr 1.2fr; gap: 46px; padding-bottom: 40px; }
.ft-logo { font-size: 19px; font-weight: 600; color: #fff; margin-bottom: 14px; }
.ft-logo img { height: 34px; width: auto; display: block; filter: brightness(0) invert(1); opacity: .92; }
.ft-desc { font-size: 13.5px; line-height: 1.8; margin: 0; }
.ft-social { display: flex; gap: 14px; margin-top: 16px; font-size: 13px; }
.ft-social a { color: rgba(255,255,255,.6); }
.ft-social a:hover { color: #fff; }
.ft-col h4 { color: #fff; font-size: 14px; margin-bottom: 16px; font-weight: 500; }
.ft-col a { display: block; font-size: 13.5px; margin-bottom: 10px; color: rgba(255,255,255,.62); }
.ft-col a:hover { color: #fff; }
.ft-col p { margin: 0 0 10px; font-size: 13.5px; }
.ft-bot { display: flex; justify-content: space-between; gap: 16px; padding: 18px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: rgba(255,255,255,.42); flex-wrap: wrap; }

/* 响应式 */
@media (max-width: 1024px) {
  .about-in, .contact-in, .detail-head, .list-in { grid-template-columns: 1fr; }
  .ft-in { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 860px) {
  .burger { display: block; margin-left: auto; }
  .hd-act .btn { display: none; }
  .nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 74px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 8px 16px 16px;
    max-height: 0;
    overflow: hidden;
    transition: .2s;
  }
  body.nav-open .nav { max-height: 70vh; overflow-y: auto; }
  .nav-sub { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; padding: 0 0 0 14px; }
  .hero { padding: 56px 0 64px; }
  .sec { padding: 52px 0; }
  .inq-grid { grid-template-columns: 1fr; }
  .inq { padding: 22px; }
  .ft-in { grid-template-columns: 1fr; gap: 28px; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 16px; }
  .hero h1 { font-size: 26px; }
  .p-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .pcard-body { padding: 14px; }
  .pcard-body h3 { font-size: 14px; }
  .pcard-desc { display: none; }
}
