/* ===== 山野集·户外运动服装商城 · 山系卡其军绿风 ===== */
* { margin:0; padding:0; box-sizing:border-box; }
:root{
  --olive:#5f6f52; --olive-d:#46543c; --sand:#f4f0e6;
  --soil:#8a7a5c; --tx:#3b352b; --dim:#8d8371; --line:#e2dccb; --acc:#d98b3a;
}
html,body{ background:var(--sand); color:var(--tx);
  font-family:'PingFang SC','Microsoft YaHei',system-ui,sans-serif; }
a{ color:inherit; text-decoration:none; }
button{ font-family:inherit; cursor:pointer; }
img{ display:block; }
.wrap{ max-width:1180px; margin:0 auto; padding:0 20px; }
.topbar{ position:sticky; top:0; z-index:50; background:#fffdf7;
  box-shadow:0 2px 14px rgba(95,111,82,.14); }
.topbar .wrap{ display:flex; align-items:center; gap:22px; height:64px; }
.logo{ display:flex; align-items:baseline; gap:7px; font-size:24px; font-weight:800; color:var(--olive-d);
  letter-spacing:1px; }
.logo b{ font-size:14px; font-weight:700; color:#fff; background:var(--olive); padding:3px 9px; border-radius:6px; }
.nav{ display:flex; gap:4px; flex:1; overflow-x:auto; }
.nav button{ background:none; border:none; color:var(--dim); padding:8px 14px;
  border-radius:20px; font-size:14px; white-space:nowrap; transition:.2s; }
.nav button:hover{ background:#efe9da; color:var(--olive-d); }
.nav button.on{ background:var(--olive); color:#fff; font-weight:600; }
.cartbtn{ position:relative; background:var(--olive-d); border:none; color:#fff;
  padding:10px 18px; border-radius:22px; font-weight:700; font-size:14px;
  box-shadow:0 3px 10px rgba(70,84,60,.35); white-space:nowrap; }
.cartbtn .badge{ position:absolute; top:-7px; right:-7px; background:var(--acc);
  color:#fff; font-size:12px; min-width:20px; height:20px; border-radius:10px;
  display:flex; align-items:center; justify-content:center; padding:0 5px; font-weight:700; }
.hero{ margin:26px 0; border-radius:18px; overflow:hidden; position:relative;
  background:linear-gradient(120deg,#f0ead9,#e0d6bd 55%,#cdc09e);
  border:1px solid var(--line); padding:44px 40px; }
.hero h1{ font-size:34px; color:var(--olive-d); letter-spacing:2px; margin-bottom:10px; }
.hero p{ color:var(--soil); margin-bottom:20px; max-width:640px; line-height:1.8; font-size:15px; }
.hero .stats{ display:flex; gap:26px; }
.hero .stats span{ background:#fffdf7; border-radius:12px; padding:10px 16px; font-size:13px;
  color:var(--olive-d); box-shadow:0 2px 8px rgba(95,111,82,.1); }
.hero .stats em{ font-style:normal; color:var(--acc); font-weight:800; font-size:18px; }
.sec{ margin:38px 0 16px; display:flex; align-items:center; gap:10px; font-size:21px; color:var(--olive-d); }
.sec::before{ content:''; width:6px; height:22px; border-radius:3px; background:var(--acc); }
.sec small{ color:var(--dim); font-size:13px; font-weight:400; letter-spacing:1px; }
.catgrid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(168px,1fr)); gap:14px; }
.cattile{ background:#fffdf7; border:1px solid var(--line); border-radius:16px; padding:20px 14px;
  text-align:center; transition:.22s; }
.cattile:hover{ transform:translateY(-4px); box-shadow:0 8px 22px rgba(95,111,82,.15); border-color:var(--olive); }
.cattile .ic{ font-size:32px; display:block; margin-bottom:10px; }
.cattile .nm{ font-size:15px; font-weight:700; color:var(--tx); }
.cattile .ct{ font-size:12px; color:var(--olive); margin-top:6px; }
.grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(210px,1fr)); gap:18px; }
.card{ background:#fffdf7; border:1px solid var(--line); border-radius:16px; overflow:hidden;
  transition:.22s; position:relative; }
