/* ============================================================
   eSIM Theme — 全局样式(移动端优先)
   品牌主色 #1A73E8,白底圆角卡片,对标 mobimatter.com
   ============================================================ */

:root {
  --primary: #1A73E8;
  --primary-dark: #1557B0;
  --primary-light: #E8F1FD;
  --bg: #ffffff;
  --surface: #F5F7FA;
  --text: #1F2933;
  --muted: #64748B;
  --border: #E5E7EB;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 4px 16px rgba(15, 23, 42, .08);
  --header-h: 64px;
  --bottomnav-h: 58px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 15px;
  /* 移动端为底部导航条留出空间 */
  padding-bottom: calc(var(--bottomnav-h) + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; }
button { font-family: inherit; }
.screen-reader-text {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }

/* ---------- 通用组件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; cursor: pointer; border-radius: 999px;
  font-size: 14px; font-weight: 600; padding: 10px 22px;
  transition: background .2s, color .2s, box-shadow .2s;
}
.btn-primary {
  background: linear-gradient(135deg, #2080F8 0%, #1259C9 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(26, 115, 232, .32);
}
.btn-primary:hover { background: linear-gradient(135deg, var(--primary) 0%, #0E47A8 100%); }

/* 内联 SVG 图标(esim_icon)统一尺寸 */
.esim-ic { width: 15px; height: 15px; vertical-align: -2.5px; flex: none; }
.plan-specs .esim-ic { color: var(--muted); }
.product-chips .chip .esim-ic { color: var(--primary); }
.spec-icon .esim-ic { width: 20px; height: 20px; color: var(--primary); vertical-align: -4px; }
.bn-icon .esim-ic { width: 22px; height: 22px; }

/* 数字/拉丁字符用 Rubik(中文回退系统栈) */
.plan-price, .product-price, .buy-bar-price, .plan-name, .product-title,
.sort-count strong, .chip, .spec-value, .tax-title, .hero h1, .section-title,
.nt-tech, .plan-5g {
  font-family: 'Rubik', -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
}
.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary-light); }

.card {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
}

/* ---------- 顶部导航 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 var(--border), 0 4px 16px rgba(15, 23, 42, .04);
}
.header-inner { display: flex; align-items: center; gap: 10px; height: var(--header-h); }

.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 20px; font-weight: 800; letter-spacing: -.01em;
  color: var(--text); white-space: nowrap;
}
.logo span {
  background: linear-gradient(120deg, var(--primary), #00A8E8);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-mark { width: 34px; height: 34px; border-radius: 9px; }

.main-nav { display: none; }

.nav-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 9px 15px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: #3D4852;
  background: none; border: none; cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-link:hover { color: var(--primary); background: var(--primary-light); }

.caret { font-size: 11px; transition: transform .18s; }
.has-dropdown.open > button .caret { transform: rotate(180deg); }

/* 下拉面板 */
.has-dropdown { position: relative; }
.dropdown-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 1010;
  min-width: 400px; padding: 16px;
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.has-dropdown.open .dropdown-panel { opacity: 1; visibility: visible; transform: none; }

.dropdown-title {
  font-size: 12px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 10px;
}
.dest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; }
.dest-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px;
}
.dest-item:hover { background: var(--primary-light); color: var(--primary); }
.dest-flag { font-size: 20px; line-height: 1; }
.view-all {
  display: block; margin-top: 12px; padding-top: 12px; text-align: center;
  border-top: 1px solid var(--border);
  color: var(--primary); font-weight: 600; font-size: 14px;
}

