:root {
  --brand: #0dbdcd;
  --brand-dark: #0a9aa8;
  --brand-soft: #e7f8fa;
  --accent: #ff5a36;
  --text: #1f2329;
  --text-2: #646a73;
  --text-3: #8f959e;
  --line: #eef0f3;
  --bg: #f5f6f8;
  --card: #ffffff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 2px 10px rgba(20, 30, 45, 0.05);
  --shadow-lg: 0 8px 28px rgba(20, 30, 45, 0.1);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body {
  overscroll-behavior-y: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  /*
   * 必须显式关掉系统外观。
   * iOS Safari / 微信内置浏览器下 <button> 会被 appearance:button 接管渲染，
   * CSS 里的 background-color / border-color 会被忽略 ——
   * 表现就是规格按钮点选后「高亮不变」（桌面 Chrome 看不出来）。
   */
  -webkit-appearance: none;
  appearance: none;
  border: none;
  background: none;
  color: inherit;
}

input,
textarea,
select {
  font-family: inherit;
  font-size: 14px;
  -webkit-appearance: none;
  appearance: none;
}

img {
  display: block;
  max-width: 100%;
}

::-webkit-scrollbar {
  width: 0;
  height: 0;
}

/* ------------------------------- 布局 ------------------------------- */

#app {
  min-height: 100vh;
  padding-bottom: calc(64px + var(--safe-bottom));
}

#app.no-tabbar {
  padding-bottom: var(--safe-bottom);
}

.page {
  animation: fadein 0.22s ease;
}

@keyframes fadein {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.container {
  padding: 12px;
}

/* ------------------------------ 顶部栏 ------------------------------ */

.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.navbar.gradient {
  background: linear-gradient(135deg, var(--brand), #189ee0);
  border-bottom: none;
  color: #fff;
}

.navbar .nav-title {
  flex: 1;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.navbar .nav-btn {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  border-radius: 50%;
  color: inherit;
}

.navbar .nav-btn:active {
  background: rgba(0, 0, 0, 0.06);
}

.navbar.gradient .nav-btn:active {
  background: rgba(255, 255, 255, 0.18);
}

/* ------------------------------ 搜索 ------------------------------ */

.searchbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #fff;
}

.search-input {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  background: #f2f3f5;
  border-radius: 18px;
  color: var(--text-3);
}

.search-input input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  color: var(--text);
}

/* ------------------------------ 通用卡片 ------------------------------ */

.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.section {
  margin: 12px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 10px;
  font-size: 15px;
  font-weight: 600;
}

.section-title .more {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-3);
}

.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px;
  padding: 10px 12px;
  background: #fff8e6;
  border: 1px solid #ffe7ac;
  border-radius: var(--radius-sm);
  font-size: 12.5px;
  color: #95661a;
}

.notice-bar .ico {
  flex-shrink: 0;
}

/* ------------------------------ 商品卡片 ------------------------------ */

.product-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 0 12px 12px;
}

.product-card {
  background: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform 0.15s;
}

.product-card:active {
  transform: scale(0.975);
}

.product-card .thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  background: #f7f8fa;
  overflow: hidden;
}

.product-card .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-card .badge {
  position: absolute;
  left: 0;
  top: 8px;
  padding: 2px 8px;
  font-size: 11px;
  color: #fff;
  background: var(--accent);
  border-radius: 0 8px 8px 0;
}

