
/* =====================================================================
   批次1 · 免邮进度条 + 产品卡 Quick Buy 抽屉（对标一线美妆 DTC）
   只动 transform/opacity，60fps，reduced-motion 静态
   ===================================================================== */

/* ---------- 免邮进度条（顶部 sticky，虹光渐变填充） ---------- */
.free-ship-bar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: var(--paper, #fff);
  border-bottom: 1px solid var(--line, #e7e5e0);
  padding: 9px 0;
  text-align: center;
  font-size: 12px;
  color: var(--muted, #75757d);
  letter-spacing: .3px;
}
.free-ship-bar__track {
  height: 5px;
  background: var(--card-2, #efede8);
  border-radius: 999px;
  margin: 7px auto 0;
  max-width: 420px;
  overflow: hidden;
  position: relative;
}
.free-ship-bar__fill {
  position: absolute;
  inset: 0;
  width: 0;
  background: linear-gradient(90deg, #c94f7c 0%, #b06fb8 40%, #4b1edb 70%, #19d3cb 100%);
  border-radius: 999px;
  transition: width .6s cubic-bezier(.22,1,.36,1);
}
.free-ship-bar.is-done { color: #108474; }
.free-ship-bar.is-done .free-ship-bar__track { background: rgba(16,132,116,.18); }
.free-ship-bar.is-done .free-ship-bar__fill {
  width: 100%;
  animation: fsPulse .6s ease;
}
.free-ship-bar__txt b { color: var(--rose, #c94f7c); font-weight: 700; }
.free-ship-bar.is-done .free-ship-bar__txt b { color: #108474; }
@keyframes fsPulse { 0%{transform:scale(1)} 50%{transform:scale(1.04)} 100%{transform:scale(1)} }

/* ---------- Quick Buy 抽屉（右侧，白色半透明遮罩，与头部白底按钮一致） ---------- */
.qb-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.86);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility .35s;
}
.qb-overlay.open { opacity: 1; visibility: visible; }
.qb-drawer {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 100%;
  max-width: 420px;
  background: var(--paper, #fff);
  box-shadow: -12px 0 48px rgba(17,17,20,.22);
  z-index: 91;
  transform: translateX(100%);
  transition: transform .42s cubic-bezier(.22,1,.36,1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.qb-drawer.open { transform: translateX(0); }
.qb-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line, #e7e5e0);
}
.qb-drawer__head h3 {
  font-family: Georgia, "Didot", serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin: 0;
  color: var(--ink, #111);
}
.qb-close {
  width: 34px; height: 34px;
  border: 1px solid var(--line, #e7e5e0);
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  font-size: 18px;
  color: var(--muted, #75757d);
  display: grid;
  place-items: center;
  transition: .25s;
}
.qb-close:hover { color: var(--rose, #c94f7c); border-color: var(--rose, #c94f7c); }
.qb-drawer__body { padding: 20px 22px; flex: 1; }
.qb-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; border: 1px solid var(--line, #e7e5e0); }
.qb-title { font-family: Georgia, serif; font-size: 1.05rem; margin: 14px 0 4px; color: var(--ink, #111); }
.qb-price { font-size: 1.1rem; color: var(--rose, #c94f7c); font-weight: 600; }
.qb-price s { color: var(--muted, #75757d); font-size: .85rem; margin-left: 8px; font-weight: 400; }
/* 色号 Swatch */
.qb-swatches { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.qb-swatch {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 2px solid var(--line, #e7e5e0);
  cursor: pointer;
  transition: .25s;
  position: relative;
}
.qb-swatch.active { border-color: var(--rose, #c94f7c); box-shadow: 0 0 0 3px rgba(201,79,124,.2); }
.qb-swatch.active::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 13px;
}
/* 加购按钮 */
.qb-add {
  width: 100%;
  padding: 15px;
  background: var(--rose, #c94f7c);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(201,79,124,.3);
  transition: .3s;
}
.qb-add:hover { background: var(--rose-deep, #a83a64); transform: translateY(-1px); }
.qb-add.added { background: #108474; box-shadow: 0 10px 26px rgba(16,132,116,.3); }
/* 产品卡 Quick Buy 触发按钮 */
.card .qb-trigger {
  position: absolute;
  bottom: 12px;
  right: 12px;
  padding: 9px 16px;
  background: var(--paper, #fff);
  border: 1px solid var(--rose, #c94f7c);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--rose, #c94f7c);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s, transform .3s;
  z-index: 4;
  cursor: pointer;
}
.card:hover .qb-trigger, .card:focus-within .qb-trigger { opacity: 1; transform: translateY(0); }
/* 移动端：抽屉全屏 */
@media (max-width: 640px) {
  .qb-drawer { max-width: 100%; }
}

/* reduced-motion：全静态 */
@media (prefers-reduced-motion: reduce) {
  .free-ship-bar__fill, .qb-drawer, .qb-overlay, .qb-trigger { transition: none !important; }
  .free-ship-bar.is-done .free-ship-bar__fill { animation: none; }
}
