/* Multi-buy tiers styles, moved out of components/product/volume-discount-tier.html so browsers cache them. */
  .zv-bundle-tiers {
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    font-family: inherit;
    margin: 14px 0 12px;
    width: 100%;
    box-sizing: border-box;
  }
  /* 在悬浮条中隐藏阶梯选择卡片，避免遮挡屏幕，但保持加购与自选状态联动 */
  theme-sticky-position .zv-bundle-tiers,
  product-float-buy-buttons .zv-bundle-tiers,
  .is-sticky .zv-bundle-tiers {
    display: none !important;
  }
  .zv-bundle-header {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 9px;
    flex-wrap: wrap;
    gap: 6px;
  }
  .zv-bundle-header-title {
    font-size: 14.5px;
    font-weight: 700;
    color: #111827;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    letter-spacing: 0;
  }
  .zv-bundle-flame-icon {
    width: 16px;
    height: 16px;
    color: #dc2626;
    flex-shrink: 0;
  }
  .zv-bundle-header-sub {
    font-size: 12.5px;
    font-weight: 500;
    color: #4b5563;
  }
  .zv-tier-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .zv-tier-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    background: #ffffff;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    transform: translateZ(0);
    will-change: border-color, background-color, box-shadow;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
    box-sizing: border-box;
  }
  .zv-tier-card:hover {
    border-color: #166534;
    background: #fafbf9;
  }
  .zv-tier-card.zv-tier-active {
    border-color: #166534;
    background: #f7faf6;
    box-shadow: 0 2px 8px rgba(22, 101, 52, 0.08);
  }
  .zv-tier-card:active {
    transform: scale(0.996);
  }
  .zv-tier-radio {
    width: 18px;
    height: 18px;
    border: 2px solid #9ca3af;
    border-radius: 50%;
    flex-shrink: 0;
    position: relative;
    transition: border-color 0.15s ease;
  }
  .zv-tier-card.zv-tier-active .zv-tier-radio {
    border-color: #166534;
  }
  .zv-tier-card.zv-tier-active .zv-tier-radio::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: #166534;
    border-radius: 50%;
  }
  .zv-tier-info {
    flex: 1;
    min-width: 0;
  }
  .zv-tier-row-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    line-height: 1.35;
    width: 100%;
  }
  .zv-tier-left {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    min-width: 0;
  }
  .zv-tier-right {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    justify-content: flex-end;
    text-align: right;
    flex-shrink: 0;
    margin-left: auto;
  }
  .zv-tier-name {
    font-size: 14px;
    font-weight: 700;
    color: #111827;
    white-space: nowrap;
  }
  .zv-tier-calc-price {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-variant-numeric: tabular-nums;
  }
  .zv-tier-compare-price {
    font-size: 11.5px;
    font-weight: 500;
    color: #9ca3af;
    text-decoration: line-through;
    white-space: nowrap;
  }
  .zv-tier-total-num {
    font-size: 13.5px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.01em;
  }
  .zv-tier-unit-price {
    font-size: 11px;
    font-weight: 600;
    color: #166534;
    background: #dcfce7;
    padding: 1.5px 5.5px;
    border-radius: 4px;
    white-space: nowrap;
  }
  .zv-tier-tag {
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 10px;
    letter-spacing: 0.02em;
    white-space: nowrap;
  }
  .zv-tag-popular {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
  }
  .zv-tag-value {
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
  }
  .zv-tag-free {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
  }
  .zv-tier-row-sub {
    font-size: 12px;
    color: #6b7280;
    margin-top: 3px;
    line-height: 1.35;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
  }
  .zv-tier-deal {
    color: #15803d;
    font-weight: 700;
  }
  .zv-deal-free {
    color: #b91c1c;
  }
  .zv-tier-deal-sub {
    color: #6b7280;
    font-weight: 500;
  }
  .zv-tier-save-pill {
    display: inline-block;
    font-size: 10.5px;
    font-weight: 700;
    color: #15803d;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    padding: 1px 5px;
    border-radius: 4px;
    letter-spacing: 0.01em;
    white-space: nowrap;
  }
  .zv-tier-perk {
    color: #4b5563;
    white-space: nowrap;
  }
  .zv-tier-perk.zv-perk-qualified {
    color: #15803d;
    font-weight: 600;
  }

  /* 自选定制器容器 */
  .zv-bundle-customizer {
    margin-top: 12px;
    padding: 12px 14px;
    background: #f9fafb;
    border: 1px dashed #d1d5db;
    border-radius: 8px;
    animation: zvFadeSlideIn 0.2s ease-out;
  }
  @keyframes zvFadeSlideIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .zv-customizer-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
    gap: 8px;
  }
  .zv-customizer-title-wrap {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13.5px;
    font-weight: 700;
    color: #111827;
  }
  .zv-customizer-icon {
    width: 15px;
    height: 15px;
    color: #166534;
  }
  .zv-customizer-badge {
    font-size: 11px;
    font-weight: 700;
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    padding: 1.5px 6px;
    border-radius: 4px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
  }
  .zv-customizer-desc {
    font-size: 12px;
    color: #6b7280;
    margin-bottom: 10px;
    line-height: 1.35;
  }
  .zv-customizer-rows {
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .zv-piece-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #ffffff;
    padding: 8px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
  }
  .zv-piece-label {
    font-size: 12.5px;
    font-weight: 600;
    color: #374151;
    min-width: 60px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
  }
  .zv-piece-sync-tag {
    font-size: 10px;
    font-weight: 600;
    color: #059669;
    background: #ecfdf5;
    padding: 1px 4px;
    border-radius: 3px;
  }
  .zv-piece-selectors {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .zv-piece-select {
    padding: 5px 8px;
    font-size: 12px;
    color: #1f2937;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    outline: none;
    cursor: pointer;
    font-weight: 500;
    transition: border-color 0.15s ease;
    max-width: 140px;
  }
  .zv-piece-select:focus {
    border-color: #166534;
  }
  .zv-piece-select option:disabled {
    color: #9ca3af;
  }
  .zv-customizer-tip {
    margin-top: 10px;
    font-size: 11.5px;
    color: #4b5563;
    line-height: 1.4;
    display: flex;
    align-items: flex-start;
    gap: 6px;
    background: #f0fdf4;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #bbf7d0;
  }
  .zv-tip-icon {
    width: 14px;
    height: 14px;
    color: #15803d;
    flex-shrink: 0;
    margin-top: 1.5px;
  }

  /* 移动端高保真优化 */
  @media (max-width: 767px) {
    .zv-tier-card {
      padding: 9px 11px;
      gap: 10px;
    }
    .zv-tier-name {
      font-size: 13.5px;
    }
    .zv-tier-total-num {
      font-size: 13px;
    }
    .zv-tier-unit-price {
      font-size: 10.5px;
      padding: 1px 4px;
    }
    .zv-tier-tag {
      font-size: 10px;
      padding: 1.5px 5px;
    }
    .zv-tier-row-sub {
      font-size: 11px;
      gap: 4px;
    }
    .zv-tier-save-pill {
      font-size: 9.5px;
      padding: 0.5px 4px;
    }
    .zv-piece-row {
      flex-direction: column;
      align-items: flex-start;
      gap: 6px;
    }
    .zv-piece-selectors {
      width: 100%;
      justify-content: flex-start;
    }
    .zv-piece-select {
      flex: 1;
      max-width: none;
    }
  }

  /* 确保原生购买按钮不被数量输入框挤压变形，文字完整展示 */
  .block-product-buy-button {
    flex: 1 1 auto !important;
    min-width: 140px !important;
    white-space: nowrap !important;
  }
  .block-product-buy-button-text {
    white-space: nowrap !important;
    display: inline-block !important;
  }
  /* 抽屉防卡死样式守卫：若抽屉内部已有商品或空态，强制隐藏全屏 loading 遮罩 */
  .cart-drawer__inner:has(.cart-drawer__items) .cart-drawer__loading,
  .cart-drawer__inner:has(.cart-empty) .cart-drawer__loading {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }


  /* 加购成功非侵入式微动效与按钮反馈 (避免抽屉突兀跳出) */
  @keyframes zv-cart-bounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.25); }
    70% { transform: scale(0.96); }
    100% { transform: scale(1); }
  }
  .zv-cart-bump {
    animation: zv-cart-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  }
  .zv-btn-added {
    background-color: #166534 !important;
    border-color: #166534 !important;
    color: #ffffff !important;
    transition: background-color 0.25s ease, border-color 0.25s ease !important;
  }

  /* 加购成功非侵入式微动效与按钮反馈 (避免抽屉突兀跳出) */
  @keyframes zv-cart-bounce {
    0% { transform: scale(1); }
    40% { transform: scale(1.25); }
    70% { transform: scale(0.96); }
    100% { transform: scale(1); }
  }
  .zv-cart-bump {
    animation: zv-cart-bounce 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) !important;
  }
  .zv-btn-added {
    background-color: #166534 !important;
    border-color: #166534 !important;
    color: #ffffff !important;
    transition: background-color 0.25s ease, border-color 0.25s ease !important;
  }