.product-card .info {
  padding: 8px 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.product-card .name {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 36px;
}

.product-card .sub {
  font-size: 11px;
  color: var(--text-3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.price {
  color: var(--accent);
  font-weight: 700;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.price .unit {
  font-size: 11px;
  font-weight: 400;
}

.price-old {
  font-size: 11.5px;
  color: var(--text-3);
  text-decoration: line-through;
}

.price-tag {
  font-size: 10.5px;
  color: var(--accent);
  border: 1px solid currentColor;
  border-radius: 4px;
  padding: 0 3px;
  line-height: 14px;
}

/* ------------------------------ 列表式商品 ------------------------------ */

.list-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child {
  border-bottom: none;
}

.list-item .thumb {
  width: 76px;
  height: 76px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #f7f8fa;
  flex-shrink: 0;
}

.list-item .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.list-item .body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.list-item .name {
  font-size: 14px;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ------------------------------ 按钮 ------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 18px;
  border-radius: 22px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  transition: opacity 0.15s;
}

.btn:active {
  opacity: 0.85;
}

.btn.block {
  width: 100%;
}

.btn.ghost {
  background: #fff;
  color: var(--brand);
  border: 1px solid var(--brand);
}

.btn.grey {
  background: #f2f3f5;
  color: var(--text-2);
}

.btn.small {
  height: 32px;
  padding: 0 14px;
  font-size: 13px;
  border-radius: 16px;
}

.btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

.btn-danger {
  background: #fff;
  color: #e5484d;
  border: 1px solid #f5c6c7;
}

/* ------------------------------ 表单 ------------------------------ */

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  font-size: 13px;
  color: var(--text-2);
}

.field label .req {
  color: var(--accent);
  margin-left: 2px;
}

.input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
}

.input:focus {
  border-color: var(--brand);
}

textarea.input {
  height: auto;
  min-height: 76px;
  padding: 12px 14px;
  resize: vertical;
}

/* ------------------------------ 数量步进 ------------------------------ */

.stepper {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.stepper button {
  width: 32px;
  height: 30px;
  font-size: 16px;
  color: var(--text-2);
  background: #fafbfc;
}

.stepper button:active {
  background: #eef0f3;
}

.stepper input {
  width: 48px;
  height: 30px;
  border: none;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  text-align: center;
  outline: none;
}

/* ------------------------------ 底部导航 ------------------------------ */

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  height: calc(56px + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(12px);
  border-top: 1px solid var(--line);
}

.tabbar .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 10.5px;
  color: var(--text-3);
  position: relative;
}

.tabbar .tab .icon {
  font-size: 20px;
  line-height: 1;
}

.tabbar .tab.active {
  color: var(--brand);
}

.tabbar .tab .dot {
  position: absolute;
  top: 6px;
  right: 50%;
  margin-right: -20px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  line-height: 16px;
  text-align: center;
}

/* ------------------------------ 底部操作条 ------------------------------ */

.actionbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px calc(8px + var(--safe-bottom));
  background: #fff;
  border-top: 1px solid var(--line);
}

/*
 * 页面带底部导航时，操作条必须抬到 tabbar 之上。
 * 两者都是 bottom:0，而 tabbar 的 z-index 更高（60 > 55），
 * 不抬高的话操作条最下面那颗按钮会被 tabbar 盖住 —— 看得见却点不到。
 */
#app:not(.no-tabbar) .actionbar {
  bottom: calc(56px + var(--safe-bottom));
  padding-bottom: 8px;
}

/* ------------------------------ 详情页 ------------------------------ */

.detail-gallery {
  position: relative;
  width: 100%;
  background: #fff;
}

.detail-gallery .slides {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.detail-gallery .slides img {
  flex: 0 0 100%;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  scroll-snap-align: start;
  background: #fff;
}

.detail-gallery .idx {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 2px 10px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.45);
  color: #fff;
  font-size: 11px;
}

.price-block {
  padding: 14px 12px;
  background: linear-gradient(135deg, #fff3ef, #fff);
}

.price-block .big {
  font-size: 26px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}

.detail-title {
  padding: 12px;
  background: #fff;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.45;
}

.meta-table {
  background: #fff;
  padding: 12px;
}

.meta-row {
  display: flex;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
}

.meta-row .k {
  width: 62px;
  color: var(--text-3);
  flex-shrink: 0;
}

.meta-row .v {
  flex: 1;
  color: var(--text);
  word-break: break-all;
}

.detail-html {
  padding: 12px;
  background: #fff;
  font-size: 13.5px;
  line-height: 1.7;
  color: #3a3f47;
  word-break: break-word;
}

.detail-html img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 8px 0;
}

/*
 * 商品介绍几乎都是「一整串连排的图片」（<p><img/><img/>…</p>，904 张图里 902 张这么排）。
 * 图与图之间不该露出白缝 —— 所以段内图片的上下外边距和圆角都要收掉：
 * 只收外边距的话接缝两侧的圆角还会各缺一个口，看上去仍是一条白线。
 */
.detail-html p img {
  margin: 0;
  border-radius: 0;
}

/* 只有一张图的段落，照旧留白 + 圆角 */
.detail-html p img:only-child {
  margin: 8px 0;
  border-radius: 8px;
}

