/* 购物车结算页（viewcart）—— 全站统一的设计语言：
   4px 圆角、#e8ecf4 描边、主色 #0052d9，类名统一用 vc-* 前缀。 */

/* ---------------- 页面骨架 ---------------- */
.vc-page {
  /* 与选购页 .shop-page 一致：固定头部 63px + 20px 间距 */
  --shop-top: 83px;
  padding: var(--shop-top) 0 0;
  background: #f5f7fb;
  min-height: 100vh;
  box-sizing: border-box;
}
/* 顶部返回条：贴视口左侧（同参考站 .nav-top-page） */
.vc-region { padding: 0 16px; margin-bottom: 16px; }
/* 主体容器：居中定宽（1440 视口下内容宽 1312） */
.vc-container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}
.vc-body {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 0 0 130px;
}
/* 顶部返回条与标题之间留出参考站的间距 */
.vc-cart-body > .vc-head:first-child { margin-top: 0; }
.vc-cart-body { flex: 1 1 0%; width: 100%; }

/* ---------------- 标题 ---------------- */
.vc-head { margin-bottom: 20px; }
.vc-title {
  font-size: 16px;
  font-weight: 700;
  color: #212529;
  margin: 0;
  line-height: 1.5;
}
.vc-title::before {
  position: relative;
  top: -2px;
  display: inline-block;
  content: "";
  width: 4px;
  height: 22px;
  background: var(--primary);
  vertical-align: middle;
  margin: 0 10px 0 0;
}

