/* ========== 按钮 ========== */
body.vape-theme a.vape-btn,
body.vape-theme button.vape-btn,
.vape-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  background: var(--vape-brand);
  color: var(--vape-on-brand);
  border: none;
  border-radius: var(--vape-radius);
  font-family: var(--vape-font-ja);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--vape-transition);
  text-decoration: none;
  opacity: 1;
}

body.vape-theme a.vape-btn:hover,
body.vape-theme button.vape-btn:hover,
.vape-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--vape-glow);
  color: var(--vape-on-brand);
  opacity: 1;
}

body.vape-theme a.vape-btn--outline,
.vape-btn--outline {
  background: transparent;
  color: var(--vape-brand);
  border: 1px solid var(--vape-brand);
}

body.vape-theme a.vape-btn--outline:hover,
.vape-btn--outline:hover {
  background: var(--vape-brand-dim);
  color: var(--vape-brand);
  opacity: 1;
}

.vape-btn--lg { padding: 16px 32px; font-size: 15px; border-radius: var(--vape-radius-lg); }

.vape-btn--cart { width: 100%; margin-top: 12px; }

body.vape-theme a.vape-btn--disabled,
body.vape-theme button.vape-btn--disabled,
.vape-btn--disabled {
  background: var(--vape-bg-elevated);
  color: var(--vape-text-dim);
  cursor: not-allowed;
}

body.vape-theme a.vape-btn--disabled:hover,
body.vape-theme button.vape-btn--disabled:hover,
.vape-btn--disabled:hover {
  transform: none;
  box-shadow: none;
  color: var(--vape-text-dim);
  opacity: 1;
}

/* ========== 抽屉 / 模态 / 回到顶部 ========== */
.vape-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 280px;
  height: 100%;
  background: var(--vape-bg-elevated);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform var(--vape-transition);
  padding: 24px;
  border-right: 1px solid var(--vape-border);
}

.vape-drawer.is-open { transform: translateX(0); }

.vape-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 199;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--vape-transition);
}

.vape-drawer-overlay.is-open { opacity: 1; pointer-events: auto; }

.vape-drawer__search {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--vape-border);
}

.vape-drawer__search .vape-search { max-width: none; }

.vape-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.vape-drawer__nav a { color: var(--vape-text); font-size: 15px; }

.vape-drawer__account {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--vape-border);
}

.vape-drawer__account .vape-account { flex-direction: column; align-items: flex-start; gap: 12px; }

.vape-drawer__account .vape-account__link span { display: inline; }

.vape-drawer__close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  color: var(--vape-text);
  font-size: 28px;
  cursor: pointer;
}

.vape-modal__box {
  background: var(--vape-bg-elevated);
  border-radius: var(--vape-radius-lg);
  padding: 32px;
  max-width: 400px;
  margin: auto;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

.vape-pagetop {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--vape-brand);
  color: var(--vape-on-brand);
  border: none;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--vape-transition);
  z-index: 50;
}

.vape-pagetop.is-visible { opacity: 1; visibility: visible; }

.vape-pagetop:hover { box-shadow: var(--vape-glow); }

/* ========== 表单必須标签（全站 EC 表单） ========== */
body.vape-theme .ec-borderedDefs dt {
  line-height: 1.5;
}

body.vape-theme .ec-borderedDefs dt .ec-label {
  font-weight: 600;
  color: var(--vape-text);
}

body.vape-theme .ec-required {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.5em;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(224, 62, 62, 0.1);
  border: 1px solid rgba(224, 62, 62, 0.35);
  color: var(--vape-danger);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.35;
  vertical-align: middle;
  white-space: nowrap;
}

/* ========== 加购动效 ========== */
.vape-cart-toast-root {
  position: fixed;
  top: calc(var(--vape-header-h) + var(--vape-compliance-h) + 12px);
  right: 16px;
  z-index: 10050;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
  max-width: min(360px, calc(100vw - 32px));
}

.vape-cart-toast {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  background: var(--vape-bg-card);
  border: 1px solid var(--vape-border);
  border-left: 3px solid var(--vape-brand);
  border-radius: var(--vape-radius);
  box-shadow: var(--vape-shadow-md);
  pointer-events: auto;
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.vape-cart-toast.is-visible {
  opacity: 1;
  transform: translateX(0);
}

.vape-cart-toast.is-leaving {
  opacity: 0;
  transform: translateY(-8px);
}

.vape-cart-toast__thumb {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--vape-bg-elevated);
  border: 1px solid var(--vape-border);
}

.vape-cart-toast__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.vape-cart-toast__body {
  flex: 1;
  min-width: 0;
}

.vape-cart-toast__title {
  margin: 0 0 4px;
  font-size: 13px;
  font-weight: 700;
  color: var(--vape-text);
  line-height: 1.4;
}

.vape-cart-toast__msg {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--vape-text-muted);
  line-height: 1.5;
}

.vape-cart-toast__link {
  font-size: 12px;
  font-weight: 600;
  color: var(--vape-brand);
  text-decoration: none;
}

.vape-cart-toast__link:hover {
  opacity: 0.85;
}

.vape-cart-fly {
  position: fixed;
  z-index: 10040;
  width: 72px;
  height: 72px;
  margin: 0;
  padding: 4px;
  border-radius: 12px;
  background: var(--vape-bg-card);
  border: 2px solid var(--vape-brand);
  box-shadow: var(--vape-shadow-md);
  pointer-events: none;
  opacity: 1;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.65s ease;
  will-change: transform, opacity;
}

