/* 防止页面切换时滚动条出现/消失导致布局抖动 */
html{
  scrollbar-gutter: stable;
}

/* 兼容一些不支持 scrollbar-gutter 的浏览器 */
@supports not (scrollbar-gutter: stable){
  html{ overflow-y: scroll; }
}


/* ======================
   全局 / 变量
====================== */

html, body{ background:#f3f4f6 !important; }
*{ box-sizing:border-box; }

:root{
  --bg:#f2f3f5;
  --card:#ffffff;
  --text:#111;
  --muted:#666;
  --line:#e5e7eb;
  --btn:#111;
  --radius:22px;
  --wrap:1360px;
}

body{
  margin:0;
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial;
  background:var(--bg);
  color:var(--text);
}

/* ======================
   顶部导航
====================== */

.topbar{
  background:#fff;
  border-bottom:1px solid var(--line);
}

.topbar-inner{
  max-width:var(--wrap);
  margin:0 auto;
  padding:18px 40px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}

.logo{
  color:#111;
  text-decoration:none;
  font-weight:700;
  letter-spacing:.5px;
}
.logo:hover{ opacity:.75; }

.nav a{
  margin-left:30px;
  font-size:14px;
  color:#444;
  text-decoration:none;
}
.nav a:hover{ color:#111; }

/* ======================
   主体
====================== */

.container{
  max-width:var(--wrap);
  margin:0 auto;
  padding:70px 40px 40px 40px;
}

/* ======================
   Hero
====================== */

.hero{
  text-align:center;
  margin-top:10px;
  padding:20px 0 10px;
}

.hero h1{
  font-size:54px;
  font-weight:900;
  margin:0 0 12px;
  letter-spacing:1px;
}

.hero p{
  color:var(--muted);
  font-size:18px;
  margin:0;
}

.hero-guide{
  margin-top:22px;
  text-align:center;
}
.guide-tip{
  font-size:14px;
  color:#666;
  margin-bottom:10px;
}
.guide-btn{
  padding:14px 34px;
  border-radius:999px;
  border:none;
  font-size:15px;
  font-weight:800;
  cursor:pointer;
  color:#fff;
  background:linear-gradient(135deg,#111,#444);
  box-shadow:0 12px 35px rgba(0,0,0,.25);
  transition:all .25s ease;
}
.guide-btn:hover{
  transform:translateY(-3px);
  box-shadow:0 20px 50px rgba(0,0,0,.35);
}
.guide-btn:active{ transform:translateY(0); }

/* ======================
   说明卡片
====================== */

.info-box{
  background:#fff;
  max-width:820px;
  margin:55px auto 0;
  padding:46px;
  border-radius:var(--radius);
  box-shadow:0 25px 80px rgba(0,0,0,.06);
  text-align:center;
}

.info-box h3{ font-size:18px; margin:0 0 10px; }

.info-box hr{
  border:none;
  height:1px;
  background:var(--line);
  margin:26px 0;
}

.info-box p{
  font-size:14px;
  color:var(--muted);
  line-height:1.9;
  margin:0;
}

/* ======================
   项目介绍折叠
====================== */

.project-card{
  width:92%;
  margin:20px auto;
  background:#fff;
  border-radius:14px;
  box-shadow:0 8px 20px rgba(0,0,0,.05);
  overflow:hidden;
}

.project-header{
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px;
  cursor:pointer;
}

.project-title{
  font-size:16px;
  font-weight:600;
  color:#222;
  display:flex;
  align-items:center;
  gap:6px;
}

.project-header .arrow{
  font-size:14px;
  color:#999;
  transition:transform .3s ease;
}

.project-content{
  max-height:0;
  overflow:hidden;
  transition:max-height .35s ease;
  padding:0 16px;
}

.project-content p{
  font-size:14px;
  line-height:1.7;
  color:#666;
  margin:12px 0;
}

/* ======================
   活动条 / 在线人数 / 跑马灯
====================== */

.activity-bar{
  width:100%;
  max-width:920px;
  margin:30px auto;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  box-shadow:0 12px 40px rgba(0,0,0,.05);
  padding:12px 14px;
  display:flex;
  align-items:center;
  gap:12px;
}

.activity-left{
  display:flex;
  align-items:center;
  gap:8px;
  white-space:nowrap;
}

.label{
  font-weight:600;
  color:#111;
  font-size:14px;
}

.dot{
  width:8px;
  height:8px;
  background:#ef4444;
  border-radius:50%;
  box-shadow:0 0 8px rgba(239,68,68,.6);
  animation:pulse 1.6s infinite;
}

@keyframes pulse{
  0%{ transform:scale(1); opacity:1; }
  50%{ transform:scale(1.3); opacity:.6; }
  100%{ transform:scale(1); opacity:1; }
}

.activity-marquee{ flex:1; overflow:hidden; min-width:0; }

#orderTrack{
  white-space:nowrap;
  display:inline-block;
  color:#6b7280;
  font-size:14px;
  animation:orderScroll 60s linear infinite;
}

@keyframes orderScroll{
  0%{ transform:translateX(0); }
  100%{ transform:translateX(-50%); }
}

.online-pill{
  display:flex;
  align-items:center;
  gap:6px;
  font-size:12px;
  color:#111;
  background:linear-gradient(180deg,#ffffff,#f3f4f6);
  border:1px solid rgba(0,0,0,.08);
  padding:6px 12px;
  border-radius:999px;
  font-weight:600;
  box-shadow:0 3px 10px rgba(0,0,0,.08);
}

/* 小绿点 */
.online-pill::before{
  content:"";
  width:8px;
  height:8px;
  border-radius:50%;
  background:#22c55e;
  box-shadow:0 0 6px rgba(34,197,94,.7);
  animation:onlinePulse 1.8s infinite;
}

@keyframes onlinePulse{
  0%{ transform:scale(1); opacity:1 }
  50%{ transform:scale(1.3); opacity:.6 }
  100%{ transform:scale(1); opacity:1 }
}



/* ======================
   商品网格
====================== */

.products{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:42px;
  margin-top:36px;
}

.card{
  background:#fff;
  border-radius:var(--radius);
  padding:34px 26px;
  text-align:center;
  position:relative;
  box-shadow:0 18px 55px rgba(0,0,0,.06);
  border:1px solid rgba(17,17,17,.06);
  transition:transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.card:hover{
  transform:translateY(-6px);
  box-shadow:0 30px 85px rgba(0,0,0,.10);
  border-color:rgba(17,17,17,.10);
}

.card img{ width:128px; margin-bottom:18px; }

.card h4{
  font-size:18px;
  margin:0 0 8px;
  letter-spacing:.2px;
}

.price{
  font-size:26px;
  font-weight:900;
  margin:14px 0 18px;
}

.sold{
  color:#888;
  font-size:13px;
  margin-bottom:10px;
}

.profit{
  color:#ff4d4f;
  font-size:14px;
  margin-top:4px;
}

/* 购买按钮 */
.btn{
  display:inline-block;
  background:var(--btn);
  color:#fff;
  padding:12px 34px;
  border-radius:999px;
  text-decoration:none;
  font-size:14px;
  transition:transform .18s ease, opacity .18s ease;
}
.btn:hover{ transform:scale(1.04); opacity:.92; }

/* Tag（保留配色；删除原先“隐藏tag”的冲突/无效规则） */
.tag{
  position:absolute;
  top:10px;
  left:10px;
  color:#fff;
  font-size:12px;
  font-weight:600;
  padding:4px 10px;
  border-radius:999px;
  letter-spacing:.3px;
  backdrop-filter:blur(6px);
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}
.card:nth-child(1) .tag{ background:linear-gradient(135deg,#64748b,#475569); }
.card:nth-child(2) .tag{ background:linear-gradient(135deg,#f59e0b,#d97706); }
.card:nth-child(3) .tag{ background:linear-gradient(135deg,#ef4444,#b91c1c); }
.card:nth-child(4) .tag{ background:linear-gradient(135deg,#10b981,#047857); }
.card:nth-child(5) .tag{ background:linear-gradient(135deg,#6366f1,#4338ca); }
.card:nth-child(6) .tag{ background:linear-gradient(135deg,#06b6d4,#0891b2); }
.card:nth-child(7) .tag{ background:linear-gradient(135deg,#ec4899,#be185d); }
.card:nth-child(8) .tag{ background:linear-gradient(135deg,#3b82f6,#1d4ed8); }

/* ======================
   Toast
====================== */

.toast{
  position:fixed;
  top:22px;
  left:50%;
  transform:translateX(-50%);
  background:#111;
  color:#fff;
  padding:12px 16px;
  border-radius:14px;
  font-size:13px;
  opacity:0;
  pointer-events:none;
  transition:.25s ease;
  z-index:9999;
  min-width:220px;
  box-shadow:0 18px 55px rgba(0,0,0,.25);
}

.toast .t{ font-weight:800; margin-bottom:4px; font-size:12px; opacity:.9; }
.toast .m{ font-size:13px; line-height:1.4; opacity:.95; }

.toast.show{ opacity:1; }

/* ======================
   Footer / 社交
====================== */

.footer{
  text-align:center;
  margin-top:90px;
  color:#777;
  font-size:14px;
}

.footer small{
  display:block;
  margin-top:6px;
  color:#aaa;
}

.social-icons{
  margin-top:20px;
  display:flex;
  justify-content:center;
  gap:26px;
}

.social-icons a{
  width:22px;
  height:22px;
  color:#666;
  transition:.2s;
}

.social-icons svg{ width:100%; height:100%; }

.social-icons a:hover{
  color:#111;
  transform:translateY(-3px);
}



/* ======================
   响应式
====================== */

@media(max-width:1200px){
  :root{ --wrap:1120px; }
  .products{ gap:28px; }
}

@media(max-width:1000px){
  .products{ grid-template-columns:repeat(2,1fr); }
  .topbar-inner{ padding:16px 24px; }
  .container{
  padding:60px 24px 40px 24px;
}
  .hero h1{ font-size:44px; }
}

@media(max-width:600px){
  .products{ grid-template-columns:1fr; }
  .bottom-nav{ display:flex; }
  body{ padding-bottom:40px; } /* 给底部栏留空间 */
  .hero h1{ font-size:38px; }
  .info-box{ padding:36px 22px; }
  .activity-bar{ gap:10px; }
  .online-pill{ display:none; } /* 小屏可隐藏，避免挤压跑马灯 */
}


/* ======================
   视频教程弹窗（首页按钮触发）
====================== */

.modal-mask{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:18px;
  z-index:10000;
}

.modal-mask.show{ display:flex; }



.modal-title{
  font-weight:900;
  font-size:16px;
  margin:2px 0 10px;
  color:#111;
}

.modal-close{
  position:absolute;
  right:10px;
  top:8px;
  width:36px;
  height:36px;
  border:none;
  border-radius:10px;
  background:#f3f4f6;
  color:#111;
  font-size:22px;
  cursor:pointer;
}

.modal-close:hover{ background:#e5e7eb; }

/* 视频弹窗容器 */
.modal{
  width:auto;
  max-width:420px;
  max-height:90vh;
  background:#fff;
  border-radius:18px;
  box-shadow:0 30px 120px rgba(0,0,0,.35);
  border:1px solid rgba(0,0,0,.10);
  position:relative;
  padding:16px;
}

/* 弹窗里的流程说明 */
.modal-video video{
  width:100%;
  height:70vh;
  border-radius:14px;
  object-fit:cover;   /* 填满容器，不留黑边 */
}

/* 标签文字隐藏 */
.card:nth-child(3) .tag{
  display:none;
}

/* 手机单独缩小卡片 */
@media(max-width:600px){

.products{
  grid-template-columns:repeat(2,1fr);
  gap:14px;
}

/* 卡片缩小 */
.card{
  padding:16px 10px;
  border-radius:16px;
}

/* 图片缩小 */
.card img{
  width:72px;
  margin-bottom:10px;
}

/* 标题 */
.card h4{
  font-size:14px;
}

/* 价格 */
.price{
  font-size:18px;
  margin:8px 0;
}

/* 按钮 */
.btn{
  padding:8px 16px;
  font-size:12px;
}

}


/* 商品名称 / 订单号：上下两行显示 */
.product-row.stack{
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 16px;
}

.product-row.stack span:first-child{
  color:#6b7280;
  font-size:13px;
}

.product-row.stack span:last-child{
  font-size:15px;
  font-weight:600;
  color:#111;
  word-break: break-word;
}


/* 修复 100vw 引起的左右抖动（强制用 100%） */
body, .wrap, .container, .topbar, .navbar, header {
  width: 100% !important;
}


body{
  margin:0;
  background:#f2f3f5;
}

.topbar{
  background:#f2f3f5;
}
