/* =========================================================
   待下单（订单管理内）/ 商品多选 —— 独立样式（在 style.css 之后加载）
   ========================================================= */

/* 详情页顶部待下单快捷入口 */
.cart-shortcut { position: relative; }
.cart-shortcut__badge {
  position: absolute;
  top: -1px;
  right: -1px;
  min-width: 15px;
  height: 15px;
  padding: 0 4px;
  border-radius: 8px;
  background: var(--gold);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  box-shadow: 0 0 0 2px var(--bg);
}

/* ============ 商品卡片多选 ============ */
.pcard--select { cursor: pointer; }
.pcard--select:active { transform: scale(0.993); }
.pcard--select.is-selected {
  border-color: rgba(194, 153, 79, 0.7);
  background: #fffdf8;
  box-shadow: 0 6px 20px rgba(194, 153, 79, 0.16);
}
.pcard__check {
  position: absolute;
  left: 16px;
  top: 16px;
  z-index: 2;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.96);
  border: 1.5px solid #cbd2de;
  color: transparent;
  box-shadow: 0 2px 8px rgba(22, 32, 52, 0.16);
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pcard__check svg { width: 12px; height: 12px; }
.pcard.is-selected .pcard__check {
  background: linear-gradient(140deg, #d9b775, #b98f45);
  border-color: transparent;
  color: #fff;
}
.pcard__check.is-disabled { opacity: 0.45; }
.pcard--select .seller-line-row { pointer-events: none; }
.pcard--select .seller-line { margin-top: 3px; }

.result-bar__side { display: flex; align-items: center; gap: 10px; }
.result-bar__select {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 0;
  font-size: 10.5px;
  font-weight: 600;
  color: #a37a2c;
}
.result-bar__select svg { color: var(--gold); }
.result-bar__select.is-on { color: var(--brand); }
.result-bar__select.is-on svg { color: var(--brand-3); }

/* ============ 列表底部多选操作条 ============ */
.page--selecting { min-height: 100%; display: flex; flex-direction: column; }
.page--selecting .cart-select-bar { margin-top: auto; }
.cart-select-bar {
  position: sticky;
  bottom: 0;
  z-index: 26;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(22, 32, 52, 0.06);
}
.cart-select-bar__all {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-2);
}
.cart-select-bar__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
  font-size: 10px;
  color: var(--muted);
}
.cart-select-bar__info b {
  font-size: 17px;
  color: var(--red);
  font-family: "DIN Alternate", "Helvetica Neue", var(--font);
}
.cart-select-bar__info small { font-size: 9px; color: var(--muted); }
.cart-select-bar .btn { flex: none; height: 42px; padding: 0 16px; font-size: 13px; }

