/* ==========================================================================
   牛总鱼甘油 H5 商城 —— 全局样式
   移动端优先；桌面端以 420px 手机框居中显示
   ========================================================================== */

:root {
  --primary: #07c160;
  --primary-dark: #06ad56;
  --primary-light: #e8f8ef;
  --danger: #ee0a24;
  --warn: #ff976a;
  --text: #323233;
  --text-2: #646566;
  --text-3: #969799;
  --line: #ebedf0;
  --bg: #f7f8fa;
  --white: #fff;
  --radius: 10px;
  --radius-sm: 6px;
  --header-h: 46px;
  --tabbar-h: 52px;
  --shadow: 0 1px 6px rgba(100, 101, 102, 0.08);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

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

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  font-size: inherit;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* ---------------- 应用外框 ---------------- */
#app {
  position: relative;
  display: flex;
  flex-direction: column;
  max-width: 420px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  overflow: hidden;
}

@media (min-width: 480px) {
  #app {
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.08);
  }
}

/* ---------------- 顶部标题栏 ---------------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 4px;
  height: var(--header-h);
  padding: 0 4px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.app-header.is-hidden {
  display: none;
}

.app-back {
  flex: none;
  width: 34px;
  height: 34px;
  font-size: 24px;
  line-height: 30px;
  color: var(--text);
  border-radius: 50%;
}

.app-back:active {
  background: var(--bg);
}

.app-back.is-hidden {
  visibility: hidden;
}

.app-title {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-actions {
  flex: none;
  min-width: 34px;
  padding-right: 6px;
  font-size: 13px;
  color: var(--text-2);
  text-align: right;
}

/* ---------------- 主体 ---------------- */
.app-main {
  flex: 1;
  padding-bottom: 12px;
}

.app-main.has-tabbar {
  padding-bottom: calc(var(--tabbar-h) + 12px);
}

.app-main.no-padding {
  padding: 0;
}

/* ---------------- 底部 tabbar ---------------- */
.app-tabbar {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 200;
  display: none;
  width: 100%;
  max-width: 420px;
  height: var(--tabbar-h);
  transform: translateX(-50%);
  background: var(--white);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}

.app-tabbar.is-show {
  display: flex;
}

.tab-item {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: var(--text-3);
}

.tab-item.is-active {
  color: var(--primary);
}

.tab-icon {
  font-size: 19px;
  line-height: 20px;
}

.tab-badge {
  position: absolute;
  top: 4px;
  left: 50%;
  margin-left: 4px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 16px;
  color: #fff;
  text-align: center;
  background: var(--danger);
  border-radius: 8px;
}

/* ---------------- 通用卡片 / 单元格 ---------------- */
.card {
  margin: 10px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}

.card-flat {
  margin: 10px;
  background: var(--white);
  border-radius: var(--radius);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 12px 8px;
  font-size: 15px;
  font-weight: 600;
}

.section-title .more {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

.cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.cell:last-child {
  border-bottom: none;
}

.cell-label {
  flex: 1;
  min-width: 0;
}

.cell-value {
  flex: none;
  max-width: 60%;
  font-size: 13px;
  color: var(--text-3);
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-arrow::after {
  content: '›';
  font-size: 18px;
  color: var(--text-3);
}

.cell-icon {
  flex: none;
  width: 22px;
  font-size: 17px;
  text-align: center;
}

.cell-sub {
  font-size: 12px;
  color: var(--text-3);
}

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 40px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--white);
  background: var(--primary);
  border-radius: 20px;
}

.btn:active {
  opacity: 0.85;
}

.btn-block {
  display: flex;
  width: 100%;
}

.btn-plain {
  color: var(--text);
  background: var(--white);
  border: 1px solid var(--line);
}

.btn-primary-plain {
  color: var(--primary);
  background: var(--white);
  border: 1px solid var(--primary);
}

.btn-danger {
  background: var(--danger);
}

.btn-sm {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 14px;
}

.btn-lg {
  height: 46px;
  font-size: 16px;
}

.btn[disabled],
.btn.is-disabled {
  color: #fff;
  background: #c8c9cc;
  pointer-events: none;
}

/* ---------------- 商品网格与卡片 ---------------- */
.goods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  padding: 8px 10px 0;
}

.goods-card {
  background: var(--white);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.goods-card-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--bg);
}

.goods-card-body {
  padding: 6px 8px 10px;
}

