/* 現貨精品彈窗 + 售完遮罩（官網前台唯讀層） */
.wx-instock-modal.wm-modal {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(4px);
}
.wx-instock-modal.wm-modal.is-open {
  display: flex;
  pointer-events: auto;
}
html.wx-instock-modal-open,
body.wx-instock-modal-open {
  overflow: hidden !important;
}
.wx-instock-modal__shell {
  position: relative;
  width: min(420px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.08);
  padding: 18px 18px 22px;
}
.wx-instock-modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #334155;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.wx-instock-modal__hero {
  border-radius: 14px;
  overflow: hidden;
  background: #f8fafc;
  aspect-ratio: 1 / 1;
  margin-bottom: 14px;
}
.wx-instock-modal__img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.wx-instock-modal__badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  color: #ffffff;
  background: var(--instock-tag-color, #728B7E);
  border-radius: 999px;
  padding: 4px 10px;
  margin-bottom: 8px;
}
.wx-instock-modal__title {
  margin: 0 0 8px;
  font-size: 1.15rem;
  font-weight: 900;
  color: #0f172a;
  line-height: 1.35;
}
.wx-instock-modal__platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.wx-instock-modal__price {
  font-size: 1.35rem;
  font-weight: 900;
  color: var(--instock-tag-color, #728B7E);
  margin-bottom: 14px;
}
.wx-instock-modal__variants-label {
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  margin-bottom: 8px;
}
.wx-instock-modal__variant-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.wx-instock-modal__variant-btns .variant-btn {
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #334155;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.wx-instock-modal__variant-btns .variant-btn.active {
  border-color: var(--instock-tag-color, #728B7E);
  background: color-mix(in srgb, var(--instock-tag-color, #728B7E) 12%, #fff);
  color: color-mix(in srgb, var(--instock-tag-color, #728B7E) 75%, #000);
}
.wx-instock-modal__variant-btns .variant-btn.is-sold-out {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}
.wx-instock-modal__qty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.wx-instock-modal__qty-label {
  font-size: 14px;
  font-weight: 800;
  color: #334155;
}
.wx-instock-qty-stepper {
  display: inline-flex;
  align-items: center;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.wx-instock-qty-btn {
  width: 40px;
  height: 40px;
  border: none;
  background: #f8fafc;
  color: #334155;
  font-size: 18px;
  font-weight: 900;
  cursor: pointer;
}
.wx-instock-qty-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.wx-instock-qty-input {
  width: 48px;
  height: 40px;
  border: none;
  border-left: 1px solid #e2e8f0;
  border-right: 1px solid #e2e8f0;
  text-align: center;
  font-size: 15px;
  font-weight: 800;
  color: #0f172a;
  background: #fff;
  -moz-appearance: textfield;
}
.wx-instock-qty-input::-webkit-outer-spin-button,
.wx-instock-qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.wx-instock-modal__cta {
  width: 100%;
  border: none;
  border-radius: 14px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 900;
  color: #fff;
  background: var(--instock-tag-color, #728B7E);
  box-shadow: 0 12px 24px color-mix(in srgb, var(--instock-tag-color, #728B7E) 28%, transparent);
  cursor: pointer;
}
.wx-instock-modal__cta:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  background: #94a3b8;
  box-shadow: none;
}

/* 商品卡售完遮罩 */
.product-card .card-img-box,
.product-card .product-img-wrapper {
  position: relative;
}
.product-card.is-sold-out .card-img-box::after,
.product-card.is-sold-out .product-img-wrapper::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 2;
  pointer-events: none;
  border-radius: inherit;
}
.product-card.is-sold-out .wx-sold-out-badge {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
  line-height: 1.35;
  padding: 0 8px;
  pointer-events: none;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.product-card.is-sold-out .card-btn,
.product-card.is-sold-out .btn-submit-order {
  opacity: 0.45 !important;
  cursor: not-allowed !important;
  pointer-events: none !important;
}