.detail-html table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.detail-html td,
.detail-html th {
  border: 1px solid var(--line);
  padding: 6px;
}

/* ------------------------------ 规格选择 ------------------------------ */

.spec-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.spec-chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid #dfe3e8;
  background: #fafbfc;
  color: #3a3f47;
  font-size: 13.5px;
  line-height: 1.2;
  transition: all 0.15s;
}

.spec-chip:active {
  transform: scale(0.97);
}

.spec-chip.on {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

.spec-chip.on::before {
  content: '✓';
  margin-right: 4px;
  font-size: 12px;
}

/* ---------------- 多维度规格选择器（商品详情页） ---------------- */

.sku-panel {
  background: #fff;
  padding: 4px 14px 14px;
  margin-bottom: 8px;
}

.sku-dim {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid #f2f4f7;
}

.sku-dim:last-of-type {
  border-bottom: none;
}

.sku-dim-name {
  flex: 0 0 62px;
  padding-top: 8px;
  font-size: 13px;
  color: #8f959e;
  line-height: 1.2;
}

.sku-vals {
  flex: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.sku-val {
  -webkit-appearance: none;
  appearance: none;
  padding: 7px 14px;
  border-radius: 8px;
  border: 1px solid #dfe3e8;
  background: #fff;
  color: #3a3f47;
  font-size: 13.5px;
  line-height: 1.3;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  position: relative;
}

.sku-val:active {
  transform: scale(0.97);
}

/* 当前组合下没有这个取值 —— 仍然可点，点击会自动跳到最近的规格 */
.sku-val.dis {
  color: #c3c7cc;
  background: #f7f8fa;
  border-style: dashed;
}

/*
 * 选中样式必须放在 .dis 之后：
 * 这两个选择器特异性相同，后写的赢。否则「已选中、但当前组合下不完整」
 * 的那个按钮会被 .dis 的灰底虚线盖掉，看着就像没选中。
 */
.sku-val.on,
.sku-val.dis.on {
  border-color: var(--brand);
  border-style: solid;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}

.sku-picked {
  margin-top: 4px;
  padding: 10px 12px;
  background: #f7f9fc;
  border-radius: 8px;
  font-size: 13px;
  color: #646a73;
}

.sku-picked b {
  color: #1f2329;
}

.sku-picked .hint {
  font-size: 12px;
  color: #8f959e;
}

/* ---------------- 规格确认弹层（加入购物车 / 立即下单） ---------------- */

.sku-sheet {
  padding: 0;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.sku-sheet-hd {
  position: relative;
  display: flex;
  gap: 12px;
  padding: 20px 16px 14px;
  border-bottom: 1px solid #f2f4f7;
  background: #fff;
}

/* 缩略图往上“顶”出头部，京东/淘宝的经典观感 */
.sku-sheet-thumb {
  flex: 0 0 84px;
  width: 84px;
  height: 84px;
  margin-top: -34px;
  border-radius: 12px;
  overflow: hidden;
  background: #f7f8fa;
  border: 1px solid #eef0f3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.sku-sheet-info {
  flex: 1;
  min-width: 0;
  padding-right: 26px;
}

.sku-sheet-price {
  font-size: 21px;
  font-weight: 600;
  color: #ff5a36;
  line-height: 1.2;
}

.sku-sheet-price s {
  margin-left: 6px;
  font-size: 12.5px;
  font-weight: 400;
  color: #b0b4ba;
}

.sku-sheet-picked {
  margin-top: 8px;
  font-size: 13px;
  color: #646a73;
  line-height: 1.45;
}

.sku-sheet-picked b {
  color: #1f2329;
}

.sku-sheet-stock {
  margin-top: 4px;
  font-size: 12px;
  color: #8f959e;
}

.sku-sheet-stock.warn {
  color: #ff5a36;
}

.sku-sheet .sheet-x {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: #b0b4ba;
  font-size: 15px;
  font-family: inherit;
  cursor: pointer;
  line-height: 1;
}

.sku-sheet-bd {
  flex: 1;
  overflow-y: auto;
  padding: 0 16px;
  -webkit-overflow-scrolling: touch;
}

.sku-sheet-bd .sku-dim {
  padding: 14px 0;
}

.sku-sheet-bd .sku-dim:last-of-type {
  border-bottom: none;
}

.sku-sheet-qty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0 18px;
  border-top: 1px solid #f2f4f7;
}

.sku-sheet-qty .sku-dim-name {
  padding-top: 0;
}

.sku-sheet-ft {
  padding: 12px 16px calc(12px + var(--safe-bottom));
  border-top: 1px solid #f2f4f7;
  background: #fff;
}

.sku-sheet-ft .btn {
  height: 46px;
  font-size: 16px;
}

/* 规格没选全时按钮置灰（仍可点，点了会提示缺哪一维） */
.sku-sheet-ft .btn.is-off {
  background: #e5e6eb;
  border-color: #e5e6eb;
  color: #a9aeb8;
  box-shadow: none;
}

/* 详情页里取消选中时的空状态 */
.sku-val.off {
  border-style: dashed;
}

/* 商品卡片上的规格数角标 */
.spec-count-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  padding: 1px 8px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 11px;
}

/* ------------------------------ 活动 ------------------------------ */

.activity-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
}

