/* BREATHTIME 复刻站 · 自建购物车层（沿用原站 Kadence 视觉体系） */
:root {
  --mj-ink: #1a1a1a;
  --mj-muted: #767676;
  --mj-line: #e5e0d8;
  --mj-gold: #b08d57;
  --mj-bg: #fff;
  --mj-soft: #faf8f5;
}

#mj-root * { box-sizing: border-box; }

/* 徽标 */
.mj-badge,
.xoo-wsc-items-count {
  font-variant-numeric: tabular-nums;
}

/* 抽屉 */
.mj-drawer-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .42);
  opacity: 0; pointer-events: none; transition: opacity .28s ease; z-index: 999998;
  backdrop-filter: blur(2px);
}
.mj-drawer-mask.open { opacity: 1; pointer-events: auto; }

.mj-drawer {
  position: fixed; top: 0; right: 0; height: 100dvh; width: min(420px, 92vw);
  background: var(--mj-bg); z-index: 999999;
  display: flex; flex-direction: column;
  transform: translateX(102%); transition: transform .32s cubic-bezier(.22, .61, .36, 1);
  box-shadow: -18px 0 60px rgba(0, 0, 0, .16);
  font-family: inherit; color: var(--mj-ink);
}
.mj-drawer.open { transform: translateX(0); }

.mj-dhead {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--mj-line);
}
.mj-dhead h3 { margin: 0; font-size: 15px; letter-spacing: .16em; text-transform: uppercase; font-weight: 600; }
.mj-dclose {
  border: 0; background: transparent; cursor: pointer; font-size: 26px; line-height: 1;
  color: var(--mj-muted); padding: 0 4px; transition: color .2s;
}
.mj-dclose:hover { color: var(--mj-ink); }

.mj-dbody { flex: 1; overflow-y: auto; padding: 8px 22px; }
.mj-empty { text-align: center; padding: 60px 0; color: var(--mj-muted); font-size: 14px; }
.mj-empty a {
  display: inline-block; margin-top: 18px; padding: 11px 26px; border: 1px solid var(--mj-ink);
  color: var(--mj-ink); text-decoration: none; font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
}
.mj-empty a:hover { background: var(--mj-ink); color: #fff; }

.mj-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--mj-line); }
.mj-item img { width: 74px; height: 92px; object-fit: cover; background: var(--mj-soft); flex: none; }
.mj-item-info { flex: 1; min-width: 0; }
.mj-item-name { font-size: 13px; line-height: 1.45; margin: 0 0 5px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mj-item-variant { font-size: 11.5px; color: var(--mj-muted); margin: 0 0 8px; }
.mj-item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mj-qty { display: inline-flex; align-items: center; border: 1px solid var(--mj-line); }
.mj-qty button {
  width: 26px; height: 26px; border: 0; background: transparent; cursor: pointer;
  font-size: 15px; color: var(--mj-muted); line-height: 1;
}
.mj-qty button:hover { color: var(--mj-ink); background: var(--mj-soft); }
.mj-qty span { min-width: 30px; text-align: center; font-size: 13px; font-variant-numeric: tabular-nums; }
.mj-price { font-size: 13.5px; font-weight: 600; white-space: nowrap; }
.mj-del {
  border: 0; background: none; cursor: pointer; color: var(--mj-muted);
  font-size: 11px; text-decoration: underline; padding: 0; margin-top: 6px;
}
.mj-del:hover { color: #b3261e; }

.mj-dfoot { border-top: 1px solid var(--mj-line); padding: 18px 22px 22px; background: var(--mj-soft); }
.mj-total-row { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }
.mj-total-row .lbl { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--mj-muted); }
.mj-total-row .val { font-size: 19px; font-weight: 600; }
.mj-cny { font-size: 11.5px; color: var(--mj-muted); text-align: right; margin-bottom: 14px; }
.mj-checkout {
  display: block; width: 100%; text-align: center; padding: 15px; background: var(--mj-ink);
  color: #fff; text-decoration: none; font-size: 12px; letter-spacing: .18em; text-transform: uppercase;
  border: 0; cursor: pointer; transition: background .2s;
}
.mj-checkout:hover { background: var(--mj-gold); }
.mj-note { font-size: 11px; color: var(--mj-muted); text-align: center; margin: 10px 0 0; line-height: 1.5; }

/* 加购中的 toast */
.mj-toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: var(--mj-ink); color: #fff; padding: 12px 22px; font-size: 13px;
  opacity: 0; pointer-events: none; transition: all .26s ease; z-index: 1000000;
  border-radius: 2px;
}
.mj-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* 商品页变体未选时的提示 */
.mj-warn { color: #b3261e !important; font-size: 13px; margin: 8px 0 0; }

@media (max-width: 480px) {
  .mj-item img { width: 64px; height: 80px; }
}
