* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif; background: #f6f6f8; color: #222; }
#app { max-width: 430px; margin: 0 auto; min-height: 100vh; position: relative; background: #f6f6f8; }
.page { min-height: 100vh; padding-bottom: 78px; }
.page::-webkit-scrollbar { display: none; }

/* 首页 */
.homeHead { position: sticky; top: 0; z-index: 30; background: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #ec4899 100%); padding: 14px 14px 0; color: #fff; }
.shopRow { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.shopName { font-size: 20px; font-weight: 900; letter-spacing: .5px; text-shadow: 0 1px 8px rgba(0,0,0,.25); }
.cartBtn { position: relative; width: 36px; height: 36px; background: rgba(255,255,255,.22); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.cartBtn em { position: absolute; top: -3px; right: -3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: #fff; color: #7c3aed; font-size: 11px; font-style: normal; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.searchBar { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.95); border-radius: 20px; padding: 0 14px; height: 38px; }
.searchBar svg { flex-shrink: 0; }
.searchBar input { flex: 1; border: none; outline: none; background: none; font-size: 13px; color: #333; }
.groupBar { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 12px; scrollbar-width: none; }
.groupBar::-webkit-scrollbar { display: none; }
.groupBar .g { flex-shrink: 0; padding: 5px 13px; border-radius: 14px; background: rgba(255,255,255,.22); color: #fff; font-size: 12px; cursor: pointer; white-space: nowrap; }
.groupBar .g.active { background: #fff; color: #7c3aed; font-weight: 700; }
.noticeBar { display: flex; align-items: center; gap: 8px; background: rgba(255,255,255,.95); border-radius: 12px; padding: 8px 12px; margin: 0 12px 2px; box-shadow: 0 2px 8px rgba(124,58,237,.08); }
.noticeTag { flex-shrink: 0; background: #7c3aed; color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 9px; font-weight: 700; }
.noticeList { display: flex; gap: 10px; overflow-x: auto; scrollbar-width: none; }
.noticeList::-webkit-scrollbar { display: none; }
.noticeItem { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #4a1d96; cursor: pointer; white-space: nowrap; }
.noticeItem em { font-style: normal; color: #a5a5b0; font-size: 11px; }
.nCard { width: 84%; max-width: 420px; background: #fff; border-radius: 18px; padding: 20px 18px; max-height: 76vh; display: flex; flex-direction: column; }
.nHead { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.nHead #nTitle { font-size: 17px; font-weight: 800; color: #222; }
.nTime { font-size: 11px; color: #a5a5b0; margin-bottom: 12px; }
.nImgs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.nImgs img { width: 31%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; cursor: pointer; }
.nContent { flex: 1; overflow-y: auto; font-size: 14px; line-height: 1.8; color: #444; white-space: pre-wrap; word-break: break-word; margin-bottom: 14px; }
.nCard .payBtn { width: 100%; }
.feed { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 12px; }
.card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 1px 6px rgba(0,0,0,.05); cursor: pointer; }
.card .imgWrap { position: relative; aspect-ratio: 1/1; background: #eee; }
.card .imgWrap img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .soldOut { position: absolute; inset: 0; background: rgba(0,0,0,.45); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; }
.card .info { padding: 8px 10px 10px; }
.card .pTitle { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.card .pSub { font-size: 11px; color: #999; margin-top: 4px; }
.card .pPrice { font-size: 16px; font-weight: 800; color: #f43f5e; margin-top: 5px; }
.card .pPrice i { font-style: normal; font-size: 11px; }
.loading { text-align: center; color: #aaa; font-size: 13px; padding: 16px; }
.empty { text-align: center; color: #999; padding: 60px 20px; font-size: 13px; }

/* 详情 */
.backRow { display: flex; align-items: center; gap: 5px; padding: 14px 14px 6px; font-size: 14px; color: #555; cursor: pointer; }
.pageTitle { font-size: 17px; font-weight: 800; padding: 4px 16px 12px; }
.swiper { position: relative; overflow: hidden; background: #eee; }
.swiper .track { display: flex; transition: transform .25s ease; }
.swiper .track img { width: 100%; aspect-ratio: 1/1; object-fit: cover; flex-shrink: 0; }
.swiper .dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.swiper .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.6); }
.swiper .dots i.on { background: #fff; width: 16px; border-radius: 3px; }
.videoTag { position: absolute; right: 10px; top: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 4px 9px; border-radius: 12px; cursor: pointer; }
.videoTag.on { background: #7c3aed; }
.lightVideo { background: #000; text-align: center; }
.lightVideo video { width: 100%; max-height: 46vh; }
.detailBody { padding: 14px; }
.dPrice { font-size: 24px; font-weight: 900; color: #f43f5e; }
.dPrice i { font-style: normal; font-size: 13px; }
.dTitle { font-size: 16px; font-weight: 700; margin-top: 6px; line-height: 1.45; }
.dMeta { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; }
.dMeta .m { background: #f3f3f6; color: #555; font-size: 12px; padding: 4px 10px; border-radius: 10px; }
.dMeta .m b { color: #333; font-weight: 700; }
.dSec { margin-top: 14px; background: #fff; border-radius: 12px; padding: 14px; }
.dSec h4 { font-size: 14px; margin-bottom: 8px; }
.dSec .txt { font-size: 13px; color: #666; line-height: 1.7; white-space: pre-wrap; }
.stockRow { font-size: 13px; color: #777; margin-top: 8px; }
.buyBar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; height: 62px; background: #fff; display: flex; align-items: center; gap: 8px; padding: 0 12px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(0,0,0,.06); z-index: 40; }
.buyCart { flex-shrink: 0; width: 52px; height: 46px; border-radius: 12px; background: #f3f3f6; display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; color: #555; cursor: pointer; gap: 2px; }
.buyBtn { flex: 1; height: 46px; border: none; border-radius: 23px; font-size: 15px; font-weight: 700; cursor: pointer; color: #fff; }
.buyBtn.add { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.buyBtn.go { background: linear-gradient(135deg, #ec4899, #f43f5e); }
.buyBtn:active { opacity: .85; }
.buyBtn:disabled { opacity: .45; }

/* 购物车/结算 */
.cartItem { display: flex; gap: 10px; background: #fff; margin: 10px 12px; padding: 10px; border-radius: 12px; }
.cartItem img { width: 76px; height: 76px; object-fit: cover; border-radius: 8px; background: #eee; }
.cartItem .ci { flex: 1; min-width: 0; }
.cartItem .t { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cartItem .s { font-size: 11px; color: #999; margin-top: 3px; }
.cartItem .row2 { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }
.cartItem .p { font-size: 14px; font-weight: 800; color: #f43f5e; }
.qtyCtl { display: flex; align-items: center; gap: 8px; }
.qtyCtl button { width: 24px; height: 24px; border-radius: 50%; border: 1px solid #ddd; background: #fff; font-size: 14px; cursor: pointer; line-height: 1; }
.qtyCtl span { min-width: 20px; text-align: center; font-size: 13px; }
.delItem { color: #bbb; font-size: 12px; cursor: pointer; align-self: flex-start; margin-top: 2px; }
.cartFoot { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 430px; height: 62px; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 0 14px calc(8px + env(safe-area-inset-bottom)); box-shadow: 0 -2px 12px rgba(0,0,0,.06); z-index: 40; }
.cartTotal { font-size: 13px; color: #555; }
.cartTotal b { font-size: 18px; color: #f43f5e; }
.cartFoot .buyBtn { max-width: 150px; }
.formCard { background: #fff; margin: 0 12px; border-radius: 12px; padding: 14px; }
.fld { margin-bottom: 12px; }
.fld label { display: block; font-size: 12px; color: #888; margin-bottom: 6px; }
.fld input, .fld textarea { width: 100%; border: 1px solid #e6e6ea; border-radius: 10px; padding: 11px 12px; font-size: 14px; outline: none; background: #fafafa; font-family: inherit; }
.fld input:focus, .fld textarea:focus { border-color: #a855f7; background: #fff; }
.orderItems { background: #fff; margin: 10px 12px; border-radius: 12px; padding: 6px 12px; }
.orderItems .li { display: flex; justify-content: space-between; padding: 8px 0; font-size: 13px; color: #555; border-bottom: 1px solid #f2f2f5; }
.orderItems .li:last-child { border-bottom: none; }
.orderItems .li b { color: #222; }

/* 订单 */
.orderTabs { display: flex; gap: 4px; padding: 0 12px 10px; overflow-x: auto; scrollbar-width: none; }
.orderTabs::-webkit-scrollbar { display: none; }
.orderTabs span { flex-shrink: 0; padding: 6px 13px; border-radius: 14px; background: #fff; color: #777; font-size: 12px; cursor: pointer; }
.orderTabs span.active { background: linear-gradient(135deg, #8b5cf6, #a855f7); color: #fff; font-weight: 700; }
.orderCard { background: #fff; margin: 0 12px 10px; border-radius: 12px; overflow: hidden; }
.orderHead { display: flex; justify-content: space-between; padding: 10px 12px; font-size: 12px; color: #999; border-bottom: 1px solid #f2f2f5; }
.orderHead .st { color: #7c3aed; font-weight: 700; }
.orderBody { padding: 10px 12px; }
.orderRow { display: flex; gap: 10px; align-items: center; }
.orderRow img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #eee; }
.orderRow .oi { flex: 1; min-width: 0; }
.orderRow .t { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.orderRow .s { font-size: 11px; color: #999; margin-top: 3px; }
.orderRow .p { font-size: 13px; font-weight: 800; color: #f43f5e; }
.orderFoot { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px; border-top: 1px solid #f2f2f5; }
.orderFoot .info { font-size: 11px; color: #999; line-height: 1.6; }
.orderFoot .btns { display: flex; gap: 7px; }
.miniBtn { border: 1px solid #ddd; background: #fff; color: #555; font-size: 12px; padding: 6px 13px; border-radius: 15px; cursor: pointer; }
.miniBtn.primary { border: none; background: linear-gradient(135deg, #ec4899, #f43f5e); color: #fff; }
.miniBtn:active { opacity: .8; }

/* 我的 */
.meHead { background: linear-gradient(135deg, #7c3aed 0%, #a855f7 45%, #ec4899 100%); padding: 20px 16px 24px; color: #fff; }
.meTop { margin-bottom: 14px; }
.meUser { display: flex; align-items: center; gap: 13px; }
.meAvatar { width: 58px; height: 58px; border-radius: 50%; background: rgba(255,255,255,.28); display: flex; align-items: center; justify-content: center; font-size: 26px; }
.meNick { font-size: 18px; font-weight: 800; }
.meSub { font-size: 12px; opacity: .85; margin-top: 4px; }
.meMenu { background: #fff; margin: 14px 12px; border-radius: 12px; }
.meItem { display: flex; align-items: center; gap: 11px; padding: 14px; font-size: 14px; border-bottom: 1px solid #f4f4f6; cursor: pointer; }
.meItem:last-child { border-bottom: none; }
.meIco { font-size: 18px; }
.arrow { margin-left: auto; color: #ccc; font-size: 18px; }

/* 支付弹窗 */
.mask { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.5); display: flex; align-items: center; justify-content: center; }
.payCard { width: 330px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 24px 20px; text-align: center; }
.payCard h3 { font-size: 16px; margin-bottom: 8px; }
.payMoney { font-size: 30px; font-weight: 900; color: #f43f5e; margin-bottom: 10px; }
.payTip { font-size: 12px; color: #888; margin-bottom: 16px; line-height: 1.6; }
.payBtn { width: 100%; height: 46px; border: none; border-radius: 23px; font-size: 15px; font-weight: 700; cursor: pointer; color: #fff; margin-bottom: 10px; }
.payBtn.ep { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.payBtn.close { background: #f1f1f4; color: #777; }
.payDivider { font-size: 12px; color: #bbb; margin: 6px 0 12px; }
.payQrWrap { margin-bottom: 12px; }
.payQrWrap img { width: 200px; height: 200px; object-fit: contain; border: 1px solid #eee; border-radius: 10px; background: #fff; }
.payName { font-size: 13px; color: #555; margin-top: 6px; }
.payUpload { display: block; background: #f3f3f6; color: #555; font-size: 13px; padding: 12px; border-radius: 12px; cursor: pointer; margin-bottom: 8px; }
.muted2 { font-size: 12px; color: #999; min-height: 16px; margin-bottom: 8px; }

/* 登录 */
.loginCard { width: 330px; max-width: 92vw; background: #fff; border-radius: 16px; padding: 26px 22px; }
.loginLogo { text-align: center; font-size: 20px; font-weight: 900; margin-bottom: 18px; background: linear-gradient(135deg, #7c3aed, #ec4899); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.loginTabs { display: flex; gap: 22px; margin-bottom: 18px; }
.loginTabs span { font-size: 15px; color: #999; cursor: pointer; padding-bottom: 6px; border-bottom: 2.5px solid transparent; font-weight: 600; }
.loginTabs span.active { color: #7c3aed; border-bottom-color: #7c3aed; }
.loginCard input { width: 100%; height: 44px; border: 1px solid #e6e6ea; border-radius: 10px; padding: 0 13px; font-size: 14px; outline: none; margin-bottom: 11px; background: #fafafa; }
.loginCard input:focus { border-color: #a855f7; }
.lgBtn { width: 100%; height: 44px; border: none; border-radius: 22px; background: linear-gradient(135deg, #8b5cf6, #a855f7); color: #fff; font-size: 15px; font-weight: 700; cursor: pointer; }
.err { color: #f43f5e; font-size: 12px; margin-top: 8px; text-align: center; min-height: 16px; }

/* toast */
#toast { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); background: rgba(20,20,26,.92); color: #fff; padding: 10px 20px; border-radius: 20px; font-size: 13px; z-index: 300; display: none; max-width: 80vw; text-align: center; opacity: 0; transition: all .25s; }

/* 订单详情弹窗 */
.odCard { width: 92vw; max-width: 420px; max-height: 86vh; background: #fff; border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; }
.odHead { display: flex; justify-content: space-between; align-items: center; padding: 16px 16px 12px; border-bottom: 1px solid #f0f0f3; }
.odHead .odNo { font-size: 13px; color: #555; font-weight: 600; }
.odSt { display: inline-block; margin-left: 8px; padding: 2px 10px; border-radius: 10px; font-size: 11px; background: #f1e9ff; color: #7c3aed; font-weight: 700; }
.odClose { font-size: 18px; color: #999; cursor: pointer; padding: 0 4px; }
.odBody { overflow-y: auto; padding: 14px 16px 20px; }
.odSec { margin-bottom: 16px; }
.odSec h4 { font-size: 13px; color: #333; margin-bottom: 8px; }
.odItems { }
.odRow { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
.odRow img { width: 52px; height: 52px; object-fit: cover; border-radius: 8px; background: #eee; }
.odRow .oi { flex: 1; min-width: 0; }
.odRow .oi .t { font-size: 13px; font-weight: 600; color: #222; }
.odRow .oi .s { font-size: 11px; color: #888; margin-top: 2px; }
.odRow .p { font-size: 13px; color: #f43f5e; font-weight: 700; }
.odTotal { text-align: right; font-size: 13px; color: #666; padding-top: 6px; border-top: 1px dashed #eee; }
.odMoney { color: #f43f5e; font-size: 16px; }
.odLogiTop { background: #f7f6fb; border-radius: 10px; padding: 10px 12px; font-size: 12px; color: #444; line-height: 1.7; margin-bottom: 10px; }
.odLogiTop b { color: #7c3aed; }
.odTrack { position: relative; padding-left: 18px; }
.odTrack::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: #e8e6f5; }
.odTItem { position: relative; padding-bottom: 14px; }
.odTItem:last-child { padding-bottom: 0; }
.odTItem::before { content: ''; position: absolute; left: -17px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #c9c2ea; }
.odTItem.on::before { background: #7c3aed; box-shadow: 0 0 0 3px rgba(124,58,237,.18); }
.odTItem .loc { font-size: 13px; color: #222; font-weight: 600; }
.odTItem.on .loc { color: #7c3aed; }
.odTItem .desc { font-size: 12px; color: #888; margin-top: 2px; }
.odTItem .tm { font-size: 11px; color: #b5b2c4; margin-top: 2px; }
.odAddr { font-size: 13px; color: #444; line-height: 1.7; background: #faf9fd; border-radius: 10px; padding: 10px 12px; }
.odMeta { font-size: 12px; color: #888; line-height: 1.9; }
#toast.show { opacity: 1; }