/* 右侧操作区 */
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.currency-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; font-size: 13px; font-weight: 700;
  background: var(--surface); color: var(--text);
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  transition: .15s;
}
.currency-btn:hover { background: #fff; border-color: var(--primary); color: var(--primary); }
.currency-panel { left: auto; right: 0; min-width: 180px; padding: 6px; }
.currency-option {
  display: flex; justify-content: space-between; align-items: center; width: 100%;
  padding: 9px 12px; font-size: 14px; text-align: left;
  background: none; border: none; border-radius: var(--radius-sm); cursor: pointer;
}
.currency-option:hover { background: var(--primary-light); }
.currency-option.active { color: var(--primary); font-weight: 700; }
.currency-label { font-size: 12px; color: var(--muted); }

/* 语言切换(样式与货币切换一致) */
.lang-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 8px 13px; font-size: 13px; font-weight: 700;
  background: var(--surface); color: var(--text);
  border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  transition: .15s;
}
.lang-btn:hover { background: #fff; border-color: var(--primary); color: var(--primary); }
.lang-panel { left: auto; right: 0; min-width: 140px; padding: 6px; }
.lang-option {
  display: block; width: 100%;
  padding: 9px 12px; font-size: 14px; text-align: left;
  background: none; border: none; border-radius: var(--radius-sm); cursor: pointer;
}
.lang-option:hover { background: var(--primary-light); color: var(--primary); }

/* Google 翻译:隐藏顶部横幅与悬浮提示,防止页面被顶下来 */
.skiptranslate iframe, #goog-gt-tt, .goog-te-balloon-frame { display: none !important; }
body { top: 0 !important; }
font[style] { background: transparent !important; box-shadow: none !important; }

.btn-login { display: none; }

/* 汉堡按钮 */
.hamburger {
  display: flex; flex-direction: column; justify-content: center; gap: 4px;
  width: 40px; height: 40px; padding: 9px;
  background: none; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
}
.hamburger span {
  display: block; height: 2px; width: 100%;
  background: var(--text); border-radius: 2px; transition: .2s;
}
body.drawer-open .hamburger span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.drawer-open .hamburger span:nth-child(2) { opacity: 0; }
body.drawer-open .hamburger span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ---------- 移动端抽屉 ---------- */
.mobile-drawer { position: fixed; inset: 0; z-index: 1100; pointer-events: none; }
.drawer-backdrop {
  position: absolute; inset: 0;
  background: rgba(15, 23, 42, .45); opacity: 0; transition: opacity .2s;
}
.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(320px, 86vw); padding: 16px;
  background: #fff; overflow-y: auto;
  display: flex; flex-direction: column; gap: 4px;
  transform: translateX(100%); transition: transform .25s ease;
}
body.drawer-open { overflow: hidden; }
body.drawer-open .mobile-drawer { pointer-events: auto; }
body.drawer-open .drawer-backdrop { opacity: 1; }
body.drawer-open .drawer-panel { transform: none; }

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: 12px; margin-bottom: 8px; border-bottom: 1px solid var(--border);
}
.drawer-title { font-weight: 800; color: var(--primary); font-size: 17px; }
.drawer-close {
  width: 36px; height: 36px; font-size: 16px;
  background: var(--surface); border: none; border-radius: 50%; cursor: pointer;
}
.drawer-section summary {
  padding: 12px 8px; font-size: 15px; font-weight: 600;
  cursor: pointer; list-style: none; display: flex; justify-content: space-between;
}
.drawer-section summary::after { content: "▾"; color: var(--muted); transition: transform .18s; }
.drawer-section[open] summary::after { transform: rotate(180deg); }
.drawer-dest { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; padding: 0 4px 8px; }
.drawer-link {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 8px; font-size: 15px; font-weight: 500;
  border-radius: var(--radius-sm);
}
.drawer-link .esim-ic { width: 18px; height: 18px; color: var(--primary); }
.drawer-link:active, .drawer-link:hover { background: var(--primary-light); color: var(--primary); }
.drawer-login { margin-top: auto; }

/* ---------- 移动端底部导航条 ---------- */
.bottom-nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 1000;
  display: flex; background: #fff; border-top: 1px solid var(--border);
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(15, 23, 42, .06);
}
.bottom-nav a {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 0 6px; font-size: 11px; color: var(--muted);
}
.bottom-nav a.active, .bottom-nav a:hover { color: var(--primary); }
.bn-icon { font-size: 20px; line-height: 1.1; }

/* ---------- 页面主体 ---------- */
.site-main { min-height: 60vh; }

