/* 电商线（mall.html）组件样式：参考 shopany-app-uni 设计语言 */
:root {
  --price-red: #fc1b35;
}

/* ===== 搜索框（红底白胶囊） ===== */
.search-hero {
  flex: none;
  background: linear-gradient(180deg, var(--brand) 0%, var(--brand) 62%, var(--bg) 62%);
  padding: 50px 14px 10px;
}
.search-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 30px;
  height: 36px;
  padding: 0 14px;
  color: var(--text-3);
  font-size: 13px;
}
.banner-slot {
  margin: 10px 0 0;
  height: 128px;
  border-radius: var(--radius);
  background: linear-gradient(120deg, #ffe1e5, #ffd4a8);
  display: grid;
  place-items: center;
  color: #b26a5c;
  font-size: 13px;
}

/* ===== 金刚区宫格 ===== */
.kingkong {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 6px;
  padding: 14px 6px;
}
.kk-item { display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer; }
.kk-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 20px;
  background: #f4f5f9;
}

/* ===== 公告栏 ===== */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 12px;
  color: var(--text-2);
}
.notice-bar .tag { flex: none; }

/* ===== 分区标题 ===== */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px 0; }
.sec-head b { font-size: 16px; }
.sec-head span { font-size: 12px; color: var(--text-3); }

