/* ==========================================================================
   AMZ555 跨境导航 · 站点公共样式
   主色：邮政绿 #008C3C ｜ 浅色商务风 ｜ 移动优先 + 桌面自适应
   ========================================================================== */

:root {
  --green: #008C3C;
  --green-dark: #006B2E;
  --green-soft: #E8F5EE;
  --green-line: #C9E4D5;
  --orange: #FF8A00;
  --orange-soft: #FFF3E5;

  --ink: #1B2733;
  --ink-2: #46586B;
  --ink-3: #7A8B9C;
  --line: #E4E9EF;
  --bg: #F4F6F8;
  --card: #FFFFFF;

  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(24, 46, 68, .06), 0 6px 18px rgba(24, 46, 68, .05);
  --shadow-hover: 0 4px 10px rgba(24, 46, 68, .08), 0 14px 32px rgba(24, 46, 68, .10);
  --maxw: 1200px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

/* ---------------------------------------------------------------- 顶部导航 */
.topbar {
  background: linear-gradient(135deg, #0B3D24 0%, #006B2E 55%, #008C3C 100%);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 12px rgba(11, 61, 36, .22);
}

.topbar-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 16px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.logo { display: flex; align-items: center; gap: 9px; flex: none; }
.logo-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(255, 255, 255, .16);
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; flex: none;
}
.logo-text { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.logo-text small { display: block; font-size: 10px; font-weight: 400; opacity: .7; letter-spacing: 1px; }

.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a {
  padding: 7px 13px; border-radius: 8px;
  font-size: 14.5px; color: rgba(255, 255, 255, .85);
  transition: background .16s, color .16s;
  white-space: nowrap;
}
.nav a:hover { background: rgba(255, 255, 255, .12); color: #fff; }
.nav a.on { background: rgba(255, 255, 255, .18); color: #fff; font-weight: 600; }

.topbar-spacer { flex: 1; }

.search-box {
  position: relative; flex: none;
  width: 230px;
}
.search-box input {
  width: 100%; height: 36px; border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, .22);
  background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 13.5px;
  padding: 0 14px 0 34px; outline: none;
  transition: background .16s, border-color .16s;
}
.search-box input::placeholder { color: rgba(255, 255, 255, .6); }
.search-box input:focus { background: rgba(255, 255, 255, .2); border-color: rgba(255, 255, 255, .5); }
.search-box::before {
  content: "🔍"; position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%); font-size: 12px; opacity: .75;
}

/* 移动端菜单按钮 */
.menu-btn {
  display: none; width: 36px; height: 36px; border-radius: 9px;
  background: rgba(255, 255, 255, .14); border: none; color: #fff;
  font-size: 17px; cursor: pointer; flex: none;
}

/* ------------------------------------------------------------------- 头部 */
.hero {
  background: linear-gradient(135deg, #0B3D24 0%, #00722F 60%, #00A047 100%);
  color: #fff;
  padding: 40px 0 34px;
}
.hero h1 { font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.hero p { margin-top: 8px; font-size: 14.5px; color: rgba(255, 255, 255, .82); }
.hero-tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero-tags span {
  font-size: 12.5px; padding: 4px 11px; border-radius: 14px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18);
}

/* 快速登录条 */
.quicklogin {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-top: -22px;
  padding: 16px 18px 12px;
  position: relative;
  z-index: 2;
}
.quicklogin h3 {
  font-size: 14px; color: var(--ink-2); font-weight: 600;
  margin-bottom: 10px; display: flex; align-items: center; gap: 6px;
}
.quicklogin h3 em { font-style: normal; font-size: 12px; color: var(--ink-3); font-weight: 400; }
.qgrid { display: flex; flex-wrap: wrap; gap: 8px; }
.qgrid a {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 8px;
  background: var(--green-soft); color: var(--green-dark);
  font-size: 13.5px; font-weight: 500;
  border: 1px solid var(--green-line);
  transition: background .15s, transform .15s;
}
.qgrid a:hover { background: #D9EFE3; transform: translateY(-1px); }

/* ------------------------------------------------------------------- 区块 */
.section { margin-top: 34px; }
.section-head {
  display: flex; align-items: baseline; gap: 10px;
  margin-bottom: 14px; flex-wrap: wrap;
}
.section-head h2 {
  font-size: 19px; font-weight: 700; letter-spacing: .3px;
  display: flex; align-items: center; gap: 8px;
}
.section-head h2::before {
  content: ""; width: 4px; height: 18px; border-radius: 2px;
  background: var(--green); flex: none;
}
.section-head .desc { font-size: 13px; color: var(--ink-3); }
.section-head .more { margin-left: auto; font-size: 13.5px; color: var(--green); font-weight: 500; }
.section-head .more:hover { text-decoration: underline; }

/* 平台分组标题（小） */
.group-head {
  display: flex; align-items: center; gap: 9px;
  margin: 26px 0 12px;
}
.group-head .gicon { font-size: 18px; }
.group-head h3 { font-size: 16px; font-weight: 600; }
.group-head .gdesc { font-size: 12.5px; color: var(--ink-3); }
.group-head .gcount {
  font-size: 11.5px; color: var(--green-dark); background: var(--green-soft);
  border: 1px solid var(--green-line); padding: 1px 8px; border-radius: 10px;
}

/* --------------------------------------------------------- 平台卡片网格 */
.pgrid { display: grid; grid-template-columns: 1fr; gap: 12px; }

.pcard {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 13px 14px;
  box-shadow: var(--shadow);
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.pcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--green-line); }

.pcard-top { display: flex; align-items: center; gap: 9px; }
.pcard-flag {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}
.pcard-name { font-size: 14.5px; font-weight: 600; line-height: 1.3; }
.pcard-note { font-size: 11.5px; color: var(--ink-3); margin-top: 1px; }

.pcard-btns { display: flex; gap: 7px; margin-top: 10px; }
.pbtn {
  flex: 1; text-align: center; font-size: 12.5px;
  padding: 6px 4px; border-radius: 7px;
  border: 1px solid var(--line); color: var(--ink-2);
  background: #fff; transition: all .15s; white-space: nowrap;
}
.pbtn:hover { border-color: var(--green); color: var(--green); background: var(--green-soft); }
.pbtn.primary {
  background: var(--green); border-color: var(--green); color: #fff; font-weight: 500;
}
.pbtn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
.pbtn.disabled { opacity: .45; pointer-events: none; }

/* 亚马逊站点按区域 */
.region-label {
  font-size: 12.5px; font-weight: 600; color: var(--ink-3);
  margin: 14px 0 8px; display: flex; align-items: center; gap: 7px;
}
.region-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ----------------------------------------------------------- 资讯卡片 */
.news-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }

.ncard {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); overflow: hidden;
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.ncard:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--green-line); }