.goods-card-name {
  font-size: 13px;
  line-height: 1.35;
  height: 36px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.goods-card-price {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 6px;
}

.price {
  color: var(--danger);
  font-size: 16px;
  font-weight: 600;
}

.price-symbol {
  font-size: 11px;
}

.price-old {
  font-size: 11px;
  color: var(--text-3);
  text-decoration: line-through;
}

/* 横向商品条 */
.goods-row {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.goods-row:last-child {
  border-bottom: none;
}

.goods-row-img {
  flex: none;
  width: 88px;
  height: 88px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.goods-row-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.goods-row-name {
  font-size: 14px;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

/* ---------------- 标签 ---------------- */
.tag {
  display: inline-block;
  padding: 1px 6px;
  font-size: 11px;
  line-height: 16px;
  color: var(--primary);
  background: var(--primary-light);
  border-radius: 3px;
}

.tag-danger {
  color: var(--danger);
  background: #ffece8;
}

.tag-warn {
  color: var(--warn);
  background: #fff2e8;
}

.tag-plain {
  color: var(--text-2);
  background: var(--bg);
}

.badge {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  line-height: 16px;
  color: #fff;
  text-align: center;
  background: var(--danger);
  border-radius: 8px;
}

/* ---------------- 搜索栏 ---------------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--white);
}

.search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 12px;
  background: var(--bg);
  border-radius: 17px;
}

.search-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 13px;
}

/* ---------------- 表单 ---------------- */
.form-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 50px;
  padding: 10px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.form-item:last-child {
  border-bottom: none;
}

.form-label {
  flex: none;
  width: 74px;
  font-size: 14px;
  color: var(--text);
}

.form-item input,
.form-item textarea {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
}

.form-item textarea {
  resize: none;
  padding: 4px 0;
}

.form-item .form-value {
  flex: 1;
  min-width: 0;
  font-size: 14px;
}

.form-item .form-value.is-placeholder {
  color: var(--text-3);
}

.form-tip {
  padding: 8px 12px;
  font-size: 12px;
  color: var(--text-3);
}

.switch {
  position: relative;
  flex: none;
  width: 44px;
  height: 24px;
  background: #dcdee0;
  border-radius: 12px;
  transition: background 0.2s;
}

.switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.switch.is-on {
  background: var(--primary);
}

.switch.is-on::after {
  transform: translateX(20px);
}

/* ---------------- 弹层 ---------------- */
.popup-mask {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  animation: fade-in 0.18s ease;
}

.popup-mask.is-center {
  align-items: center;
}

.popup {
  width: 100%;
  max-width: 420px;
  max-height: 82vh;
  background: var(--white);
  border-radius: 14px 14px 0 0;
  overflow: auto;
  animation: slide-up 0.22s ease;
}

.popup.is-center {
  width: 84%;
  border-radius: 12px;
}

.popup-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  font-size: 15px;
  font-weight: 600;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.popup-body {
  padding: 4px 0 8px;
}

.popup-footer {
  position: sticky;
  bottom: 0;
  padding: 10px 14px;
  background: var(--white);
  border-top: 1px solid var(--line);
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes slide-up {
  from {
    transform: translateY(16%);
  }
}

/* ---------------- Toast / Loading ---------------- */
.toast {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 1200;
  max-width: 74%;
  padding: 10px 16px;
  font-size: 13px;
  color: #fff;
  text-align: center;
  background: rgba(0, 0, 0, 0.78);
  border-radius: 8px;
  transform: translate(-50%, -50%);
}

.loading-mask {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.35);
}

/* 作者样式的 display 会覆盖浏览器对 [hidden] 的默认隐藏，必须显式兜底 */
.loading-mask[hidden] {
  display: none;
}

.loading-spinner {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(7, 193, 96, 0.25);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------------- 空状态 ---------------- */
.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
}

.empty-icon {
  font-size: 42px;
  opacity: 0.4;
}

.empty-text {
  margin-top: 10px;
  font-size: 13px;
}

.load-more {
  padding: 14px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

/* ---------------- 底部操作条 ---------------- */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 300;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 420px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  background: var(--white);
  border-top: 1px solid var(--line);
}

.app-main.has-bottom-bar {
  padding-bottom: 76px;
}

/* ---------------- 分类页布局 ---------------- */
.catalog {
  display: flex;
  height: calc(100vh - var(--header-h) - var(--tabbar-h));
}

.catalog-side {
  flex: none;
  width: 92px;
  overflow-y: auto;
  background: var(--bg);
}

.catalog-side-item {
  padding: 14px 6px;
  font-size: 13px;
  text-align: center;
  color: var(--text-2);
}

.catalog-side-item.is-active {
  position: relative;
  color: var(--primary);
  font-weight: 600;
  background: var(--white);
}

.catalog-side-item.is-active::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 16px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
}

.catalog-main {
  flex: 1;
  overflow-y: auto;
  background: var(--white);
}

.sub-cat-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
}

.sub-cat-item {
  padding: 6px 12px;
  font-size: 12px;
  color: var(--text-2);
  background: var(--bg);
  border-radius: 14px;
}

.sub-cat-item.is-active {
  color: #fff;
  background: var(--primary);
}

/* ---------------- 商品详情 ---------------- */
.gallery-swiper {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: var(--white);
  overflow: hidden;
}

.gallery-track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.gallery-track::-webkit-scrollbar {
  display: none;
}

.gallery-track img {
  flex: none;
  width: 100%;
  height: 100%;
  object-fit: contain;
  scroll-snap-align: center;
}

.gallery-dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  display: flex;
  gap: 5px;
  width: 100%;
  justify-content: center;
}

.gallery-dot {
  width: 6px;
  height: 6px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 50%;
}

.gallery-dot.is-active {
  background: var(--primary);
}

.detail-price-bar {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding: 12px;
  background: var(--white);
}

.detail-price-bar .price {
  font-size: 22px;
}

.detail-name {
  padding: 0 12px 12px;
  font-size: 16px;
  font-weight: 600;
  background: var(--white);
}

.detail-brief {
  padding: 0 12px 12px;
  font-size: 12px;
  color: var(--text-3);
  background: var(--white);
}

.spec-value {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--text-2);
}

