/* ============================================================
   Company Site — Global Stylesheet
   配色：深海军蓝 + 金色点缀（外贸公司常见风格，可自行替换）
   ============================================================ */
:root {
  --navy: #102a43;
  --navy-2: #1f4068;
  --gold: #d99b2b;
  --bg: #f7f9fb;
  --text: #22313f;
  --muted: #5b6b7a;
  --line: #e3e9ef;
  --white: #ffffff;
  --radius: 10px;
  --maxw: 1080px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: var(--navy-2); }
.container { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--navy);
  color: var(--white);
  position: sticky;
  top: 0;
  z-index: 10;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  flex-wrap: wrap;
}
.brand {
  color: var(--white);
  font-weight: 700;
  font-size: 1.15rem;
  text-decoration: none;
  letter-spacing: .5px;
}
.brand span { color: var(--gold); }
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand-mark { height: 36px; width: auto; display: block; }
.main-nav { display: flex; align-items: center; gap: 4px; }
.main-nav a {
  color: #dbe6f0;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: .95rem;
}
.main-nav a:hover, .main-nav a.active { background: var(--navy-2); color: var(--white); }
.main-nav a.lang-switch { border: 1px solid rgba(255, 255, 255, .45); margin-left: 6px; }
.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  color: var(--white);
  padding: 84px 0 92px;
  text-align: center;
}
.hero h1 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); margin: 0 0 14px; }
.hero p { max-width: 640px; margin: 0 auto 28px; color: #c9d6e2; }

/* ---------- Brand assets ---------- */
.hero-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}
.hero-logo img {
  height: 100px;
  width: auto;
  display: block;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .45));
}
.about-logo {
  display: block;
  height: 120px;
  width: auto;
  margin: 0 auto 18px;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .12));
}
.btn {
  display: inline-block;
  background: var(--gold);
  color: #1a1a1a;
  font-weight: 700;
  padding: 12px 26px;
  border-radius: var(--radius);
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
}
.btn:hover { filter: brightness(1.08); }
.btn-outline {
  background: transparent;
  color: var(--white);
  border: 2px solid var(--white);
}

/* ---------- Sections ---------- */
.section { padding: 56px 0; }
.section h2 { text-align: center; margin: 0 0 8px; font-size: clamp(1.3rem, 3vw, 1.6rem); }
.section .sub { text-align: center; color: var(--muted); margin: 0 0 36px; }

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}
.feature {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.feature h3 { margin: 0 0 8px; font-size: 1.05rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; }

/* ---------- Product grid ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
}
.product-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.product-img {
  aspect-ratio: 4 / 3;
  background: #dfe7ee;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: .9rem;
  overflow: hidden;
}
.product-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-body { padding: 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.product-body h3 { margin: 0; font-size: 1.05rem; }
.product-desc { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.product-price { font-size: 1.25rem; font-weight: 700; color: var(--navy); }
.product-price small { color: var(--muted); font-weight: 400; }
.product-form { display: flex; flex-direction: column; gap: 8px; }
.product-form select {
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: .95rem;
  background: var(--white);
}
.sold-out { color: #b3261e; font-weight: 700; text-align: center; padding: 10px; background: #fdecea; border-radius: 6px; }

.view-cart-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 18px;
}
.view-cart-bar input[type="submit"] {
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 10px 18px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .95rem;
}

/* ---------- Contact form ---------- */
.contact-form {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  max-width: 640px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.contact-form label { font-weight: 600; font-size: .95rem; }
.contact-form input, .contact-form textarea {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 1rem;
  font-family: inherit;
  width: 100%;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: #b9c7d4;
  margin-top: 56px;
  padding: 28px 0;
  font-size: .9rem;
}
.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.site-footer a { color: #dbe6f0; }

/* ============================================================
   Responsive —— 三档断点：平板 / 手机 / 小屏手机
   PC（>1024px）使用上面桌面端的默认样式
   ============================================================ */

/* ---------- 平板（721–1024px） ---------- */
@media (max-width: 1024px) {
  .hero { padding: 64px 0 72px; }
  .section { padding: 44px 0; }
}

/* ---------- 手机（≤720px） ---------- */
@media (max-width: 720px) {
  .container { padding: 0 16px; }
  .brand-mark { height: 30px; }
  .hero { padding: 52px 0 60px; }
  .hero p { font-size: .95rem; }
  .section { padding: 36px 0; }

  /* 导航：汉堡按钮 + 44px 以上触控目标 */
  .nav-toggle {
    display: block;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px 14px;
    min-width: 48px;
    min-height: 48px;
  }
  .main-nav {
    display: none;
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    padding-bottom: 8px;
  }
  .main-nav.open { display: flex; }
  .main-nav a {
    padding: 14px 12px;
    font-size: 1rem;
    border-top: 1px solid rgba(255, 255, 255, .08);
  }

  /* 产品/优势：单列；按钮全宽便于拇指点击 */
  .product-grid { grid-template-columns: 1fr; }
  .features { grid-template-columns: 1fr; }
  .product-form .btn,
  .view-cart-bar input[type="submit"],
  .contact-form .btn {
    width: 100%;
    min-height: 46px;
  }
  .view-cart-bar { justify-content: stretch; }

  .contact-form { padding: 18px; }

  /* 页脚竖排居中 */
  .site-footer .container {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  /* 杜绝横向滚动 */
  html, body { max-width: 100%; overflow-x: hidden; }
  h1, h2, h3, p, li { overflow-wrap: break-word; }
}

/* ---------- 小屏手机（≤380px） ---------- */
@media (max-width: 380px) {
  .hero h1 { font-size: 1.45rem; }
  .btn { padding: 12px 18px; }
}
