:root {
  --bg-canvas: #F4F7F4;
  --bg-surface: #FFFFFF;
  --brand-primary: #0B6B49;
  --brand-secondary: #159A6B;
  --brand-light: #E6F4EE;
  --brand-subtle: #F0F8F4;
  --accent-price: #D9381E;
  --accent-amber: #C98219;
  --wechat-green: #07C160;
  --text-primary: #12241B;
  --text-secondary: #4E6358;
  --text-muted: #82968C;
  --border-subtle: #E1EAE4;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-xs: 0 2px 6px rgba(18, 36, 27, 0.05);
  --shadow-sm: 0 4px 14px rgba(18, 36, 27, 0.08);
  --shadow-phone: 0 24px 60px rgba(11, 45, 31, 0.18), 0 0 0 10px #1C2822, 0 0 0 12px #36493F;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: #E8EFEA;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  outline: none;
}

button { cursor: pointer; }

.price-num {
  font-weight: 800;
  color: var(--accent-price);
  font-variant-numeric: tabular-nums;
}
.price-num::before {
  content: '¥';
  font-size: 0.78em;
  margin-right: 1px;
}

.price-original {
  color: var(--text-muted);
  text-decoration: line-through;
  font-size: 11.5px;
}

.client-stage {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
  gap: 32px;
}

.mp-device-shell {
  width: 414px;
  height: 844px;
  background: var(--bg-canvas);
  border-radius: 42px;
  box-shadow: var(--shadow-phone);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.mp-companion {
  max-width: 520px;
  width: 100%;
}

.companion-card {
  background: #FFFFFF;
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border-subtle);
}

.demo-action-btn {
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--bg-canvas);
  border: 1px solid var(--border-subtle);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.demo-action-btn:hover {
  border-color: var(--brand-primary);
  background: var(--brand-subtle);
}

@media (max-width: 860px) {
  .mp-companion { display: none; }
  .client-stage { padding: 0; }
  .mp-device-shell {
    width: 100vw;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }
}

.wx-status-bar {
  height: 38px;
  padding: 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--brand-primary);
  color: #FFFFFF;
}

.wx-nav-bar {
  height: 44px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--brand-primary);
  color: #FFFFFF;
}

.wx-nav-title {
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.wx-logo-dot {
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--brand-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
}

.wx-capsule {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 99px;
  height: 28px;
  padding: 0 10px;
  gap: 8px;
}
.wx-capsule button { color: #FFFFFF; font-size: 12px; }
.wx-capsule-divider { width: 1px; height: 13px; background: rgba(255, 255, 255, 0.3); }

.h5-scroll-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: 76px;
}
.h5-scroll-body::-webkit-scrollbar { width: 0; }

.home-hero-header {
  background: linear-gradient(180deg, var(--brand-primary) 0%, #0F7E57 70%, var(--bg-canvas) 100%);
  padding: 8px 14px 14px;
}

.search-bar-box {
  background: #FFFFFF;
  border-radius: 99px;
  height: 38px;
  display: flex;
  align-items: center;
  padding: 0 6px 0 12px;
  margin-bottom: 10px;
  box-shadow: var(--shadow-xs);
}
.search-bar-box input { flex: 1; font-size: 13px; padding: 0 8px; }
.search-bar-btn {
  background: var(--brand-primary);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  height: 28px;
  padding: 0 12px;
  border-radius: 99px;
}

.hero-carousel {
  position: relative;
  height: 168px;
  border-radius: 16px;
  overflow: hidden;
  background: #102A1E;
}
.hero-carousel img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.82);
}
.hero-carousel-caption {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.78) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 14px;
  color: #FFFFFF;
}

.kingkong-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 10px 14px;
}
.kingkong-item {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 8px 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--border-subtle);
}
.kingkong-item img {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  object-fit: cover;
}

.section-card {
  margin: 0 14px 12px;
  background: #FFFFFF;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 14px 14px;
}
.product-card {
  background: #FFFFFF;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  cursor: pointer;
}
.product-card img {
  width: 100%;
  aspect-ratio: 1 / 0.9;
  object-fit: cover;
}
.product-body {
  padding: 9px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.product-title {
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 3px;
}
.product-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.tag-mini {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 600;
}
.tag-mini.green { background: var(--brand-light); color: var(--brand-primary); }
.tag-mini.amber { background: #FEF3C7; color: #B45309; }

.add-cart-circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--brand-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}

.category-layout {
  display: flex;
  min-height: calc(100% - 48px);
  background: #FFFFFF;
}
.cat-sidebar {
  width: 90px;
  background: var(--bg-canvas);
  flex-shrink: 0;
}
.cat-lvl2-item {
  padding: 13px 6px;
  font-size: 12px;
  text-align: center;
  color: var(--text-secondary);
  cursor: pointer;
}
.cat-lvl2-item.active {
  background: #FFFFFF;
  color: var(--brand-primary);
  font-weight: 700;
  border-left: 3px solid var(--brand-primary);
}

.cart-bottom-bar {
  position: absolute;
  bottom: 58px;
  left: 0;
  right: 0;
  height: 52px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid var(--border-subtle);
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 25;
}

.h5-tabbar {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 58px;
  background: #FFFFFF;
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  z-index: 30;
}
.tabbar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  position: relative;
}
.tabbar-item.active { color: var(--brand-primary); }
.tabbar-badge {
  position: absolute;
  top: 4px;
  right: 24%;
  background: var(--accent-price);
  color: #FFFFFF;
  font-size: 10px;
  font-weight: 700;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  display: none;
  align-items: center;
  justify-content: center;
}

.floating-cs-btn {
  position: absolute;
  right: 12px;
  bottom: 122px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #FFFFFF;
  color: var(--brand-primary);
  box-shadow: 0 4px 14px rgba(11, 107, 73, 0.25);
  border: 1.5px solid var(--brand-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  z-index: 28;
}

.h5-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 24, 18, 0.55);
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms;
}
.h5-modal-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}
.h5-sheet {
  background: #FFFFFF;
  border-radius: 20px 20px 0 0;
  max-height: 86%;
  display: flex;
  flex-direction: column;
}
.sheet-header {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  font-size: 15px;
}
.sheet-body {
  padding: 15px;
  overflow-y: auto;
  flex: 1;
}

.btn-primary {
  background: var(--brand-primary);
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: 99px;
  font-weight: 600;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.btn-outline {
  border: 1px solid var(--border-subtle);
  background: #FFFFFF;
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 99px;
  font-weight: 500;
  font-size: 12px;
}
.form-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: #FFFFFF;
}

.toast-container {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.toast-msg {
  background: rgba(16, 36, 27, 0.94);
  color: #FFFFFF;
  padding: 9px 16px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 600;
}