.activity-card .cover {
  width: 84px;
  height: 84px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: linear-gradient(135deg, var(--brand-soft), #eaf4ff);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: var(--brand);
}

.activity-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.activity-card .body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.activity-card .t {
  font-size: 14.5px;
  font-weight: 600;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.activity-card .d {
  font-size: 12px;
  color: var(--text-3);
}

.pill {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 10px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
}

.pill.new {
  background: #fff0ec;
  color: var(--accent);
}

/* ------------------------------ 购物车 ------------------------------ */

.cart-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  align-items: center;
}

.checkbox {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid #d0d3d9;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}

.checkbox.on {
  background: var(--brand);
  border-color: var(--brand);
}

.cart-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: 1;
  font-size: 13px;
  color: var(--text-2);
}

/* ------------------------------ 订单 ------------------------------ */

/* -------------------- 我的订单（仿天猫 / 京东手机端） -------------------- */

/* 状态分签：吸在导航栏（50px）下面，只有订单列表滚动 */
.ord-tabs {
  position: sticky;
  top: 50px;
  z-index: 40;
  display: flex;
  gap: 4px;
  padding: 8px 10px;
  overflow-x: auto;
  background: #fff;
  border-bottom: 1px solid var(--line);
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.ord-tabs::-webkit-scrollbar {
  display: none;
}

.ord-tab {
  flex: 0 0 auto;
  padding: 6px 13px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13.5px;
  font-family: inherit;
  cursor: pointer;
}

.ord-tab.on {
  color: var(--brand-dark);
  font-weight: 600;
  background: var(--brand-soft);
}

.ord-list {
  padding: 10px 12px 20px;
}

.ord-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  overflow: hidden;
}

.ord-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
}

.ord-shop {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 600;
}

.ord-status {
  flex: 0 0 auto;
  font-size: 12.5px;
}

.ord-goods-wrap {
  padding: 2px 12px 8px;
}

.ord-goods {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 0;
}

.ord-thumb {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f8fa;
}

.ord-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ord-info {
  flex: 1;
  min-width: 0;
}

.ord-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.4;
}

.ord-spec {
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--text-3);
}