/* ---------------- 提示条 ---------------- */
.vc-alert {
  position: relative;
  margin-bottom: 12px;
  padding: 10px 20px 12px 52px;
  background: rgba(255, 165, 52, .1);
  border: 1px solid rgba(255, 165, 52, .3);
  color: #ff8c00;
  font-size: 14px;
  line-height: 20px;
}
.vc-alert p { margin: 0; font-size: 14px; color: inherit; }
.vc-alert::before {
  content: "";
  position: absolute;
  left: 20px;
  top: 12px;
  width: 20px;
  height: 20px;
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center;
  background-image: url("img/alert-warning.svg");
}
.vc-alert--error {
  background: rgba(255, 52, 52, .1);
  border-color: rgba(255, 52, 52, .3);
  color: #b22222;
}
.vc-alert--error::before { background-image: url("img/alert-error.svg"); }
.vc-alert--ok {
  background: rgba(52, 195, 143, .1);
  border-color: rgba(52, 195, 143, .3);
  color: #1a7f4b;
}
.vc-alert--ok::before { background-image: url("img/alert-success.svg"); }
/* ---------------- 商品清单 ---------------- */
.vc-items {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.vc-items-c {
  padding: 20px;
  background: #fff;
  border-radius: 4px;
}
/* 空购物车：照参考站 .no-data
   padding:126px 0 0; height:330px; text-align:center; 14px; #8187a1;
   背景插图 background-size:220px 62px; background-position:50% 50px; no-repeat */
.vc-no-data {
  padding: 126px 0 0;
  height: 330px;
  box-sizing: border-box;
  text-align: center;
  font-size: 14px;
  line-height: 12px;
  color: #8187a1;
  background-image: url("img/nodata.png");
  background-size: 220px 62px;
  background-position: 50% 50px;
  background-repeat: no-repeat;
}
.vc-no-data a { color: var(--primary); text-decoration: none; }
.vc-no-data a:hover { color: var(--primary); text-decoration: none; }

.vc-item-header {
  display: flex;
  justify-content: space-between;
  padding-bottom: 10px;
}
.vc-item-name {
  font-size: 16px;
  font-weight: 700;
  color: #000;
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.vc-item-name strong { font-weight: 700; }
.vc-item-toggle { display: block; line-height: 0; position: relative; }
.vc-item-toggle img {
  display: block;
  width: 18px;
  height: 18px;
  transition: transform .5s ease-out;
}
.vc-items-c.is-collapsed .vc-item-toggle img { transform: rotate(180deg); }
.vc-item-toggle { cursor: pointer; }

/* hover 提示气泡：照参考站 body.inherit .tooltip-inner + bs-tooltip-top
   实测：inner padding 8px 15px / 14px / lh 21px / #000 on #fff / radius 4px /
   box-shadow 0 4px 8px rgba(0,0,0,.1)；气泡底边距图标顶 5px，箭头 5px 白色三角 */
.vc-item-toggle,
.vc-item-actions {
  display: flex;
  align-items: center;
  align-self: center;
  flex: 0 0 auto;
}
.vc-item-actions a {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #007bff;
  margin-left: 15px;
  text-decoration: none;
  line-height: 0;
}
.vc-item-actions a:hover { color: #0056b3; }
.vc-item-actions img { display: block; width: 22px; height: 22px; }
.vc-item-toggle::after,
.vc-item-actions a::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 5px);
  transform: translateX(-50%);
  padding: 8px 15px;
  background: #fff;
  color: #000;
  font-size: 14px;
  line-height: 21px;
  font-weight: 400;
  white-space: nowrap;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s linear, visibility .15s linear;
  pointer-events: none;
  z-index: 30;
}
.vc-item-toggle::before,
.vc-item-actions a::before {
  content: "";
  position: absolute;
  left: 50%;
  /* 三角（10x10，白色朝下）顶点落在图标顶边：
     padding box bottom = 图标顶 - 5px，即 bottom: 13px（= 100% - 5px） */
  bottom: calc(100% - 5px);
  margin-left: -5px;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-top-color: #fff;
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s linear, visibility .15s linear;
  pointer-events: none;
  z-index: 31;
}
.vc-item-toggle:hover::after,
.vc-item-toggle:hover::before,
.vc-item-actions a:hover::after,
.vc-item-actions a:hover::before { opacity: 1; visibility: visible; }

/* 支付方式卡片 hover 提示：气泡显示在卡片下方（复用上面同一套气泡数值）。
   只吸 title（各网关自己的名字），用 ::after 会顶掉原状角标，所以气泡挂在 .addfunds 上。 */
.vc-payment-gateway-list .addfunds { position: relative; }
.vc-payment-gateway-list .addfunds::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  top: calc(100% + 5px);
  transform: translateX(-50%);
  padding: 8px 15px;
  /* 支付方式气泡：纯半透明白（50%），不做毛玻璃 */
  background: rgba(255, 255, 255, .9);
  color: #000;
  font-size: 14px;
  font-weight: 400;
  line-height: 21px;
  white-space: nowrap;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, .1);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s linear, visibility .15s linear;
  pointer-events: none;
  z-index: 30;
}
.vc-payment-gateway-list .addfunds::before {
  content: "";
  position: absolute;
  left: 50%;
  top: calc(100% - 5px);
  margin-left: -5px;
  width: 0;
  height: 0;
  border: 5px solid transparent;
  border-bottom-color: rgba(255, 255, 255, .9);
  opacity: 0;
  visibility: hidden;
  transition: opacity .15s linear, visibility .15s linear;
  pointer-events: none;
  z-index: 31;
}
.vc-payment-gateway-list .addfunds:hover::after,
.vc-payment-gateway-list .addfunds:hover::before { opacity: 1; visibility: visible; }

