/* ==========================================================
   裝備商城 / 裝備接單 共用樣式
   ========================================================== */

/* ── Tab 切換 ──────────────────────────────────────────── */
.shop-tabs {
  display: flex; gap: 0;
  background: var(--wh); border-bottom: 1px solid var(--bd);
  padding: 0 14px;
  position: sticky; top: 0; z-index: 10;
}
.shop-tab {
  flex: 1; padding: 11px 6px;
  font-size: 13px; font-weight: 600;
  color: var(--t2); cursor: pointer;
  border: none; background: none;
  border-bottom: 2.5px solid transparent;
  transition: color .2s, border-color .2s;
}
.shop-tab.active { color: var(--dk); border-bottom-color: var(--gd); }

/* ── 商品 Grid ──────────────────────────────────────────── */
.shop-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 10px 14px 16px;
}
.shop-item {
  background: var(--wh); border-radius: var(--rs);
  border: 1px solid var(--bd);
  overflow: hidden; cursor: pointer;
  transition: box-shadow .2s;
}
.shop-item:active { opacity: .85; }
.shop-item-img {
  width: 100%; aspect-ratio: 1/1;
  object-fit: cover; background: var(--sf);
  display: block;
}
.shop-item-img-placeholder {
  width: 100%; aspect-ratio: 1/1;
  background: var(--sf); display: flex;
  align-items: center; justify-content: center;
  font-size: 32px; color: var(--t3);
}
.shop-item-body { padding: 8px 10px 10px; }
.shop-item-game { font-size: 9px; color: var(--t3); font-weight: 600; margin-bottom: 2px; text-transform: uppercase; letter-spacing: .03em; }
.shop-item-name { font-size: 13px; font-weight: 700; color: var(--dk); line-height: 1.3; margin-bottom: 6px; }
.shop-item-price { font-size: 16px; font-weight: 900; color: var(--gd); }
.shop-item-price span { font-size: 11px; font-weight: 600; }
.shop-item-badge {
  display: inline-block; font-size: 9px; font-weight: 700;
  padding: 2px 6px; border-radius: 4px; margin-top: 4px;
}
.shop-item-badge.out { background: rgba(239,68,68,.1); color: var(--er); }

/* ── 下單 Modal ─────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(0,0,0,.55);
  display: flex; align-items: flex-end;
}
.modal-backdrop.hidden { display: none !important; }
.modal-box {
  background: var(--wh); border-radius: var(--r) var(--r) 0 0;
  width: 100%; max-height: 92vh;
  overflow-y: auto; padding-bottom: env(safe-area-inset-bottom, 0);
}
.modal-hd {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--bd);
  position: sticky; top: 0; background: var(--wh); z-index: 1;
}
.modal-title { font-size: 15px; font-weight: 700; }
.modal-close {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--sf); border: none; cursor: pointer;
  font-size: 14px; display: flex; align-items: center; justify-content: center;
}
#modalBody { padding: 14px 16px; }
.modal-item-row { display: flex; gap: 12px; align-items: flex-start; }
.modal-item-img {
  width: 72px; height: 72px; border-radius: 8px;
  object-fit: cover; flex-shrink: 0; background: var(--sf);
}
.modal-item-name { font-size: 14px; font-weight: 700; color: var(--dk); }
.modal-item-game { font-size: 11px; color: var(--t3); margin: 3px 0; }
.modal-item-price { font-size: 18px; font-weight: 900; color: var(--gd); }

/* ── Quantity control ──────────────────────────────────── */
.qty-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1.5px solid var(--bd); background: none;
  font-size: 20px; cursor: pointer; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s;
}
.qty-btn:active { background: var(--sf); }

/* ── Fee summary ────────────────────────────────────────── */
.fee-summary { background: var(--sf); border-radius: var(--rs); padding: 10px 12px; }
.fee-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--t2); padding: 3px 0; }
.fee-total { font-size: 14px; font-weight: 800; color: var(--dk); padding-top: 7px; margin-top: 4px; border-top: 1.5px solid var(--bd); }

