/* ============================================================
   凯冠商城 全站样式 static/app.css
   参照截图 UI：绿色主按钮、深蓝点缀、卡片式布局
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
body { font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif; background: #f5f5f5; color: #333; max-width: 480px; margin: 0 auto; min-height: 100vh; padding-bottom: 60px; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* 顶部搜索栏 */
.search-bar { display: flex; align-items: center; background: #16305a; padding: 10px 14px; }
.search-bar input { flex: 1; border: none; border-radius: 18px; padding: 8px 14px; font-size: 14px; outline: none; }

/* 导航 Tab */
.nav-tabs { display: flex; gap: 18px; background: #16305a; color: #d8d8d8; padding: 10px 14px 12px; font-size: 15px; }
.nav-tabs a.active { color: #fff; font-weight: bold; }

/* 轮播 Banner */
.banner { margin: 10px; border-radius: 10px; overflow: hidden; }
.banner img { width: 100%; }

/* 区块标题 */
.sec-head { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 12px 8px; }
.sec-head h3 { font-size: 17px; }
.sec-head span { font-size: 12px; color: #999; }

/* 商品网格（两列） */
.goods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 12px; }
.goods-card { background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.goods-card .thumb { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eee; }
.goods-card .info { padding: 8px 10px 12px; }
.goods-card .name { font-size: 13px; line-height: 1.4; height: 36px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.goods-card .price { color: #333; font-weight: bold; margin: 6px 0 8px; }

/* 绿色主按钮（登录/购买/保存） */
.btn-primary { display: block; width: 100%; background: #14a327; color: #fff; border: none; border-radius: 24px; padding: 12px; font-size: 16px; text-align: center; cursor: pointer; }
.btn-buy { background: #16305a; color: #fff; border: none; border-radius: 14px; padding: 6px 16px; font-size: 13px; }

/* 商品详情页：JS 驱动横向轮播（手指滑动 / 鼠标拖动 / 箭头 / 圆点） */
.swiper { position: relative; background: #000; overflow: hidden; }   /* 超出部分裁掉 */
.swiper-track {
    display: flex;                       /* 横向并排 */
    transition: transform .3s ease;      /* 切换动画 */
    will-change: transform;
    cursor: grab;                        /* 提示可拖动 */
    touch-action: pan-y;                 /* 允许纵向滚动页面，横向交给 JS */
}
.swiper-track.dragging { transition: none; cursor: grabbing; }        /* 拖动中去掉动画 */
.swiper .swiper-slide { flex: 0 0 100%; }                            /* 每张占满一屏宽 */
.swiper .swiper-slide img { width: 100%; aspect-ratio: 1; object-fit: cover; -webkit-user-drag: none; user-select: none; }
.swiper .counter { position: absolute; right: 12px; bottom: 12px; background: rgba(0,0,0,.5); color: #fff; font-size: 12px; border-radius: 12px; padding: 2px 10px; pointer-events: none; }

/* 左右箭头 */
.swiper .arrow-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; line-height: 28px; text-align: center;
    background: rgba(0,0,0,.35); color: #fff; border-radius: 50%; font-size: 16px; cursor: pointer;
}
.swiper .arrow-btn.prev { left: 8px; }
.swiper .arrow-btn.next { right: 8px; }

/* 底部圆点指示 */
.swiper .dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; justify-content: center; gap: 6px; pointer-events: none; }
.swiper .dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.45); }
.swiper .dots i.on { background: #fff; width: 14px; border-radius: 3px; }
.pd-price-row { display: flex; gap: 6px; padding: 8px 12px 0; align-items: center; flex-wrap: wrap; }
.tag { background: #eef3fb; color: #16305a; border: 1px solid #16305a; border-radius: 14px; font-size: 12px; padding: 3px 10px; }
.pd-price { font-size: 20px; font-weight: bold; }
.pd-title { font-size: 16px; font-weight: bold; padding: 6px 12px; line-height: 1.5; }
.pd-meta { display: flex; justify-content: space-between; color: #999; font-size: 12px; padding: 0 12px 10px; }
.card { background: #fff; border-radius: 10px; margin: 10px 12px; padding: 12px; }
.spec-row { display: flex; justify-content: space-between; align-items: center; }
.arrow { color: #ccc; }

/* 规格弹层 */
.spec-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); display: none; z-index: 99; }
.spec-panel { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; border-radius: 14px 14px 0 0; padding: 14px; display: none; z-index: 100; max-height: 70vh; overflow: auto; }
.spec-item { display: inline-block; border: 1px solid #16305a; color: #16305a; border-radius: 14px; padding: 5px 12px; font-size: 13px; margin: 4px 6px 4px 0; cursor: pointer; }
.spec-item.on { background: #16305a; color: #fff; }
.num-ctrl { display: inline-flex; align-items: center; gap: 10px; }
.num-ctrl button { width: 28px; height: 28px; border: 1px solid #ddd; background: #fff; border-radius: 6px; }

/* 底部操作栏（详情页） */
.bottom-bar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; display: flex; align-items: center; padding: 8px 12px; gap: 8px; box-shadow: 0 -2px 8px rgba(0,0,0,.06); z-index: 90; }
.bottom-bar .op { text-align: center; font-size: 11px; color: #666; width: 44px; }
.bottom-bar .op .ico { font-size: 18px; }
.btn-cart { flex: 1; background: #9aa6bd; color: #fff; border: none; border-radius: 22px; padding: 11px; font-size: 15px; }
.btn-buy2 { flex: 1; background: #16305a; color: #fff; border: none; border-radius: 22px; padding: 11px; font-size: 15px; }

/* 底部 TabBar */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; max-width: 480px; margin: 0 auto; background: #fff; display: flex; border-top: 1px solid #eee; z-index: 90; }
.tabbar a { flex: 1; text-align: center; padding: 8px 0 10px; font-size: 11px; color: #888; }
.tabbar a .ico { font-size: 20px; display: block; }
.tabbar a.active { color: #16305a; }

/* 表单（登录/地址） */
.form-item { display: flex; align-items: center; gap: 8px; background: #fff; border-bottom: 1px solid #eee; padding: 14px 16px; }
.form-item input { flex: 1; border: none; outline: none; font-size: 15px; }

/* 订单/地址列表 */
.cell { background: #fff; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }

/* 会员中心头部 */
.me-head { background: #16305a; color: #fff; padding: 18px 16px 0; }
.me-stats { display: flex; text-align: center; padding: 14px 0; }
.me-stats div { flex: 1; }
.me-stats b { display: block; font-size: 18px; }
.me-stats span { font-size: 12px; color: #cfd8ea; }

/* 订单状态宫格 */
.order-grid { display: flex; background: #fff; padding: 12px 0; margin-top: 10px; }
.order-grid a { flex: 1; text-align: center; font-size: 12px; color: #555; position: relative; }
.order-grid .ico { font-size: 22px; display: block; margin-bottom: 4px; }
.order-grid .badge { position: absolute; top: -6px; right: 18%; background: #e33; color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; }

/* 后台管理 admin.css 复用部分样式 */
.admin-wrap { max-width: 100%; }
.admin-nav { background: #1f2d3d; color: #fff; }
.admin-nav a { color: #c6cbd4; display: block; padding: 12px 18px; border-bottom: 1px solid rgba(255,255,255,.06); }
.admin-nav a.active { background: #16305a; color: #fff; }
.table { width: 100%; border-collapse: collapse; background: #fff; }
.table th, .table td { border-bottom: 1px solid #eee; padding: 10px; font-size: 13px; text-align: left; }
.table th { background: #f8f9fb; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; border: 1px solid #ddd; background: #fff; cursor: pointer; }
.btn-del { color: #e33; border-color: #e33; }


/* ===== mx2 严选杂志式（组合二 B 站头+首页 / E 详情）追加样式 2026-10-21 ===== */
:root{--mx2-rose:#A0526D;--mx2-rosed:#7B4B5A;--mx2-cream:#FBF8F5;--mx2-ink:#332D2B;--mx2-gold:#B98A4A;--mx2-line:#EDE4E0;--mx2-sub:#8C8180}
body{background:var(--mx2-cream)}
/* 通知条 */
.mx2-notice{background:var(--mx2-rosed);color:#F5E7EB;font-size:12px;text-align:center;padding:7px 8px;letter-spacing:.5px}
/* 刊头 */
.mx2-mast{text-align:center;padding:16px 12px 12px;background:#fff;border-bottom:1px solid var(--mx2-line)}
.mx2-mast h1{margin:0;font-size:21px;font-weight:800;color:var(--mx2-ink);letter-spacing:3px}
.mx2-mast h1::after{content:"";display:block;width:34px;height:2px;background:var(--mx2-rose);margin:7px auto 0}
.mx2-mast p{margin:7px 0 0;font-size:12px;color:var(--mx2-sub);letter-spacing:1px}
/* 露边轮播（纯 CSS snap） */
.mx2-hswiper{display:flex;overflow-x:auto;scroll-snap-type:x mandatory;padding:12px 0;gap:8px;background:var(--mx2-cream);-webkit-overflow-scrolling:touch}
.mx2-hswiper::-webkit-scrollbar{display:none}
.mx2-hcard{flex:0 0 78%;scroll-snap-align:center;background:#fff;border-radius:10px;overflow:hidden;text-decoration:none;box-shadow:0 1px 4px rgba(80,50,60,.08)}
.mx2-hcard:first-child{margin-left:11%}
.mx2-hcard img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover}
.mx2-hcard .cap{padding:9px 11px 11px;display:flex;flex-direction:column;gap:4px}
.mx2-hcard .tag{align-self:flex-start;font-size:10px;padding:1px 7px;border-radius:8px}
.mx2-hcard .tag.t1{color:#fff;background:var(--mx2-rose)}
.mx2-hcard .tag.t2{color:var(--mx2-gold);border:1px solid var(--mx2-gold)}
.mx2-hcard .t{font-size:13px;color:var(--mx2-ink);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mx2-hcard .pr{font-size:16px;font-weight:700;color:var(--mx2-rose)}
.mx2-hcard .pr i{font-style:normal;font-size:11px;margin-right:1px}
.mx2-hcard .pr s{font-weight:400;font-size:11px;color:var(--mx2-sub);margin-left:6px}
/* 区块通用 */
.mx2-sect{margin-top:14px;background:#fff;padding:12px}
.mx2-sect h3{margin:0 0 10px;font-size:15px;color:var(--mx2-ink);letter-spacing:1px}
.mx2-sect .sect-hd{display:flex;align-items:baseline;justify-content:space-between;margin-bottom:10px}
.mx2-sect .sect-hd h3{margin:0}
.mx2-sect .sect-hd a{font-size:12px;color:var(--mx2-rose);text-decoration:none}
/* 图左文右横卡 */
.mx2-rcard{display:flex;gap:10px;padding:9px 0;border-bottom:1px solid #F5EFEA;text-decoration:none}
.mx2-rcard:last-child{border-bottom:0}
.mx2-rcard img{flex:0 0 96px;width:96px;height:96px;object-fit:cover;border-radius:8px}
.mx2-rcard .info{flex:1;display:flex;flex-direction:column;gap:4px;min-width:0}
.mx2-rcard .tag{align-self:flex-start;font-size:10px;color:var(--mx2-gold);border:1px solid var(--mx2-gold);padding:1px 7px;border-radius:8px}
.mx2-rcard .t{font-size:13px;color:var(--mx2-ink);line-height:1.4}
.mx2-rcard .d{font-size:11px;color:var(--mx2-sub)}
.mx2-rcard .pr{font-size:16px;font-weight:700;color:var(--mx2-rose)}
.mx2-rcard .pr i{font-style:normal;font-size:11px;margin-right:1px}
.mx2-rcard .pr s{font-weight:400;font-size:11px;color:var(--mx2-sub);margin-left:6px}
/* 自营承诺卡 */
.mx2-brandcard{margin:14px 12px;padding:13px 14px;background:linear-gradient(135deg,#4A3038,#6B4450);border-radius:10px}
.mx2-brandcard b{display:block;font-size:14px;color:#E8C79A;letter-spacing:1px;margin-bottom:6px}
.mx2-brandcard p{margin:0;font-size:12px;line-height:1.8;color:#E3D3D8}
/* 2列小卡 */
.mx2-grid2{display:flex;flex-wrap:wrap;border-radius:10px;overflow:hidden;border:1px solid #F5EFEA}
.mx2-it{width:33.333%;box-sizing:border-box;padding:8px;text-decoration:none;background:#fff;border-right:1px solid #F5EFEA;border-bottom:1px solid #F5EFEA}
.mx2-it:nth-child(3n){border-right:0}
.mx2-it:nth-last-child(-n+3){border-bottom:0}
.mx2-it img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover}
.mx2-it .t{margin-top:6px;font-size:12px;color:var(--mx2-ink);line-height:1.4;height:34px;overflow:hidden}
.mx2-it .pr{margin-top:2px;font-size:14px;font-weight:700;color:var(--mx2-rose)}
.mx2-it .pr i{font-style:normal;font-size:11px;margin-right:1px}
/* 专题横滑 */
.mx2-topic{display:flex;overflow-x:auto;gap:8px;-webkit-overflow-scrolling:touch}
.mx2-topic .tp{flex:0 0 62%;background:var(--mx2-cream);border:1px solid var(--mx2-line);border-radius:10px;padding:12px;text-decoration:none}
.mx2-topic .tp b{display:block;font-size:13px;color:var(--mx2-ink);margin-bottom:4px}
.mx2-topic .tp span{font-size:11px;color:var(--mx2-sub);line-height:1.5}
/* 长文面板 */
.mx2-panel{margin:12px 12px 0;padding:12px;background:#fff;border-radius:10px}
.mx2-panel h4{margin:0 0 8px;font-size:14px;color:var(--mx2-ink);text-align:center;letter-spacing:1px}
.mx2-panel p{margin:0 0 6px;font-size:12px;line-height:1.85;color:#6E6560}
/* 分类页导语 */
.mx2-lead{margin:10px 14px 0;font-size:12px;color:var(--mx2-sub);line-height:1.7}
/* 详情页 */
.mx2p .swiper{background:#fff}
.mx2-thumbs{display:flex;overflow-x:auto;gap:6px;padding:8px 12px;background:#fff;-webkit-overflow-scrolling:touch}
.mx2-thumbs img{flex:0 0 auto;width:54px;height:54px;object-fit:cover;border-radius:6px;border:2px solid transparent;cursor:pointer}
.mx2-thumbs img.on{border-color:var(--mx2-rose)}
.mx2-pricecard{display:flex;align-items:center;justify-content:space-between;margin:10px 12px 0;padding:13px 15px;border-radius:12px;background:linear-gradient(135deg,#4A3038,#6B4450)}
.mx2-pricecard .big{font-size:24px;font-weight:800;color:#E8C79A}
.mx2-pricecard .big i{font-style:normal;font-size:13px;margin-right:2px}
.mx2-pricecard .old{margin-left:8px;font-size:12px;color:#C4AEB4;text-decoration:line-through}
.mx2-pricecard .st{text-align:right;font-size:11px;color:#D5C2C8;line-height:1.7}
.mx2-info{margin:10px 12px 0;padding:12px;background:#fff;border-radius:10px}
.mx2-ptitle{font-size:15px;font-weight:600;color:var(--mx2-ink);line-height:1.55}
.mx2-tags{margin-top:8px}
.mx2-tags span{display:inline-block;margin-right:6px;padding:2px 8px;font-size:10px;color:var(--mx2-rose);border:1px solid #D9B7C2;border-radius:9px}
.mx2-specrow{display:flex;align-items:center;justify-content:space-between;margin:10px 12px 0;padding:11px 13px;background:#fff;border-radius:10px;text-decoration:none}
.mx2-specrow .lb{font-size:13px;color:var(--mx2-sub)}
.mx2-specrow .vv{flex:1;margin:0 10px;font-size:13px;color:var(--mx2-ink)}
.mx2-specrow .ar{color:#C0B4B2}
@media (max-width:360px){.mx2-it .t{height:33px}.mx2-hcard{flex-basis:84%}}
