/* ============================================================
   EYESEO · 设计系统（工厂实力主调 + 科学极简）
   对标 Kolmar/COSMAX 的「数据 + 认证 + 全案服务」信任打法
   ============================================================ */
:root {
  /* 品牌色（全案 §2.4 · ④工厂实力） */
  --primary: #185FA5;       /* 深蓝：科技/实力 */
  --primary-d: #0C447C;
  --accent: #1D9E75;        /* 青：眼护/清爽 */
  --accent-d: #0F6E56;
  --gold: #BA7517;          /* 金：CTA 点缀 */
  --ink: #1F2933;           /* 正文 */
  --muted: #6B7280;         /* 次要 */
  --bg: #F6F9FB;            /* 页面底 */
  --surface: #FFFFFF;
  --line: #E5E7EB;

  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 8px 24px rgba(15, 41, 68, .08);
  --shadow-lg: 0 16px 40px rgba(15, 41, 68, .12);

  --font-sans: "Inter", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --maxw: 1180px;
}

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

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- 通用按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px; border-radius: 999px; font-size: 16px; font-weight: 500;
  cursor: pointer; border: 1px solid transparent; transition: all .2s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); transform: translateY(-1px); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-d); transform: translateY(-1px); }
.btn-gold { background: var(--gold); color: #fff; }
.btn-ghost { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-ghost:hover { background: rgba(24, 95, 165, .06); }

/* ---------- 顶栏 ---------- */
.topbar {
  background: var(--ink); color: #fff; font-size: 13px;
  padding: 8px 0;
}
.topbar .container { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.topbar a { color: #d7e4f0; }
.topbar a:hover { color: #fff; }
.topbar .lang { display: flex; gap: 14px; align-items: center; }
.topbar .lang a { font-weight: 500; }
.topbar .lang .active { color: #fff; border-bottom: 2px solid var(--accent); }

.header {
  background: var(--surface); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 50;
}
.header .container { display: flex; align-items: center; justify-content: space-between; height: 72px; gap: 16px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 22px; letter-spacing: -.5px; }
.logo .mark {
  width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700;
}
.logo small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: .3px; }

.nav { display: flex; align-items: center; gap: 26px; }
.nav a:not(.btn) { font-size: 15px; font-weight: 500; color: #374151; }
.nav a:not(.btn):hover { color: var(--primary); }
.nav a.active:not(.btn) { color: var(--primary); font-weight: 600; }
.nav .cta { padding: 10px 20px; }

.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 8px; width: 42px; height: 42px; cursor: pointer; }
.burger span { display: block; width: 20px; height: 2px; background: var(--ink); margin: 4px auto; }

/* ---------- Hero 首屏 ---------- */
.hero {
  background: linear-gradient(180deg, #0C447C 0%, #185FA5 100%);
  color: #fff; padding: 72px 0 0; position: relative; overflow: hidden;
}
.hero .container { position: relative; z-index: 2; }
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.2);
  padding: 6px 14px; border-radius: 999px; font-size: 13px; letter-spacing: .4px; margin-bottom: 20px;
}
.hero h1 { font-size: 52px; line-height: 1.15; font-weight: 700; letter-spacing: -1px; max-width: 760px; }
.hero h1 .hl { color: #7fd8c0; }
.hero .sub { font-size: 18px; color: #cfe0f0; max-width: 640px; margin-top: 18px; }
.hero .actions { display: flex; gap: 14px; margin-top: 30px; flex-wrap: wrap; }
.hero .actions .btn-gold { background: var(--gold); }
.hero .actions .btn-ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.hero .actions .btn-ghost:hover { background: rgba(255,255,255,.1); }

/* 数据背书条 */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius); margin-top: 48px; overflow: hidden;
}
.stat { padding: 22px 20px; background: rgba(255,255,255,.05); }
.stat b { display: block; font-size: 30px; font-weight: 700; }
.stat span { font-size: 13px; color: #cfe0f0; }

/* ---------- 分区标题 ---------- */
.section { padding: 72px 0; }
.section-head { text-align: center; margin-bottom: 44px; }
.section-head .kicker { color: var(--accent); font-weight: 600; font-size: 13px; letter-spacing: 1.5px; text-transform: uppercase; }
.section-head h2 { font-size: 34px; font-weight: 700; letter-spacing: -.5px; margin-top: 10px; }
.section-head p { color: var(--muted); margin-top: 12px; max-width: 640px; margin-left: auto; margin-right: auto; }

/* ---------- 品类能力 ---------- */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 18px; }
.cat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 20px; text-align: center; transition: all .2s ease; cursor: pointer;
}
.cat:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.cat .icon { width: 56px; height: 56px; border-radius: 14px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 26px; }
.cat h3 { font-size: 17px; font-weight: 600; }
.cat p { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- 定制流程 ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 22px; position: relative; }
.step .num {
  width: 42px; height: 42px; border-radius: 50%; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; margin-bottom: 14px;
}
.step h3 { font-size: 18px; font-weight: 600; }
.step p { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* ---------- 工厂实力 ---------- */
.factory { background: var(--ink); color: #fff; }
.factory .section-head h2 { color: #fff; }
.factory .section-head p { color: #9fb3c8; }
.factory-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.fcard { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius); padding: 26px 22px; }
.fcard b { font-size: 28px; font-weight: 700; color: #7fd8c0; }
.fcard h4 { font-size: 16px; font-weight: 600; margin-top: 6px; color: #fff; }
.fcard p { font-size: 13px; color: #9fb3c8; margin-top: 6px; }

/* 认证徽章 */
.certs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.cert { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15); border-radius: 8px; padding: 8px 16px; font-size: 13px; color: #d7e4f0; }

/* ---------- 案例 ---------- */
.cases { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.case .thumb { height: 160px; display: flex; align-items: center; justify-content: center; font-size: 40px; }
.case .body { padding: 20px; }
.case h3 { font-size: 16px; font-weight: 600; }
.case p { font-size: 13px; color: var(--muted); margin-top: 6px; }

/* ---------- 询盘 CTA ---------- */
.cta-band { background: linear-gradient(120deg, var(--primary) 0%, var(--accent) 100%); color: #fff; border-radius: var(--radius); padding: 48px 40px; text-align: center; }
.cta-band h2 { font-size: 30px; font-weight: 700; }
.cta-band p { color: #e3f2fd; margin-top: 10px; max-width: 560px; margin-left: auto; margin-right: auto; }
.cta-band .actions { display: flex; gap: 14px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.cta-band .btn-gold { background: var(--gold); }

/* ---------- 页脚 ---------- */
.footer { background: var(--ink); color: #9fb3c8; padding: 56px 0 32px; }
.footer .grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 30px; }
.footer h4 { color: #fff; font-size: 15px; font-weight: 600; margin-bottom: 14px; }
.footer a { display: block; font-size: 14px; margin-bottom: 10px; }
.footer a:hover { color: #fff; }
.footer .logo { color: #fff; }
.footer .note { font-size: 13px; margin-top: 14px; line-height: 1.7; }
.footer .bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 40px; padding-top: 24px; font-size: 13px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 13px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font-size: 15px; font-family: inherit; background: var(--surface); transition: border .2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--primary); }
.field textarea { resize: vertical; min-height: 110px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.form-grid .full { grid-column: 1 / -1; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
  .hero h1 { font-size: 42px; }
  .cats { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .factory-grid { grid-template-columns: repeat(2, 1fr); }
  .cases { grid-template-columns: repeat(2, 1fr); }
  .footer .grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .nav { display: none; position: absolute; top: 72px; left: 0; right: 0; background: var(--surface); flex-direction: column; padding: 20px 24px; border-bottom: 1px solid var(--line); gap: 16px; }
  .nav.open { display: flex; }
  .burger { display: block; }
  .hero { padding: 48px 0 0; }
  .hero h1 { font-size: 34px; }
  .hero .sub { font-size: 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .cats { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; }
  .factory-grid { grid-template-columns: 1fr; }
  .cases { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .section { padding: 52px 0; }
  .section-head h2 { font-size: 28px; }
}

/* ============ M2 电商组件（商品 / 购物车 / 结算） ============ */
/* 页面标题 */
.page-head { background: linear-gradient(180deg, #0C447C, #185FA5); color: #fff; padding: 48px 0; }
.page-head h1 { font-size: 36px; font-weight: 700; }
.page-head .crumb { font-size: 14px; color: #cfe0f0; margin-top: 8px; }
.page-head .crumb a { color: #7fd8c0; }

/* 分类 chips */
.cat-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chips .chip { padding: 8px 18px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); font-size: 14px; cursor: pointer; transition: all .2s; }
.cat-chips .chip:hover { border-color: var(--primary); color: var(--primary); }
.cat-chips .chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* 排序 */
.sort-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 18px 0; flex-wrap: wrap; }
.sort-row select { padding: 8px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; background: var(--surface); color: var(--ink); }
.sort-row .count { font-size: 14px; color: var(--muted); }

/* 商品网格 */
.prod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.prod-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: all .2s; display: flex; flex-direction: column; }
.prod-card:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.prod-card .thumb { height: 170px; display: flex; align-items: center; justify-content: center; font-size: 64px; position: relative; }
.prod-card .badge-hot { position: absolute; top: 12px; left: 12px; background: var(--gold); color: #fff; font-size: 11px; padding: 3px 9px; border-radius: 6px; font-weight: 600; }
.prod-card .body { padding: 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.prod-card .cat-tag { font-size: 12px; color: var(--muted); letter-spacing: .5px; }
.prod-card h3 { font-size: 16px; font-weight: 600; line-height: 1.3; }
.prod-card h3 a { color: var(--ink); }
.prod-card h3 a:hover { color: var(--primary); }
.prod-card .desc { font-size: 13px; color: var(--muted); line-height: 1.5; flex: 1; }
.prod-card .price-row { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.prod-card .price { font-size: 20px; font-weight: 700; color: var(--primary); }
.prod-card .price .cur { font-size: 14px; }
.prod-card .member-price { font-size: 12px; color: var(--accent); }
.prod-card .add-btn { width: 100%; margin-top: 4px; }

/* 商品详情 */
.prod-detail { display: grid; grid-template-columns: 1fr 1.2fr; gap: 40px; align-items: start; }
.prod-detail .gallery { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); height: 380px; display: flex; align-items: center; justify-content: center; font-size: 120px; }
.prod-detail h1 { font-size: 30px; font-weight: 700; }
.prod-detail .en { color: var(--muted); margin-top: 4px; }
.prod-detail .price-big { font-size: 34px; font-weight: 700; color: var(--primary); margin: 16px 0; }
.prod-detail .price-big .cur { font-size: 20px; }
.prod-detail .price-big .member { font-size: 15px; color: var(--accent); font-weight: 500; margin-left: 10px; }
.prod-detail .meta { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.prod-detail .meta .m { font-size: 13px; color: var(--muted); }
.prod-detail .meta .m b { color: var(--ink); }
.qty-row { display: flex; align-items: center; gap: 12px; margin: 20px 0; }
.qty-row .stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty-row .stepper button { width: 38px; height: 38px; border: none; background: var(--bg); font-size: 18px; cursor: pointer; }
.qty-row .stepper input { width: 50px; height: 38px; border: none; text-align: center; font-size: 15px; }
.detail-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* 购物车 */
.cart-list { display: flex; flex-direction: column; gap: 14px; }
.cart-item { display: grid; grid-template-columns: 80px 1fr auto auto; gap: 16px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; }
.cart-item .thumb { width: 80px; height: 80px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 40px; background: var(--bg); }
.cart-item h3 { font-size: 16px; font-weight: 600; }
.cart-item .unit { font-size: 13px; color: var(--muted); }
.cart-item .price { font-size: 17px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.cart-item .rm { background: none; border: none; color: #d95; cursor: pointer; font-size: 13px; }
.cart-summary { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; position: sticky; top: 90px; }
.cart-summary .row { display: flex; justify-content: space-between; margin: 10px 0; font-size: 15px; }
.cart-summary .row.total { font-size: 20px; font-weight: 700; border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.cart-summary .row.total .num { color: var(--primary); }
.cart-empty { text-align: center; padding: 80px 20px; color: var(--muted); }
.cart-empty .icon { font-size: 60px; }

/* 结算 */
.checkout-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 32px; align-items: start; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.form-card h2 { font-size: 20px; font-weight: 700; margin-bottom: 18px; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.field input, .field select, .field textarea { width: 100%; padding: 11px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; font-family: inherit; }
.field input:focus, .field select:focus { outline: none; border-color: var(--primary); }
.pay-methods { display: flex; flex-direction: column; gap: 10px; }
.pay-method { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: all .2s; }
.pay-method:hover { border-color: var(--primary); }
.pay-method.selected { border-color: var(--primary); background: rgba(24, 95, 165, .05); }
.pay-method .ico { font-size: 22px; }
.pay-method .name { font-weight: 600; }
.pay-method .note { font-size: 12px; color: var(--muted); }

/* 购物车角标 */
.cart-link { position: relative; display: inline-flex; align-items: center; gap: 6px; }
.cart-link .badge { position: absolute; top: -8px; right: -10px; background: var(--gold); color: #fff; font-size: 11px; min-width: 18px; height: 18px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 5px; font-weight: 700; }

/* toast */
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 999px; font-size: 14px; z-index: 999; opacity: 0; pointer-events: none; transition: all .3s; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(-8px); }

@media (max-width: 992px) {
  .prod-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
  .prod-grid { grid-template-columns: repeat(2, 1fr); }
  .prod-detail { grid-template-columns: 1fr; }
  .checkout-grid { grid-template-columns: 1fr; }
  .cart-item { grid-template-columns: 64px 1fr auto; }
  .cart-item .price { grid-column: 2; }
}

/* ============ 统一导航：子项目下拉菜单 ============ */
.hd-actions { display: flex; align-items: center; gap: 14px; }
.hd-actions > a[href="member.html"] { font-size: 22px; }
.nav .has-sub { position: relative; }
.nav .has-sub > a.sub-trigger { cursor: pointer; }
.nav .caret { font-size: 10px; opacity: .6; margin-left: 2px; }
.nav .submenu { display: none; position: absolute; top: calc(100% + 12px); left: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); min-width: 220px; padding: 8px; z-index: 300; }
.nav .has-sub:hover .submenu { display: block; }
.nav .submenu a { display: flex; flex-direction: column; gap: 1px; padding: 9px 14px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--ink); line-height: 1.25; }
.nav .submenu a small { font-size: 11px; color: var(--muted); font-weight: 400; }
.nav .submenu a:hover { background: var(--bg); }
.nav .submenu a:hover span { color: var(--primary); }
@media (max-width: 768px) {
  .nav .submenu { display: none; position: static; box-shadow: none; border: none; min-width: 0; padding: 4px 0 4px 14px; }
  .nav .has-sub.open .submenu { display: block; }
  .nav .has-sub { flex-direction: column; align-items: flex-start; }
  .hd-actions { margin-left: auto; }
}