.card:hover{ transform:translateY(-4px); box-shadow:0 10px 26px rgba(95,111,82,.16); }
.card .ph{ aspect-ratio:1/1; background:var(--sand); overflow:hidden; }
.card .ph img{ width:100%; height:100%; object-fit:cover; transition:.3s; }
.card:hover .ph img{ transform:scale(1.05); }
.card .bd{ padding:12px 14px 15px; }
.card .t{ font-size:14px; line-height:1.5; height:42px; overflow:hidden; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical; color:var(--tx); }
.card .meta{ display:flex; align-items:center; justify-content:space-between; margin-top:9px; }
.card .pr{ color:var(--acc); font-size:18px; font-weight:800; }
.card .pr i{ font-style:normal; font-size:12px; }
.card .pr s{ color:var(--dim); font-size:12px; font-weight:400; margin-left:5px; }
.card .sl{ color:var(--dim); font-size:12px; }
.addbtn{ width:100%; margin-top:9px; border:none; background:var(--olive); color:#fff;
  padding:9px 0; border-radius:20px; font-weight:600; font-size:14px; transition:.2s; }
.addbtn:hover{ background:var(--olive-d); }

.detail{ display:grid; grid-template-columns:1fr 1fr; gap:34px; margin:30px 0 56px; }
.dpic{ border-radius:16px; overflow:hidden; border:1px solid var(--line); background:#fffdf7; }
.dpic img{ width:100%; aspect-ratio:1/1; object-fit:cover; }
.dinfo h1{ font-size:23px; line-height:1.5; margin-bottom:12px; }
.dtag{ display:inline-block; background:#efe9da; color:var(--olive-d); font-size:12px;
  padding:4px 12px; border-radius:14px; margin-bottom:14px; font-weight:600; }
.dprice{ font-size:32px; color:var(--acc); font-weight:800; margin:8px 0; }
.dprice s{ color:var(--dim); font-size:15px; margin-left:10px; font-weight:400; }
.dsales{ color:var(--dim); font-size:13px; margin-bottom:16px; }
.ddesc{ background:#fffdf7; border:1px solid var(--line); border-radius:12px; padding:14px 16px;
  color:#6d6253; line-height:1.8; font-size:14px; }
.dbtns{ display:flex; gap:14px; margin-top:20px; }
.dbtns button{ flex:1; padding:14px 0; border:none; border-radius:22px; font-size:16px; font-weight:700; }
.dbtns .addbtn{ background:#efe9da; color:var(--olive-d); }
.dbtns .buy{ background:var(--olive-d); color:#fff; }
.dbtns .buy:hover{ filter:brightness(1.15); }
.carttable{ background:#fffdf7; border:1px solid var(--line); border-radius:16px; overflow:hidden; margin:22px 0; }
.crow{ display:grid; grid-template-columns:72px 1fr 110px 120px 90px 40px; gap:14px;
  align-items:center; padding:14px 18px; border-bottom:1px solid #f0ecdf; }
.crow:last-child{ border-bottom:none; }
.crow img{ width:64px; height:64px; object-fit:cover; border-radius:12px; }
.crow .t{ font-size:14px; line-height:1.5; }
.crow .qty{ display:flex; align-items:center; gap:8px; }
.crow .qty button{ width:28px; height:28px; border-radius:50%; border:1px solid var(--line);
  background:#fff; color:var(--olive-d); font-size:15px; }
.crow .qty button:hover{ background:#efe9da; }
.crow .qty span{ min-width:24px; text-align:center; }
.crow .pr{ color:var(--acc); font-weight:700; }
.crow .sub{ color:var(--acc); font-weight:800; }
.crow .del{ border:none; background:none; color:#c9c0ad; font-size:18px; }
.crow .del:hover{ color:var(--acc); }
.empty{ text-align:center; color:var(--dim); padding:70px 0; }
.empty a{ color:var(--olive); text-decoration:underline; }
.summary{ background:#fffdf7; border:1px solid var(--line); border-radius:16px; padding:20px 24px;
  display:flex; align-items:center; justify-content:space-between; margin-bottom:24px; }
.summary .tt{ color:var(--dim); }
.summary .tot{ color:var(--acc); font-size:28px; font-weight:800; }
.ck{ display:grid; grid-template-columns:1.2fr .8fr; gap:24px; margin:28px 0 56px; }
.fpanel,.cklist{ background:#fffdf7; border:1px solid var(--line); border-radius:16px; padding:24px; }
.fpanel h2,.cklist h2{ font-size:17px; color:var(--olive-d); margin-bottom:16px; }
.field{ margin-bottom:15px; }
.field label{ display:block; color:var(--dim); font-size:13px; margin-bottom:7px; }
.field input{ width:100%; padding:12px 14px; border-radius:10px; border:1px solid var(--line);
  background:var(--sand); font-size:15px; outline:none; color:var(--tx); }
.field input:focus{ border-color:var(--olive); background:#fff; }
.field .err{ color:#d15b4e; font-size:12px; margin-top:5px; min-height:15px; }
.paybox{ border:2px dashed var(--line); border-radius:14px; padding:16px; text-align:center; margin:8px 0 18px; }
.paybox .pt{ color:var(--dim); font-size:13px; margin-bottom:10px; }
.alipay{ display:flex; align-items:center; justify-content:center; gap:12px; }
.alb{ width:36px; height:36px; border-radius:9px; display:flex; align-items:center; justify-content:center;
  font-size:23px; font-weight:900; color:#fff; font-family:'SimHei',sans-serif;
  background:linear-gradient(145deg,#168bff,#00a1e9 55%,#0f7fe0); box-shadow:0 2px 8px rgba(0,150,255,.4); }
.alipay span{ font-size:15px; font-weight:700; letter-spacing:1px; color:var(--tx); }
.subbtn{ width:100%; padding:15px 0; border:none; border-radius:22px; font-size:17px; font-weight:700;
  background:var(--olive-d); color:#fff; transition:.2s; }
.subbtn:hover{ filter:brightness(1.15); box-shadow:0 4px 14px rgba(70,84,60,.4); }
.ckitem{ display:flex; align-items:center; gap:12px; padding:9px 0; border-bottom:1px solid #f0ecdf; font-size:13px; }
.ckitem img{ width:46px; height:46px; border-radius:10px; object-fit:cover; }
.ckitem .n{ flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; color:var(--dim); }
.ckitem .p{ color:var(--acc); font-weight:700; }
.ckitem .q{ color:var(--dim); }
.ok{ text-align:center; padding:86px 0; }
.ok .mark{ width:86px; height:86px; margin:0 auto 22px; border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:44px; color:#fff;
  background:var(--olive); box-shadow:0 8px 26px rgba(95,111,82,.4); }
.ok h1{ font-size:27px; color:var(--olive-d); margin-bottom:12px; }
.ok p{ color:var(--dim); margin-bottom:24px; }
.ok a{ display:inline-block; padding:12px 32px; border-radius:22px; background:var(--olive);
  color:#fff; font-weight:700; }
.foot{ border-top:1px solid var(--line); padding:28px 0 36px; margin-top:46px; text-align:center;
  color:var(--dim); font-size:13px; }

/* ============ 会员登录/注册 ============ */
.loginbtn { margin-left: 10px; padding: 8px 16px; border: 1px solid #8ba35e; border-radius: 20px; background: none; color: #8ba35e; font-size: 13px; cursor: pointer; white-space: nowrap; }
.loginbtn:hover { background: #8ba35e; color: #fff; }
.userchip { margin-left: 10px; font-size: 13px; color: #8ba35e; font-weight: 600; white-space: nowrap; }
.userchip .quit { margin-left: 6px; color: #999; font-weight: 400; text-decoration: underline; cursor: pointer; }
.auth-modal { position: fixed; inset: 0; z-index: 1000; display: flex; align-items: center; justify-content: center; }
.auth-mask { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.auth-box { position: relative; width: 360px; max-width: 92vw; background: #fff; border-radius: 14px; padding: 26px 24px 20px; box-shadow: 0 16px 50px rgba(0,0,0,.3); }
.auth-close { position: absolute; top: 10px; right: 14px; border: none; background: none; font-size: 22px; color: #999; cursor: pointer; line-height: 1; }
.auth-box h4 { margin: 0 0 4px; font-size: 20px; color: #333; }
.auth-sub { margin: 0 0 12px; font-size: 12px; color: #999; }
.auth-label { display: block; margin: 12px 0 4px; font-size: 13px; color: #555; }
.auth-input { width: 100%; box-sizing: border-box; padding: 10px 12px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; }
.auth-input:focus { border-color: #8ba35e; }
.auth-err { min-height: 18px; margin-top: 8px; font-size: 12px; color: #e5484d; }
.auth-submit { width: 100%; padding: 11px 0; border: none; border-radius: 8px; background: #8ba35e; color: #fff; font-size: 15px; cursor: pointer; }
.auth-submit:hover { opacity: .9; }
.auth-switch { text-align: center; margin-top: 14px; font-size: 13px; }
.auth-switch a { color: #8ba35e; text-decoration: none; }