/* ===== 商品卡（两列宫格） ===== */
.goods-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.goods-card { background: #fff; border-radius: 12px; overflow: hidden; cursor: pointer; }
.goods-pic {
  height: 118px;
  background: linear-gradient(135deg, #f2f3f7, #e8eaf1);
  display: grid; place-items: center;
  color: #c0c4cc; font-size: 11px;
  position: relative;
}
.goods-card .info { padding: 10px 10px 12px; }
.goods-card .name { font-size: 13px; line-height: 1.5; height: 38px; overflow: hidden; }
.price { color: var(--price-red); font-weight: 700; display: flex; align-items: baseline; margin-top: 5px; }
.price .yen { font-size: 12px; }
.price .int { font-size: 19px; }
.price .dec { font-size: 12px; }
.price .old { color: var(--text-3); font-weight: 400; font-size: 11px; text-decoration: line-through; margin-left: 6px; }
.sold-out {
  position: absolute; inset: 0;
  background: rgba(255, 255, 255, .78);
  display: grid; place-items: center;
  color: var(--text-2); font-size: 13px; font-weight: 600;
}

/* ===== 我的页组件 ===== */
.me-card { background: #fff; border-radius: 0 0 18px 18px; padding: 54px 16px 16px; }
.me-row { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ffd4a8, #ff9f9f);
  display: grid; place-items: center;
  font-size: 26px;
  flex: none;
}
.assets { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; margin-top: 16px; }
.assets .a-item { cursor: pointer; }
.assets .a-num { font-size: 18px; font-weight: 700; }
.assets .a-txt { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.order-strip { display: grid; grid-template-columns: repeat(5, 1fr); text-align: center; }
.order-strip .o-item { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; cursor: pointer; font-size: 11px; color: var(--text-2); }
.order-strip .o-icon { font-size: 21px; }
.order-strip .mark {
  position: absolute;
  top: -6px; left: calc(50% + 6px);
  min-width: 15px; height: 15px;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 10px;
  line-height: 15px;
  padding: 0 4px;
}
.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px 6px; }
.tool-item { display: flex; flex-direction: column; align-items: center; gap: 6px; font-size: 11px; color: var(--text-2); cursor: pointer; }

/* ===== 购物车 ===== */
.cart-shop { background: #fff; border-radius: var(--radius); padding: 4px 12px; }
.cart-prod { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cart-prod:last-child { border-bottom: none; }
.checkbox {
  flex: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 1.5px solid #c8cad0;
  display: grid; place-items: center;
  color: #fff; font-size: 11px;
  cursor: pointer;
}
.checkbox.on { background: var(--brand); border-color: var(--brand); }
.cart-pic { flex: none; width: 68px; height: 68px; border-radius: 10px; background: linear-gradient(135deg, #f2f3f7, #e8eaf1); display: grid; place-items: center; font-size: 10px; color: #c0c4cc; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.stepper button { width: 24px; height: 24px; border: none; background: #f7f8fa; color: var(--text-2); font-size: 14px; cursor: pointer; }
.stepper span { min-width: 28px; text-align: center; font-size: 13px; }
.settle-bar {
  flex: none;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}
.btn-settle {
  margin-left: auto;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 20px;
  height: 38px;
  padding: 0 22px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.total-price { color: var(--price-red); font-weight: 700; display: flex; align-items: baseline; }
.total-price .yen { font-size: 12px; }
.total-price .int { font-size: 20px; }
.total-price .dec { font-size: 12px; }

/* ===== 确认订单价格行 ===== */
.price-row { display: flex; justify-content: space-between; align-items: center; padding: 10px 0; font-size: 13px; }
.price-row .lab { color: var(--text-2); }
.price-row .arr { color: var(--text-3); font-size: 12px; }
.switch {
  flex: none;
  width: 40px; height: 22px;
  border-radius: 11px;
  background: #e5e6eb;
  position: relative;
  cursor: pointer;
  transition: background .2s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 2px; left: 2px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: left .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch.on { background: var(--brand); }
.switch.on::after { left: 20px; }
.deduct-on { color: var(--price-red); font-weight: 600; }

/* ===== 支付 ===== */
.pay-amount { text-align: center; padding: 30px 0 10px; }
.pay-method { background: #fff; border-radius: var(--radius); overflow: hidden; }
.pay-item { display: flex; align-items: center; gap: 12px; padding: 16px; border-bottom: 1px solid var(--line); cursor: pointer; }
.pay-item:last-child { border-bottom: none; }
.pay-item .p-ico { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; color: #fff; flex: none; }
.pay-item .p-radio { margin-left: auto; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid #c8cad0; display: grid; place-items: center; }
.pay-item.on .p-radio { border-color: var(--brand); }
.pay-item.on .p-radio::after { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); }

/* ===== 券卡（领券中心） ===== */
.coupon-card { display: flex; background: #fff; border-radius: 12px; overflow: hidden; }
.coupon-left {
  flex: none;
  width: 108px;
  background: linear-gradient(135deg, #ff5e62, var(--brand));
  color: #fff;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  position: relative;
}
.coupon-left::after {
  content: "";
  position: absolute;
  right: -6px; top: 50%;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  transform: translateY(-50%);
}
.coupon-right { flex: 1; padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.btn-take {
  margin-left: auto;
  flex: none;
  align-self: center;
  background: var(--brand);
  color: #fff;
  border: none;
  border-radius: 16px;
  height: 30px;
  padding: 0 16px;
  font-size: 12px;
  cursor: pointer;
}
.btn-take.done { background: #f2f3f5; color: var(--text-3); }

/* ===== 积分商城头部 ===== */
.integral-hero {
  flex: none;
  background: linear-gradient(135deg, var(--brand), #ff5e62);
  color: #fff;
  padding: 54px 20px 22px;
}
.integral-hero .num { font-size: 40px; font-weight: 700; }
.integral-hero .lab { font-size: 12px; opacity: .85; }

/* ===== 会员中心 ===== */
.member-hero {
  flex: none;
  margin: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, #3a3d46, #191b20);
  color: #f2d5a0;
  padding: 22px 18px;
}
.member-priv { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 6px; text-align: center; }

/* ===== 消息中心 ===== */
.seg-tabs { flex: none; display: flex; background: #fff; padding: 0 8px; border-bottom: 1px solid var(--line); }
.seg-tabs button {
  flex: 1;
  background: none;
  border: none;
  padding: 12px 0;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-family: inherit;
}
.seg-tabs button.on { color: var(--brand); font-weight: 600; border-bottom-color: var(--brand); }
.msg-item { background: #fff; border-radius: 12px; padding: 14px; cursor: pointer; }
.msg-item.unread .m-tit::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--brand);
  margin-left: 6px;
  vertical-align: 2px;
}
.msg-time { text-align: center; font-size: 11px; color: var(--text-3); margin: 2px 0; }

/* ===== 地址卡 ===== */
.addr-card { background: #fff; border-radius: var(--radius); padding: 16px; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.default-flag { font-size: 10px; color: var(--brand); border: 1px solid var(--brand); border-radius: 4px; padding: 0 4px; margin-right: 6px; }
.addr-edit { flex: none; color: var(--text-3); font-size: 16px; }

/* ===== 详情底栏 ===== */
.detail-bar {
  flex: none;
  background: #fff;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0px));
}
.detail-bar .round { display: flex; flex-direction: column; align-items: center; font-size: 10px; color: var(--text-2); cursor: pointer; }
.detail-bar .round span { font-size: 19px; }
.btn-half { flex: 1; height: 40px; border: none; border-radius: 20px 0 0 20px; background: #ffa53c; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-half + .btn-half { border-radius: 0 20px 20px 0; background: var(--brand); margin-left: -6px; }

/* Toast */
.toast {
  position: absolute;
  left: 50%; bottom: 120px;
  transform: translateX(-50%);
  background: rgba(29, 33, 41, .88);
  color: #fff;
  font-size: 13px;
  padding: 10px 18px;
  border-radius: 20px;
  z-index: 50;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  white-space: nowrap;
}
.toast.show { opacity: 1; }