.vape-cart-fly img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

.vape-cart-fly.is-flying {
  opacity: 0.15;
  transform: translate(var(--vape-fly-x, 0), var(--vape-fly-y, 0)) scale(0.2);
}

.vape-cart__badge.is-bump {
  animation: vapeCartBadgeBump 0.55s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes vapeCartBadgeBump {
  0% { transform: scale(1); }
  35% { transform: scale(1.35); }
  65% { transform: scale(0.92); }
  100% { transform: scale(1); }
}

.vape-cart__trigger.is-cart-highlight {
  animation: vapeCartTriggerPulse 0.55s ease;
}

@keyframes vapeCartTriggerPulse {
  0% { box-shadow: 0 0 0 0 rgba(0, 168, 142, 0.45); }
  70% { box-shadow: 0 0 0 10px rgba(0, 168, 142, 0); }
  100% { box-shadow: none; }
}

body.vape-theme .vape-btn.add-cart.is-added {
  background: #06c755;
  color: var(--vape-on-brand);
  box-shadow: 0 4px 16px rgba(6, 199, 85, 0.35);
}

.vape-card.is-cart-added {
  animation: vapeCardAdded 0.6s ease;
}

@keyframes vapeCardAdded {
  0% { box-shadow: 0 0 0 0 rgba(0, 168, 142, 0.35); }
  50% { box-shadow: 0 0 0 4px rgba(0, 168, 142, 0.2); }
  100% { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  .vape-cart-fly,
  .vape-cart-toast,
  .vape-cart__badge.is-bump,
  .vape-cart__trigger.is-cart-highlight,
  .vape-card.is-cart-added {
    animation: none !important;
    transition: none !important;
  }

  .vape-cart-fly { display: none !important; }
}

/* ========== 郵便番号検索ヘルプ（question.svg） ========== */
body.vape-theme .ec-zipInputHelp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.4;
  color: var(--vape-text-dim);
  vertical-align: middle;
}

body.vape-theme .ec-zipInputHelp__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  background: var(--vape-bg-elevated);
  border: 1px solid var(--vape-border);
  border-radius: 50%;
}

body.vape-theme .ec-zipInputHelp .ec-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}

body.vape-theme .ec-zipInputHelp .ec-icon img {
  width: 12px;
  height: 12px;
  max-width: 12px;
  max-height: 12px;
  display: block;
  opacity: 0.75;
}

body.vape-theme .ec-zipInputHelp a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--vape-brand);
  font-size: 12px;
  text-decoration: none;
}

body.vape-theme .ec-zipInputHelp a:hover {
  text-decoration: underline;
}

/* ========== 通用提示 ========== */
.vape-alert {
  padding: 14px 18px;
  border-radius: var(--vape-radius);
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.vape-alert--warn {
  background: rgba(224, 62, 62, 0.08);
  border: 1px solid rgba(224, 62, 62, 0.35);
  color: #c53030;
}

.vape-alert--debug {
  background: rgba(180, 120, 0, 0.08);
  border: 1px solid rgba(180, 120, 0, 0.35);
  color: #b45309;
}

.vape-alert--ok {
  background: var(--vape-brand-dim);
  border: 1px solid rgba(0, 168, 142, 0.35);
  color: var(--vape-brand);
}

/* ========== 商品表单控件（首页卡片等全站复用） ========== */
.vape-product-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
  min-width: 0;
}

.vape-product-options__row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.vape-product-options__label {
  font-size: 12px;
  color: var(--vape-text-dim);
  font-weight: 500;
}

.vape-select,
.vape-qty,
select.vape-select,
input.vape-qty {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 10px 12px;
  background: var(--vape-bg-elevated);
  border: 1px solid var(--vape-border);
  border-radius: var(--vape-radius);
  color: var(--vape-text);
  font-size: 14px;
  font-family: inherit;
}

.vape-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%23888' d='M0 0l4 5 4-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
}

@media (max-width: 768px) {
  .vape-select,
  .vape-qty {
    font-size: 16px;
    padding: 10px 12px;
  }
}

/* ========== 多币种切换（MultiCurrency 插件 · 页脚） ========== */
body.vape-theme .vape-currency-selector {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 8px 12px 8px 14px;
  background: var(--vape-bg-elevated);
  border: 1px solid var(--vape-border);
  border-radius: 999px;
}

body.vape-theme .vape-currency-selector__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vape-text-dim);
  white-space: nowrap;
}

body.vape-theme .vape-currency-selector__group {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  background: var(--vape-bg-elevated);
  border-radius: 999px;
}

body.vape-theme .vape-currency-selector__option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  padding: 6px 12px;
  border-radius: 999px;
  font-family: var(--vape-font-en);
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  color: var(--vape-text-muted);
  text-decoration: none;
  transition: background var(--vape-transition), color var(--vape-transition), box-shadow var(--vape-transition);
}

body.vape-theme a.vape-currency-selector__option:hover {
  color: var(--vape-brand);
  background: rgba(0, 168, 142, 0.12);
  opacity: 1;
}

body.vape-theme .vape-currency-selector__option.is-active {
  background: var(--vape-brand);
  color: var(--vape-on-brand);
  box-shadow: 0 0 16px rgba(0, 168, 142, 0.25);
}

body.vape-theme .vape-currency-selector.vape-currency-selector--embedded,
body.vape-theme .vape-currency-selector.vape-currency-selector--footer {
  position: static;
}