.spec-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 12px 12px;
}

.spec-option {
  padding: 6px 14px;
  font-size: 13px;
  background: var(--bg);
  border: 1px solid transparent;
  border-radius: 4px;
}

.spec-option.is-active {
  color: var(--primary);
  background: var(--primary-light);
  border-color: var(--primary);
}

.spec-option.is-disabled {
  color: var(--text-3);
  text-decoration: line-through;
  opacity: 0.6;
}

.detail-section {
  margin-top: 8px;
  background: var(--white);
}

.detail-section-title {
  padding: 12px;
  font-size: 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}

.issue-item {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
}

.issue-item:last-child {
  border-bottom: none;
}

.issue-q {
  font-size: 13px;
  font-weight: 500;
}

.issue-a {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-2);
  white-space: pre-wrap;
}

/* ---------------- 购物车 ---------------- */
.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.checkbox {
  flex: none;
  width: 20px;
  height: 20px;
  border: 1px solid #c8c9cc;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: transparent;
}

.checkbox.is-checked {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
}

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.stepper button {
  width: 26px;
  height: 26px;
  font-size: 15px;
  color: var(--text-2);
  background: var(--bg);
}

.stepper button[disabled] {
  color: #c8c9cc;
}

.stepper span {
  min-width: 34px;
  font-size: 13px;
  text-align: center;
}

/* ---------------- 订单 ---------------- */
.order-card {
  margin: 10px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}

.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
}

.order-status {
  color: var(--primary);
  font-weight: 600;
}

.order-status.is-muted {
  color: var(--text-3);
}

.order-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.order-total {
  display: flex;
  justify-content: flex-end;
  padding: 10px 12px 0;
  font-size: 13px;
  color: var(--text-2);
}

.order-total .price {
  font-size: 16px;
}

/* ---------------- 优惠券 ---------------- */
.coupon-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px;
  padding: 14px 12px;
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
}

.coupon-left {
  flex: none;
  width: 92px;
  text-align: center;
  color: var(--danger);
  border-right: 1px dashed var(--line);
}

.coupon-amount {
  font-size: 24px;
  font-weight: 700;
}

.coupon-right {
  flex: 1;
  min-width: 0;
}

.coupon-name {
  font-size: 14px;
  font-weight: 600;
}

.coupon-desc {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
}

/* ---------------- 用户中心 ---------------- */
.user-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--primary), #29d17d);
}

.user-avatar {
  width: 58px;
  height: 58px;
  border: 2px solid rgba(255, 255, 255, 0.6);
  border-radius: 50%;
  object-fit: cover;
  background: #fff;
}

.user-name {
  font-size: 17px;
  font-weight: 600;
}

.user-sub {
  margin-top: 3px;
  font-size: 12px;
  opacity: 0.9;
}

.order-nav {
  display: flex;
  padding: 12px 0;
  background: var(--white);
}

.order-nav-item {
  position: relative;
  flex: 1;
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
}

.order-nav-icon {
  font-size: 20px;
}

.order-nav-badge {
  position: absolute;
  top: -4px;
  left: 50%;
  margin-left: 6px;
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px 0;
  padding: 8px 0 14px;
  background: var(--white);
}

