/* 样式照原网站：白底、浅灰卡片、黄色按钮、红色价格和成色标签 */
:root {
  --text: #1a1a1a; --muted: #6b7079; --bg: #fff; --surface: #f6f7f9; --line: #e2e5ea;
  --y: #ffd84d; --y-soft: #fff6d6; --price: #c8361d; --g1: #c2410c; --g2: #b91c1c;
  --r: 12px; --rc: 8px;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text); background: var(--bg); font-size: 15px; line-height: 1.5; display: flex; flex-direction: column; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
h1, h2, h3, p { margin: 0; }
button, input, select { font: inherit; color: inherit; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; width: 100%; }
.main { padding-top: 32px; padding-bottom: 48px; flex: 1; }
.muted { color: var(--muted); }
.sm { font-size: 14px; } .xs { font-size: 12px; } .b { font-weight: 500; }
.ul { text-decoration: underline; text-underline-offset: 4px; font-size: 14px; }
.mt { margin-top: 32px; } .mt-s { margin-top: 16px; }
.grow { flex: 1; min-width: 0; }
.pre { white-space: pre-line; font-size: 14px; margin-top: 4px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 16px;
  border-radius: var(--rc); border: 1px solid transparent; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; background: none; }
.btn-y { background: var(--y); } .btn-y:hover { opacity: .9; }
.btn-o { border-color: var(--line); background: var(--bg); } .btn-o:hover { background: var(--y-soft); }
.btn.sm { height: 30px; padding: 0 10px; font-size: 13px; }
.btn.sq { width: 36px; padding: 0; }
.btn.wide { width: 100%; height: 40px; }
.btn.fit { width: fit-content; }

/* 顶部 */
.hd { border-bottom: 1px solid var(--line); background: var(--bg); }
.hd-in { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; order: 1; }
.logo { width: 32px; height: 32px; object-fit: contain; border-radius: 6px; }
.hd-tools { display: flex; align-items: center; gap: 10px; order: 2; flex-wrap: wrap; }
.sel { height: 32px; border: 1px solid var(--line); border-radius: var(--rc); padding: 0 8px; background: var(--bg); max-width: 150px; }
.nav { display: flex; gap: 16px; order: 3; font-size: 14px; overflow-x: auto; white-space: nowrap; scrollbar-width: none; }
.nav a:hover { color: var(--muted); }
.search { display: flex; align-items: center; gap: 6px; order: 4; width: 100%; border: 1px solid var(--line);
  border-radius: var(--rc); padding: 3px; background: var(--surface); }
.search input[type=search] { flex: 1; min-width: 0; border: 0; background: var(--bg); height: 30px; border-radius: 6px; padding: 0 10px; outline: none; }
.search .sq { width: 30px; height: 30px; }
.seg { display: flex; font-size: 12px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: block; padding: 3px 8px; border-radius: 6px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.seg input:checked + span { background: var(--y); color: var(--text); font-weight: 500; }
@media (min-width: 900px) {
  .hd-in { flex-wrap: nowrap; }
  .nav { order: 2; } .search { order: 3; width: 360px; margin-left: auto; } .hd-tools { order: 4; }
}

/* 首页 */
.hero { background: var(--surface); border-radius: var(--r); padding: 40px 24px; text-align: center; }
.hero h1 { font-size: 34px; font-weight: 600; }
.hero p { max-width: 640px; margin: 10px auto 0; font-size: 16px; }
.hero p.sm { font-size: 14px; }
.hero-btns { display: flex; gap: 12px; justify-content: center; margin-top: 24px; }
.sec { margin-top: 48px; }
.sec h2, .h2 { font-size: 20px; font-weight: 600; margin-bottom: 16px; }
.h2 { font-size: 18px; margin-bottom: 12px; }
.sec-hd { display: flex; justify-content: space-between; align-items: baseline; }
.h1 { font-size: 26px; font-weight: 600; }
.grid2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 900px) { .grid2 { grid-template-columns: repeat(4, 1fr); } }
.cat { border: 1px solid var(--line); border-radius: var(--r); padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.cat:hover { box-shadow: 0 4px 12px rgba(0,0,0,.06); }
.cat .muted { font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); border-radius: var(--rc); padding: 4px 12px; font-size: 14px; }
.chip:hover { background: var(--y-soft); }
.chip.on { background: var(--y); border-color: var(--y); font-weight: 500; }
.filter { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; }
.filter-l { font-size: 13px; color: var(--muted); padding-top: 5px; min-width: 44px; }