.ord-side {
  flex: 0 0 auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.ord-price {
  font-size: 13.5px;
  font-weight: 500;
}

.ord-qty {
  margin-top: 3px;
  font-size: 11.5px;
  color: var(--text-3);
}

.ord-more {
  display: block;
  padding: 2px 0 4px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* 待收货时把快递单号铺在卡片上 */
.ord-express {
  margin: 6px 0 2px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: #f2f7ff;
  color: #2f6bd8;
  font-size: 12px;
}

.ord-sum {
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 4px;
  padding: 0 12px 10px;
  font-size: 13px;
  color: var(--text-2);
}

.ord-total {
  color: var(--accent);
  font-size: 16px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ord-ft {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
}

.ord-no {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  color: var(--text-3);
}

.ord-acts {
  flex: 0 0 auto;
  display: flex;
  gap: 8px;
}

.ord-btn {
  padding: 5px 14px;
  border: 1px solid #dfe3e8;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 12.5px;
  font-family: inherit;
  line-height: 1.4;
  cursor: pointer;
}

.ord-btn.primary {
  border-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 500;
}

.ord-btn:active {
  background: #f2f4f7;
}

.ord-btn:disabled {
  opacity: 0.5;
}

.ord-end {
  padding: 14px 0 6px;
  text-align: center;
  font-size: 12px;
  color: #c9ced6;
}

.status {
  font-size: 12px;
  font-weight: 500;
}

.status.pending {
  color: var(--accent);
}
.status.confirmed {
  color: #ff9500;
}
.status.paid {
  color: #12a150;
}
.status.ordered {
  color: #3b82f6;
}
.status.shipped {
  color: #7c3aed;
}
.status.done {
  color: var(--text-3);
}
.status.cancelled {
  color: var(--text-3);
}
/* 逆向流程：驳回（单子关掉了）/ 召回（货在往回走）/ 退款（钱退回去了） */
.status.rejected {
  color: var(--text-3);
}
.status.recalled {
  color: #ff9500;
}
.status.refunded {
  color: #e5484d;
}

/* ------------------------------ 空状态 / 加载 ------------------------------ */

.empty {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-3);
}

.empty .icon {
  font-size: 42px;
  opacity: 0.35;
  margin-bottom: 10px;
}

.loading {
  padding: 30px;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.spinner {
  width: 20px;
  height: 20px;
  margin: 0 auto 8px;
  border: 2px solid var(--line);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  background: linear-gradient(90deg, #f2f3f5 25%, #e9ebee 37%, #f2f3f5 63%);
  background-size: 400% 100%;
  animation: shimmer 1.3s ease infinite;
  border-radius: 8px;
}

@keyframes shimmer {
  0% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0 50%;
  }
}

/* ------------------------------ 提示 ------------------------------ */

.toast {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 9999;
  max-width: 78%;
  padding: 11px 18px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-size: 13.5px;
  text-align: center;
  animation: toastin 0.18s ease;
  pointer-events: none;
}

@keyframes toastin {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.94);
  }
}

.sheet-mask {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: flex-end;
  animation: fadein 0.18s ease;
}

.sheet {
  width: 100%;
  max-height: 82vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 18px 18px 0 0;
  padding: 16px 16px calc(16px + var(--safe-bottom));
  animation: sheetup 0.24s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sheetup {
  from {
    transform: translateY(100%);
  }
}

.sheet h3 {
  margin: 0 0 14px;
  font-size: 16px;
  text-align: center;
}

/* ------------------------------ 登录页 ------------------------------ */

.login-page {
  min-height: 100vh;
  background: linear-gradient(160deg, #0dbdcd 0%, #16a8d6 45%, #f5f6f8 45.1%, #f5f6f8 100%);
  padding: 0 24px;
}

.login-brand {
  padding: 60px 0 34px;
  color: #fff;
  text-align: center;
}

.login-brand .logo {
  width: 62px;
  height: 62px;
  margin: 0 auto 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}

.login-brand h1 {
  margin: 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: 1px;
}

.login-brand p {
  margin: 8px 0 0;
  font-size: 12.5px;
  opacity: 0.85;
}

.login-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  padding: 22px 18px 20px;
}

.login-card .field:last-of-type {
  margin-bottom: 20px;
}

.login-foot {
  margin-top: 18px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.8;
}

/* ------------------------------ 个人中心 ------------------------------ */

.profile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px 16px 26px;
  background: linear-gradient(135deg, var(--brand), #189ee0);
  color: #fff;
}

.profile-head .avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  flex-shrink: 0;
}

.profile-head .name {
  font-size: 17px;
  font-weight: 600;
}

.profile-head .sub {
  font-size: 12px;
  opacity: 0.85;
  margin-top: 3px;
}

.profile-stats {
  display: flex;
  margin: -16px 12px 0;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.profile-stats .item {
  flex: 1;
  padding: 14px 0;
  text-align: center;
}

.profile-stats .n {
  font-size: 18px;
  font-weight: 600;
  color: var(--brand-dark);
  font-variant-numeric: tabular-nums;
}

.profile-stats .l {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.cell-group {
  margin: 12px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.cell {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.cell:last-child {
  border-bottom: none;
}

.cell .ico {
  width: 20px;
  text-align: center;
  color: var(--brand);
}

.cell .label {
  flex: 1;
}

.cell .value {
  color: var(--text-3);
  font-size: 13px;
}

.cell .arrow {
  color: #c9ced6;
}