/* ============ 勾选圆点 ============ */
.cart-check-btn {
  flex: none;
  display: grid;
  place-items: center;
  align-self: center;
  padding: 4px;
}
.cart-check {
  width: 21px;
  height: 21px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1.5px solid #ccd3de;
  color: transparent;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cart-check svg { width: 12px; height: 12px; }
.cart-check.is-on {
  background: linear-gradient(140deg, #d9b775, #b98f45);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 3px 8px rgba(185, 143, 69, 0.3);
}
.cart-check.is-disabled { opacity: 0.4; }
.cart-check-btn[disabled] { pointer-events: none; }

/* ============ 订单页内的待下单面板 ============ */
.page--cart { min-height: 100%; display: flex; flex-direction: column; }
.cart-main { flex: 1; padding-bottom: 84px; }

.cart-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 0 18px 12px;
  padding: 9px 11px;
  border-radius: 11px;
  background: var(--gold-soft);
  border: 1px solid rgba(194, 153, 79, 0.2);
  color: #8a6a2f;
  font-size: 10px;
  line-height: 1.65;
}
.cart-hint svg { flex: none; margin-top: 1px; color: var(--gold); }

.cart-group {
  margin: 0 18px 12px;
  background: #fff;
  border: 1px solid rgba(233, 236, 241, 0.95);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(22, 32, 52, 0.05);
}
.cart-group.is-invalid { opacity: 0.9; }
.cart-group__head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  background: #fbfcfd;
  border-bottom: 1px solid var(--line-2);
}
.cart-group__avatar {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  flex: none;
  object-fit: cover;
}
.cart-group__avatar--empty {
  display: grid;
  place-items: center;
  background: #eef1f6;
  color: var(--muted);
}
.cart-group__seller { flex: 1; min-width: 0; }
.cart-group__name {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  font-weight: 650;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-group__name .tag { flex: none; height: 16px; padding: 0 5px; font-size: 8.5px; }
.cart-group__meta {
  font-size: 9.5px;
  color: var(--muted);
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-group__amount { flex: none; text-align: right; line-height: 1.2; }
.cart-group__amount small { display: block; font-size: 9px; color: var(--muted); }
.cart-group__amount b {
  font-size: 14px;
  color: var(--red);
  font-family: "DIN Alternate", "Helvetica Neue", var(--font);
}
.cart-group__items { padding: 0 12px; }

.cart-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-2);
}
.cart-item:last-child { border-bottom: 0; }
.cart-item.is-invalid { opacity: 0.65; }
.cart-item__img {
  width: 64px;
  height: 64px;
  flex: none;
  border-radius: 9px;
  object-fit: cover;
  background: #f0f1f4;
}
.cart-item__main { flex: 1; min-width: 0; }
.cart-item__name {
  padding-right: 18px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.cart-item__meta { font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.cart-item__warn {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--warn-soft);
  color: #a9701f;
  font-size: 9px;
  line-height: 1.5;
}
.cart-item.is-invalid .cart-item__warn { background: #f2f4f7; color: #8b94a4; }
.cart-item__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 7px;
}
.cart-item__price {
  font-size: 14px;
  font-weight: 750;
  color: var(--red);
  font-family: "DIN Alternate", "Helvetica Neue", var(--font);
}
.cart-item.is-invalid .cart-item__price { color: var(--muted); }
.cart-item__del {
  position: absolute;
  right: 2px;
  top: 4px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: #b5bcc8;
}
.cart-item__del:active { background: #f3f5f8; color: var(--red); }

.stepper--xs { border-radius: 8px; }
.stepper--xs button { width: 27px; height: 27px; }
.stepper--xs .stepper__qty {
  min-width: 30px;
  height: 27px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 650;
  background: #fff;
}

/* 底部结算条 */
.cart-bar {
  position: sticky;
  bottom: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 14px;
  background: #fff;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -8px 24px rgba(22, 32, 52, 0.06);
}
.cart-bar__all {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--ink-2);
}
.cart-bar__total { flex: 1; min-width: 0; text-align: right; line-height: 1.2; }
.cart-bar__total b {
  display: block;
  font-size: 18px;
  color: var(--red);
  font-family: "DIN Alternate", "Helvetica Neue", var(--font);
}
.cart-bar__total small { display: block; margin-top: 1px; font-size: 9px; color: var(--muted); }
.cart-bar .btn { flex: none; width: 112px; height: 42px; padding: 0 10px; font-size: 13px; }

/* ============ 统一下单 / 加入待下单结果面板 ============ */
.checkout-groups {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 12px 0 2px;
}
.checkout-group {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.checkout-group__head {
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 8px 10px;
  background: #fafbfc;
  border-bottom: 1px solid var(--line-2);
  font-size: 11px;
}
.checkout-group__head b {
  flex: 1;
  min-width: 0;
  font-size: 11.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkout-group__head small { flex: none; font-size: 9px; color: var(--muted); }
.checkout-group__head span {
  flex: none;
  margin-left: auto;
  font-size: 12px;
  font-weight: 700;
  color: var(--red);
  font-family: "DIN Alternate", var(--font);
}
.checkout-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 10px;
  border-top: 1px solid var(--line-2);
  font-size: 10px;
  color: var(--muted);
}
.checkout-line:first-of-type { border-top: 0; }
.checkout-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.checkout-line small { flex: none; color: var(--ink-2); font-size: 10px; }

.cart-added-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 12px 0 2px;
}
.cart-added-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fafbfc;
  border: 1px solid var(--line-2);
  font-size: 11px;
}
.cart-added-row b {
  flex: 1;
  min-width: 0;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cart-added-row small { flex: none; color: var(--muted); font-size: 9.5px; }
.cart-added-row span { flex: none; color: var(--red); font-weight: 700; font-size: 11.5px; }