.vc-item-details {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(178px, 1fr));
  gap: 20px;
  padding: 12px 0;
  transition: all .18s ease-out;
  overflow: hidden;
  max-height: 200px;
}
/* 收起：配置区高度收为 0（照参考站 max-height 过渡） */
.vc-items-c.is-collapsed .vc-item-details {
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
}
.vc-items-c.is-collapsed .vc-item-price-info { padding-top: 0; }
.vc-item-detail-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
}
.vc-detail-label {
  font-size: 14px;
  font-weight: 400;
  color: rgba(0, 0, 0, .4);
  white-space: nowrap;
}
.vc-detail-value {
  font-size: 14px;
  color: rgba(0, 0, 0, .9);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vc-item-price-info {
  padding: 10px 0 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
}
.vc-qty {
  display: flex;
  align-items: center;
  gap: 10px;
}
.vc-qty > span { font-size: 14px; color: #495057; }
/* 数量步进：原样复用产品配置页的 .mdcfg-toolbar 分段控件
   （config.css 里那套：#f2f3f8 底、外侧 4px 圆角、hover 变蓝底白字） */
.vc-qty__toolbar {
  display: flex;
  align-items: center;
  margin: 0;
  flex: 0 0 auto;
}
.vc-qty .mdcfg-toolbar__btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f2f3f8;
  color: #999;
  border: 0;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  user-select: none;
  transition: background-color .3s, color .3s;
}
.vc-qty .mdcfg-toolbar__dec { border-radius: 4px 0 0 4px; }
.vc-qty .mdcfg-toolbar__inc { border-radius: 0 4px 4px 0; }
.vc-qty .mdcfg-toolbar__btn:hover { background: var(--primary); color: #fff; }
.vc-qty .mdcfg-range-val {
  width: 60px;
  height: 32px;
  padding: 0;
  background: #f2f3f8;
  border: 0;
  border-radius: 0;
  font-size: 14px;
  text-align: center;
  color: #000;
  transition: box-shadow .3s, background-color .3s;
  -moz-appearance: textfield;
}
.vc-qty .mdcfg-range-val::-webkit-outer-spin-button,
.vc-qty .mdcfg-range-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.vc-qty .mdcfg-range-val:hover,
.vc-qty .mdcfg-range-val:focus {
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--primary);
  outline: none;
}
.vc-qty__update {
  font-size: 12px;
  color: #fff;
  background: var(--primary);
  padding: 6px 15px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  height: 32px;
  line-height: 18px;
  vertical-align: middle;
  cursor: pointer;
}
.vc-qty__update:hover { background: #0f45d6; border-color: #0f45d6; }

/* 价格区：小计 / 客户折扣价 / 原价 三组横排 */
.vc-price-content {
  display: flex;
  align-items: center;
  gap: 20px;
}
.vc-price-row {
  display: flex;
  justify-content: flex-start;
  align-items: center;
}
.vc-discount-label,
.vc-price-label { font-size: 14px; color: rgba(0, 0, 0, .9); }
.vc-discount-value { font-size: 14px; color: #ff0000; }
.vc-price-value { font-size: 14px; color: rgba(0, 0, 0, .9); }
.vc-price-row__icon {
  display: block;
  width: 22px;
  height: 22px;
  margin-right: 4px;
}
.vc-subtotal-label {
  font-size: 14px;
  color: rgba(0, 0, 0, .9);
}
.vc-subtotal-value {
  color: rgba(0, 0, 0, .9);
  font-size: 16px;
  font-weight: 700;
  display: flex;
}

/* ---------------- 结算详情 ---------------- */
.vc-pay-body { width: 100%; }
/* 第二步的标题和卡片分开（标题不放进白卡） */
.vc-pay-body > .vc-head { margin-bottom: 20px; }
.vc-pay-content {
  background-color: #fff;
  padding: 32px 20px;
}
.pay-body-content {
  background-color: #fff;
  padding: 32px 20px;
  border-radius: 4px;
}
.vc-remarks-header { margin-bottom: 24px; }
.vc-remarks-title { color: #212529; margin-bottom: 8px; font-size: 14px; }
/* 客户备注输入框：直接复用底栏优惠码输入框那套样式 */
.vc-input {
  width: 100%;
  height: 36px;
  padding: 0 10px;
  font-size: 13px;
  color: #1f2b3d;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 4px;
  line-height: 34px;
  outline: none;
  box-sizing: border-box;
  transition: border-color .28s ease, box-shadow .28s ease;
}
/* 聚焦效果同优惠码输入框：边框慢慢变蓝 + 淡蓝发光 */
.vc-input:focus {
  outline: none;
  border-color: #0052d9;
  box-shadow:
    0 0 0 2px rgba(0, 82, 217, .04),
    0 4px 12px rgba(0, 82, 217, .06);
}

.vc-payment-method {
  margin-top: 24px;
  margin-bottom: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  /* 「支付方式」标题和下面的支付方式列表之间的空隙调小 */
  gap: 12px;
}
.vc-payment-method__title { color: #212529; font-size: 14px; margin: 0; }
.vc-payment-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.vc-credit-icon {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background-color: #f2f3f8;
  border: 1px solid #f2f3f8;
  border-radius: 4px;
  width: calc(50% - 16px);
  cursor: pointer;
  font-size: 14px;
  color: #1f2b3d;
}
.vc-credit-icon input { position: relative; white-space: nowrap; margin: 0 0 0 6px; }
.vc-credit-icon span { margin-left: 6px; }
.vc-credit-icon.is-on,
.vc-credit-icon:hover { border: 1px solid var(--primary); }

.vc-payment-gateway-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 32px;
}
.vc-payment-gateway-list .addfunds { display: flex; }
.vc-payment-gateway-list .addfunds .addfunds-payment {
  overflow: hidden;
  cursor: pointer;
  transition: all .3s ease;
  padding: 20px;
  background-color: #f2f3f8;
  border: 1px solid #f2f3f8;
  border-radius: 4px;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #1f2b3d;
}
.vc-payment-gateway-list .addfunds .addfunds-payment:hover,
.vc-payment-gateway-list .addfunds .addfunds-payment.active {
  border: 1px solid var(--primary);
}
.vc-payment-gateway-list .addfunds .addfunds-payment.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  right: 0;
  background-image: url("img/select.svg");
  background-size: 26px;
  background-repeat: no-repeat;
  width: 26px;
  height: 26px;
}
.vc-payment-gateway-list .addfunds .addfunds-payment img { max-width: 100%; height: auto; }
.vc-payment-gateway-list .addfunds .addfunds-payment input {
  clip: rect(0, 0, 0, 0);
  pointer-events: none;
  position: absolute;
}

/* ---------------- 优惠 ---------------- */
.vc-discount { margin-top: 32px; }
.vc-discount p {
  font-size: 20px;
  font-weight: 600;
  color: #343a40;
  margin: 0 0 12px;
}
.vc-promo {
  display: flex;
  align-items: center;
  gap: 12px;
}
.vc-promo .vc-input {
  flex-grow: 1;
  border-radius: 4px;
  border: 1px solid #ced4da;
}
.vc-promo button,
.vc-promo a {
  padding: 6px 12px;
  background-color: var(--primary);
  border: none;
  color: #ffffff;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  line-height: 1.5;
  white-space: nowrap;
}
.vc-promo button:hover,
.vc-promo a:hover { background-color: #0f45d6; }

/* ---------------- 服务条款 ---------------- */
.vc-terms {
  display: flex;
  align-items: center;
  margin-top: 32px;
}
/* 自绘勾选框：蓝底白勾（不用浏览器原生样式） */
.vc-terms__checkbox {
  -webkit-appearance: none;
  appearance: none;
  flex: 0 0 auto;
  position: relative;
  width: 16px;
  height: 16px;
  margin: 0 8px 0 0;
  padding: 0;
  background: #fff;
  border: 1px solid #d4dae6;
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease;
}
.vc-terms__checkbox:hover { border-color: var(--primary); }
/* 选中态与产品配置页的多选勾一致：蓝底 + 白色 SVG 勾 */
.vc-terms__checkbox:checked {
  background-color: var(--primary);
  border-color: var(--primary);
  background-image: url("img/icons/check-white.svg");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
}
.vc-terms label { font-size: 14px; color: #343a40; cursor: pointer; }
.vc-terms label a { color: var(--primary); text-decoration: none; }
.vc-terms label a:hover { color: var(--primary); text-decoration: none; }

.vc-note {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.8;
  color: #8792a8;
}

/* ---------------- 底部固定结算栏 ---------------- */
.vc-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: #fff;
  box-shadow: 0 0 12px 0 rgba(24, 44, 108, .15);
  z-index: 9;
}
.vc-footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  /* 与主体容器同宽同左边缘 */
  padding: 20px 16px;
  box-sizing: border-box;
}
/* 底栏左侧：总计 + 优惠码 */
.vc-summary {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
}
.vc-total {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;
  gap: 20px;
}
.vc-total__value {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
}
/* 照参考站：总计文字 14px rgba(0,0,0,.9)，价格（含货币符号）一起 28px #ff000e，中间不留 gap */
.vc-total__label {
  display: flex;
  flex-direction: row;
  align-items: center;
  color: rgba(0, 0, 0, .9);
  font-size: 14px;
  line-height: 36px;
}
.vc-total__label .price-num {
  font-size: 28px;
  font-weight: 700;
  font-family: "Microsoft YaHei", "微软雅黑", sans-serif;
  color: #ff000e;
  line-height: 36px;
  -webkit-font-smoothing: initial;
}
.vc-total__save { font-size: 14px; color: #8792a8; }

/* 底栏里的优惠码（登录后）：输入框与按钮同高 36px */
.vc-promo--footer {
  display: flex;
  align-items: center;
  gap: 0;
}
.vc-promo--footer .vc-input {
  flex: 0 0 152px;
  width: 152px;
  height: 36px;
  line-height: 34px;
  padding: 0 10px;
  border-radius: 4px 0 0 4px;
  border: 1px solid #ced4da;
  border-right: 0;
  font-size: 13px;
  background: #fff;
  color: #1f2b3d;
}
/* 聚焦效果直接复用本站输入框那套：边框慢慢变蓝 + 淡蓝发光 */
.vc-promo--footer .vc-input:focus {
  outline: none;
  border-color: #0052d9;
  box-shadow:
    0 0 0 2px rgba(0, 82, 217, .04),
    0 4px 12px rgba(0, 82, 217, .06);
  transition: border-color .28s ease, box-shadow .28s ease;
}
.vc-promo--footer button,
.vc-promo--footer a {
  height: 36px;
  line-height: 22px;
  padding: 6px 15px;
  border-radius: 0 4px 4px 0;
  font-size: 12px;
}
/* 已应用优惠码：纯文字（描述 + 蓝色的「移除」），不再画输入框和按钮 */
.vc-promo.vc-promo--applied {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 36px;
  font-size: 13px;
  color: rgba(0, 0, 0, .65);
}
.vc-promo--applied .vc-promo__desc { white-space: nowrap; }
.vc-promo.vc-promo--applied a {
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--primary);
  font-size: 13px;
  font-weight: 400;
  line-height: 36px;
  white-space: nowrap;
  text-decoration: none;
}
.vc-promo.vc-promo--applied a:hover {
  background: none;
  color: #0f45d6;
  text-decoration: none;
}

.vc-checkout-btn {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.vc-checkout {
  display: flex;
  align-items: center;
  border: none;
  border-radius: 4px;
  color: #fff;
  cursor: pointer;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  background-color: var(--primary);
}
.vc-checkout:hover { background-color: #0f45d6; }
/* 第二步左边的「上一步」：浅灰底 + #999 文字 */
.vc-checkout--prev { background-color: #f0f0f0; color: #999; }
.vc-checkout--prev:hover { background-color: #e6e6e6; }
/* 第二步（结算详情）的提交按钮：绿色 + 完成图标 */
.vc-checkout--pay { background-color: #00b42a; }
.vc-checkout--pay:hover { background-color: #009a24; }
.vc-checkout--pay:disabled { background-color: #d3d3d3; }
.vc-checkout:disabled {
  background-color: #d3d3d3;
  cursor: not-allowed;
}
.vc-checkout__icon {
  display: block;
  width: 20px;
  height: 20px;
  margin-right: 3.5px;
}

/* ---------------- 确认弹窗 / 轻提示 ----------------
   样式照 layui-layer 那套：白底、细线分隔的头部/正文/底栏、右侧按钮组。
   出场：遮罩慢慢变深，弹窗从中间偏上淡入并下移到居中；
   出场动画把上面反过来放一遍。 */
.cart-confirm {
  position: fixed;
  inset: 0;
  z-index: 1100;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background-color .32s ease;
}
.cart-confirm.is-open { display: flex; }
.cart-confirm.is-on { background: rgba(0, 0, 0, .55); }
.cart-confirm__box {
  width: 480px;
  max-width: calc(100vw - 32px);
  background: #fff;
  border-radius: 4px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(0, 0, 0, .16);
  /* 入场前：中间偏上 24px、透明 */
  opacity: 0;
  transform: translateY(-24px);
  transition: opacity .3s ease-out, transform .3s ease-out;
}
.cart-confirm.is-on .cart-confirm__box {
  opacity: 1;
  transform: translateY(0);
}
/* 出场：反过来 */
.cart-confirm.is-closing .cart-confirm__box {
  opacity: 0;
  transform: translateY(-24px);
  transition: opacity .24s ease-in, transform .24s ease-in;
}
.cart-confirm__head {
  position: relative;
  height: 42px;
  line-height: 42px;
  padding: 0 18px;
  border-bottom: 1px solid #eee;
  background: #f8f8f8;
}
.cart-confirm__title { margin: 0; font-size: 14px; font-weight: 400; color: #333; }
.cart-confirm__close {
  position: absolute;
  top: 0;
  right: 0;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #999;
  font-size: 20px;
  line-height: 42px;
  text-align: center;
  cursor: pointer;
}
.cart-confirm__close:hover { color: #333; }
.cart-confirm__body {
  margin: 0;
  padding: 20px 18px 24px;
  font-size: 14px;
  color: #333;
  line-height: 1.7;
  word-break: break-word;
}
.cart-confirm__body::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 16px;
  margin-right: 8px;
  vertical-align: -3px;
  background: url("img/icons/dialog-warning.svg") center/cover no-repeat;
}
.cart-confirm__foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 18px 16px;
  border-top: 0;
}
.cart-confirm__btn {
  height: 32px;
  padding: 0 18px;
  border: 1px solid #d9d9d9;
  border-radius: 4px;
  background: #fff;
  color: #333;
  font-size: 14px;
  line-height: 30px;
  cursor: pointer;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease;
}
.cart-confirm__btn:hover { border-color: #1677ff; color: #1677ff; }
.cart-confirm__btn--primary { border-color: #1677ff; background: #1677ff; color: #fff; }
.cart-confirm__btn--primary:hover { border-color: #4096ff; background: #4096ff; color: #fff; }
/* 点确定后：弹窗不关，按钮文字左边出现转圈 */
.cart-confirm__btn--primary.is-loading { padding-left: 34px; position: relative; }
.cart-confirm__btn--primary.is-loading::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  box-sizing: border-box;
  border: 2px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  border-radius: 50%;
  animation: cart-spin .7s linear infinite;
}
.cart-confirm__btn:disabled { cursor: not-allowed; opacity: .85; }
.cart-confirm__btn:disabled:hover { border-color: #d9d9d9; color: #333; }
.cart-confirm__btn--primary:disabled:hover { border-color: #1677ff; background: #1677ff; color: #fff; }
@keyframes cart-spin { to { transform: rotate(360deg); } }

.cart-toast {
  position: fixed;
  left: 50%;
  top: 88px;
  z-index: 1200;
  transform: translate(-50%, -12px);
  padding: 10px 18px;
  background: #1f2b3d;
  color: #fff;
  border-radius: 4px;
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}
.cart-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.cart-toast.is-error { background: #c02b20; }
.cart-toast.is-success { background: #1a7f4b; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 991px) {
  .vc-page { padding-top: 80px; }
  .vc-item-details { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .vc-payment-gateway-list { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px; }
  .vc-credit-icon { width: 100%; }
}
@media (max-width: 767px) {
  .vc-body { padding-bottom: 110px; }
  /* 手机端结算页顶部：照电脑端 —— 「‹ 返回 购物车结算」一行，不画白底、不吸顶 */
  .vc-region .shop-region {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0;
    background: transparent;
    border-bottom: 0;
    position: static;
  }
  .vc-region .shop-region__name {
    display: block;
    margin: 0;
    font-size: 16px; font-weight: 700; color: #181818;
    line-height: 1.5;
  }
  .vc-items-c { padding: 16px; }
  .vc-pay-content { padding: 20px 16px; }
  .vc-item-price-info { flex-wrap: wrap; gap: 12px; }
  /* 手机端底栏：照参考站的排版 —— 两行
     第一行：总计；  第二行：优惠码+应用（左） / 确认支付（右）
     只改排版，圆角、颜色、字号都沿用本站样式 */
  .vc-footer__inner {
    display: grid;
    /* 两列：左列（总计 / 优惠码），右列（结算按钮） */
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "total total"
      "promo pay";
    /* 第一行固定 42px（和按钮同高）：上一步出现/消失时总价的��置不跳 */
    grid-template-rows: 42px auto;
    /* 第一行高度写死 42px（和按钮一样高）：
       「上一步」出现/消失时这一行高度不变，总计的价格就不会上下跳 */
    grid-template-rows: 42px auto;
    align-items: center;
    gap: 10px 12px;
    padding: 12px 16px;
  }
  /* 实际结构：优惠码在 .vc-total 里面（.vc-total 是 flex，会把总计和优惠码排成一行），
     所以让 .vc-total 也摊平成网格项，两个子元素各自占一个区域 */
  .vc-summary { display: contents; }
  .vc-total { display: contents; }
  .vc-total__value { grid-area: total; }
  .vc-promo { grid-area: promo; }
  /* 两个按钮摊平成网格项：「上一步」在第一行右侧，「立刻结账」在第二行右侧。
     宽度各按内容自然撑开（一长一短，不拉齐），右边缘对齐，和电脑端一致 */
  .vc-checkout-btn { display: contents; }
  .vc-checkout-btn > .vc-checkout--prev { grid-area: total; justify-self: end; align-self: center; }
  .vc-checkout-btn > .vc-checkout:not(.vc-checkout--prev) { grid-area: pay; justify-self: end; align-self: center; }
  /* 未登录：底栏只有「立刻结账」一个按钮（没有总计/优惠码），放在左边 */
  .vc-footer__inner:not(:has(.vc-summary)) .vc-checkout-btn > .vc-checkout:not(.vc-checkout--prev) {
    grid-area: total;
    justify-self: start;
  }
  /* 按钮文字不换行 */
  .vc-checkout { white-space: nowrap; }
  .vc-total__label { line-height: 1.2; }
  .vc-total__label .price-num { line-height: 1.2; }
  .vc-total__price .price-num { font-size: 22px; }
  .vc-checkout { padding: 9px 16px; }
  /* 手机端价格区：照参考站的排版 —— 小计 / 客户折扣价 / 价格 各自一行竖排，
     不再挤在一行（窄屏会把「小计」拆成两行）。只改排版，字号颜色不变 */
  .vc-price-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .vc-price-row { gap: 4px; }
  .vc-subtotal-label,
  .vc-discount-label,
  .vc-price-label { white-space: nowrap; }
  .vc-discount-value,
  .vc-price-value { white-space: nowrap; }
}