.menu-grid-item {
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
}

.menu-grid-icon {
  font-size: 21px;
}

/* ---------------- 步骤条 ---------------- */
.steps {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  background: var(--white);
}

.step {
  flex: 1;
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
}

.step-dot {
  width: 18px;
  height: 18px;
  margin: 0 auto 6px;
  font-size: 11px;
  line-height: 18px;
  color: #fff;
  background: #dcdee0;
  border-radius: 50%;
}

.step.is-active .step-dot {
  background: var(--primary);
}

.step.is-active {
  color: var(--primary);
}

/* ---------------- 瀑布/频道 ---------------- */
.channel-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  padding: 12px 10px 4px;
  background: var(--white);
}

.channel-item {
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
}

.channel-img {
  width: 44px;
  height: 44px;
  margin: 0 auto 4px;
  object-fit: cover;
  border-radius: 50%;
  background: var(--bg);
}

.brand-scroll {
  display: flex;
  gap: 10px;
  padding: 4px 12px 14px;
  overflow-x: auto;
  background: var(--white);
}

.brand-item {
  flex: none;
  width: 76px;
  text-align: center;
  font-size: 12px;
}

.brand-item img {
  width: 76px;
  height: 56px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--bg);
}

/* ---------------- 钱包 ---------------- */
.wallet-card {
  margin: 12px;
  padding: 20px;
  color: #fff;
  background: linear-gradient(135deg, #2b3a55, #4c6690);
  border-radius: 14px;
}

.wallet-label {
  font-size: 12px;
  opacity: 0.8;
}

.wallet-amount {
  margin-top: 6px;
  font-size: 30px;
  font-weight: 700;
}

/* ---------------- 提示条 ---------------- */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--warn);
  background: #fff8e8;
}

/* 图片占位 */
.img-ph {
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Ctext x='50%25' y='54%25' font-size='18' fill='%23c8c9cc' text-anchor='middle'%3E%F0%9F%93%B7%3C/text%3E%3C/svg%3E")
    center / 34px no-repeat;
}

.text-center {
  text-align: center;
}

.mt-8 {
  margin-top: 8px;
}

.mt-12 {
  margin-top: 12px;
}

.px-12 {
  padding-left: 12px;
  padding-right: 12px;
}

.text-muted {
  color: var(--text-3);
  font-size: 12px;
}

/* ---------------- 会员分销 · 加好友 ---------------- */
.dist-hero {
  padding: 22px 16px;
  color: #fff;
  background: linear-gradient(135deg, #2b3a55, #4c6690);
}

.dist-hero-label {
  font-size: 12px;
  opacity: 0.8;
}

.dist-hero-code {
  margin-top: 6px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 2px;
}

.dist-hero-sub {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.85;
}

.dist-stats {
  display: flex;
  padding: 14px 0;
  background: var(--white);
}

.dist-stat {
  flex: 1;
  text-align: center;
}

.dist-stat + .dist-stat {
  border-left: 1px solid var(--line);
}

.dist-stat-num {
  font-size: 19px;
  font-weight: 600;
  color: var(--primary);
}

.dist-stat-label {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

.dist-tabs {
  display: flex;
  gap: 8px;
  padding: 10px 12px 0;
}

.dist-tab {
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-2);
  background: var(--white);
  border-radius: 14px;
}

.dist-tab.is-active {
  color: #fff;
  background: var(--primary);
}

.dist-user-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.dist-user-avatar {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg);
}

.dist-user-body {
  flex: 1;
  min-width: 0;
}

.dist-user-name {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dist-user-sub {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-3);
}

.dist-user-time {
  flex: none;
  font-size: 11px;
  color: var(--text-3);
}

/* 分享给好友弹层 */
.share-tip {
  padding: 2px 0 12px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
}

.share-tip b {
  color: var(--primary);
}

.share-box {
  margin-bottom: 10px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
}

.share-box-label {
  font-size: 12px;
  color: var(--text-3);
}

.share-box-value {
  margin-top: 4px;
  font-size: 15px;
  font-weight: 600;
  word-break: break-all;
}

.share-box-link {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
}

/* ---------------- 邀请落地页 ---------------- */
.invite-hero {
  padding: 30px 16px 26px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, var(--primary), #29d17d);
}

.invite-avatar {
  width: 64px;
  height: 64px;
  margin: 0 auto 10px;
  font-size: 30px;
  line-height: 64px;
  background: rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  overflow: hidden;
}

.invite-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.invite-name {
  font-size: 18px;
  font-weight: 600;
}

.invite-sub {
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.9;
}
