* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --p: #1677ff;
  --pd: #0958d9;
  --pl: #e6f4ff;
  --red: #ff4d4f;
  --gold: #fa8c16;
  --green: #52c41a;
  --t: #1f1f1f;
  --tm: #595959;
  --tl: #8c8c8c;
  --bg: #f5f6fa;
  --line: #f0f0f0;
  --card: #fff;
  --shadow: 0 2px 10px rgba(0,0,0,.06);
  --radius: 10px;
}
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: var(--t);
  background: var(--bg);
  line-height: 1.6;
  min-width: 320px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
.container { width: 1200px; max-width: calc(100% - 32px); margin: 0 auto; }
.row { display: flex; gap: 16px; }
.muted { color: var(--tm); }
.tiny { color: var(--tl); font-size: 12px; }
.price { color: var(--red); font-weight: 700; font-family: DIN, "Helvetica Neue", Arial, sans-serif; }
.price em { font-style: normal; font-size: .7em; margin-right: 1px; }
.origin { color: var(--tl); text-decoration: line-through; font-size: 12px; }
.tag {
  display: inline-block; font-size: 11px; line-height: 1; padding: 3px 6px;
  border-radius: 3px; background: #fff1f0; color: var(--red); border: 1px solid #ffccc7;
}
.tag.blue { background: var(--pl); color: var(--p); border-color: #91caff; }
.tag.gold { background: #fff7e6; color: var(--gold); border-color: #ffd591; }
.tag.green { background: #f6ffed; color: #389e0d; border-color: #b7eb8f; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 6px; border: 1px solid transparent;
  cursor: pointer; font-size: 14px; background: var(--p); color: #fff;
}
.btn:hover { background: var(--pd); }
.btn.ghost { background: #fff; color: var(--t); border-color: #d9d9d9; }
.btn.ghost:hover { color: var(--p); border-color: var(--p); }
.btn.red { background: var(--red); }
.btn.red:hover { background: #cf1322; }
.btn.lg { height: 44px; padding: 0 28px; font-size: 16px; }
.btn.block { width: 100%; }
.section { padding: 28px 0; }
.sec-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 16px;
}
.sec-head h2 { font-size: 22px; font-weight: 700; }
.sec-head h2 span { color: var(--p); margin-right: 8px; }
.sec-head .more { font-size: 13px; color: var(--tm); }
.sec-head .more:hover { color: var(--p); }

/* topbar */
.topbar { background: #f5f5f5; border-bottom: 1px solid #eee; font-size: 12px; color: var(--tm); }
.topbar-inner { height: 32px; display: flex; align-items: center; justify-content: space-between; }
.topbar a { margin-left: 16px; }
.topbar a:hover { color: var(--p); }
.topbar-left span { margin-right: 16px; }

/* header */
.header { background: #fff; box-shadow: 0 1px 0 #eee; }
.header-main { height: 96px; display: flex; align-items: center; gap: 28px; }
.logo { display: flex; align-items: center; gap: 10px; min-width: 168px; flex-shrink: 0; }
.logo-mark {
  width: 48px; height: 48px; border-radius: 12px;
  background: linear-gradient(135deg, #1677ff, #69b1ff);
  color: #fff; font-size: 24px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 16px rgba(22,119,255,.28);
}
.logo h1 { font-size: 20px; line-height: 1.15; }
.logo p { font-size: 11px; color: var(--tl); }
.search { flex: 1; }
.search-box {
  display: flex; height: 42px; border: 2px solid var(--p); border-radius: 21px; overflow: hidden;
}
.search-box input { flex: 1; border: 0; outline: 0; padding: 0 16px; font-size: 14px; }
.search-box button { width: 88px; border: 0; background: var(--p); color: #fff; cursor: pointer; font-size: 15px; }
.search-hot { margin-top: 8px; font-size: 12px; color: var(--tl); }
.search-hot a { margin-right: 12px; }
.search-hot a:hover { color: var(--red); }
.header-tools { display: flex; gap: 12px; }
.tool {
  min-width: 96px; height: 42px; border: 1px solid #e8e8e8; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 13px; background: #fff; position: relative; white-space: nowrap; padding: 0 12px; flex-shrink: 0;
}
.tool:hover { border-color: var(--p); color: var(--p); }
.tool .badge {
  position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px;
  background: var(--red); color: #fff; border-radius: 9px; font-size: 11px;
  display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.nav { background: #1677ff; }
.nav-inner { height: 40px; display: flex; align-items: center; }
.nav-cat {
  width: 200px; height: 40px; background: #0958d9; color: #fff;
  display: flex; align-items: center; padding: 0 16px; font-weight: 600; font-size: 14px;
}
.nav a { color: #fff; padding: 0 18px; font-size: 14px; height: 40px; display: flex; align-items: center; }
.nav a:hover, .nav a.active { background: rgba(255,255,255,.12); }

/* hero */
.hero { padding: 16px 0 0; }
.hero-grid { display: grid; grid-template-columns: 200px 1fr 230px; gap: 12px; min-height: 420px; }
.cat-panel { background: #fff; border-radius: var(--radius); padding: 8px 0; box-shadow: var(--shadow); }
.cat-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 14px; font-size: 13px; color: var(--t);
  white-space: nowrap;
}
.cat-item:hover { background: var(--pl); color: var(--p); }
.cat-item i { width: 20px; text-align: center; flex-shrink: 0; }
.cat-item .tiny { margin-left: auto; max-width: 72px; overflow: hidden; text-overflow: ellipsis; }
.slider {
  position: relative; border-radius: var(--radius); overflow: hidden; min-height: 420px; background: #123;
}
.slide {
  position: absolute; inset: 0; opacity: 0; transition: opacity .5s;
  display: flex; flex-direction: column; justify-content: center; padding: 48px;
  color: #fff;
}
.slide.on { opacity: 1; z-index: 1; }
.slide h3 { font-size: 32px; margin: 10px 0 8px; }
.slide p { opacity: .9; margin-bottom: 20px; }
.s1 { background: linear-gradient(135deg, #0b3d91, #1677ff 55%, #69b1ff); }
.s2 { background: linear-gradient(135deg, #7c2d12, #ea580c 50%, #fb923c); }
.s3 { background: linear-gradient(135deg, #14532d, #16a34a 50%, #86efac); }
.dots { position: absolute; left: 0; right: 0; bottom: 16px; z-index: 2; text-align: center; }
.dots span {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: rgba(255,255,255,.45); margin: 0 4px; cursor: pointer;
}
.dots span.on { background: #fff; width: 18px; border-radius: 8px; }
.side-col { display: flex; flex-direction: column; gap: 12px; }
.user-card, .news-card, .promo-mini {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px;
}
.user-card { text-align: center; }
.avatar {
  width: 48px; height: 48px; margin: 0 auto 8px; border-radius: 50%;
  background: linear-gradient(135deg, #1677ff, #69b1ff); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700;
}
.user-card .acts { display: flex; gap: 8px; margin-top: 12px; }
.user-card .acts .btn { flex: 1; height: 32px; font-size: 13px; }
.news-card h4 { font-size: 14px; margin-bottom: 10px; display: flex; justify-content: space-between; }
.news-card li { list-style: none; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--line); display: flex; gap: 8px; }
.news-card li:last-child { border: 0; }
.news-card li a:hover { color: var(--p); }
.promo-mini { background: linear-gradient(135deg, #fff7e6, #fff); }
.promo-mini b { color: var(--gold); }

/* ticker */
.ticker {
  margin-top: 12px; background: #fff; border-radius: 8px; height: 36px;
  display: flex; align-items: center; overflow: hidden; box-shadow: var(--shadow);
}
.ticker-lab {
  background: #fff1f0; color: var(--red); font-size: 12px; font-weight: 700;
  height: 100%; display: flex; align-items: center; padding: 0 12px; white-space: nowrap;
}
.ticker-track { flex: 1; overflow: hidden; position: relative; height: 100%; }
.ticker-track span {
  position: absolute; white-space: nowrap; line-height: 36px; font-size: 13px; color: var(--tm);
  padding-left: 12px; animation: marquee 18s linear infinite;
}
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* cats */
.cat-icons { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; }
.cat-icon {
  background: #fff; border-radius: 10px; text-align: center; padding: 14px 4px;
  box-shadow: var(--shadow); font-size: 12px;
}
.cat-icon:hover { color: var(--p); transform: translateY(-2px); }
.cat-icon .ic { font-size: 26px; display: block; margin-bottom: 6px; }

/* seckill */
.seckill { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.seckill-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: linear-gradient(90deg, #ff4d4f, #ff7a45);
  color: #fff;
}
.seckill-head h3 { font-size: 18px; }
.countdown { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.countdown b {
  background: #1f1f1f; color: #fff; min-width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 4px;
}
.seckill-list { display: grid; grid-template-columns: repeat(5, 1fr); }
.sk-item { padding: 16px; border-right: 1px solid var(--line); text-align: center; }
.sk-item:last-child { border: 0; }
.sk-item:hover { background: #fff7f6; }
.sk-item .name { font-size: 13px; margin: 8px 0 6px; height: 36px; overflow: hidden; }
.sk-item .bar { height: 6px; background: #fff1f0; border-radius: 3px; margin: 8px 0; }
.sk-item .bar i { display: block; height: 100%; background: var(--red); border-radius: 3px; }

/* product thumbs */
.thumb {
  height: 170px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden; background: #fff;
}
.thumb img, .thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb .mark {
  position: absolute; top: 8px; left: 8px; z-index: 2;
}
.c1 { background: linear-gradient(160deg, #d6e4ff, #adc6ff); }
.c2 { background: linear-gradient(160deg, #ffd6e7, #ffadd2); }
.c3 { background: linear-gradient(160deg, #d9f7be, #95de64); }
.c4 { background: linear-gradient(160deg, #fff1b8, #ffd666); }
.c5 { background: linear-gradient(160deg, #ffe7ba, #ffc069); }
.c6 { background: linear-gradient(160deg, #bae0ff, #69b1ff); }
.c7 { background: linear-gradient(160deg, #efdbff, #b37feb); }
.c8 { background: linear-gradient(160deg, #ffccc7, #ff7875); }
.c9 { background: linear-gradient(160deg, #b5f5ec, #36cfc9); }
.c10 { background: linear-gradient(160deg, #d6e4ff, #597ef7); }
.c11 { background: linear-gradient(160deg, #ffd8bf, #ff9c6e); }
.c12 { background: linear-gradient(160deg, #e6fffb, #5cdbd3); }
.c13 { background: linear-gradient(160deg, #f4ffb8, #d3f261); }

/* merchants */
.m-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.m-card {
  background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow);
}
.m-card:hover { box-shadow: 0 8px 24px rgba(22,119,255,.12); }
.m-top { display: flex; gap: 12px; align-items: center; }
.m-av {
  width: 48px; height: 48px; border-radius: 12px; color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  background: linear-gradient(135deg, #1677ff, #69b1ff);
}
.m-card:nth-child(2) .m-av { background: linear-gradient(135deg, #52c41a, #95de64); }
.m-card:nth-child(3) .m-av { background: linear-gradient(135deg, #722ed1, #b37feb); }
.m-card:nth-child(4) .m-av { background: linear-gradient(135deg, #eb2f96, #ff85c0); }
.m-card:nth-child(5) .m-av { background: linear-gradient(135deg, #fa8c16, #ffc069); }
.m-card:nth-child(6) .m-av { background: linear-gradient(135deg, #13c2c2, #5cdbd3); }
.m-card:nth-child(7) .m-av { background: linear-gradient(135deg, #2f54eb, #85a5ff); }
.m-card:nth-child(8) .m-av { background: linear-gradient(135deg, #f5222d, #ff7875); }
.m-top h4 { font-size: 15px; }
.m-top p { font-size: 12px; color: var(--tl); }
.m-meta { display: flex; justify-content: space-between; margin-top: 12px; font-size: 12px; color: var(--tm); }
.m-meta b { color: var(--t); }

/* floors */
.floor { display: grid; grid-template-columns: 180px 1fr; gap: 12px; }
.floor-side {
  border-radius: var(--radius); color: #fff; padding: 20px 16px;
  display: flex; flex-direction: column; justify-content: space-between; min-height: 420px;
}
.f-digital { background: linear-gradient(180deg, #1d4ed8, #60a5fa); }
.f-beauty { background: linear-gradient(180deg, #be185d, #f472b6); }
.f-fresh { background: linear-gradient(180deg, #15803d, #86efac); }
.f-home { background: linear-gradient(180deg, #b45309, #fbbf24); }
.floor-side h3 { font-size: 22px; }
.floor-side ul { list-style: none; margin: 16px 0; }
.floor-side li { font-size: 13px; opacity: .92; padding: 4px 0; }
.floor-side .btn { background: #fff; color: var(--t); }
.p-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.p-card { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.p-card:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(0,0,0,.08); }
.p-info { padding: 12px; }
.p-info h4 { font-size: 14px; height: 40px; overflow: hidden; margin-bottom: 6px; }
.p-shop { font-size: 12px; color: var(--p); margin-bottom: 8px; }
.p-row { display: flex; align-items: baseline; justify-content: space-between; }
.p-row .price { font-size: 20px; }

/* rank + news */
.split { display: grid; grid-template-columns: 1fr 360px; gap: 12px; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.rank-item { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.rank-item:last-child { border: 0; }
.rank-n {
  width: 22px; height: 22px; border-radius: 4px; background: #f0f0f0; color: var(--tm);
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700;
}
.rank-item:nth-child(1) .rank-n { background: #ff4d4f; color: #fff; }
.rank-item:nth-child(2) .rank-n { background: #fa8c16; color: #fff; }
.rank-item:nth-child(3) .rank-n { background: #fadb14; color: #5c3c00; }
.rank-item h5 { font-size: 13px; }
.faq-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.faq-item b { display: block; font-size: 14px; margin-bottom: 4px; }
.faq-item p { font-size: 13px; color: var(--tm); }

/* settle band */
.cta {
  background: linear-gradient(135deg, #0b3d91, #1677ff);
  color: #fff; border-radius: 14px; padding: 36px; display: flex;
  align-items: center; justify-content: space-between; gap: 24px;
}
.cta h3 { font-size: 26px; margin-bottom: 8px; }
.cta-stats { display: flex; gap: 32px; margin-top: 16px; }
.cta-stats b { display: block; font-size: 24px; }
.cta .btn { background: #fff; color: var(--p); }

/* guarantee */
.g-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.g-item { background: #fff; border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.g-item h4 { margin: 8px 0; font-size: 16px; }
.g-item p { font-size: 13px; color: var(--tm); }

/* partners */
.partners { display: flex; flex-wrap: wrap; gap: 10px; }
.partner {
  background: #fff; border: 1px solid #eee; border-radius: 8px;
  padding: 10px 16px; font-size: 13px; color: var(--tm);
}

/* footer */
.footer { background: #141824; color: #9aa3b2; margin-top: 40px; }
.footer-links { display: grid; grid-template-columns: repeat(5, 1fr); gap: 24px; padding: 40px 0 28px; }
.footer-links h4 { color: #fff; font-size: 14px; margin-bottom: 12px; }
.footer-links a { display: block; font-size: 13px; margin: 8px 0; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid #2a3142; padding: 20px 0 28px; text-align: center; font-size: 12px; }
.footer-bottom p { margin: 6px 0; }
.footer-bottom a { color: #9aa3b2; }
.footer-bottom a:hover { color: #fff; }
.pay-row { display: flex; justify-content: center; gap: 10px; margin: 12px 0; flex-wrap: wrap; }
.pay-row span {
  background: #1e2433; border: 1px solid #2a3142; border-radius: 4px;
  padding: 4px 10px; font-size: 12px; color: #c6cedb;
}

/* page common */
.page-wrap { padding: 18px 0 40px; }
.crumb { font-size: 13px; color: var(--tm); margin-bottom: 14px; }
.crumb a:hover { color: var(--p); }
.page-title { font-size: 22px; margin-bottom: 16px; }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }

/* listing */
.list-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; }
.filter { background: #fff; border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.filter h4 { font-size: 14px; margin: 12px 0 8px; }
.filter label { display: block; font-size: 13px; color: var(--tm); padding: 5px 0; cursor: pointer; }
.filter label:hover { color: var(--p); }
.sortbar {
  background: #fff; border-radius: 8px; padding: 10px 14px; margin-bottom: 12px;
  display: flex; gap: 16px; align-items: center; font-size: 13px; box-shadow: var(--shadow);
}
.sortbar a { color: var(--tm); }
.sortbar a.on, .sortbar a:hover { color: var(--p); font-weight: 600; }

/* product detail */
.detail { display: grid; grid-template-columns: 460px 1fr 240px; gap: 20px; }
.gallery .big { height: 420px; border-radius: 12px; }
.gallery .big img { border-radius: 12px; }
.sku-name { font-size: 22px; line-height: 1.4; margin-bottom: 8px; }
.sku-sub { font-size: 13px; color: var(--tm); margin-bottom: 16px; }
.price-box { background: #fff7f6; border-radius: 8px; padding: 16px; margin-bottom: 16px; }
.price-box .now { font-size: 32px; }
.meta-line { display: flex; font-size: 13px; padding: 8px 0; color: var(--tm); }
.meta-line b { width: 72px; color: var(--tl); font-weight: 400; }
.qty { display: flex; align-items: center; gap: 8px; }
.qty button { width: 32px; height: 32px; border: 1px solid #d9d9d9; background: #fff; cursor: pointer; }
.qty input { width: 52px; height: 32px; text-align: center; border: 1px solid #d9d9d9; }
.buy-row { display: flex; gap: 12px; margin-top: 20px; }
.shop-side .m-av { margin-bottom: 10px; }
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--line); margin: 20px 0 0; }
.tabs a { padding: 12px 20px; font-size: 14px; }
.tabs a.on { color: var(--p); border-bottom: 2px solid var(--p); font-weight: 600; }
.review { padding: 14px 0; border-bottom: 1px solid var(--line); }
.stars { color: #faad14; }

/* forms */
.form { max-width: 520px; }
.form.wide { max-width: 760px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; margin-bottom: 6px; color: var(--tm); }
.field input, .field select, .field textarea {
  width: 100%; height: 40px; border: 1px solid #d9d9d9; border-radius: 6px; padding: 0 12px; font-size: 14px;
}
.field textarea { height: 100px; padding: 10px 12px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 0; border-color: var(--p); box-shadow: 0 0 0 3px rgba(22,119,255,.12); }
.auth { max-width: 420px; margin: 40px auto; }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 24px; }
.step { background: #fff; border-radius: 10px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.step b { color: var(--p); font-size: 20px; display: block; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th, .table td { border-bottom: 1px solid var(--line); padding: 12px 8px; text-align: left; }
.table th { background: #fafafa; color: var(--tm); font-weight: 600; }
.ok { color: var(--green); }
.warn { color: var(--gold); }

/* cart */
.cart-item { display: grid; grid-template-columns: 40px 90px 1fr 100px 120px 80px; gap: 12px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.cart-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 16px; }

/* article */
.article { max-width: 860px; }
.article h1 { font-size: 26px; margin-bottom: 8px; }
.article .meta { font-size: 13px; color: var(--tl); margin-bottom: 20px; }
.article p, .article li { font-size: 15px; color: #333; line-height: 1.9; margin-bottom: 12px; }
.article h2 { font-size: 18px; margin: 24px 0 10px; }
.article h3 { font-size: 16px; margin: 18px 0 8px; }

/* user */
.user-layout { display: grid; grid-template-columns: 200px 1fr; gap: 16px; }
.side-nav a { display: block; padding: 10px 12px; border-radius: 6px; font-size: 14px; color: var(--tm); }
.side-nav a.on, .side-nav a:hover { background: var(--pl); color: var(--p); }

.toast {
  position: fixed; top: 24px; left: 50%; transform: translateX(-50%);
  background: #1f1f1f; color: #fff; padding: 10px 18px; border-radius: 8px;
  z-index: 99; font-size: 14px; display: none;
}
.mobile-menu { display: none; }

@media (max-width: 1024px) {
  .hero-grid, .floor, .detail, .list-layout, .split, .user-layout { grid-template-columns: 1fr; }
  .cat-panel, .floor-side, .shop-side, .filter { display: none; }
  .cat-icons { grid-template-columns: repeat(4, 1fr); }
  .seckill-list, .p-grid, .m-grid, .g-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-links { grid-template-columns: repeat(2, 1fr); }
  .header-main { height: auto; padding: 12px 0; flex-wrap: wrap; }
  .nav-cat { display: none; }
}
@media (max-width: 640px) {
  .header-tools, .nav, .topbar-left { display: none; }
  .seckill-list, .p-grid, .m-grid, .g-grid, .steps, .cart-item { grid-template-columns: 1fr; }
  .cta { flex-direction: column; align-items: flex-start; }
  .mobile-menu { display: block; }
}
