/* ============================================================
   会形商贸 · 全站样式
   视觉基因：源站蓝 #0082ce/#046ebf + 促销红 #e4000f，1200px 居中
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif; font-size: 14px; color: #333; background: #f5f5f5; line-height: 1.6; }
a { color: #333; text-decoration: none; }
a:hover { color: #0082ce; }
img { border: 0; vertical-align: middle; max-width: 100%; }
ul, ol, li { list-style: none; }
.clearfix:after { content: ""; display: block; clear: both; }
.w1200 { width: 1200px; margin: 0 auto; }
.fl { float: left; } .fr { float: right; }
.red { color: #e4000f; } .blue { color: #0082ce; }
.container { width: 1200px; margin: 0 auto; }
.hidden { display: none !important; }

/* ---- 顶部欢迎条 ---- */
.under { height: 32px; background: #f7f7f7; border-bottom: 1px solid #eee; font-size: 12px; color: #666; line-height: 32px; }
.under .w1200 { display: flex; justify-content: space-between; }
.under a { color: #0082ce; margin-left: 14px; }
.under a:hover { text-decoration: underline; }

/* ---- 头部 ---- */
.header { background: #fff; }
.nav_top { padding: 20px 0; }
.navs { display: flex; align-items: center; }
.logo { display: block; width: 240px; height: 70px; }
.logo-txt { font-size: 30px; font-weight: bold; color: #0082ce; letter-spacing: 2px; line-height: 70px; }
.logo-txt small { display: block; font-size: 11px; color: #999; letter-spacing: 4px; line-height: 12px; font-weight: normal; }
.navszj { flex: 1; margin: 0 30px; }
.sousuo { display: flex; height: 42px; border: 2px solid #0082ce; }
.sousuo a.sep { width: 92px; background: #0082ce; color: #fff; text-align: center; line-height: 38px; font-size: 16px; cursor: pointer; }
.sousuo input { flex: 1; border: 0; padding: 0 14px; font-size: 14px; outline: none; }
.navszjr { width: 210px; text-align: center; font-size: 12px; color: #999; border-left: 1px solid #eee; }
.navszjr .hot { font-size: 22px; color: #e4000f; font-weight: bold; display: block; line-height: 26px; }
.navr { width: 130px; text-align: center; }
.navr a { display: block; color: #0082ce; }
.navr a:hover { color: #e4000f; }
.navr .cart-num { display: inline-block; min-width: 18px; height: 18px; line-height: 18px; background: #e4000f; color: #fff; border-radius: 9px; font-size: 12px; padding: 0 4px; margin-left: 3px; }

/* ---- 分类导航 ---- */
.navbar { background: #0082ce; height: 42px; position: relative; z-index: 20; }
.navbar .navx { display: flex; align-items: center; height: 42px; }
.navbar .allcat { width: 200px; height: 42px; background: #046ebf; color: #fff; font-size: 15px; text-align: center; line-height: 42px; position: relative; float: left; }
.navbar .allcat:hover { background: #e4000f; }
.navbar .catmenu { position: absolute; top: 42px; left: 0; width: 200px; background: #fff; box-shadow: 0 4px 12px rgba(0,0,0,.15); display: none; z-index: 30; }
.navbar .allcat-wrap:hover .catmenu { display: block; }
.navbar .catmenu li a { display: block; padding: 8px 16px; font-size: 13px; border-bottom: 1px solid #f2f2f2; color: #444; }
.navbar .catmenu li a:hover { background: #f0f8ff; color: #0082ce; padding-left: 22px; }
.navbar .toplinks { display: flex; height: 42px; }
.navbar .toplinks a { color: #fff; padding: 0 22px; line-height: 42px; font-size: 15px; }
.navbar .toplinks a:hover { background: #046ebf; }

/* ---- 面包屑 ---- */
.crumb { height: 40px; line-height: 40px; font-size: 13px; color: #666; }
.crumb a { color: #666; }
.crumb a:hover { color: #0082ce; }

/* ---- 首页 banner ---- */
.banner { height: 380px; position: relative; overflow: hidden; background: #046ebf; }
.banner .slide { position: absolute; inset: 0; opacity: 0; transition: opacity .5s; background-size: cover; background-position: center; }
.banner .slide.active { opacity: 1; }
.banner .slide-inner { position: absolute; inset: 0; display: flex; align-items: center; }
.banner .slide-txt { color: #fff; padding-left: 80px; text-shadow: 0 2px 8px rgba(0,0,0,.3); }
.banner .slide-txt h2 { font-size: 40px; margin-bottom: 14px; }
.banner .slide-txt p { font-size: 18px; margin-bottom: 24px; }
.banner .slide-txt a { display: inline-block; background: #e4000f; color: #fff; padding: 12px 34px; font-size: 16px; border-radius: 3px; }
.banner .dots { position: absolute; bottom: 16px; left: 50%; transform: translateX(-50%); display: flex; gap: 8px; }
.banner .dots i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255,255,255,.5); cursor: pointer; }
.banner .dots i.on { background: #fff; }

/* ---- 通用区块 ---- */
.section { margin: 28px 0; }
.section-hd { height: 46px; border-bottom: 2px solid #0082ce; display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.section-hd h3 { font-size: 20px; color: #0082ce; font-weight: normal; }
.section-hd h3 small { font-size: 12px; color: #bbb; font-weight: normal; margin-left: 8px; text-transform: uppercase; }
.section-hd a { font-size: 13px; color: #999; }
.section-hd a:hover { color: #0082ce; }

/* ---- 商品卡片网格 ---- */
.goods-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.goods-grid.cols4 { grid-template-columns: repeat(4, 1fr); }
.goods-card { background: #fff; border: 1px solid #eee; transition: box-shadow .2s; position: relative; }
.goods-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.12); border-color: #0082ce; }
.goods-card a.pic { display: block; height: 180px; overflow: hidden; background: #fafafa; text-align: center; }
.goods-card a.pic img { width: 100%; height: 100%; object-fit: contain; transition: transform .3s; }
.goods-card:hover a.pic img { transform: scale(1.05); }
.goods-card .info { padding: 10px 12px 14px; }
.goods-card .name { height: 40px; overflow: hidden; font-size: 13px; line-height: 1.5; color: #333; }
.goods-card:hover .name { color: #0082ce; }
.goods-card .price { color: #e4000f; font-size: 20px; font-weight: bold; margin-top: 8px; }
.goods-card .price::first-letter { font-size: 13px; }
.goods-card .market { color: #999; font-size: 12px; text-decoration: line-through; margin-left: 6px; }
.goods-card .buybar { display: flex; gap: 6px; margin-top: 10px; }
.goods-card .buybar a { flex: 1; text-align: center; padding: 7px 0; font-size: 12px; border-radius: 2px; }
.btn-add { background: #e4000f; color: #fff; }
.btn-add:hover { background: #c9000d; color: #fff; }
.btn-buy { background: #0082ce; color: #fff; }
.btn-buy:hover { background: #046ebf; color: #fff; }

/* ---- 首页两栏布局 ---- */
.home-split { display: grid; grid-template-columns: 240px 1fr; gap: 20px; }
.cat-side { background: #fff; border: 1px solid #eee; }
.cat-side h4 { background: #0082ce; color: #fff; padding: 12px 16px; font-size: 16px; font-weight: normal; }
.cat-side li a { display: block; padding: 9px 16px; border-bottom: 1px solid #f2f2f2; font-size: 13px; }
.cat-side li a:hover { color: #0082ce; padding-left: 22px; }
.news-box { background: #fff; border: 1px solid #eee; padding: 16px; }
.news-box li { padding: 8px 0; border-bottom: 1px dashed #eee; font-size: 13px; }
.news-box li span { color: #bbb; float: right; }
.news-box li a:hover { color: #0082ce; }

/* ---- 友情链接 / 页脚 ---- */
.friendly { background: #fff; border: 1px solid #eee; padding: 16px 20px; margin: 28px 0; }
.friendly h4 { color: #0082ce; font-size: 15px; margin-bottom: 12px; }
.friendly a { display: inline-block; margin: 0 20px 8px 0; font-size: 13px; color: #666; }
.footer { background: #333; color: #ccc; padding: 36px 0 20px; }
.footer .f-cols { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; border-bottom: 1px solid #444; padding-bottom: 26px; }
.footer .f-col h4 { color: #fff; font-size: 16px; margin-bottom: 14px; }
.footer .f-col a { display: block; font-size: 13px; color: #aaa; padding: 4px 0; }
.footer .f-col a:hover { color: #fff; }
.footer .bottom { text-align: center; padding-top: 20px; font-size: 12px; color: #999; line-height: 2; }
.footer .bottom a { color: #999; margin: 0 6px; }
.footer .bottom .biz-info { color: #888; }

/* ---- 列表页侧栏筛选 ---- */
.filter-bar { background: #fff; border: 1px solid #eee; padding: 14px 18px; margin-bottom: 16px; }
.filter-bar .row { display: flex; padding: 6px 0; border-bottom: 1px dashed #eee; }
.filter-bar .row:last-child { border-bottom: 0; }
.filter-bar .label { width: 90px; color: #666; }
.filter-bar .opts a { display: inline-block; margin-right: 16px; padding: 2px 10px; border-radius: 2px; }
.filter-bar .opts a.on, .filter-bar .opts a:hover { background: #0082ce; color: #fff; }

/* ---- 详情页 ---- */
.detail-wrap { background: #fff; border: 1px solid #eee; padding: 24px; display: grid; grid-template-columns: 420px 1fr; gap: 30px; }
.detail-pic { width: 420px; height: 420px; border: 1px solid #eee; background: #fafafa; display: flex; align-items: center; justify-content: center; }
.detail-pic img { max-width: 100%; max-height: 100%; object-fit: contain; }
.detail-info h1 { font-size: 22px; font-weight: normal; color: #333; line-height: 1.4; padding-bottom: 14px; border-bottom: 1px solid #eee; }
.detail-price { background: #fff5f5; padding: 16px; margin: 16px 0; }
.detail-price .p { color: #e4000f; font-size: 32px; font-weight: bold; }
.detail-price .p::first-letter { font-size: 16px; }
.detail-price .m { color: #999; text-decoration: line-through; margin-left: 12px; }
.detail-attrs { margin: 16px 0; font-size: 14px; color: #666; }
.detail-attrs div { padding: 6px 0; }
.detail-attrs b { color: #333; font-weight: normal; display: inline-block; width: 80px; }
.detail-actions { display: flex; gap: 12px; margin-top: 24px; }
.detail-actions a, .detail-actions button { padding: 14px 40px; font-size: 16px; border: 0; border-radius: 3px; cursor: pointer; }
.detail-tabs { background: #fff; border: 1px solid #eee; margin-top: 20px; }
.detail-tabs .tab-hd { display: flex; border-bottom: 2px solid #0082ce; }
.detail-tabs .tab-hd a { padding: 12px 28px; font-size: 15px; }
.detail-tabs .tab-hd a.on { background: #0082ce; color: #fff; }
.detail-tabs .tab-body { padding: 24px; min-height: 160px; color: #555; line-height: 2; }
.detail-tabs .tab-body img { max-width: 100%; margin: 10px 0; }

/* ---- 购物车 / 结算表格 ---- */
.cart-table { width: 100%; background: #fff; border-collapse: collapse; }
.cart-table th { background: #f7f7f7; padding: 12px; text-align: left; font-weight: normal; color: #666; border-bottom: 1px solid #eee; }
.cart-table td { padding: 14px 12px; border-bottom: 1px solid #eee; vertical-align: middle; }
.cart-table .pimg { width: 70px; height: 70px; object-fit: contain; }
.cart-table .qty-box { display: inline-flex; border: 1px solid #ddd; }
.cart-table .qty-box button { width: 28px; height: 28px; border: 0; background: #f7f7f7; cursor: pointer; font-size: 16px; }
.cart-table .qty-box input { width: 44px; height: 28px; border: 0; border-left: 1px solid #ddd; border-right: 1px solid #ddd; text-align: center; }
.cart-table .del { color: #999; cursor: pointer; }
.cart-table .del:hover { color: #e4000f; }
.cart-summary { background: #fff; padding: 20px; margin-top: 16px; text-align: right; }
.cart-summary .total { color: #e4000f; font-size: 24px; font-weight: bold; }
.checkout-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 20px; }
.panel { background: #fff; border: 1px solid #eee; padding: 22px; margin-bottom: 16px; }
.panel h3 { font-size: 17px; color: #0082ce; border-bottom: 1px solid #eee; padding-bottom: 12px; margin-bottom: 18px; font-weight: normal; }
.form-row { display: flex; align-items: center; margin-bottom: 14px; }
.form-row label { width: 100px; text-align: right; margin-right: 12px; color: #555; }
.form-row label em { color: #e4000f; font-style: normal; }
.form-row input, .form-row textarea, .form-row select { flex: 1; border: 1px solid #ddd; padding: 10px 12px; font-size: 14px; outline: none; border-radius: 2px; }
.form-row input:focus, .form-row textarea:focus { border-color: #0082ce; }
.form-row .hint { color: #999; font-size: 12px; margin-left: 10px; }

/* ---- 按钮 ---- */
.btn { display: inline-block; padding: 12px 30px; font-size: 15px; border: 0; border-radius: 3px; cursor: pointer; text-align: center; }
.btn-primary { background: #0082ce; color: #fff; }
.btn-primary:hover { background: #046ebf; color: #fff; }
.btn-danger { background: #e4000f; color: #fff; }
.btn-danger:hover { background: #c9000d; color: #fff; }
.btn-lg { padding: 16px 60px; font-size: 18px; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; }

/* ---- 支付页 ---- */
.pay-wrap { max-width: 700px; margin: 20px auto; }
.pay-order-box { background: #fff; border: 1px solid #eee; padding: 30px; text-align: center; }
.pay-order-box .amount { font-size: 44px; color: #e4000f; font-weight: bold; margin: 16px 0; }
.pay-order-box .amount::first-letter { font-size: 20px; }
.pay-methods { display: flex; gap: 16px; justify-content: center; margin: 24px 0; }
.pay-method { border: 2px solid #ddd; padding: 16px 30px; border-radius: 4px; cursor: pointer; min-width: 160px; }
.pay-method.active { border-color: #0082ce; background: #f0f8ff; }
.pay-method .t { font-size: 16px; }
.pay-alipay { color: #1677ff; font-weight: bold; }
.pay-success { text-align: center; padding: 50px 20px; background: #fff; }
.pay-success .icon { width: 80px; height: 80px; border-radius: 50%; background: #22ac38; color: #fff; font-size: 46px; line-height: 80px; margin: 0 auto 20px; }
.pay-success h2 { font-size: 26px; color: #333; margin-bottom: 12px; }
.pay-success .info { color: #666; line-height: 2.2; margin: 20px 0; }
.pay-success .info b { color: #333; font-weight: normal; }
.pay-success .act a { margin: 0 8px; }

/* ---- 登录/注册/会员 ---- */
.auth-wrap { max-width: 460px; margin: 40px auto; background: #fff; border: 1px solid #eee; padding: 36px 40px; }
.auth-wrap h2 { font-size: 24px; color: #0082ce; text-align: center; margin-bottom: 24px; font-weight: normal; }
.auth-wrap .form-row label { width: 80px; }
.auth-wrap .auth-links { text-align: center; margin-top: 16px; font-size: 13px; color: #999; }
.auth-wrap .auth-links a { color: #0082ce; margin: 0 6px; }
.captcha-row { display: flex; gap: 10px; }
.captcha-row input { flex: 1; }
.captcha-row canvas { width: 110px; height: 40px; border: 1px solid #ddd; cursor: pointer; }
.member-layout { display: grid; grid-template-columns: 220px 1fr; gap: 20px; margin: 20px 0; }
.member-side { background: #fff; border: 1px solid #eee; }
.member-side .m-user { background: #0082ce; color: #fff; padding: 20px; text-align: center; }
.member-side .m-user .avatar { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,255,255,.25); line-height: 56px; font-size: 26px; margin: 0 auto 8px; }
.member-side li a { display: block; padding: 12px 20px; border-bottom: 1px solid #f2f2f2; }
.member-side li a.on, .member-side li a:hover { background: #f0f8ff; color: #0082ce; }
.order-list { width: 100%; border-collapse: collapse; background: #fff; }
.order-list th, .order-list td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; font-size: 13px; }
.order-list th { background: #f7f7f7; color: #666; font-weight: normal; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 10px; font-size: 12px; }
.badge-0 { background: #fff3cd; color: #856404; }
.badge-1 { background: #d4edda; color: #155724; }
.badge-2 { background: #cce5ff; color: #004085; }
.badge-3 { background: #e2e3e5; color: #383d41; }

/* ---- 后台 ---- */
.admin-body { background: #f0f2f5; }
.admin-login { max-width: 420px; margin: 100px auto; background: #fff; padding: 36px; border-radius: 6px; box-shadow: 0 2px 12px rgba(0,0,0,.1); }
.admin-login h2 { text-align: center; color: #0082ce; margin-bottom: 24px; font-weight: normal; }
.admin-layout { display: flex; min-height: 100vh; }
.admin-side { width: 220px; background: #001529; color: #fff; flex-shrink: 0; }
.admin-side .as-logo { padding: 20px; font-size: 18px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.1); color: #fff; }
.admin-side li a { display: block; padding: 14px 24px; color: #bbb; font-size: 14px; }
.admin-side li a:hover, .admin-side li a.on { background: #0082ce; color: #fff; }
.admin-main { flex: 1; padding: 24px; overflow: auto; }
.admin-top { background: #fff; padding: 16px 24px; display: flex; justify-content: space-between; margin-bottom: 20px; border-radius: 4px; }
.admin-stat { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; padding: 22px; border-radius: 6px; border-left: 4px solid #0082ce; }
.stat-card .n { font-size: 30px; font-weight: bold; color: #333; }
.stat-card .t { color: #999; font-size: 13px; }
.admin-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 4px; }
.admin-table th, .admin-table td { padding: 12px; border-bottom: 1px solid #eee; text-align: left; font-size: 13px; }
.admin-table th { background: #fafafa; color: #666; font-weight: normal; }
.admin-table .op a { color: #0082ce; margin-right: 8px; }
.admin-table .op a.del { color: #e4000f; }

/* ---- 通用提示 ---- */
.alert { padding: 12px 16px; margin-bottom: 16px; border-radius: 3px; font-size: 14px; }
.alert-success { background: #d4edda; color: #155724; }
.alert-error { background: #f8d7da; color: #721c24; }
.alert-info { background: #d1ecf1; color: #0c5460; }
.empty { text-align: center; color: #999; padding: 50px 0; }
.pagination { text-align: center; padding: 20px; }
.pagination a { display: inline-block; padding: 6px 14px; border: 1px solid #ddd; margin: 0 2px; }
.pagination a.on, .pagination a:hover { background: #0082ce; color: #fff; border-color: #0082ce; }

@media (max-width: 1250px) {
  .w1200, .container { width: 96%; }
  .goods-grid { grid-template-columns: repeat(4, 1fr); }
}