/* ── btn-primary ─────────────────────────────────────────── */
.btn-primary {
  display: block; width: 100%;
  padding: 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--gd), var(--gl));
  color: var(--bk); border: none; cursor: pointer;
  font-size: 15px; font-weight: 800; font-family: inherit;
  letter-spacing: .04em; transition: opacity .2s;
}
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary:active:not(:disabled) { opacity: .85; }

/* ── Modal message ──────────────────────────────────────── */
.modal-msg {
  margin-top: 10px; padding: 9px 12px;
  border-radius: 8px; font-size: 12px; font-weight: 600;
  background: rgba(239,68,68,.1); color: var(--er);
}
.modal-msg.success { background: rgba(34,197,94,.1); color: var(--su); }

/* ── 訂單列表卡片 (商城訂單) ─────────────────────────────── */
.eq-order-card {
  background: var(--wh); border: 1px solid var(--bd);
  border-radius: var(--rs); padding: 12px 14px;
  margin: 0 14px 8px;
}
.eq-order-card-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.eq-order-game  { font-size: 10px; color: var(--t3); font-weight: 600; }
.eq-order-name  { font-size: 13px; font-weight: 700; color: var(--dk); margin: 3px 0; }
.eq-order-meta  { font-size: 11px; color: var(--t2); line-height: 1.6; }
.eq-order-price { font-size: 15px; font-weight: 800; color: var(--gd); }
.eq-order-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  margin-top: 10px; padding-top: 8px;
  border-top: 1px solid var(--bd);
}
.eq-payment-info {
  margin-top: 10px; padding: 10px 12px;
  background: var(--bg2); border-radius: var(--rs);
  font-size: 12px; line-height: 1.8; color: var(--t2);
  border-top: 1px solid var(--bd);
}
.eq-payment-label { font-weight: 700; color: var(--t1); margin-bottom: 2px; }
.eq-payment-code-num { font-size: 15px; letter-spacing: .05em; color: var(--dk); }
.eq-payment-expire { font-size: 11px; color: var(--er); margin-top: 4px; }

/* ── Status badge (商城) ─────────────────────────────────── */
.eq-status {
  font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 20px;
}
.eq-status.pending  { background: var(--gb); color: var(--gd); }
.eq-status.paid     { background: rgba(15,52,96,.1); color: var(--nv); }
.eq-status.accepted { background: rgba(34,197,94,.12); color: var(--su); }
.eq-status.done     { background: var(--sf); color: var(--t3); border: 1px solid var(--bd); }
.eq-status.cancel   { background: rgba(239,68,68,.1); color: var(--er); }

/* ── Report panel ───────────────────────────────────────── */
.report-summary {
  display: flex; gap: 12px; padding: 12px 14px 4px;
}
.report-stat {
  flex: 1; background: var(--wh); border: 1px solid var(--bd);
  border-radius: var(--rs); padding: 12px 14px;
  text-align: center;
}
.report-stat-label { font-size: 10px; color: var(--t3); font-weight: 600; margin-bottom: 4px; }
.report-stat-value { font-size: 18px; font-weight: 800; color: var(--dk); }
.report-row {
  background: var(--wh); border: 1px solid var(--bd);
  border-radius: var(--rs); padding: 10px 14px;
  margin: 0 14px 8px;
  font-size: 12px; color: var(--t2);
  display: flex; justify-content: space-between; align-items: center;
}
.report-row-payout { font-size: 14px; font-weight: 800; color: var(--su); }

/* ── chip.active override for shop pages ─────────────────── */
.chip.active {
  background: var(--bk); color: var(--gd);
  border: 1px solid var(--gd);
}
.chip:not(.active) {
  background: var(--wh); border: 1px solid var(--bd); color: var(--t2);
}

/* ── Small action buttons inside cards ──────────────────── */
.btn-eq-action {
  padding: 7px 14px; border-radius: 8px;
  font-size: 11px; font-weight: 700; font-family: inherit;
  cursor: pointer; border: 1.5px solid var(--bd);
  background: none; color: var(--dk); transition: all .2s;
}
.btn-eq-action.gold {
  background: var(--gd); color: var(--bk); border-color: var(--gd);
}
.btn-eq-action.green {
  background: var(--su); color: #fff; border-color: var(--su);
}
.btn-eq-action:active { opacity: .8; }
