/* =============================================
   贵人同城网 · 全站公共样式（宝塔可直接改）
   主色：农绿 #1e5b3e / 亮绿 #2f8f4e / 黄 #ffd64f
   ============================================= */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f7f5; color: #222; }
a { color: inherit; text-decoration: none; }
img { display: block; }
button { font-family: inherit; border: none; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* 页面容器（移动端优先，PC 居中） */
.wrap { max-width: 520px; margin: 0 auto; background: #f5f7f5; min-height: 100vh; padding-bottom: 64px; }

/* ===== 头部 ===== */
.head { background: url('/static/head-rice.jpg') center / cover no-repeat; padding: 12px 14px 14px; position: relative; }
.head-top { display: flex; align-items: center; padding: 8px 0; position: relative; margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
.logo-left { position: absolute; left: 0; top: -12px; bottom: -14px; width: 50px; display: flex; align-items: center; justify-content: center; background: #1a7a3a; color: #fff; font-size: 24px; font-weight: 800; }
.logo-right { position: absolute; right: 0; top: -12px; bottom: -14px; width: 50px; display: flex; align-items: center; justify-content: center; background: #1a7a3a; color: #fff; font-size: 24px; font-weight: 800; }
.logo-center { flex: 1; text-align: center; }
.logo-center > div { color: #fff; font-size: 20px; font-weight: 800; text-shadow: 0 1px 3px rgba(0,0,0,.4); }
.logo-center .loc { display: block; color: #fff; font-size: 12px; opacity: .95; text-shadow: 0 1px 3px rgba(0,0,0,.4); margin-top: 2px; }
.search-wrap { padding: 10px 14px 0; background: #f5f7fa; }
.search { height: 38px; border-radius: 19px; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.06); display: flex; align-items: center; gap: 8px; padding: 0 14px; max-width: 420px; margin: 0 auto; }
.search .s-ic { font-size: 14px; }
.search span { font-size: 13px; color: #8a8a8a; }

/* ===== 轮播 ===== */
.banner-box { padding: 0 10px; }
.banner { position: relative; height: 170px; border-radius: 14px; overflow: hidden; }
.banner img { width: 100%; height: 100%; object-fit: cover; }
.banner-dots { position: absolute; bottom: 8px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; }
.banner-dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255,255,255,.5); }
.banner-dots i.on { background: #fff; width: 14px; }

/* ===== 公告 ===== */
.notice { margin: 10px; background: #fff8ef; border: 1px solid #ffe4c2; border-radius: 10px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9a6b1f; overflow: hidden; }
.notice b { font-size: 13px; flex-shrink: 0; }
.notice .mq { flex: 1; white-space: nowrap; overflow: hidden; }
.notice .mq span { display: inline-block; animation: mq 22s linear infinite; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* ===== 分类 ===== */
.cats { margin: 10px; background: #fff; border-radius: 14px; padding: 12px 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 4px; }
.cat { text-align: center; }
.cat .ci { width: 50px; height: 50px; margin: 0 auto 5px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; overflow: hidden; }
.cat .ci img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cat span { font-size: 12px; color: #333; }

/* ===== 服务区 ===== */
.services { margin: 10px; background: #fff; border-radius: 14px; padding: 12px 6px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px 4px; }
.svc { text-align: center; }
.svc .si { width: 44px; height: 44px; margin: 0 auto 5px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 21px; overflow: hidden; }
.svc .si img { width: 100%; height: 100%; object-fit: cover; display: block; }
.svc span { font-size: 11px; color: #333; }
.svc em { display: block; font-size: 10px; color: #999; font-style: normal; }

/* ===== 我要买 / 我要卖 ===== */
.biz { margin: 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.marquee { margin: 0 10px 10px; background: #fff; border-radius: 14px; overflow: hidden; padding: 12px 0; }
.mq-track { display: flex; gap: 10px; width: max-content; animation: mq 22s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-item { flex-shrink: 0; width: 118px; text-align: center; }
.mq-item img { width: 118px; height: 88px; object-fit: cover; border-radius: 10px; display: block; }
.mq-item span { display: block; font-size: 12px; color: #333; margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes mq { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.biz a { border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 10px; box-shadow: 0 3px 10px rgba(0,0,0,.10); }
.biz a:first-child { background: linear-gradient(135deg, #4caf50, #2e7d32); }
.biz a:last-child { background: linear-gradient(135deg, #ffb03a, #f57c00); }
.biz .bi { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; background: rgba(255,255,255,.25); }
.biz b { font-size: 15px; display: block; color: #fff; }
.biz span { font-size: 11px; color: rgba(255,255,255,.92); }

/* ===== 区块标题 ===== */
.sec-t { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 8px; }
.sec-t b { font-size: 16px; font-weight: 700; }
.sec-t b i { font-style: normal; margin-right: 2px; }
.sec-t a { font-size: 12px; color: #999; }

/* ===== 商品网格 ===== */
.goods { margin: 0 10px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.gcard { background: #fff; border-radius: 14px; overflow: hidden; }
.gcard .gimg { position: relative; }
.gcard .gi { width: 100%; height: 150px; object-fit: cover; display: block; }
.g-top { display: none; }
.g-hot { position: absolute; left: 0; top: 10px; background: linear-gradient(135deg, #ff5e3a, #e4393c); color: #fff; font-size: 10px; font-weight: 700; padding: 3px 10px 3px 7px; border-radius: 0 9px 9px 0; z-index: 2; box-shadow: 0 1px 3px rgba(228, 57, 60, .4); white-space: nowrap; }
.g-buy { height: 28px; padding: 0 10px; border-radius: 8px; background: linear-gradient(135deg, #ff9f1c, #f57c00); display: inline-flex; align-items: center; gap: 3px; color: #fff; font-size: 12px; font-weight: 700; line-height: 1; box-shadow: 0 2px 5px rgba(245, 124, 0, .4); cursor: pointer; flex: none; margin-left: 6px; }
.g-buy svg { width: 13px; height: 13px; }
.gcard .gb { padding: 8px 10px 10px; }
.gcard .gn { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .gs { font-size: 11px; color: #999; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gcard .gp { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.gcard .gp b { color: #e4393c; font-size: 17px; }
.gcard .gp b i { font-size: 12px; font-style: normal; }
.gcard .gp span { font-size: 11px; color: #aaa; }

/* ===== 商品列表页 ===== */
.list-bar { position: sticky; top: 0; z-index: 9; background: #fff; padding: 10px; display: flex; gap: 8px; align-items: center; }
.list-bar input { flex: 1; height: 36px; border: 1px solid #e5e5e5; border-radius: 18px; padding: 0 14px; }
.list-bar button { background: #1e5b3e; color: #fff; border-radius: 18px; padding: 0 16px; height: 36px; }
.sorts { background: #fff; padding: 8px 10px; display: flex; gap: 8px; border-bottom: 1px solid #f0f0f0; }
.sorts a { font-size: 13px; color: #666; padding: 4px 10px; border-radius: 14px; }
.sorts a.on { background: #e8f3ec; color: #1e5b3e; font-weight: 600; }

/* ===== 详情页 ===== */
.detail .dimg { width: 100%; height: 330px; object-fit: cover; }
.detail .dbody { padding: 14px; background: #fff; border-radius: 16px 16px 0 0; margin-top: -12px; position: relative; }
.detail .dprice { color: #e4393c; font-size: 24px; font-weight: 800; }
.detail .dprice i { font-size: 14px; font-style: normal; }
.detail .dname { font-size: 17px; font-weight: 700; margin-top: 6px; }
.detail .dsub { font-size: 12px; color: #999; margin-top: 4px; }
.detail .dmeta { display: flex; gap: 16px; font-size: 12px; color: #888; margin-top: 10px; padding-top: 10px; border-top: 1px dashed #eee; }
.detail .ddetail { margin-top: 12px; background: #fff; border-radius: 14px; padding: 14px; }
.detail .ddetail h3 { font-size: 14px; margin-bottom: 8px; }
.detail .ddetail p { font-size: 13px; color: #555; line-height: 1.7; white-space: pre-wrap; }
.detail .dbottom { position: fixed; bottom: 0; left: 0; right: 0; background: #fff; border-top: 1px solid #eee; display: flex; max-width: 520px; margin: 0 auto; padding: 8px 12px; gap: 10px; z-index: 100; }
.detail .dbottom .fav { width: 44px; text-align: center; font-size: 11px; color: #666; display: flex; flex-direction: column; justify-content: center; }
.detail .dbottom .fav em { font-size: 18px; font-style: normal; }
.detail .dbottom .cart-btn { flex: 1; background: #ffb800; color: #fff; border-radius: 22px; height: 42px; font-size: 15px; font-weight: 600; }
.detail .dbottom .buy-btn { flex: 1; background: #e4393c; color: #fff; border-radius: 22px; height: 42px; font-size: 15px; font-weight: 600; }

/* ===== 购物车/下单 ===== */
.cart-list { margin: 10px; }
.citem { background: #fff; border-radius: 14px; padding: 12px; display: flex; gap: 10px; margin-bottom: 10px; align-items: center; }
.citem img { width: 76px; height: 76px; border-radius: 10px; object-fit: cover; }
.citem .ci { flex: 1; }
.citem .cn { font-size: 14px; font-weight: 600; }
.citem .cs { font-size: 11px; color: #999; margin-top: 2px; }
.citem .cp { color: #e4393c; font-weight: 700; margin-top: 6px; }
.citem .cnum { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.citem .cnum button { width: 26px; height: 26px; border-radius: 6px; background: #f0f0f0; font-size: 16px; line-height: 1; }
.citem .cnum b { min-width: 24px; text-align: center; font-size: 14px; }
.citem .del { color: #bbb; font-size: 12px; padding: 6px; }
.sum-bar { position: fixed; bottom: 0; left: 0; right: 0; max-width: 520px; margin: 0 auto; background: #fff; border-top: 1px solid #eee; padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; }
.sum-bar .st { font-size: 13px; color: #666; }
.sum-bar .st b { color: #e4393c; font-size: 20px; margin-left: 4px; }
.sum-bar .go { background: #1e5b3e; color: #fff; border-radius: 20px; padding: 0 26px; height: 40px; font-size: 15px; }

/* ===== 表单页 ===== */
.form { margin: 14px; }
.form .fi { background: #fff; border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.form label { display: block; font-size: 13px; color: #666; margin-bottom: 6px; }
.form input, .form select, .form textarea { width: 100%; height: 40px; border: 1px solid #e5e5e5; border-radius: 10px; padding: 0 12px; }
.form textarea { height: 80px; padding: 10px; resize: none; }
.btn-main { width: 100%; height: 46px; background: #1e5b3e; color: #fff; border-radius: 23px; font-size: 16px; font-weight: 600; }
.btn-warn { width: 100%; height: 46px; background: #e4393c; color: #fff; border-radius: 23px; font-size: 16px; font-weight: 600; }

/* ===== 我的 ===== */
.me-head { background: linear-gradient(rgba(16,28,18,.25), rgba(16,28,18,.25)), url('/static/head-logo.jpg') center / cover no-repeat; padding: 30px 16px 22px; color: #fff; display: flex; align-items: center; gap: 12px; }
.me-head img { width: 56px; height: 56px; border-radius: 50%; border: 2px solid rgba(255,255,255,.7); }
.me-head .mn { font-size: 17px; font-weight: 700; }
.me-head .mp { font-size: 12px; opacity: .9; margin-top: 4px; }
.me-cell { margin: 12px; background: #fff; border-radius: 14px; overflow: hidden; }
.me-cell a { display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-bottom: 1px solid #f5f5f5; font-size: 14px; }
.me-vip { margin: 10px 12px 0; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #ffd64f, #ff9f1c); border-radius: 14px; padding: 14px; color: #5a3d00; box-shadow: 0 3px 10px rgba(255, 159, 28, .25); }
.me-card { margin: -44px 12px 0; background: #fff; border-radius: 14px; padding: 18px 14px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; box-shadow: 0 3px 10px rgba(0, 0, 0, .08); position: relative; z-index: 1; }
.me-head2 { height: 120px; margin: 10px 12px 0; border-radius: 14px; background-position: center; background-size: cover; }
.me-card .mn { font-size: 17px; font-weight: 700; color: #222; }
.me-card .mp { font-size: 12px; color: #888; margin-top: 4px; }
.me-mini { display: flex; gap: 16px; margin-top: 10px; }
.me-mini a { display: flex; align-items: baseline; gap: 3px; }
.me-mini b { font-size: 15px; color: #e4393c; font-weight: 700; }
.me-mini span { font-size: 11px; color: #999; }
.av-ed { position: relative; }
.av-ed img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; display: block; }
.av-btn { position: absolute; right: 0; bottom: 0; background: #ff9f1c; color: #fff; font-size: 10px; border-radius: 10px; padding: 1px 6px; cursor: pointer; line-height: 1.4; }
.me-quick { flex-basis: 100%; display: flex; gap: 8px; margin-top: 14px; padding-top: 14px; border-top: 1px solid #f0f0f0; }
.me-quick a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; background: linear-gradient(135deg, #fff7e8, #ffeacb); border: 1px solid #ffd9a8; color: #a97b1f; border-radius: 10px; padding: 9px 0; font-size: 12px; font-weight: 700; }
.me-quick a em { font-style: normal; font-size: 15px; }
.inv-modal { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); display: none; align-items: center; justify-content: center; z-index: 99; padding: 0 16px; }
.inv-box { width: 100%; max-width: 330px; background: #fff; border-radius: 18px; padding: 20px 16px 16px; text-align: center; }
.inv-h { font-size: 17px; font-weight: 700; color: #e4393c; position: relative; }
.inv-x { position: absolute; right: 0; top: -2px; font-size: 18px; color: #999; cursor: pointer; }
.inv-sub { font-size: 12px; color: #888; margin: 6px 0 12px; }
.inv-card { background: linear-gradient(135deg, #ff5b3b, #ff9f1c); border-radius: 12px; padding: 14px; display: flex; align-items: center; gap: 10px; color: #fff; box-shadow: 0 4px 12px rgba(255, 91, 59, .3); }
.inv-av { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .8); flex-shrink: 0; }
.inv-t { flex: 1; text-align: left; font-size: 13px; line-height: 1.5; }
.inv-t b { font-size: 18px; }
.inv-btn { background: #fff; color: #ff5b3b; font-size: 12px; font-weight: 700; border-radius: 20px; padding: 7px 14px; flex-shrink: 0; }
.inv-actions { display: flex; gap: 10px; margin-top: 14px; }
.inv-actions button { flex: 1; border: none; border-radius: 10px; padding: 11px 0; font-size: 13px; font-weight: 600; cursor: pointer; }
.inv-actions button:first-child { background: #ffe0a3; color: #7a5b00; }
.inv-actions button:last-child { background: #ff5b3b; color: #fff; }
.inv-code { font-size: 12px; color: #999; margin-top: 12px; }
.inv-code b { color: #e4393c; font-size: 15px; }
.grp-qr { width: 210px; height: 210px; border-radius: 12px; object-fit: cover; margin: 4px auto 0; }
.grp-tip { font-size: 12px; color: #999; margin-top: 10px; }
.me-vip b { font-size: 15px; display: block; }
.me-vip span { font-size: 12px; opacity: .85; display: block; margin-top: 3px; }
.me-vip i { font-style: normal; background: #fff; border-radius: 20px; padding: 7px 14px; font-size: 12px; font-weight: 700; }
.me-stats { margin: 10px 12px 0; background: #fff; border-radius: 14px; display: flex; overflow: hidden; }
.me-stats a { flex: 1; text-align: center; padding: 14px 0; }
.me-stats a + a { border-left: 1px solid #f2f2f2; }
.me-stats b { display: block; font-size: 18px; color: #e4393c; font-weight: 700; }
.me-stats span { font-size: 12px; color: #666; margin-top: 4px; display: block; }
.me-grid { margin: 0 12px 10px; background: #fff; border-radius: 14px; display: grid; grid-template-columns: repeat(4, 1fr); padding: 4px 0; }
.me-grid a { text-align: center; padding: 12px 0; }
.me-kf { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 0 12px 10px; background: linear-gradient(135deg, #fff7e8, #ffeacb); border: 1px solid #ffd9a8; color: #a97b1f; border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 600; }
.me-grid em { font-style: normal; font-size: 22px; display: block; }
.me-grid span { font-size: 12px; color: #444; display: block; margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 2px; }
.mg6 { grid-template-columns: repeat(3, 1fr); }
.mg3 { grid-template-columns: repeat(3, 1fr); }
.me-cell a:last-child { border-bottom: none; }
.me-cell a em { font-style: normal; font-size: 18px; width: 24px; text-align: center; }
.me-cell a span { flex: 1; }
.me-cell a i { font-style: normal; color: #bbb; font-size: 13px; }

/* ===== 订单页 ===== */
.otabs { background: #fff; display: flex; position: sticky; top: 0; z-index: 9; }
.otabs a { flex: 1; text-align: center; padding: 12px 0; font-size: 13px; color: #666; border-bottom: 2px solid transparent; }
.otabs a.on { color: #1e5b3e; font-weight: 700; border-color: #1e5b3e; }
.ocard { margin: 10px; background: #fff; border-radius: 14px; padding: 12px; }
.ocard .ot { font-size: 12px; color: #999; display: flex; justify-content: space-between; margin-bottom: 8px; }
.ocard .oi { display: flex; gap: 10px; align-items: center; }
.ocard .oi img { width: 60px; height: 60px; border-radius: 8px; object-fit: cover; }
.ocard .oi .nn { font-size: 13px; font-weight: 600; }
.ocard .oi .tt { font-size: 12px; color: #999; margin-top: 2px; }
.ocard .ob { text-align: right; font-size: 13px; margin-top: 8px; }
.ocard .ob b { color: #e4393c; font-size: 16px; }
.ocard .oa { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ocard .oa button { border: 1px solid #ddd; border-radius: 16px; padding: 5px 14px; font-size: 12px; background: #fff; }
.ocard .oa .primary { background: #1e5b3e; color: #fff; border-color: #1e5b3e; }
.empty { text-align: center; color: #aaa; font-size: 13px; padding: 60px 0; }
.empty .e { font-size: 40px; margin-bottom: 10px; }

/* ===== 底部导航 ===== */
.tab { position: fixed; bottom: 0; left: 0; right: 0; max-width: 520px; margin: 0 auto; background: #fff; border-top: 1px solid #eee; display: flex; z-index: 99; }
.tab a { flex: 1; text-align: center; padding: 8px 0 6px; color: #999; font-size: 11px; }
.tab a em { display: block; font-size: 19px; font-style: normal; margin-bottom: 2px; }
.tab a.on { color: #1e5b3e; }

/* 通用 */
.tip { text-align: center; color: #999; font-size: 12px; padding: 8px 0; }
.msg { color: #e4393c; font-size: 13px; text-align: center; padding: 8px 0; }
.toast { position: fixed; top: 45%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.75); color: #fff; padding: 10px 18px; border-radius: 10px; font-size: 14px; z-index: 999; display: none; }
