/* UKUS 官网样式。全站女娲字体，深蓝为主，红色只用在价格上。 */
@font-face {
  font-family: "nvwa";
  src: url("fonts/nvwa-subset.woff2") format("woff2");
  font-display: swap;
}

/* 输入框用：常用汉字全集，只有客户输入了子集里没有的字时浏览器才会下载 */
@font-face {
  font-family: "nvwa-input";
  src: url("fonts/nvwa-input.woff2") format("woff2");
  font-display: swap;
}

:root {
  --blue: #1f4e79;
  --navy: #173a5c;
  --red: #b8322a;
  --ink: #1c2733;
  --text: #3d4a57;
  --muted: #7b8794;
  --line: #e1e7ee;
  --bg: #f4f7fb;
  --pale: #eaf1f8;
  --font: "nvwa", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sys: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.75; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-weight: 400; color: var(--ink); margin: 0; }
b, strong { font-weight: 400; color: var(--ink); }
button, input { font-family: inherit; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 14px; }
@media (min-width: 860px) { .wrap { padding: 0 28px; } }

/* 顶部 */
.bar { background: var(--navy); color: #d6e4f1; text-align: center; font-size: 13px; padding: 5px 12px; letter-spacing: .08em; }
.top { position: sticky; top: 0; z-index: 30; background: #fff; border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 16px; }
.brand { display: flex; align-items: baseline; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand b { font-size: 26px; color: var(--blue); letter-spacing: .06em; line-height: 1; }
.brand span { font-size: 13px; color: var(--muted); }

.btn {
  display: inline-block; border: 1px solid var(--blue); background: var(--blue); color: #fff; border-radius: 6px;
  padding: 9px 22px; font-size: 15px; line-height: 1.4; text-decoration: none; text-align: center; cursor: pointer;
}
.btn:hover { background: var(--navy); }
.btn.ghost { background: #fff; color: var(--blue); }
.btn.ghost:hover { background: var(--pale); }
.btn.small { padding: 3px 12px; font-size: 13px; }
.btn.block { display: block; width: 100%; }
.btn.buy { background: var(--red); border-color: var(--red); }
.btn.buy:hover { background: #a02a23; }
.btn[disabled] { opacity: .6; cursor: default; }

/* 商品区 */
.shop { background: #fff; padding: 16px 0 18px; border-bottom: 1px solid var(--line); }
.shop-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.shop-head h1 { font-size: 20px; }
.shop-head span { font-size: 13px; color: var(--muted); }
.rail { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; padding: 2px 14px 6px; scroll-padding-left: 14px; scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.pcard { flex: 0 0 44.5vw; scroll-snap-align: start; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; text-decoration: none; }
.pcard img { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; }
.pcard .body { padding: 9px 10px 11px; display: flex; flex-direction: column; flex: 1; }
.pcard h3 { font-size: 15.5px; line-height: 1.4; }
.pcard .sub { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 2px 0 6px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tags { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.tags i { font-style: normal; font-size: 11.5px; line-height: 1.5; color: var(--red); border: 1px solid #e3b4b0; border-radius: 3px; padding: 0 5px; }
.pcard .foot { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; }
.price { color: var(--red); font-size: 24px; line-height: 1.1; white-space: nowrap; }
.price em { font-style: normal; font-size: .58em; margin-right: 1px; }
.price small { font-size: 12px; color: var(--muted); margin-left: 3px; }
.pcard .go { font-size: 12.5px; color: #fff; background: var(--red); border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.dots { display: flex; justify-content: center; gap: 6px; padding-top: 8px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: #cfd8e2; }
.dots i.on { background: var(--blue); width: 16px; border-radius: 3px; }
@media (min-width: 860px) {
  .shop { padding: 26px 0 30px; }
  .shop-head h1 { font-size: 24px; }
  .rail { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; overflow: visible; max-width: 1160px; margin: 0 auto; padding: 0 28px; }
  .pcard { transition: box-shadow .15s, transform .15s; }
  .pcard:hover { box-shadow: 0 8px 22px rgba(31, 78, 121, .16); transform: translateY(-2px); }
  .shop .dots { display: none; }
}
.promise { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px 12px; margin-top: 14px; font-size: 13.5px; color: var(--text); }
.promise li { list-style: none; display: flex; align-items: center; gap: 6px; }
.promise li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--blue); flex: none; }
ul.promise { padding: 0; }
@media (min-width: 860px) { .promise { grid-template-columns: repeat(4, auto); justify-content: space-between; font-size: 15px; margin-top: 22px; } }

/* 介绍段落 */
section { padding: 44px 0; }
@media (min-width: 860px) { section { padding: 76px 0; } }
section h2 { font-size: clamp(24px, 6vw, 32px); line-height: 1.4; margin-bottom: 8px; }
.lead { color: var(--muted); margin: 0 0 22px; }
.white { background: #fff; }

.two { display: grid; gap: 12px; }
@media (min-width: 760px) { .two { grid-template-columns: 1fr 1fr; gap: 18px; } }
.side { background: #fff; border: 1px solid var(--line); border-top: 4px solid var(--blue); border-radius: 10px; padding: 20px 20px 22px; display: flex; flex-direction: column; }
.side h3 { font-size: 22px; color: var(--blue); margin-bottom: 6px; }
.side p { margin: 0 0 6px; }
.side .fit { color: var(--ink); }
.side .btn { margin-top: 12px; align-self: flex-start; }
.after { margin: 16px 0 0; font-size: 14.5px; color: var(--muted); }
.after a { color: var(--blue); }

.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 10px; }
.steps li { counter-increment: s; position: relative; background: var(--bg); border-radius: 10px; padding: 14px 16px 14px 60px; }
.steps li::before { content: counter(s); position: absolute; left: 16px; top: 15px; width: 32px; height: 32px; border-radius: 50%; background: var(--blue); color: #fff; text-align: center; line-height: 32px; font-size: 18px; }
.steps b { display: block; font-size: 17.5px; }
.steps span { font-size: 14.5px; color: var(--muted); }
@media (min-width: 900px) {
  .steps { grid-template-columns: repeat(5, 1fr); gap: 14px; }
  .steps li { padding: 62px 16px 18px; }
}

.duty { background: #fff; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.duty h3 { background: var(--blue); color: #fff; font-size: 18px; padding: 9px 18px; }
.duty dl { margin: 0; padding: 4px 18px 8px; }
.duty dl div { padding: 11px 0; border-bottom: 1px dashed var(--line); }
.duty dl div:last-child { border-bottom: 0; }
.duty dt { color: var(--ink); }
.duty dd { margin: 0; font-size: 14px; color: var(--red); }

.gift { background: var(--bg); border-radius: 10px; padding: 20px; display: flex; flex-direction: column; }
.gift h3 { font-size: 20px; margin-bottom: 4px; }
.gift p { margin: 0 0 14px; font-size: 14.5px; color: var(--muted); flex: 1; }
.gift .btn { align-self: flex-start; }

.faq .wrap { max-width: 820px; }
details { background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 8px; padding: 0 16px; }
summary { cursor: pointer; list-style: none; padding: 13px 26px 13px 0; position: relative; color: var(--ink); }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 2px; top: 10px; font-size: 20px; color: var(--blue); }
details[open] summary::after { content: "×"; }
details p { margin: 0 0 14px; font-size: 15px; }

.contact { background: var(--navy); color: #d6e4f1; text-align: center; }
.contact h2 { color: #fff; }
.contact p { margin: 0 0 18px; }
.wx { display: inline-flex; align-items: center; gap: 10px; background: #fff; color: var(--ink); border-radius: 8px; padding: 10px 14px; }
.wx code, .sys { font-family: var(--font); font-size: 17px; letter-spacing: .03em; }
.qr { width: 190px; height: 190px; object-fit: contain; background: #fff; padding: 8px; border-radius: 8px; margin: 18px auto 0; }

footer { background: #10283f; color: #8ea3b8; font-size: 13px; text-align: center; padding: 22px 0 26px; }
footer p { margin: 0 0 5px; }

/* 商品详情页 */
.detail { display: grid; gap: 14px; padding-bottom: 30px; }
@media (min-width: 900px) { .detail { padding-top: 20px; } }
@media (min-width: 900px) { .detail { grid-template-columns: 460px 1fr; gap: 28px; align-items: start; padding-bottom: 60px; } }
.gallery { position: relative; margin: 0 -14px; background: #fff; }
.gallery .track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.gallery .track::-webkit-scrollbar { display: none; }
.gallery .track img { flex: 0 0 100%; width: 100%; height: auto; aspect-ratio: 1 / 1; scroll-snap-align: start; }
.gallery .count { position: absolute; right: 12px; bottom: 12px; background: rgba(0, 0, 0, .45); color: #fff; font-size: 12.5px; border-radius: 999px; padding: 1px 10px; }
.thumbs { display: none; }
@media (min-width: 900px) {
  .gallery { margin: 0; position: sticky; top: 72px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
  .gallery .track { border-bottom: 1px solid var(--line); }
  .thumbs { display: flex; gap: 8px; padding: 10px; }
  .thumbs img { width: 68px; height: 68px; border-radius: 6px; border: 2px solid transparent; cursor: pointer; }
  .thumbs img.on { border-color: var(--blue); }
}
.box { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 16px; margin-bottom: 12px; }
.box h1 { font-size: 24px; line-height: 1.35; }
.box h2 { font-size: 19px; margin-bottom: 10px; padding-left: 10px; border-left: 4px solid var(--blue); line-height: 1.3; }
.box .sub { margin: 2px 0 10px; color: var(--muted); font-size: 14.5px; }
.pricebar { display: flex; align-items: baseline; gap: 12px; background: #fbf1f0; border-radius: 8px; padding: 10px 14px; margin-bottom: 10px; }
.pricebar .price { font-size: 36px; }
.pricebar > span:last-child { font-size: 13.5px; color: var(--red); }
.box .what { margin: 10px 0 0; font-size: 15px; }
.box ul, .box ol { margin: 0; padding-left: 1.3em; }
.box li { margin-bottom: 4px; }
.box .mute li { color: var(--muted); font-size: 14.5px; }

.form label { display: block; font-size: 14.5px; color: var(--ink); margin: 0 0 12px; }
.form input { display: block; width: 100%; margin-top: 4px; border: 1px solid #c9d3de; border-radius: 6px; padding: 10px 12px; font-size: 17px; font-family: "nvwa", "nvwa-input", var(--sys); color: var(--ink); background: #fff; }
.form input:focus { outline: 2px solid var(--blue); outline-offset: -1px; border-color: var(--blue); }
.form .err { color: var(--red); font-size: 14px; margin: 0 0 10px; min-height: 0; }
.form .hint { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.payview { text-align: center; }
.payview .no { font-size: 13.5px; color: var(--muted); margin: 0; }
.payview .amt { color: var(--red); font-size: 34px; line-height: 1.3; margin: 2px 0 8px; }
.payview .amt em { font-style: normal; font-size: .6em; }
.payview img { width: 220px; height: 220px; margin: 0 auto; border: 1px solid var(--line); border-radius: 8px; }
.payview p { margin: 10px 0 0; font-size: 14.5px; }
.payview .ok { color: var(--blue); font-size: 22px; margin: 6px 0; }
.others a { display: inline-block; margin: 0 14px 4px 0; color: var(--blue); font-size: 15px; }

.buybar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff; border-top: 1px solid var(--line); padding: 8px 14px calc(8px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.buybar .price { font-size: 26px; }
.buybar .btn { padding: 9px 34px; border-radius: 999px; }
body.has-buybar { padding-bottom: 64px; }
@media (min-width: 900px) { .buybar { display: none; } body.has-buybar { padding-bottom: 0; } }

/* 下单弹窗：手机从底部弹出，电脑居中 */
.desk-buy { display: none; margin-top: 14px; padding: 12px; font-size: 17px; }
@media (min-width: 900px) { .desk-buy { display: block; } }
button.btn { font-family: inherit; }
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(16, 40, 63, .55); display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
body.modal-open { overflow: hidden; }
.sheet { position: relative; width: 100%; max-width: 440px; max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 16px 16px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); }
@media (min-width: 600px) { .modal { align-items: center; } .sheet { border-radius: 14px; padding: 24px; } }
.sheet h2 { font-size: 20px; margin: 0 0 10px; }
.sheet .close { position: absolute; right: 10px; top: 8px; width: 36px; height: 36px; border: 0; background: none; font-size: 24px; color: var(--muted); cursor: pointer; }
.sheet .item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; background: var(--bg); border-radius: 8px; padding: 10px 12px; margin: 0 0 14px; color: var(--ink); }
.sheet .btn.block { padding: 12px; font-size: 17px; }
.addwx { background: var(--bg); border-radius: 10px; padding: 12px; margin-top: 12px; }
.addwx p { margin: 0 0 8px; }
.addwx img { width: 170px; height: 170px; margin: 4px auto 10px; border: 0; }

[hidden] { display: none !important; }
.gift .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.gift .acts .btn { margin: 0; }

/* 付款方式 */
.payways { margin: 2px 0 14px; }
.payways > span { display: block; color: var(--ink); margin-bottom: 6px; }
.payways .opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.payways .way { display: flex; align-items: center; gap: 8px; margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; color: var(--ink); background: #fff; }
.payways .way input { position: absolute; opacity: 0; width: 0; height: 0; }
.payways .way { justify-content: center; min-height: 50px; }
.payways .way img { height: 22px; width: auto; display: block; }
.payways .way.ali img { height: 25px; }
.payways .way { position: relative; overflow: hidden; transition: border-color .15s; }
.payways .way:has(input:checked) { border-color: var(--blue); }
/* 选中：右下角一个带勾的小角标 */
.payways .way:has(input:checked)::before { content: ""; position: absolute; right: 0; bottom: 0; border: 12px solid transparent; border-right-color: var(--blue); border-bottom-color: var(--blue); }
.payways .way:has(input:checked)::after { content: ""; position: absolute; right: 4px; bottom: 5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 1.6px 1.6px 0; transform: rotate(40deg); }
