/* ===== 承茗堂 · 新中式深色奢华（墨绿+暗金）===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
  background: #f7f6f2;
  color: #3d3d3d;
  line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }
input { font-family: inherit; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 22px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13, 26, 22, .96);
  border-bottom: 1px solid rgba(200, 164, 92, .35);
  backdrop-filter: blur(6px);
}
.topbar .wrap { display: flex; align-items: center; gap: 26px; height: 64px; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 21px; letter-spacing: 4px; color: #c8a45c; }
.logo .seal {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border: 1px solid #a0332a; color: #c4503f;
  font-family: "SimSun", serif; font-size: 15px; border-radius: 3px;
  background: rgba(164, 51, 42, .12);
}
.logo em { font-style: normal; font-size: 12px; letter-spacing: 2px; color: #9aa89f; display: block; margin-top: -4px; }
.nav { display: flex; gap: 4px; margin-left: 6px; }
.nav button {
  background: none; border: none; color: #e3dfd6; font-size: 14px;
  padding: 8px 14px; border-radius: 3px; letter-spacing: 1px;
}
.nav button.on { color: #c8a45c; background: rgba(200, 164, 92, .1); }
.nav button:hover { color: #c8a45c; }
.search { flex: 1; display: flex; max-width: 300px; margin-left: auto; }
.search input {
  flex: 1; background: #ffffff; border: 1px solid rgba(200,164,92,.3);
  color: #3d3d3d; padding: 8px 12px; font-size: 13px; outline: none; border-radius: 2px 0 0 2px;
}
.search input::placeholder { color: #6b6b6b; }
.search button {
  background: linear-gradient(135deg, #c8a45c, #b08d4c); border: none;
  color: #f7f6f2; padding: 0 16px; font-size: 13px; font-weight: 600; letter-spacing: 2px;
  border-radius: 0 2px 2px 0;
}
.cartbtn {
  position: relative; background: none; border: 1px solid rgba(200,164,92,.4);
  color: #c8a45c; padding: 8px 16px; font-size: 13px; letter-spacing: 1px; border-radius: 3px;
}
.cartbtn:hover { background: rgba(200,164,92,.12); }
.cartbtn .badge {
  position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px;
  background: #a0332a; color: #fff; font-size: 11px; line-height: 18px;
  text-align: center; border-radius: 9px; padding: 0 4px;
}

/* ---------- Hero ---------- */
.hero {
  position: relative; text-align: center; padding: 74px 20px 64px;
  background:
    radial-gradient(1200px 420px at 50% -10%, rgba(200,164,92,.14), transparent 60%),
    linear-gradient(180deg, #f7f6f2 0%, #f7f6f2 100%);
  border-bottom: 1px solid rgba(200,164,92,.25);
  overflow: hidden;
}
.hero::before {
  content: "茶"; position: absolute; right: 4%; top: 30%;
  font-family: "STKaiti", "KaiTi", serif; font-size: 240px; color: rgba(200,164,92,.05);
}
.hero .zh {
  font-family: "STKaiti", "KaiTi", "SimSun", serif; font-size: 46px; letter-spacing: 14px;
  color: #e6cc8d; text-shadow: 0 2px 24px rgba(200,164,92,.25);
}
.hero .en { font-size: 12px; letter-spacing: 8px; color: #7e8f85; margin-top: 10px; text-transform: uppercase; }
.hero p.sub { margin: 22px auto 0; max-width: 560px; color: #b8c3b9; font-size: 14px; letter-spacing: 1px; }
.hero .divider { display: flex; align-items: center; justify-content: center; gap: 12px; margin: 26px auto 0; color: #c8a45c; }
.hero .divider::before, .hero .divider::after { content: ""; width: 70px; height: 1px; background: linear-gradient(90deg, transparent, #c8a45c); }
.hero .divider::after { background: linear-gradient(90deg, #c8a45c, transparent); }
.hero .stats { display: flex; justify-content: center; gap: 44px; margin-top: 28px; }
.hero .stats span { font-family: "SimSun", serif; font-size: 15px; color: #c8a45c; letter-spacing: 1px; }
.hero .stats em { font-style: normal; color: #6b6b6b; font-size: 12px; margin-left: 4px; }

/* ---------- 分类条 ---------- */
.catbar { display: flex; flex-wrap: wrap; gap: 8px; margin: 26px 0 8px; }
.catbar a {
  padding: 7px 16px; font-size: 13px; color: #e3dfd6; letter-spacing: 1px;
  border: 1px solid rgba(200,164,92,.25); border-radius: 20px;
}
.catbar a.on { background: linear-gradient(135deg, #c8a45c, #b08d4c); color: #f7f6f2; border-color: transparent; font-weight: 600; }
.catbar a:hover { border-color: #c8a45c; color: #c8a45c; }

/* ---------- 区块标题 ---------- */
.sec {
  display: flex; align-items: baseline; gap: 12px;
  margin: 34px 0 18px; font-size: 20px; letter-spacing: 3px; color: #c8a45c;
}
.sec::before { content: ""; width: 4px; height: 18px; background: linear-gradient(180deg, #c8a45c, #8a6a2e); align-self: center; }
.sec small { font-size: 11px; letter-spacing: 3px; color: #6b6b6b; }

/* ---------- 商品网格 ---------- */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
@media (max-width: 960px) { .grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .grid { grid-template-columns: repeat(2, 1fr); } }
.card {
  background: #f7f6f2; border: 1px solid rgba(200,164,92,.18);
  border-radius: 6px; overflow: hidden; transition: transform .2s, box-shadow .2s;
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.5), 0 0 0 1px rgba(200,164,92,.35); }
.card .ph { position: relative; aspect-ratio: 1/1; overflow: hidden; background: #f7f6f2; }
.card .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover .ph img { transform: scale(1.05); }
.card .tag {
  position: absolute; top: 10px; left: 10px; background: rgba(10,24,19,.82);
  color: #c8a45c; font-size: 11px; padding: 3px 9px; letter-spacing: 2px; border: 1px solid rgba(200,164,92,.4);
}
.card .bd { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card .t { font-size: 14px; color: #3d3d3d; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 42px; }
.card .meta { display: flex; align-items: baseline; justify-content: space-between; margin-top: auto; }
.card .pr { font-size: 18px; color: #c8a45c; font-weight: 700; }
.card .pr i { font-style: normal; font-size: 12px; }
.card .pr s { color: #6b6b6b; font-size: 12px; font-weight: 400; margin-left: 6px; }
.card .sl { font-size: 12px; color: #6b6b6b; }
.card .extra { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 11px; color: #6b6b6b; line-height: 1.5; }
.card .extra .vi { white-space: nowrap; }
.card .extra .fv { color: #c8a45c; white-space: nowrap; }
.card .extra .sf { white-space: nowrap; }
.card .extra .free { color: #d98a5f; border: 1px solid rgba(217,138,95,.45); border-radius: 2px; padding: 0 5px; line-height: 15px; white-space: nowrap; }
.card .extra .fee { white-space: nowrap; }
.card .addbtn {
  width: 100%; padding: 9px 0; font-size: 13px; letter-spacing: 2px;
  background: linear-gradient(135deg, #c8a45c, #b08d4c); color: #f7f6f2;
  border: none; border-radius: 3px; font-weight: 600;
}
.card .addbtn:hover { filter: brightness(1.08); }

/* ---------- 店铺/详情 ---------- */
.empty { text-align: center; padding: 90px 20px; color: #6b6b6b; font-size: 15px; letter-spacing: 2px; }
.empty a { color: #c8a45c; border-bottom: 1px solid rgba(200,164,92,.5); }
.detail { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; padding: 40px 0; }
@media (max-width: 760px) { .detail { grid-template-columns: 1fr; } }
.dpic { border: 1px solid rgba(200,164,92,.25); border-radius: 6px; overflow: hidden; background: #f7f6f2; }
.dpic img { width: 100%; aspect-ratio: 1/1; object-fit: cover; }
.dinfo h1 { font-size: 22px; color: #3d3d3d; letter-spacing: 1px; margin-bottom: 12px; }
.dinfo .dtags { display: flex; gap: 8px; margin-bottom: 14px; }
.dinfo .ctag {
  background: rgba(200,164,92,.12); color: #c8a45c; font-size: 12px; padding: 4px 12px;
  border: 1px solid rgba(200,164,92,.4); letter-spacing: 1px; border-radius: 2px;
}
.dinfo .dtag { background: rgba(255,255,255,.06); color: #e3dfd6; font-size: 12px; padding: 4px 12px; border-radius: 2px; }
.dprice { font-size: 30px; color: #c8a45c; font-weight: 700; margin: 10px 0; }
.dprice s { font-size: 16px; color: #6b6b6b; font-weight: 400; margin-left: 10px; }
.dsales { font-size: 13px; color: #6b6b6b; margin-bottom: 14px; }
.ddesc { border-top: 1px dashed rgba(200,164,92,.3); padding-top: 14px; color: #c2cbbd; font-size: 14px; line-height: 1.9; }
.ddesc p { margin-bottom: 8px; }
.dbtns { display: flex; gap: 12px; margin-top: 22px; }
.dbtns button { flex: 1; padding: 13px 0; font-size: 15px; letter-spacing: 3px; border-radius: 3px; }
.dbtns .addbtn { background: none; border: 1px solid #c8a45c; color: #c8a45c; }
.dbtns .addbtn:hover { background: rgba(200,164,92,.12); }
.dbtns .buy { background: linear-gradient(135deg, #c8a45c, #b08d4c); border: none; color: #f7f6f2; font-weight: 600; }

/* ---------- 购物车 ---------- */
.carttable { background: #f7f6f2; border: 1px solid rgba(200,164,92,.2); border-radius: 6px; }
.crow { display: grid; grid-template-columns: 64px 1fr 80px 110px 90px 36px; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid rgba(200,164,92,.12); }
.crow:last-child { border-bottom: none; }
.crow img { width: 64px; height: 64px; object-fit: cover; border-radius: 4px; }
.crow .t { font-size: 13px; color: #3d3d3d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crow .pr { color: #c8a45c; font-weight: 600; }
.crow .qty { display: flex; align-items: center; gap: 8px; }
.crow .qty button { width: 24px; height: 24px; background: #f7f6f2; color: #c8a45c; border: 1px solid rgba(200,164,92,.4); border-radius: 3px; }
.crow .sub { color: #c8a45c; }
.crow .del { background: none; border: none; color: #6b6b6b; font-size: 15px; }
.crow .del:hover { color: #c4503f; }
@media (max-width: 640px) {
  .crow { grid-template-columns: 50px 1fr 60px; }
  .crow .pr, .crow .sub, .crow .qty { grid-column: auto; }
}
.summary { display: flex; align-items: center; justify-content: flex-end; gap: 18px; margin-top: 18px; }
.summary .tt { color: #e3dfd6; font-size: 14px; }
.summary .tot { font-size: 26px; color: #c8a45c; font-weight: 700; }
.subbtn {
  padding: 12px 34px; font-size: 14px; letter-spacing: 3px; border-radius: 3px;
  background: linear-gradient(135deg, #c8a45c, #b08d4c); border: none; color: #f7f6f2; font-weight: 600;
}

/* ---------- 结算 ---------- */
.ck { display: grid; grid-template-columns: 1fr 380px; gap: 24px; padding: 36px 0; }
@media (max-width: 820px) { .ck { grid-template-columns: 1fr; } }
.fpanel, .cklist { background: #f7f6f2; border: 1px solid rgba(200,164,92,.2); border-radius: 6px; padding: 24px; }
.fpanel h2, .cklist h2 { font-size: 17px; letter-spacing: 2px; color: #c8a45c; margin-bottom: 18px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; color: #e3dfd6; margin-bottom: 6px; letter-spacing: 1px; }
.field input {
  width: 100%; background: #f7f6f2; border: 1px solid rgba(200,164,92,.3); color: #3d3d3d;
  padding: 10px 12px; font-size: 14px; border-radius: 3px; outline: none;
}
.field input:focus { border-color: #c8a45c; }
.field .err { color: #c4503f; font-size: 12px; margin-top: 4px; min-height: 16px; }
.paybox { margin: 20px 0; }
.paybox .pt { font-size: 13px; color: #e3dfd6; margin-bottom: 10px; }
.paybox .alipay { display: inline-flex; align-items: center; gap: 10px; border: 1px solid rgba(200,164,92,.35); padding: 10px 18px; border-radius: 4px; font-size: 14px; color: #3d3d3d; }
.alb { width: 34px; height: 34px; border-radius: 8px; background: linear-gradient(145deg, #168bff, #00a1e9 55%, #0f7fe0); color: #fff; font-family: "SimHei", sans-serif; font-size: 18px; display: inline-flex; align-items: center; justify-content: center; }
.ckitem { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px dashed rgba(200,164,92,.18); }
.ckitem img { width: 46px; height: 46px; object-fit: cover; border-radius: 3px; }
.ckitem .n { flex: 1; font-size: 13px; color: #3d3d3d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ckitem .q { color: #6b6b6b; font-size: 13px; margin: 0 8px; }
.ckitem .p { color: #c8a45c; font-size: 13px; }

/* ---------- 成功页 ---------- */
.ok { text-align: center; padding: 80px 20px; }
.ok .mark {
  width: 74px; height: 74px; margin: 0 auto 22px; border-radius: 50%;
  background: linear-gradient(135deg, #c8a45c, #b08d4c); color: #f7f6f2;
  font-size: 36px; line-height: 74px; font-weight: 700;
}
.ok h1 { font-size: 24px; letter-spacing: 4px; color: #c8a45c; margin-bottom: 14px; }
.ok p { color: #e3dfd6; font-size: 14px; letter-spacing: 1px; }
.ok a { display: inline-block; margin-top: 26px; padding: 11px 30px; border: 1px solid #c8a45c; color: #c8a45c; border-radius: 3px; letter-spacing: 2px; }

/* ---------- 页脚 ---------- */
.foot { margin-top: 50px; padding: 26px 20px; text-align: center; border-top: 1px solid rgba(200,164,92,.25); background: #f7f6f2; color: #6b6b6b; font-size: 12px; letter-spacing: 1px; }
.foot b { color: #c8a45c; font-weight: 400; }

/* ---------- 打印 ---------- */
@media print { .topbar, .catbar, .dbtns, .cartbtn, .search, .nav, .foot { display: none !important; } body { background: #fff; color: #000; } }

/* ===== 登录/注册 ===== */
.authbox { max-width: 420px; margin: 60px auto; background: #ffffff; border: 1px solid #3a342a; border-radius: 14px; padding: 34px 38px; color: #e8dcc8; }
.authbox h2 { font-size: 24px; margin: 0 0 6px; color: #2b2b2b; }
.authsub { color: #888888; font-size: 13px; margin: 0 0 24px; }
.authmsg { text-align: center; font-size: 13px; margin-bottom: 12px; color: #e8b87a; }
.authfield { margin-bottom: 16px; }
.authfield label { display: block; font-size: 13px; color: #6b6b6b; margin-bottom: 6px; }
.authfield input { width: 100%; padding: 11px 14px; border: 1px solid #4a4234; border-radius: 8px; background: #ffffff; color: #2b2b2b; font-size: 14px; outline: none; box-sizing: border-box; }
.authfield input:focus { border-color: #c9a96a; }
.authbtn { width: 100%; padding: 12px 0; border: none; border-radius: 8px; background: #c9a96a; color: #ffffff; font-size: 15px; font-weight: 700; cursor: pointer; }
.authbtn:hover { background: #b08d4c; }
.authswitch { text-align: center; margin-top: 16px; font-size: 13px; color: #888888; }
.authswitch a { color: #b08d4c; text-decoration: underline; cursor: pointer; }
.authnav { font-size: 14px; color: #e8dcc8; margin-right: 14px; }
.authnav a { color: #b08d4c; text-decoration: none; margin: 0 4px; }
.authnav a:hover { text-decoration: underline; }
.authout { color: #888888 !important; }
@media (max-width: 640px) { .authnav { display: none; } }