/* 商品卡片 */
.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 700px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid { grid-template-columns: repeat(4, 1fr); } }
.card { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--bg); transition: box-shadow .15s; }
.card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.card-img { position: relative; background: var(--surface); overflow: hidden; }
.card-img.r45 { aspect-ratio: 4 / 5; } .card-img.r11 { aspect-ratio: 1; }
.card-img img { width: 100%; height: 100%; object-fit: cover; }
.card-bd { display: flex; flex-direction: column; gap: 6px; padding: 12px; flex: 1; }
.card-bd h3 { font-size: 14px; font-weight: 500; }
.card-bd .price-row { margin-top: auto; }
.grade { display: inline-block; background: linear-gradient(90deg, var(--g1), var(--g2)); color: #fff; font-weight: 600; border-radius: var(--rc); padding: 4px 12px; font-size: 16px; }
.grade.sm { position: absolute; left: 8px; top: 8px; font-size: 12px; font-weight: 500; padding: 2px 8px; }
.price-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tag { background: var(--surface); color: var(--muted); font-size: 12px; border-radius: var(--rc); padding: 2px 8px; }
.price { color: var(--price); font-weight: 600; }
.price.lg { font-size: 18px; } .price.sm { font-size: 14px; }
.empty { text-align: center; padding: 48px 0; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 16px; }
.empty.big { padding: 96px 0; color: var(--text); }

/* 详情页 */
.pd { display: grid; gap: 32px; }
@media (min-width: 900px) { .pd { grid-template-columns: 1fr 1fr; align-items: start; } }
.pd-info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pd-info h1 { font-size: 24px; font-weight: 600; }
.pd-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.gal-main { position: relative; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.gal-main img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.gal-n { position: absolute; right: 10px; bottom: 8px; font-size: 12px; color: var(--muted); background: rgba(255,255,255,.8); padding: 1px 6px; border-radius: 6px; }
.gal-n b { font-weight: 400; }
.gal-nav { display: flex; justify-content: space-between; margin-top: 12px; }
.gal-th { display: flex; gap: 8px; overflow-x: auto; margin-top: 12px; padding-bottom: 4px; scrollbar-width: thin; }
.gal-th button { flex: 0 0 auto; width: 38px; height: 38px; padding: 0; border: 2px solid transparent; border-radius: 6px; overflow: hidden; cursor: pointer; background: var(--surface); }
.gal-th button.on { border-color: var(--text); }
.gal-th img { width: 100%; height: 100%; object-fit: cover; }
.specs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 0; }
.specs div { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 12px; }
.specs dt { font-size: 12px; color: var(--muted); }
.specs dd { margin: 4px 0 0; font-size: 14px; font-weight: 500; }
.cta-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--bg); border-top: 1px solid var(--line); padding: 12px; }
@media (min-width: 900px) { .cta-bar { position: static; border: 0; padding: 0; background: none; } .cta-bar .btn.wide { width: auto; } }
@media (max-width: 899px) { body:has(.cta-bar) .main { padding-bottom: 96px; } }
.box { border: 1px solid var(--line); background: var(--surface); border-radius: var(--r); padding: 16px; }
.box.white { background: var(--bg); }
.box h2 { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.box p { font-size: 14px; }
.all-ph { display: flex; flex-direction: column; gap: 16px; }
.all-ph img, .rimg { width: 100%; border-radius: var(--r); border: 1px solid var(--line); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.sqimg { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--r); background: var(--surface); }
.opts { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 8px; }
.opts li { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 8px; font-size: 14px; }
.opts img { width: 48px; height: 48px; object-fit: cover; border-radius: var(--rc); background: var(--surface); flex: 0 0 auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; table-layout: fixed; }
.tbl th { width: 40%; text-align: left; font-weight: 400; color: var(--muted); padding: 8px 12px 8px 0; vertical-align: top; }
.tbl td { padding: 8px 0; word-break: break-word; }
.tbl tr { border-bottom: 1px solid var(--line); }

/* 底部 */
.ft { border-top: 1px solid var(--line); background: var(--surface); margin-top: auto; }
.ft-in { display: flex; flex-direction: column; gap: 32px; padding-top: 32px; padding-bottom: 32px; }
@media (min-width: 900px) { .ft-in { flex-direction: row; justify-content: space-between; } }
.ft-about { max-width: 380px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.ft-name { font-size: 18px; font-weight: 600; }
.ft-about .ul { width: fit-content; margin-top: 6px; }
.ft-h { font-size: 13px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 10px; }
.ft-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }

/* 联系方式弹窗 */
.modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.45); display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
@media (min-width: 700px) { .modal { align-items: center; } }
.modal-box { background: var(--bg); width: 100%; max-width: 440px; border-radius: 16px 16px 0 0; padding: 20px; max-height: 90vh; overflow: auto; }
@media (min-width: 700px) { .modal-box { border-radius: 16px; } }
.modal-hd { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.modal-hd h2 { font-size: 18px; font-weight: 600; }
.x { border: 0; background: none; font-size: 26px; line-height: 1; cursor: pointer; color: var(--muted); }
.ct-item { font-size: 13px; margin-bottom: 12px; }
.ct-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.ct-row { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: var(--r); padding: 12px; font-size: 14px; }
a.ct-row:hover { background: var(--y-soft); }
.ct-ic { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; flex: 0 0 auto; }
.ct-ic.wa { background: #25d366; } .ct-ic.em { background: #4b5563; } .ct-ic.wc { background: #07c160; }
.ct-qr { text-align: center; padding: 12px 0 0; }
.ct-qr img { width: 180px; margin: 0 auto 6px; border-radius: 8px; border: 1px solid var(--line); }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: #1a1a1a; color: #fff; padding: 8px 16px; border-radius: 8px; font-size: 14px; z-index: 200; }