/* 占位首页 hero(完整首页下一阶段开发) */
.hero {
  background: linear-gradient(180deg, var(--primary-light) 0%, #fff 100%);
  padding: 48px 0 40px; text-align: center;
}
.hero h1 { font-size: 28px; line-height: 1.3; margin: 0 0 12px; }
.hero p { color: var(--muted); margin: 0 auto 24px; max-width: 560px; }
.hero-flags { font-size: 26px; letter-spacing: 6px; margin-bottom: 24px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.page-wrap { padding: 32px 0; }
.page-wrap .entry-title { font-size: 26px; }

/* ---------- 页脚 ---------- */
.site-footer { background: var(--surface); border-top: 1px solid var(--border); margin-top: 48px; }
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 32px; padding: 40px 0 32px;
}
.footer-col h4 { font-size: 14px; margin: 0 0 14px; letter-spacing: .02em; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-col a { font-size: 14px; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; }
.footer-col a:hover { color: var(--primary); }
/* 区域/国家两列统一图标(替代 emoji 国旗,跨设备一致) */
.footer-ic { width: 15px; height: 15px; flex: none; color: var(--primary); opacity: .8; }
.footer-about p { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.footer-address { font-size: 13px; }

.lang-switcher select {
  padding: 8px 12px; font-size: 13px; color: var(--text);
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
}

.footer-bottom {
  display: flex; flex-direction: column; gap: 14px;
  padding: 20px 0 24px; border-top: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.footer-legal { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-legal a:hover { color: var(--primary); }
.social-icons { display: flex; gap: 10px; }
.social-icons a {
  width: 36px; height: 36px; border-radius: 50%;
  background: #fff; border: 1px solid var(--border); color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  transition: .2s;
}
.social-icons a:hover { color: var(--primary); border-color: var(--primary); }
.social-icons svg { width: 17px; height: 17px; fill: currentColor; }

/* ============================================================
   桌面端 ≥ 992px
   ============================================================ */
@media (min-width: 992px) {
  body { padding-bottom: 0; }
  .main-nav { display: flex; align-items: center; gap: 2px; margin-left: 8px; }
  .btn-login { display: inline-flex; }
  .hamburger, .mobile-drawer, .bottom-nav { display: none; }

  .hero { padding: 72px 0 64px; }
  .hero h1 { font-size: 40px; }

  .footer-grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
  .footer-bottom { flex-direction: row; align-items: center; }
  .social-icons { margin-left: auto; }
}

/* 小屏头部压缩:语言只留地球图标,按钮收窄 */
@media (max-width: 600px) {
  .header-inner { gap: 6px; }
  .logo { font-size: 17px; gap: 6px; }
  .logo-mark { width: 30px; height: 30px; }
  .currency-btn, .lang-btn { padding: 7px 9px; font-size: 12px; }
  .currency-btn .caret, .lang-btn .caret { display: none; }
  .lang-btn .lang-current { display: none; }
}

/* 平板 600–991px:页脚两栏 */
@media (min-width: 600px) and (max-width: 991px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

/* ============================================================
   通用区块 + 套餐卡片(全站复用:首页、目的地落地页等)
   ============================================================ */
.section { padding: 44px 0; }
.section-title { font-size: 22px; text-align: center; margin: 0 0 28px; }
.section-more { text-align: center; margin-top: 28px; }

.plans-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }

.plan-card {
  position: relative; padding: 18px; display: flex; flex-direction: column; gap: 10px;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.plan-card:hover {
  transform: translateY(-3px);
  border-color: var(--primary);
  box-shadow: 0 12px 28px rgba(15, 23, 42, .13);
}
.plan-badge {
  position: absolute; top: 0; right: 16px; transform: translateY(-50%);
  padding: 3px 10px; font-size: 10px; font-weight: 800; letter-spacing: .06em;
  color: #fff; border-radius: 999px;
}
.plan-badge--best-coverage { background: var(--primary); }
.plan-badge--best-quality { background: #0F9D58; }

.plan-supplier { display: flex; align-items: center; gap: 8px; }
.supplier-avatar {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--primary-light); color: var(--primary);
  font-size: 14px; font-weight: 800;
}
.supplier-name { font-size: 13px; color: var(--muted); font-weight: 600; }

.plan-name { margin: 0; font-size: 16px; line-height: 1.4; }
.plan-name a:hover { color: var(--primary); }

.plan-specs { display: flex; gap: 14px; font-size: 13px; color: var(--muted); }

.plan-coverage { display: flex; align-items: center; gap: 8px; min-height: 24px; }
.coverage-flags { font-size: 18px; letter-spacing: 2px; }
.coverage-more { font-size: 12px; color: var(--muted); }

.plan-foot {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--border);
}
.plan-price { font-size: 18px; font-weight: 800; color: var(--text); }
.plan-price del { color: var(--muted); font-weight: 400; font-size: 14px; margin-right: 4px; }
.plan-price ins { text-decoration: none; }
.btn-sm { padding: 8px 16px; font-size: 13px; }

@media (min-width: 600px) {
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .section { padding: 64px 0; }
  .section-title { font-size: 30px; margin-bottom: 36px; }
  .plans-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ============================================================
   多国搜索 chips 组件(首页 Hero / 落地页 / 搜索页)
   ============================================================ */
.esim-chips { position: relative; display: flex; gap: 8px; max-width: 640px; }
.chips-box {
  flex: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  min-height: 52px; padding: 7px 12px;
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .08);
  cursor: text;
}
.chips-box:focus-within { border-color: var(--primary); box-shadow: 0 6px 20px rgba(15,23,42,.08), 0 0 0 3px var(--primary-light); }
.chips-tags { display: contents; }
.chip-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 8px 5px 10px; font-size: 14px; font-weight: 600;
  background: var(--primary-light); color: var(--primary);
  border-radius: 999px; white-space: nowrap;
}
.chip-x {
  border: none; background: none; cursor: pointer;
  font-size: 15px; line-height: 1; color: var(--primary);
  padding: 0 2px; border-radius: 50%;
}
.chip-x:hover { color: #d63638; }
.chips-input {
  flex: 1; min-width: 120px; border: none; outline: none;
  font-size: 15px; padding: 6px 2px; background: transparent; color: var(--text);
}
.chips-go {
  flex: none; width: 52px; min-height: 52px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--primary); color: #fff;
  border: none; border-radius: 14px; cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
}
.chips-go:hover { background: var(--primary-dark); transform: translateY(-1px); }
/* 首页 Hero(蓝色背景)上反色:白底蓝图标,避免与背景融合 */
.home-hero .chips-go {
  background: #fff; color: var(--primary);
  box-shadow: 0 6px 18px rgba(7, 42, 96, .35);
}
.home-hero .chips-go:hover { background: var(--primary-light); }
.chips-dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; right: 60px; z-index: 60;
  margin: 0; padding: 6px; list-style: none; text-align: left;
  background: #fff; border-radius: var(--radius);
  box-shadow: 0 12px 32px rgba(15, 23, 42, .18);
  max-height: 320px; overflow-y: auto;
}
.chips-dropdown li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: var(--radius-sm);
  font-size: 14px; color: var(--text); cursor: pointer;
}
.chips-dropdown li:hover { background: var(--primary-light); color: var(--primary); }
.chips-dropdown .chips-flag { font-size: 19px; }
.chips-dropdown small { margin-left: auto; color: #9AA5B1; font-size: 12px; }
.chips-dropdown .chips-noresult { color: var(--muted); cursor: default; }
.chips-dropdown .chips-noresult:hover { background: none; color: var(--muted); }

/* 5G 角标(套餐卡片右上角) */
.plan-5g {
  position: absolute; top: 12px; right: 12px;
  padding: 2px 8px; font-size: 11px; font-weight: 800;
  color: var(--primary); background: var(--primary-light);
  border-radius: 6px; letter-spacing: .03em;
}

/* ============================================================
   结账页(极简化经典结账)
   ============================================================ */
.woocommerce-checkout .site-main { background: var(--surface); }
.woocommerce-checkout form.checkout,
.woocommerce-cart .woocommerce,
.woocommerce-checkout .woocommerce {
  max-width: 760px; margin: 0 auto; padding: 24px 0 48px;
}
.woocommerce form .form-row input.input-text {
  padding: 12px 14px; font-size: 15px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  width: 100%; box-sizing: border-box;
}
.woocommerce form .form-row input.input-text:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.woocommerce form .form-row label { font-size: 13px; font-weight: 600; }
#customer_details, .woocommerce-checkout-review-order {
  background: #fff; border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 18px;
}
.woocommerce #payment {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
}
.woocommerce #payment div.payment_box { background: var(--surface); }
.woocommerce #place_order {
  display: block; width: 100%;
  background: linear-gradient(135deg, #2080F8 0%, #1259C9 100%); color: #fff;
  border: none; border-radius: 999px;
  padding: 15px 24px; font-size: 16px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(26, 115, 232, .32);
}
.woocommerce #place_order:hover { background: linear-gradient(135deg, var(--primary) 0%, #0E47A8 100%); }
.woocommerce table.shop_table { border: 1px solid var(--border); border-radius: var(--radius-sm); }
