/* MI途软装 PC 站样式 */
:root {
  --main: #1f2430;
  --accent: #b4854d;
  --accent-dark: #9a6f3c;
  --red: #e04b4b;
  --green: #2aa876;
  --bg: #f5f5f4;
  --line: #e8e6e2;
  --muted: #999;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font: 14px/1.6 "Microsoft YaHei", "PingFang SC", sans-serif; color: #333; background: var(--bg); }
a { color: inherit; text-decoration: none; }
img { display: block; }
.wrap { width: 1200px; margin: 0 auto; }

/* ===== 顶栏 ===== */
.topbar { background: var(--main); color: #cfd3dc; font-size: 12px; }
.topbar .wrap { display: flex; justify-content: space-between; align-items: center; height: 34px; }
.topbar a { margin-left: 14px; color: #cfd3dc; }
.topbar a:hover { color: #fff; }
.topbar .muted { color: #7d828e; margin-left: 6px; }

.header { background: #fff; border-bottom: 1px solid var(--line); }
.header .wrap { display: flex; align-items: center; height: 86px; gap: 40px; }
.logo { font-size: 30px; font-weight: 800; color: var(--main); letter-spacing: 1px; }
.logo b { color: var(--accent); }
.slogan { font-size: 12px; color: var(--muted); margin-left: -26px; padding-top: 26px; }
.searchbox { flex: 1; max-width: 560px; display: flex; border: 2px solid var(--accent); border-radius: 4px; overflow: hidden; }
.searchbox input { flex: 1; border: 0; outline: 0; padding: 0 14px; font-size: 14px; height: 40px; }
.searchbox button { width: 96px; border: 0; background: var(--accent); color: #fff; font-size: 15px; cursor: pointer; }
.searchbox button:hover { background: var(--accent-dark); }
.hactions { margin-left: auto; display: flex; align-items: center; gap: 18px; }
.hactions a:hover { color: var(--accent); }
.cartlink { position: relative; }
.cartlink .num { position: absolute; top: -9px; right: -13px; background: var(--red); color: #fff; font-size: 11px; min-width: 17px; height: 17px; line-height: 17px; border-radius: 9px; text-align: center; padding: 0 4px; display: none; }

.navcat { background: #fff; border-bottom: 2px solid var(--accent); }
.navcat .wrap { display: flex; gap: 8px; height: 42px; align-items: center; }
.navcat a { padding: 0 18px; font-size: 15px; height: 42px; line-height: 42px; border-radius: 4px 4px 0 0; }
.navcat a:hover { color: var(--accent); background: #faf6f0; }
.navcat a.on, .navcat a.home { color: #fff; background: var(--accent); }

/* ===== 首页 ===== */
.banner { margin: 16px auto; }
.banner .stage { position: relative; border-radius: 8px; overflow: hidden; height: 380px; background: #ddd; }
.banner .stage img { width: 100%; height: 380px; object-fit: cover; }
.banner .dots { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; }
.banner .dots i { display: inline-block; width: 26px; height: 3px; background: rgba(255,255,255,.5); margin: 0 4px; cursor: pointer; }
.banner .dots i.on { background: #fff; }
.banner .arr { position: absolute; top: 50%; transform: translateY(-50%); width: 40px; height: 60px; line-height: 60px; text-align: center; font-size: 24px; color: #fff; background: rgba(0,0,0,.18); cursor: pointer; user-select: none; }
.banner .arr:hover { background: rgba(0,0,0,.35); }
.banner .arr.l { left: 0; } .banner .arr.r { right: 0; }

.sect { background: #fff; border-radius: 8px; padding: 18px 20px 24px; margin-bottom: 16px; }
.sect-h { display: flex; align-items: baseline; margin-bottom: 16px; border-left: 4px solid var(--accent); padding-left: 10px; }
.sect-h h2 { font-size: 20px; color: var(--main); }
.sect-h .more { margin-left: auto; color: var(--muted); font-size: 13px; }
.sect-h .more:hover { color: var(--accent); }

.ggrid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.gcard { background: #fff; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; transition: .18s; display: block; }
.gcard:hover { box-shadow: 0 6px 20px rgba(0,0,0,.09); transform: translateY(-2px); }
.gimg { position: relative; height: 200px; background: #f7f6f4; }
.gimg img { width: 100%; height: 100%; object-fit: cover; }
.gimg .soldout { position: absolute; top: 8px; left: 8px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; padding: 2px 8px; border-radius: 3px; }
.gname { padding: 10px 12px 0; font-size: 14px; height: 40px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.gsub { padding: 2px 12px 0; font-size: 12px; color: var(--accent); height: 20px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.gbottom { display: flex; justify-content: space-between; align-items: baseline; padding: 8px 12px 12px; }
.gprice { color: var(--red); font-size: 18px; font-weight: 700; }
.gsales { color: var(--muted); font-size: 12px; }
.catpill { display: inline-block; background: #faf6f0; border: 1px solid #ecdfcc; color: var(--accent-dark); padding: 4px 14px; border-radius: 16px; margin: 0 8px 8px 0; }
.catpill:hover { background: var(--accent); color: #fff; }

/* ===== 列表页 ===== */
.listlayout { display: flex; gap: 14px; margin: 16px auto; }
.side { width: 200px; flex-shrink: 0; }
.side .box { background: #fff; border-radius: 8px; padding: 14px 0; margin-bottom: 14px; }
.side h3 { font-size: 15px; padding: 0 16px 10px; border-bottom: 1px solid var(--line); color: var(--main); }
.side a { display: block; padding: 9px 16px; font-size: 14px; color: #555; border-left: 3px solid transparent; }
.side a:hover { color: var(--accent); background: #faf6f0; }
.side a.on { color: var(--accent); border-left-color: var(--accent); background: #faf6f0; font-weight: 600; }
.maincol { flex: 1; min-width: 0; }
.sortbar { background: #fff; border-radius: 8px 8px 0 0; padding: 12px 16px; display: flex; gap: 8px; border-bottom: 1px solid var(--line); }
.sortbar a { padding: 4px 14px; border-radius: 3px; font-size: 13px; color: #555; }
.sortbar a.on { background: var(--accent); color: #fff; }
.listgrid { background: #fff; border-radius: 0 0 8px 8px; padding: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; min-height: 300px; }
.resultinfo { color: var(--muted); font-size: 13px; margin: 10px 2px; }
.pager { display: flex; justify-content: center; gap: 6px; padding: 18px 0; }
.pager a { background: #fff; border: 1px solid var(--line); padding: 7px 14px; border-radius: 4px; }
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager a.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pempty { grid-column: 1/-1; text-align: center; color: var(--muted); padding: 80px 0; }

/* ===== 详情页 ===== */
.crumbs { color: var(--muted); font-size: 13px; padding: 14px 0; }
.crumbs a:hover { color: var(--accent); }
.gdlayout { display: flex; gap: 30px; background: #fff; border-radius: 8px; padding: 26px; }
.gdpics { width: 430px; flex-shrink: 0; }
.gdmain { height: 430px; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; background: #f7f6f4; }
.gdmain img { width: 100%; height: 100%; object-fit: contain; cursor: zoom-in; }
.gdthumbs { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.gdthumbs img { width: 66px; height: 66px; object-fit: cover; border: 2px solid transparent; border-radius: 4px; cursor: pointer; background: #f7f6f4; }
.gdthumbs img.on { border-color: var(--accent); }
.gdinfo { flex: 1; min-width: 0; }
.gdinfo h1 { font-size: 22px; line-height: 1.4; color: var(--main); }
.gdsub { color: var(--accent); margin-top: 6px; }
.pricebox { background: #faf6f0; border-radius: 6px; padding: 16px 18px; margin: 16px 0; display: flex; align-items: baseline; gap: 16px; }
.pricebox .p { color: var(--red); font-size: 30px; font-weight: 800; }
.pricebox .m { color: var(--muted); text-decoration: line-through; font-size: 14px; }
.pricebox .f { margin-left: auto; color: var(--green); font-size: 13px; }
.metarow { display: flex; gap: 30px; color: var(--muted); font-size: 13px; border-bottom: 1px dashed var(--line); padding-bottom: 14px; }
.skurow { margin: 16px 0; }
.skurow .lb { color: var(--muted); margin-right: 10px; }
.skubtn { display: inline-block; border: 1px solid var(--line); background: #fff; padding: 6px 16px; border-radius: 4px; margin: 0 8px 8px 0; cursor: pointer; }
.skubtn:hover { border-color: var(--accent); }
.skubtn.on { border-color: var(--accent); color: var(--accent); background: #faf6f0; font-weight: 600; }
.skubtn.dis { color: #ccc; background: #f5f5f5; cursor: not-allowed; }
.numrow { margin: 16px 0; display: flex; align-items: center; }
.numrow .lb { color: var(--muted); margin-right: 10px; }
.stepper { display: inline-flex; border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: 0; background: #fafafa; font-size: 17px; cursor: pointer; }
.stepper button:hover { background: #f0ede8; }
.stepper input { width: 54px; height: 34px; border: 0; outline: 0; text-align: center; font-size: 15px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.buyrow { margin-top: 22px; display: flex; gap: 14px; }
.bigbtn { flex: 1; max-width: 200px; height: 48px; border: 0; border-radius: 6px; font-size: 16px; cursor: pointer; }
.bigbtn.cart { background: #fff3e0; color: var(--accent-dark); border: 1px solid var(--accent); }
.bigbtn.cart:hover { background: #ffe8c7; }
.bigbtn.buy { background: var(--red); color: #fff; }
.bigbtn.buy:hover { background: #c93a3a; }
.gdsect { background: #fff; border-radius: 8px; margin-top: 16px; }
.gdsect .tab { display: flex; border-bottom: 1px solid var(--line); }
.gdsect .tab span { padding: 14px 26px; cursor: pointer; font-size: 15px; }
.gdsect .tab span.on { color: var(--accent); border-bottom: 2px solid var(--accent); font-weight: 600; }
.gdsect .tabbody { padding: 22px; }
.detail-html img { max-width: 100%; height: auto; }
.attrtable { width: 100%; border-collapse: collapse; }
.attrtable td { border: 1px solid var(--line); padding: 8px 14px; font-size: 13px; }
.attrtable td:first-child { background: #fafafa; color: var(--muted); width: 140px; }
.reviewitem { border-bottom: 1px solid var(--line); padding: 14px 0; }
.reviewitem:last-child { border-bottom: 0; }
.stars { color: #f5a623; }

/* ===== 购物车 ===== */
.carttable { background: #fff; border-radius: 8px; margin: 16px auto; }
.cartrow { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.cartrow:last-child { border-bottom: 0; }
.cartrow .chk { width: 18px; height: 18px; accent-color: var(--accent); cursor: pointer; }
.cartrow .cimg { width: 80px; height: 80px; object-fit: cover; border-radius: 4px; margin: 0 14px; background: #f7f6f4; }
.cartrow .cinfo { flex: 1; min-width: 0; }
.cartrow .cinfo .t { font-size: 15px; }
.cartrow .cinfo .s { color: var(--muted); font-size: 12px; margin-top: 4px; }
.cartrow .cprice { width: 110px; color: var(--red); font-weight: 700; }
.cartrow .cnum { width: 130px; }
.cartrow .csum { width: 110px; text-align: right; color: var(--red); font-weight: 700; }
.cartrow .cdel { width: 60px; text-align: right; color: var(--muted); cursor: pointer; }
.cartrow .cdel:hover { color: var(--red); }
.cartfoot { position: sticky; bottom: 0; background: #fff; border-radius: 8px; padding: 14px 20px; display: flex; align-items: center; box-shadow: 0 -4px 16px rgba(0,0,0,.06); margin: 14px auto; }
.cartfoot .total { margin-left: auto; color: var(--red); font-size: 22px; font-weight: 800; }
.cartfoot .go { margin-left: 20px; background: var(--red); color: #fff; border: 0; height: 44px; padding: 0 44px; font-size: 16px; border-radius: 6px; cursor: pointer; }
.cartfoot .go:hover { background: #c93a3a; }
.cartfoot .go:disabled { background: #ccc; cursor: not-allowed; }

/* ===== 结算/表单 ===== */
.panel { background: #fff; border-radius: 8px; padding: 22px 26px; margin: 16px auto; }
.panel h3 { font-size: 16px; color: var(--main); border-left: 4px solid var(--accent); padding-left: 10px; margin-bottom: 16px; }
.addrlist { display: flex; flex-wrap: wrap; gap: 12px; }
.addrcard { width: 280px; border: 1px solid var(--line); border-radius: 6px; padding: 14px 16px; cursor: pointer; position: relative; }
.addrcard.on { border-color: var(--accent); background: #fdfaf5; }
.addrcard.on::after { content: '✓'; position: absolute; top: 8px; right: 10px; color: var(--accent); font-weight: 800; }
.addrcard .n { font-weight: 600; }
.addrcard .p { color: var(--muted); margin-left: 10px; }
.addrcard .a { color: #666; font-size: 13px; margin-top: 6px; }
.addrcard .ops { margin-top: 8px; font-size: 12px; }
.addrcard .ops a { color: var(--muted); margin-right: 10px; }
.addrcard .ops a:hover { color: var(--accent); }
.addnew { width: 280px; border: 1px dashed var(--line); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer; min-height: 96px; }
.addnew:hover { border-color: var(--accent); color: var(--accent); }
.ckitem { display: flex; align-items: center; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.ckitem img { width: 56px; height: 56px; object-fit: cover; border-radius: 4px; margin-right: 12px; background: #f7f6f4; }
.ckitem .t { flex: 1; }
.ckitem .pr { color: var(--red); font-weight: 700; }
.ckitem .sm { color: var(--muted); margin-left: 20px; }
.formgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.field label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 4px; }
.field input, .field select { width: 100%; height: 40px; border: 1px solid var(--line); border-radius: 4px; padding: 0 12px; font-size: 14px; outline: none; }
.field input:focus, .field select:focus { border-color: var(--accent); }
.field .full { grid-column: 1 / -1; }
.couponrow { display: flex; gap: 10px; flex-wrap: wrap; }
.cpcard { border: 1px solid var(--line); border-radius: 6px; padding: 10px 14px; cursor: pointer; font-size: 13px; }
.cpcard.on { border-color: var(--red); color: var(--red); background: #fff5f5; }
.sumline { display: flex; justify-content: flex-end; gap: 30px; padding: 14px 0; font-size: 14px; color: #666; }
.sumline b { color: var(--red); }
.paybar { display: flex; justify-content: flex-end; align-items: center; gap: 20px; border-top: 1px solid var(--line); padding-top: 16px; }
.paybar .amt { font-size: 14px; color: #666; }
.paybar .amt b { color: var(--red); font-size: 26px; }
.paybtn { background: var(--red); color: #fff; border: 0; height: 46px; padding: 0 50px; font-size: 16px; border-radius: 6px; cursor: pointer; }
.paybtn:hover { background: #c93a3a; }
.paybtn:disabled { background: #ccc; cursor: not-allowed; }

/* ===== 订单 ===== */
.ordtabs { display: flex; gap: 4px; background: #fff; border-radius: 8px 8px 0 0; padding: 10px 14px 0; border-bottom: 1px solid var(--line); }
.ordtabs a { padding: 10px 22px; border-radius: 6px 6px 0 0; }
.ordtabs a.on { background: var(--accent); color: #fff; }
.ordcard { background: #fff; border-radius: 0 0 8px 8px; margin-bottom: 12px; padding: 0 20px; }
.ordcard .oh { display: flex; padding: 12px 0; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.ordcard .oh b { color: var(--main); }
.ordcard .oh .st { margin-left: auto; color: var(--accent); font-weight: 600; }
.orditem { display: flex; align-items: center; padding: 12px 0; }
.orditem img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; margin-right: 12px; background: #f7f6f4; }
.orditem .t { flex: 1; }
.orditem .pr { color: #666; }
.ordcard .of { display: flex; align-items: center; padding: 12px 0; border-top: 1px dashed var(--line); }
.ordcard .of .sum { margin-left: auto; color: var(--red); font-weight: 700; }
.ordcard .of button { margin-left: 16px; border: 1px solid var(--accent); color: var(--accent); background: #fff; padding: 7px 20px; border-radius: 4px; cursor: pointer; }
.ordcard .of button.solid { background: var(--red); border-color: var(--red); color: #fff; }

/* ===== 登录/注册/我的 ===== */
.authbox { width: 420px; margin: 60px auto; background: #fff; border-radius: 10px; padding: 36px 40px; }
.authbox h2 { text-align: center; color: var(--main); margin-bottom: 26px; }
.authbox .field { margin-bottom: 16px; }
.authbox button.submit { width: 100%; height: 46px; border: 0; border-radius: 6px; background: var(--accent); color: #fff; font-size: 16px; cursor: pointer; margin-top: 6px; }
.authbox button.submit:hover { background: var(--accent-dark); }
.authbox .alt { text-align: center; margin-top: 18px; font-size: 13px; color: var(--muted); }
.authbox .alt a { color: var(--accent); }
.metop { background: var(--main); border-radius: 10px; color: #fff; padding: 30px 34px; margin: 16px auto; display: flex; align-items: center; gap: 20px; }
.metop .avatar { width: 64px; height: 64px; border-radius: 50%; background: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.metop .bal { margin-left: auto; text-align: right; }
.metop .bal b { font-size: 26px; color: #ffd89b; }
.meblocks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.meblock { background: #fff; border-radius: 8px; padding: 22px; text-align: center; }
.meblock .ic { font-size: 30px; }
.meblock .tt { margin-top: 10px; }
.meblock:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }

/* ===== 页脚/其他 ===== */
.footer { background: var(--main); color: #8a8f9a; margin-top: 40px; padding: 30px 0; font-size: 13px; }
.footer .wrap { display: flex; justify-content: space-between; }
.footer a { color: #b9bec8; margin-right: 16px; }
.footer a:hover { color: #fff; }
#toast { position: fixed; top: 20%; left: 50%; transform: translateX(-50%); background: rgba(0,0,0,.78); color: #fff; padding: 11px 22px; border-radius: 6px; font-size: 14px; z-index: 999; display: none; }
#toast.show { display: block; }
.muted { color: var(--muted); }
.mt20 { margin-top: 20px; }
.tc { text-align: center; }
