/* ============================================================
   东江白露 H5 网站 - 样式
   移动端优先, 墨绿 + 米白 + 金点缀
   ============================================================ */
:root {
  --green: #1f5c43;
  --green-light: #2f7a5b;
  --gold: #c9a35b;
  --bg: #f6f3ec;
  --card: #ffffff;
  --text: #2b2b2b;
  --muted: #8a8a8a;
  --line: #ece7dd;
  --danger: #c0392b;
  --radius: 14rpx;
  --tabbar-h: 56px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  padding-bottom: calc(var(--tabbar-h) + var(--safe-b));
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { font-family: inherit; cursor: pointer; }

/* 通用 */
.page { min-height: 100vh; padding-bottom: 20px; }
.container { padding: 12px; }
.muted { color: var(--muted); }
.center { text-align: center; }
.loading-page { padding: 60px 0; text-align: center; color: var(--muted); }
.empty { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty .ico { font-size: 48px; display: block; margin-bottom: 10px; }

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: linear-gradient(135deg, var(--green), var(--green-light));
  color: #fff; padding: 14px 16px 12px;
  display: flex; align-items: center; gap: 10px;
}
.topbar .brand { font-size: 18px; font-weight: 700; letter-spacing: 1px; }
.topbar .brand small { display: block; font-size: 11px; font-weight: 400; opacity: .85; letter-spacing: 2px; }
.topbar .spacer { flex: 1; }
.topbar .search-box {
  background: rgba(255,255,255,.9); border-radius: 20px; padding: 4px 4px 4px 12px;
  display: flex; align-items: center; gap: 4px; max-width: 190px;
}
.topbar .search-box input {
  border: none; background: transparent; outline: none; font-size: 13px; color: #333; width: 110px;
}
.topbar .search-box input::placeholder { color: #999; }
.topbar .search-box button {
  border: none; background: var(--green); color: #fff; font-size: 12px; padding: 5px 12px; border-radius: 16px;
}

/* 按钮 */
.btn {
  display: inline-block; border: none; border-radius: 24px; padding: 11px 22px;
  font-size: 15px; font-weight: 600; text-align: center; transition: opacity .15s;
}
.btn:active { opacity: .85; }
.btn-primary { background: var(--green); color: #fff; }
.btn-gold { background: var(--gold); color: #fff; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: #fff; color: var(--green); border: 1px solid var(--green); }
.btn[disabled] { background: #ccc; color: #fff; cursor: not-allowed; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-danger { background: #fff; color: var(--danger); border: 1px solid var(--danger); }

/* 区块标题 */
.section-title {
  display: flex; align-items: center; gap: 8px; margin: 18px 12px 10px;
  font-size: 16px; font-weight: 700; color: var(--green);
}
.section-title::before { content: ""; width: 4px; height: 16px; background: var(--gold); border-radius: 2px; }

/* 横幅 - 保持墨绿金点缀风格,禁止改配色 */
.banner {
  margin: 12px; border-radius: 14px; overflow: hidden;
  background: linear-gradient(135deg, var(--green-light), var(--green));
  background-size: cover; background-position: center;
  color: #fff; padding: 26px 20px; position: relative;
  box-shadow: 0 6px 18px rgba(31,92,67,.25);
  min-height: 160px; display: flex; align-items: center; gap: 16px;
}
a.banner { text-decoration: none; -webkit-tap-highlight-color: transparent; }
.banner h2 { margin: 0; font-size: 24px; letter-spacing: 3px; text-shadow: 0 2px 6px rgba(0,0,0,.25); }
.banner p { margin: 10px 0 16px; opacity: .92; font-size: 13px; line-height: 1.6; }
.banner .deco { position: absolute; right: -10px; bottom: -10px; font-size: 90px; opacity: .12; pointer-events: none; }
.banner-text { flex: 1; position: relative; z-index: 1; }
.banner-thumb {
  width: 110px; height: 110px; object-fit: cover; border-radius: 12px;
  box-shadow: 0 4px 14px rgba(0,0,0,.2); flex-shrink: 0; position: relative; z-index: 1;
}
.banner-btn {
  display: inline-block; background: var(--gold); color: #3a2c0c; font-weight: 700;
  padding: 8px 18px; border-radius: 22px; font-size: 13px; box-shadow: 0 3px 10px rgba(201,163,91,.4);
}

/* 轮播图 */
.banner-carousel { position: relative; margin: 12px; border-radius: 14px; overflow: hidden; }
.banner-track {
  display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.banner-track::-webkit-scrollbar { display: none; }
.banner-track .banner {
  flex: 0 0 100%; margin: 0; border-radius: 14px; scroll-snap-align: start;
}
.banner-dots {
  position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 6px;
}
.banner-dots span {
  width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.45);
  transition: background .2s;
}
.banner-dots span.active { background: #fff; }

/* 分类入口 */
.cat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; padding: 0 12px; }
.cat-item { background: var(--card); border-radius: 12px; padding: 14px 6px; text-align: center; box-shadow: 0 2px 8px rgba(0,0,0,.04); }
.cat-item .emoji { font-size: 26px; }
.cat-item .name { font-size: 12px; margin-top: 6px; color: #444; }

/* 商品网格 */
.goods-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 12px; }
.goods-card { background: var(--card); border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,.04); transition: transform .15s, box-shadow .15s; }
.goods-card:active { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(31,92,67,.18); }
.goods-card .thumb {
  width: 100%; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center;
  font-size: 34px; color: #fff; background: linear-gradient(135deg, var(--green-light), var(--green)); font-weight: 700;
}
.goods-card img.thumb { object-fit: cover; }
.goods-card .info { padding: 8px 10px 12px; }
.goods-card .name { font-size: 14px; font-weight: 600; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.goods-card .sub { font-size: 11px; color: var(--muted); margin: 3px 0; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.goods-card .price { color: var(--danger); font-weight: 700; font-size: 16px; }
.goods-card .price small { color: var(--muted); font-weight: 400; font-size: 11px; text-decoration: line-through; margin-left: 4px; }

/* 礼券入口卡 */
.coupon-entry {
  margin: 12px; background: linear-gradient(135deg, #3a2c12, #5a4420); color: var(--gold);
  border-radius: 14px; padding: 18px; display: flex; align-items: center; gap: 12px;
}
.coupon-entry .ci-ico { font-size: 34px; }
.coupon-entry .ci-main { flex: 1; }
.coupon-entry .ci-main b { color: #fff; font-size: 16px; display: block; }
.coupon-entry .ci-main span { font-size: 12px; opacity: .8; }
.coupon-entry .ci-arrow { font-size: 20px; color: var(--gold); }

/* 商品详情 */
.detail-hero { width: 100%; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; font-size: 80px; color: #fff; background: linear-gradient(135deg, var(--green-light), var(--green)); }
.detail-body { background: var(--card); padding: 16px; border-radius: 14px 14px 0 0; margin-top: -14px; position: relative; }
.detail-body .name { font-size: 19px; font-weight: 700; }
.detail-body .sub { color: var(--muted); margin: 6px 0; }
.detail-price { display: flex; align-items: baseline; gap: 10px; margin: 12px 0; }
.detail-price .now { color: var(--danger); font-size: 24px; font-weight: 700; }
.detail-price .now small { font-size: 14px; }
.detail-price .old { color: var(--muted); text-decoration: line-through; }
.detail-price .unit { color: var(--muted); font-size: 12px; }
.detail-rich { padding: 14px; background: var(--card); margin-top: 10px; border-radius: 14px; color: #444; white-space: pre-wrap; }
.detail-rich h3 { font-size: 15px; color: var(--green); margin: 0 0 8px; }
.qty-row { display: flex; align-items: center; gap: 14px; margin: 14px 0; }
.qty-row .label { color: #555; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 20px; overflow: hidden; }
.stepper button { width: 34px; height: 34px; border: none; background: #faf8f3; font-size: 18px; color: var(--green); }
.stepper input { width: 44px; text-align: center; border: none; font-size: 15px; }

/* 底部操作条 */
.action-bar {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 30;
  background: #fff; border-top: 1px solid var(--line); display: flex; gap: 10px; padding: 10px 12px;
}
.action-bar .price-box { flex: 1; display: flex; flex-direction: column; justify-content: center; }
.action-bar .price-box .t { font-size: 12px; color: var(--muted); }
.action-bar .price-box .p { color: var(--danger); font-weight: 700; font-size: 18px; }

/* 表单 */
.form { background: var(--card); border-radius: 14px; padding: 4px 14px; margin: 12px; }
.form .field { display: flex; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.form .field:last-child { border-bottom: none; }
.form .field label { width: 84px; color: #555; font-size: 14px; flex-shrink: 0; }
.form .field input, .form .field textarea {
  flex: 1; border: none; outline: none; font-size: 14px; background: transparent; font-family: inherit;
}
.form .field textarea { min-height: 44px; resize: none; }

/* 购物车 */
.cart-item { display: flex; gap: 10px; background: var(--card); border-radius: 12px; padding: 10px; margin: 10px 12px; align-items: center; }
.cart-item .thumb { width: 64px; height: 64px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 24px; color: #fff; background: linear-gradient(135deg, var(--green-light), var(--green)); flex-shrink: 0; }
.cart-item .meta { flex: 1; min-width: 0; }
.cart-item .meta .nm { font-weight: 600; font-size: 14px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.cart-item .meta .pr { color: var(--danger); font-weight: 700; margin-top: 4px; }
.cart-item .ops { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-summary { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 30; background: #fff; border-top: 1px solid var(--line); display: flex; align-items: center; padding: 10px 12px; gap: 10px; }
.cart-summary .chk { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.cart-summary .total { flex: 1; text-align: right; }
.cart-summary .total b { color: var(--danger); font-size: 18px; }

/* 订单 */
.order-card { background: var(--card); border-radius: 12px; margin: 10px 12px; padding: 12px; }
.order-card .o-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.order-card .o-no { font-size: 12px; color: var(--muted); }
.order-card .o-status { font-size: 13px; font-weight: 600; }
.order-card .o-item { display: flex; gap: 8px; padding: 8px 0; align-items: center; }
.order-card .o-item .thumb { width: 50px; height: 50px; border-radius: 8px; display:flex; align-items:center; justify-content:center; font-size:18px; color:#fff; background: linear-gradient(135deg, var(--green-light), var(--green)); flex-shrink:0; }
.order-card .o-item .nm { flex: 1; font-size: 13px; }
.order-card .o-item .qy { color: var(--muted); font-size: 12px; }
.order-card .o-foot { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; border-top: 1px solid var(--line); }
.order-card .o-foot .amt { color: var(--danger); font-weight: 700; }
.order-card .tracking-bar { font-size: 12px; color: var(--text); padding: 6px 0; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.order-card .tracking-bar .muted { color: var(--muted); }
.badge-coupon { background: var(--gold); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 10px; margin-left: 6px; }
.status-pending { color: #e08e0b; }
.status-paid { color: var(--green); }
.status-shipped { color: #2b6cb0; }
.status-done { color: #555; }
.status-cancelled { color: var(--muted); }

/* 查券 */
.coupon-box { margin: 14px 12px; background: var(--card); border-radius: 14px; padding: 18px; box-shadow: 0 2px 10px rgba(0,0,0,.05); }
.coupon-box .cb-title { font-size: 18px; font-weight: 700; color: var(--green); }
.coupon-box .cb-desc { color: var(--muted); font-size: 13px; margin: 6px 0 14px; }
.coupon-box .cb-input { display: flex; gap: 10px; }
.coupon-box .cb-input input { flex: 1; border: 1px solid var(--line); border-radius: 24px; padding: 11px 16px; font-size: 15px; outline: none; letter-spacing: 1px; }
.coupon-result { margin: 12px; background: #fff; border-radius: 14px; padding: 16px; }
.coupon-result .cr-head { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px dashed var(--line); padding-bottom: 10px; margin-bottom: 10px; }
.coupon-result .cr-head b { font-size: 16px; }
.pick-item { display: flex; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; }
.pick-item.sel { border-color: var(--green); background: #f3f8f5; }
.pick-item .thumb { width: 48px; height: 48px; border-radius: 8px; display:flex; align-items:center; justify-content:center; font-size:16px; color:#fff; background: linear-gradient(135deg, var(--green-light), var(--green)); }
.pick-item .pi-meta { flex: 1; }
.pick-item .pi-meta .nm { font-size: 14px; font-weight: 600; }
.pick-item .pi-meta .pr { color: var(--danger); font-size: 13px; }
.pick-item .radio { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); display: flex; align-items: center; justify-content: center; }
.pick-item.sel .radio { border-color: var(--green); background: var(--green); color: #fff; }

/* 我的 */
.mine-head { background: linear-gradient(135deg, var(--green), var(--green-light)); color: #fff; padding: 30px 18px 22px; }
.mine-head .avatar { width: 54px; height: 54px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 28px; }
.mine-head .nick { font-size: 17px; font-weight: 700; margin-top: 10px; }
.mine-card { background: var(--card); border-radius: 14px; margin: 12px; padding: 6px 0; }
.mine-card .row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.mine-card .row:last-child { border-bottom: none; }
.mine-card .row .ico { font-size: 20px; width: 26px; text-align: center; }
.mine-card .row .rt { flex: 1; font-size: 15px; }
.mine-card .row .arrow { color: var(--muted); }
.mine-card .row .val { color: var(--muted); font-size: 13px; }

/* 成功页 */
.success-page { text-align: center; padding: 70px 24px; }
.success-page .ok { font-size: 60px; }
.success-page h2 { margin: 16px 0 8px; }
.success-page .order-no { background: #fff; border-radius: 10px; padding: 12px; margin: 16px 0; font-size: 15px; letter-spacing: 1px; }
.success-page .tip { color: var(--muted); font-size: 13px; margin-bottom: 24px; }

/* 工具条 */
.bar-tools { display: flex; gap: 10px; }
.bar-tools .btn { flex: 1; }

/* 底部导航 */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  height: calc(var(--tabbar-h) + var(--safe-b)); padding-bottom: var(--safe-b);
  background: #fff; border-top: 1px solid var(--line);
  display: flex; align-items: stretch;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); position: relative; }
.tab .tab-ico { font-size: 22px; line-height: 1; }
.tab .tab-txt { font-size: 11px; }
.tab.active { color: var(--green); }
.tab-badge { position: absolute; top: 6px; right: 50%; margin-right: -22px; background: var(--danger); color: #fff; font-size: 10px; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; text-align: center; padding: 0 4px; }

/* toast */
.toast {
  position: fixed; left: 50%; top: 42%; transform: translate(-50%, -50%);
  background: rgba(0,0,0,.8); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 999; max-width: 80%; text-align: center;
}

/* 备案号悬浮(底部, 不被 tabbar 遮挡) */
.site-footer {
  text-align: center;
  padding: 16px 12px calc(16px + var(--safe-b));
  font-size: 12px;
  color: var(--muted);
  background: var(--bg);
}
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:active { opacity: .7; }
/* 有底部 tabbar 的页面, 给备案号上方留空间 */
.tabbar ~ #app .site-footer,
.site-footer { margin-bottom: 0; }
#app:has(.site-footer) { padding-bottom: 8px; }
