:root {
  --blue: #1f7ae0; --blue-d: #0f4fa3; --ink: #1f2d3d; --muted: #5a7596;
  --line: #e6edf5; --bg: #f5f8fc; --card: #ffffff; --ok: #1f9d5a;
  --shadow: 0 6px 22px rgba(31, 74, 122, 0.08);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; font-family: "Microsoft YaHei", "PingFang SC", "Hiragino Sans GB", system-ui, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 15px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
.wrap { width: 1180px; max-width: 94vw; margin: 0 auto; }
.icon { width: 18px; height: 18px; flex: none; }
.tag { display: inline-block; font-size: 12px; color: var(--blue); background: #eaf2fd; padding: 2px 9px; border-radius: 20px; margin-right: 6px; }
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  background: var(--blue); color: #fff; border: none; border-radius: 8px; padding: 11px 22px;
  font-size: 15px; cursor: pointer; transition: .15s; font-family: inherit;
}
.btn:hover { background: var(--blue-d); }
.btn--ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.btn--ghost:hover { background: #eaf2fd; }
.btn--block { width: 100%; }
.btn--lg { padding: 14px 30px; font-size: 16px; }

/* ---------- Header ---------- */
#site-header { position: sticky; top: 0; z-index: 100; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.hdr-top { border-bottom: 1px solid var(--line); }
.hdr-top__in { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand__logo { width: 38px; height: 38px; }
.brand__name { font-size: 18px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.hdr-search { flex: 1; display: flex; max-width: 460px; border: 1px solid var(--line); border-radius: 22px; overflow: hidden; background: #f7fafd; }
.hdr-search input { flex: 1; border: none; background: transparent; padding: 9px 16px; font-size: 14px; outline: none; font-family: inherit; }
.hdr-search button { background: var(--blue); color: #fff; border: none; padding: 0 18px; cursor: pointer; display: flex; align-items: center; }
.hdr-actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.hdr-cart { position: relative; color: var(--ink); display: flex; }
.hdr-cart svg { width: 24px; height: 24px; }
.hdr-cart__badge { position: absolute; top: -6px; right: -8px; background: #e0533a; color: #fff; font-size: 11px; min-width: 17px; height: 17px; border-radius: 9px; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.hdr-user { display: flex; align-items: center; gap: 10px; font-size: 14px; }
.hdr-user__name { color: var(--blue-d); font-weight: 600; }
.hdr-link { color: var(--muted); }
.hdr-link:hover { color: var(--blue); }
.hdr-btn { background: var(--blue); color: #fff; padding: 8px 16px; border-radius: 7px; font-size: 14px; }
.hdr-btn--ghost { background: #fff; color: var(--blue); border: 1px solid var(--blue); }
.hdr-nav { background: #fff; }
.hdr-nav__in { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-link { padding: 14px 16px; font-size: 15px; color: var(--ink); position: relative; }
.nav-link:hover { color: var(--blue); }
.hdr-menu { display: none; background: none; border: none; color: var(--ink); cursor: pointer; }
.hdr-menu svg { width: 26px; height: 26px; }
.hdr-mobile { display: none; flex-direction: column; border-top: 1px solid var(--line); background: #fff; }
.hdr-mobile.open { display: flex; }
.hdr-mobile .nav-link { border-bottom: 1px solid var(--line); }

/* ---------- Hero ---------- */
.hero { background: linear-gradient(120deg, var(--blue), var(--blue-d)); color: #fff; padding: 54px 0 60px; }
.hero__in { display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.hero h1 { font-size: 34px; margin: 0 0 14px; }
.hero p { font-size: 16px; opacity: .92; max-width: 560px; margin: 0 0 22px; }
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .btn--ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.6); }
.hero__stats { display: flex; gap: 26px; margin-top: 26px; }
.hero__stats div { text-align: center; }
.hero__stats b { font-size: 26px; display: block; }
.hero__stats span { font-size: 13px; opacity: .85; }
.hero__panel { background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25); border-radius: 14px; padding: 22px; min-width: 280px; }
.hero__panel h3 { margin: 0 0 12px; font-size: 17px; }
.hero__panel ul { margin: 0; padding-left: 18px; font-size: 14px; opacity: .95; }

/* ---------- Sections ---------- */
.section { padding: 46px 0; }
.section--alt { background: #eef4fb; }
.sec-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.sec-hd h2 { font-size: 24px; margin: 0; }
.sec-hd .sub { color: var(--muted); font-size: 14px; }
.sec-hd__act { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Grid + cards ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; transition: .15s; display: flex; flex-direction: column; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__media { aspect-ratio: 16/10; background: #f0f4f9; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__title { font-size: 15px; margin: 0; line-height: 1.45; height: 2.9em; overflow: hidden; }
.card__tags { min-height: 22px; }
.card__meta { display: flex; align-items: baseline; gap: 8px; }
.card__price { color: #e0533a; font-weight: 700; font-size: 18px; }
.card__origin { color: var(--muted); text-decoration: line-through; font-size: 13px; }
.card__shop { font-size: 12px; color: var(--muted); border-top: 1px dashed var(--line); padding-top: 8px; margin-top: auto; }

/* merchant cards */
.mgrid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.mcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 16px; }
.mcard__hd { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; color: var(--blue); }
.mcard__hd svg { width: 30px; height: 30px; }
.mcard__name { font-weight: 700; color: var(--ink); font-size: 15px; }
.mcard__region { font-size: 12px; color: var(--muted); }
.mcard__row { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 7px 0; border-top: 1px dashed var(--line); }
.mcard__row svg { width: 16px; height: 16px; color: var(--muted); }
.mcard__row span { color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.mcard__row b { margin-left: auto; font-weight: 600; }
.mcard__phone { letter-spacing: 1px; }

/* ---------- Page head ---------- */
.page { padding: 34px 0 56px; }
.page-hd { margin-bottom: 26px; }
.page-hd--act { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.page-hd h1 { font-size: 26px; margin: 0 0 6px; }
.page-hd .desc { color: var(--muted); font-size: 14px; margin: 0; }
.page-hd__act { display: flex; gap: 10px; flex-wrap: wrap; padding-top: 30px; flex: none; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--blue); }

/* filters */
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.chip { border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 18px; border-radius: 22px; cursor: pointer; font-size: 14px; font-family: inherit; }
.chip.on, .chip:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ---------- Product detail ---------- */
.pd { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: start; }
.pd-main { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.pd-stage { background: #f3f6fa; border-radius: 10px; min-height: 340px; display: flex; align-items: center; justify-content: center; padding: 14px; }
.pd-stage img { max-width: 100%; max-height: 460px; width: auto; height: auto; object-fit: contain; }
.pd-thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.pd-thumbs button { width: 76px; height: 60px; border: 2px solid var(--line); border-radius: 8px; overflow: hidden; cursor: pointer; padding: 0; background: #f3f6fa; }
.pd-thumbs button.on { border-color: var(--blue); }
.pd-thumbs img { width: 100%; height: 100%; object-fit: cover; }
.pd-title { font-size: 22px; margin: 18px 0 10px; }
.pd-tags { margin-bottom: 14px; }
.pd-meta { display: flex; align-items: baseline; gap: 12px; background: #f7fafd; padding: 14px 16px; border-radius: 10px; }
.pd-meta .price { color: #e0533a; font-weight: 700; font-size: 26px; }
.pd-meta .origin { color: var(--muted); text-decoration: line-through; }
.pd-spec { width: 100%; border-collapse: collapse; margin: 18px 0; }
.pd-spec th, .pd-spec td { text-align: left; padding: 11px 14px; border: 1px solid var(--line); font-size: 14px; }
.pd-spec th { background: #f7fafd; color: var(--muted); font-weight: 600; width: 120px; }
.pd-desc h3 { font-size: 17px; margin: 22px 0 10px; }
.pd-desc p { color: #3a4a5c; }
.pd-buy { display: flex; align-items: center; gap: 14px; margin-top: 20px; flex-wrap: wrap; }
.qty { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.qty button { width: 36px; height: 40px; border: none; background: #f3f6fa; font-size: 18px; cursor: pointer; }
.qty input { width: 52px; height: 40px; border: none; text-align: center; font-size: 15px; outline: none; }

/* merchant aside */
.pd-aside { position: sticky; top: 92px; display: flex; flex-direction: column; gap: 16px; }
.aside-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.aside-card h4 { margin: 0 0 12px; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.aside-card h4 svg { width: 20px; height: 20px; color: var(--blue); }
.aside-row { display: flex; gap: 8px; font-size: 13px; padding: 8px 0; border-top: 1px dashed var(--line); }
.aside-row span { color: var(--muted); min-width: 56px; }
.aside-row b { font-weight: 600; }
.aside-row .phone { letter-spacing: 1px; }
.aside-tip { font-size: 12px; color: var(--muted); margin-top: 12px; line-height: 1.5; }

/* ---------- Cart / checkout ---------- */
.cart-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; table-layout: fixed; }
.cart-table th, .cart-table td { padding: 14px 12px; border-bottom: 1px solid var(--line); word-break: break-word; text-align: left; font-size: 14px; }
.cart-table th { background: #f7fafd; color: var(--muted); font-weight: 600; }
.cart-table td:nth-child(1) { width: 42%; }
.cart-table td:nth-child(2) { width: 16%; }
.cart-table td:nth-child(3) { width: 18%; }
.cart-table td:nth-child(4) { width: 14%; }
.cart-table td:nth-child(5) { width: 10%; }
.cart-thumb { width: 56px; height: 44px; object-fit: cover; border-radius: 6px; margin-right: 10px; vertical-align: middle; }
.cart-summary { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 22px; margin-top: 22px; }
.cart-summary .row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 15px; }
.cart-summary .total { font-size: 20px; color: #e0533a; font-weight: 700; }
.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty a { color: var(--blue); font-weight: 600; }

/* ---------- Forms / Auth ---------- */
.auth { max-width: 420px; margin: 30px auto; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 30px; }
.auth h2 { margin: 0 0 6px; font-size: 22px; }
.auth .sub { color: var(--muted); font-size: 14px; margin: 0 0 20px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 14px; margin-bottom: 6px; color: #34465a; }
.field input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; outline: none; font-family: inherit; }
.field input:focus { border-color: var(--blue); }
.agree { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; color: var(--muted); margin: 4px 0 18px; }
.agree input { margin-top: 3px; }
.agree a { color: var(--blue); }
.note { font-size: 13px; color: var(--muted); text-align: center; margin-top: 14px; }
.note a { color: var(--blue); }
.msg { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 14px; display: none; }
.msg.err { display: block; background: #fdecea; color: #c0392b; }
.msg.ok { display: block; background: #e7f6ee; color: var(--ok); }

/* generic form */
.form { max-width: 640px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.form .field textarea { width: 100%; min-height: 110px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; outline: none; resize: vertical; }
.form .field select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; font-family: inherit; font-size: 14px; }
.form .field input[readonly] { background: #f3f6fa; color: var(--muted); }

/* ---------- Info detail ---------- */
.id-main { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.id-hero { width: 100%; border-radius: 10px; margin-bottom: 18px; }
.id-title { font-size: 24px; margin: 0 0 12px; }
.id-metaitem { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.id-body p { color: #3a4a5c; line-height: 1.8; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; position: sticky; top: 92px; }
.contact-card h4 { margin: 0 0 14px; font-size: 16px; }
.contact-row { display: flex; align-items: center; gap: 8px; font-size: 14px; padding: 9px 0; border-top: 1px dashed var(--line); }
.contact-row svg { width: 17px; height: 17px; color: var(--muted); }
.contact-row b { margin-left: auto; font-weight: 600; }
.contact-phone { letter-spacing: 1px; }
.contact-phone.is-locked .ph { color: var(--ink); }
.contact-phone.is-open b { color: var(--ok); }
.locked-tip { font-size: 13px; color: var(--muted); margin-top: 12px; }
.locked-tip a { color: var(--blue); font-weight: 600; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 30px; align-items: start; }
.about-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 26px; }
.about-card h2 { font-size: 22px; margin: 0 0 14px; }
.about-card p { color: #3a4a5c; line-height: 1.9; }
.info-table { width: 100%; border-collapse: collapse; }
.info-table th, .info-table td { text-align: left; padding: 12px 14px; border: 1px solid var(--line); font-size: 14px; vertical-align: top; }
.info-table th { background: #f7fafd; color: var(--muted); font-weight: 600; width: 130px; }
.about-biz { margin-top: 22px; }

/* ---------- Account ---------- */
.acc-grid { display: grid; grid-template-columns: 260px 1fr; gap: 26px; align-items: start; }
.acc-side { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.acc-side h3 { margin: 0 0 12px; font-size: 16px; }
.acc-side a { display: block; padding: 10px 12px; border-radius: 8px; color: var(--ink); cursor: pointer; font-size: 14px; }
.acc-side a.on, .acc-side a:hover { background: #eaf2fd; color: var(--blue); }
.acc-main { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; min-height: 320px; }
.acc-main h3 { margin: 0 0 16px; font-size: 18px; }
.kv { display: flex; gap: 10px; padding: 10px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.kv span { color: var(--muted); min-width: 90px; }
.mlist { display: flex; flex-direction: column; gap: 12px; }
.mitem { border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mitem .st { padding: 3px 12px; border-radius: 20px; font-size: 12px; align-self: center; }
.st--wait { background: #fff4e0; color: #c98a00; }
.st--ok { background: #e7f6ee; color: var(--ok); }

/* ---------- CTA band ---------- */
.cta-band { background: linear-gradient(120deg, var(--blue), var(--blue-d)); color: #fff; border-radius: 14px; padding: 22px 28px; display: flex; align-items: center; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-top: 30px; }
.cta-band h3 { margin: 0 0 4px; font-size: 19px; }
.cta-band p { margin: 0; opacity: .9; font-size: 14px; }
.cta-band .btn--ghost { background: rgba(255,255,255,.14); color: #fff; border-color: rgba(255,255,255,.6); }

/* ---------- Footer ---------- */
#site-footer { background: #0f2740; color: #c8d6e6; margin-top: 50px; }
.ft__in { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.4fr; gap: 26px; padding: 42px 0 26px; }
.ft__col h4 { color: #fff; font-size: 15px; margin: 0 0 14px; }
.ft__col a { display: block; color: #9fb4cc; font-size: 14px; padding: 5px 0; }
.ft__col a:hover { color: #fff; }
.ft__name { color: #fff; font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.ft__line { font-size: 13px; margin: 4px 0; }
.ft__bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 16px 0; display: flex; justify-content: space-between; font-size: 13px; flex-wrap: wrap; gap: 10px; }
.ft__bottom a { color: #9fb4cc; }

.biz-strip { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px 26px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.biz-strip div b { display: block; font-size: 15px; color: var(--ink); }
.biz-strip div span { font-size: 13px; color: var(--muted); }

.txt-c { text-align: center; }
.mt20 { margin-top: 20px; }
.mt30 { margin-top: 30px; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .grid, .mgrid { grid-template-columns: repeat(3, 1fr); }
  .ft__in { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 780px) {
  .hdr-search { display: none; }
  .hdr-menu { display: flex; }
  .hdr-nav { display: none; }
  .grid, .mgrid { grid-template-columns: repeat(2, 1fr); }
  .pd { grid-template-columns: 1fr; }
  .pd-aside, .contact-card { position: static; }
  .about-grid, .acc-grid { grid-template-columns: 1fr; }
  .biz-strip { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 27px; }
  .page-hd__act { padding-top: 0; width: 100%; }
  .page-hd__act .btn { flex: 1 1 auto; justify-content: center; }
}
@media (max-width: 520px) {
  .grid, .mgrid { grid-template-columns: 1fr; }
  .ft__in { grid-template-columns: 1fr; }
  .biz-strip { grid-template-columns: 1fr; }
}