.ncard-thumb { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #EDF1F5; }
.ncard-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.ncard:hover .ncard-thumb img { transform: scale(1.04); }

.ncard-tag {
  position: absolute; left: 10px; top: 10px;
  font-size: 11.5px; padding: 3px 9px; border-radius: 6px;
  background: rgba(0, 140, 60, .92); color: #fff; font-weight: 500;
  backdrop-filter: blur(2px);
}
.ncard-tag.t-B { background: rgba(214, 89, 15, .92); }
.ncard-tag.t-C { background: rgba(0, 107, 46, .92); }
.ncard-tag.t-D { background: rgba(37, 99, 168, .92); }
.ncard-tag.t-E { background: rgba(90, 74, 158, .92); }
.ncard-tag.t-O { background: rgba(90, 105, 120, .92); }

.ncard-body { padding: 13px 14px 14px; display: flex; flex-direction: column; flex: 1; }
.ncard-title {
  font-size: 15px; font-weight: 600; line-height: 1.5; color: var(--ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ncard:hover .ncard-title { color: var(--green-dark); }
.ncard-digest {
  margin-top: 7px; font-size: 13px; color: var(--ink-2); line-height: 1.65;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.ncard-foot {
  margin-top: auto; padding-top: 11px;
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; color: var(--ink-3);
}
.ncard-foot .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

/* --------------------------------------------------------- 工具卡片 */
.tgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.tcard {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); padding: 15px 14px;
  box-shadow: var(--shadow); display: block;
  transition: box-shadow .18s, transform .18s, border-color .18s;
}
.tcard:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); border-color: var(--green-line); }
.tcard .ticon {
  width: 38px; height: 38px; border-radius: 10px; background: var(--green-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; margin-bottom: 9px;
}
.tcard .tname { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.tcard .tname .new {
  font-size: 10px; background: var(--orange-soft); color: #B35C00;
  padding: 1px 6px; border-radius: 5px; font-weight: 500;
}
.tcard .tdesc { font-size: 12px; color: var(--ink-3); margin-top: 3px; line-height: 1.55; }

/* ------------------------------------------------------------ 资讯列表页 */
.filterbar {
  background: var(--card); border-radius: var(--radius);
  border: 1px solid var(--line); box-shadow: var(--shadow);
  padding: 13px 15px; margin-top: 20px;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.filter-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ftab {
  font-size: 13.5px; padding: 6px 14px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  cursor: pointer; font-family: inherit; transition: all .15s;
}
.ftab:hover { border-color: var(--green); color: var(--green); }
.ftab.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 500; }
.filter-count { margin-left: auto; font-size: 13px; color: var(--ink-3); }
.filter-count b { color: var(--green-dark); }

.list-search {
  height: 38px; border-radius: 9px; border: 1px solid var(--line);
  padding: 0 13px; font-size: 13.5px; outline: none;
  font-family: inherit; width: 220px; color: var(--ink);
}
.list-search:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }

.empty {
  text-align: center; padding: 60px 20px; color: var(--ink-3); font-size: 14px;
}

.pager { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 30px 0 10px; flex-wrap: wrap; }
.pager button {
  min-width: 36px; height: 36px; padding: 0 11px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 13.5px; cursor: pointer; font-family: inherit; transition: all .15s;
}
.pager button:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.pager button.on { background: var(--green); border-color: var(--green); color: #fff; font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: default; }

/* ------------------------------------------------------------ 文章详情页 */
.article-shell { background: var(--card); border-radius: var(--radius-lg); box-shadow: var(--shadow); margin-top: 20px; overflow: hidden; }
.article-head { padding: 26px 24px 20px; border-bottom: 1px solid var(--line); }
.breadcrumb { font-size: 12.5px; color: var(--ink-3); margin-bottom: 12px; }
.breadcrumb a:hover { color: var(--green); }
.breadcrumb span { margin: 0 6px; }
.article-head h1 { font-size: 23px; line-height: 1.45; font-weight: 700; letter-spacing: .2px; }
.article-meta { margin-top: 13px; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.article-meta .chip {
  background: var(--green-soft); color: var(--green-dark);
  border: 1px solid var(--green-line); padding: 2px 9px; border-radius: 12px; font-size: 12px;
}
.article-meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-3); }

/* 正文：公众号内联样式内容的容器 */
.article-body { padding: 22px 18px 26px; }
.article-body section { max-width: 760px; margin: 0 auto; }
.article-body img { border-radius: 8px; margin: 0 auto; }
.article-body h2 { scroll-margin-top: 80px; }
.article-body p { word-break: break-word; }

.article-nav {
  border-top: 1px solid var(--line);
  padding: 16px 24px 20px;
  display: flex; gap: 12px; flex-wrap: wrap;
}
.article-nav a {
  flex: 1; min-width: 200px;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 11px 14px; transition: all .15s;
}
.article-nav a:hover { border-color: var(--green-line); background: var(--green-soft); }
.article-nav .lbl { font-size: 11.5px; color: var(--ink-3); }
.article-nav .ttl {
  font-size: 13.5px; font-weight: 500; margin-top: 3px; line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* CTA 卡片 */
.cta {
  margin-top: 22px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #0B3D24 0%, #00722F 65%, #00A047 100%);
  color: #fff; padding: 22px 24px;
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.cta h3 { font-size: 16.5px; font-weight: 700; }
.cta p { font-size: 13px; color: rgba(255, 255, 255, .8); margin-top: 5px; }
.cta .cta-btns { margin-left: auto; display: flex; gap: 9px; flex-wrap: wrap; }
.cta a {
  font-size: 13.5px; padding: 8px 16px; border-radius: 8px;
  background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .26);
  color: #fff; transition: background .15s;
}
.cta a:hover { background: rgba(255, 255, 255, .26); }
.cta a.solid { background: #fff; color: var(--green-dark); font-weight: 600; border-color: #fff; }
.cta a.solid:hover { background: #F0FBF4; }

/* ------------------------------------------------------------------ 页脚 */
.footer {
  margin-top: 44px; background: #10212F; color: rgba(255, 255, 255, .62);
  padding: 30px 0 24px; font-size: 13px;
}
.footer-inner { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.footer-cols { display: flex; gap: 40px; flex-wrap: wrap; }
.footer-col h4 { color: #fff; font-size: 14px; font-weight: 600; margin-bottom: 10px; }
.footer-col a { display: block; padding: 3px 0; font-size: 13px; }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 24px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .1);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255, 255, 255, .5);
}
.footer-bottom a { color: rgba(255, 255, 255, .62); }
.footer-bottom a:hover { color: #fff; }
.footer-bottom img { width: 17px; height: 17px; display: inline-block; vertical-align: -3px; margin-right: 4px; }

/* 回到顶部 */
.totop {
  position: fixed; right: 20px; bottom: 24px; z-index: 90;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--green); color: #fff; border: none;
  font-size: 17px; cursor: pointer; box-shadow: 0 6px 18px rgba(0, 140, 60, .35);
  display: none; align-items: center; justify-content: center;
}
.totop.show { display: flex; }

/* 提示块 */
.notice {
  margin-top: 16px; font-size: 12.5px; color: var(--ink-3);
  background: var(--card); border: 1px dashed var(--line);
  border-radius: var(--radius); padding: 11px 14px; line-height: 1.7;
}
.notice b { color: var(--ink-2); }

/* ================================ 响应式 ================================ */
@media (min-width: 640px) {
  .pgrid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
  .tgrid { grid-template-columns: repeat(3, 1fr); }
  .hero h1 { font-size: 30px; }
}

@media (min-width: 960px) {
  body { font-size: 15.5px; }
  .pgrid { grid-template-columns: repeat(3, 1fr); }
  .news-grid { grid-template-columns: repeat(3, 1fr); }
  .tgrid { grid-template-columns: repeat(4, 1fr); }
  .hero { padding: 54px 0 46px; }
  .hero h1 { font-size: 34px; }
  .article-head { padding: 34px 40px 24px; }
  .article-head h1 { font-size: 27px; }
  .article-body { padding: 30px 40px 34px; }
  .article-body section { max-width: 760px; }
  .article-nav { padding: 20px 40px 24px; }
  .pcard { padding: 15px 16px; }
}

@media (min-width: 1240px) {
  .pgrid { gap: 14px; }
}

/* 移动端：导航折叠 */
@media (max-width: 860px) {
  .topbar-inner { gap: 10px; }
  .menu-btn { display: flex; align-items: center; justify-content: center; }
  .nav {
    position: absolute; left: 0; right: 0; top: 58px;
    background: #0B3D24; flex-direction: column; align-items: stretch;
    padding: 8px; gap: 2px; margin: 0;
    box-shadow: 0 10px 24px rgba(0, 0, 0, .25);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 11px 14px; border-radius: 8px; }
  .search-box { width: auto; flex: 1; min-width: 0; }
  .search-box input { height: 34px; }
  .logo-text small { display: none; }
  .cta .cta-btns { margin-left: 0; width: 100%; }
}

@media (max-width: 420px) {
  .tgrid { grid-template-columns: 1fr; }
  .quicklogin { padding: 14px 14px 10px; }
}
