/* 购物车：全局侧滑 / 手机底部抽屉 */
.cart-layer {
  position: fixed;
  inset: 0;
  z-index: 940;
  display: none;
}
.cart-layer.on { display: block; }
.cart-mask { position: absolute; inset: 0; background: rgba(17,17,17,.5); backdrop-filter: blur(6px); }
.cart-panel {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 430px;
  background: #fff;
  display: flex;
  flex-direction: column;
  box-shadow: -20px 0 60px rgba(0,0,0,.16);
  transform: translateX(100%);
  transition: transform .35s cubic-bezier(.22,.8,.3,1);
}
.cart-layer.on .cart-panel { transform: translateX(0); }
.cart-hd {
  height: 74px;
  flex: none;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eee;
}
.cart-hd h3 { font: 650 22px/1 var(--sans); letter-spacing: -.02em; }
.cart-hd h3 b { color: #ff5a1f; font-weight: 650; }
.cart-full { margin-left:auto; margin-right:12px; color:#999; font:400 10px/16px var(--sans); }
.cart-x { width: 34px; height: 34px; border-radius: 50%; font-size: 23px; color: #888; }
.cart-body { flex: 1; overflow: auto; padding: 18px 24px; }
.cart-empty { padding: 80px 0; text-align: center; color: #999; font: 400 13px/22px var(--sans); }
.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid #f0f0f0; }
.cart-item__img { width: 76px; height: 76px; flex: none; border-radius: 12px; background: #f6f6f7; object-fit: cover; }
.cart-item__main { flex: 1; min-width: 0; }
.cart-item__name { font: 600 13px/20px var(--sans); color: #111; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cart-item__spec { margin-top: 2px; color: #999; font: 400 10px/16px var(--sans); }
.cart-item__row { display: flex; align-items: center; justify-content: space-between; margin-top: 9px; }
.cart-item__price { font: 650 15px/20px var(--sans); }
.cart-qty { display: flex; align-items: center; gap: 8px; }
.cart-qty button { width: 23px; height: 23px; border: 1px solid #e6e6e6; border-radius: 50%; font: 400 14px/1 var(--sans); color: #666; }
.cart-qty span { min-width: 18px; text-align: center; font: 500 12px/1 var(--sans); }
.cart-rm { margin-left: 8px; color: #bbb; font: 400 10px/16px var(--sans); }
.cart-rm:hover { color: #ff5a1f; }
.cart-ft { flex: none; border-top: 1px solid #eee; padding: 16px 24px 18px; }
.cart-total { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.cart-total span { color: #888; font: 400 12px/20px var(--sans); }
.cart-total b { font: 700 28px/34px var(--sans); letter-spacing: -.03em; }
.cart-checkout { width: 100%; height: 48px; border-radius: 999px; background: #111; color: #fff; font: 500 14px/1 var(--sans); }
.cart-checkout[disabled] { opacity: .35; pointer-events: none; }
.cart-fly {
  position: fixed;
  z-index: 1500;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #ff5a1f;
  box-shadow: 0 0 0 4px rgba(255,90,31,.18);
  pointer-events: none;
}
.badge.bump { animation: badgeBump .45s cubic-bezier(.22,.8,.3,1); }
@keyframes badgeBump {
  0% { transform: scale(1); }
  40% { transform: scale(1.45); }
  100% { transform: scale(1); }
}
.cart-total.bump b { animation: totalBump .35s ease; }
@keyframes totalBump { 50% { transform: translateY(-2px) scale(1.04); color: #ff5a1f; } }

@media (max-width: 600px) {
  .cart-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    max-height: 88vh;
    border-radius: 24px 24px 0 0;
    transform: translateY(100%);
  }
  .cart-layer.on .cart-panel { transform: translateY(0); }
  .cart-hd { height: 60px; padding: 0 18px; }
  .cart-hd h3 { font-size: 19px; }
  .cart-body { padding: 10px 18px; }
  .cart-item__img { width: 64px; height: 64px; }
  .cart-ft { padding: 12px 18px calc(12px + env(safe-area-inset-bottom, 0px)); }
  .cart-checkout { height: 46px; }
}
.cart-rm{width:18px;text-align:center;white-space:nowrap;}
