/* 抖音「一键加橱窗」组件样式 v1.0.0 */

:root { --dy-brand: #FE2C55; --dy-ink: #161823; --dy-muted: #8A8B91; --dy-line: #EFEFF2; }

/* ---------- 卡片按钮 ---------- */
.dy-pick-btn {
  white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font: inherit; font-size: 13px; font-weight: 600; line-height: 1;
  padding: 10px 14px; border-radius: 10px; cursor: pointer;
  border: 1px solid rgba(254, 44, 85, .28);
  background: rgba(254, 44, 85, .07);
  color: var(--dy-brand);
  transition: background .18s ease, border-color .18s ease, transform .12s ease;
  -webkit-tap-highlight-color: transparent;
}
.dy-pick-btn:hover { background: rgba(254, 44, 85, .13); border-color: rgba(254, 44, 85, .5); }
.dy-pick-btn:active { transform: scale(.975); }
.dy-pick-btn:focus-visible { outline: 2px solid var(--dy-brand); outline-offset: 2px; }
.dy-pick-ico { display: inline-flex; }
.dy-pick-btn--card { width: 100%; margin-top: 8px; }
.dy-pick-btn--sheet { width: 100%; margin-top: 10px; }

/* ---------- 遮罩 / 面板 ---------- */
.dy-backdrop {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  background: rgba(12, 13, 18, .56);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .2s ease;
}
.dy-backdrop.is-open { opacity: 1; }
.dy-sheet {
  position: relative; width: min(720px, 100%);
  background: #fff; border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .28);
  transform: translateY(10px) scale(.985); opacity: .6;
  transition: transform .22s cubic-bezier(.2, .8, .3, 1), opacity .22s ease;
  max-height: calc(100vh - 48px); overflow: auto;
}
.dy-backdrop.is-open .dy-sheet { transform: none; opacity: 1; }
.dy-close {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 32px; height: 32px; border-radius: 50%; border: 0; cursor: pointer;
  background: #F4F4F6; color: #555; font-size: 18px; line-height: 1;
}
.dy-close:hover { background: #E9E9EE; }

.dy-head { padding: 24px 24px 8px; }
.dy-head h2 { margin: 10px 0 6px; font-size: 20px; line-height: 1.3; color: var(--dy-ink); }
.dy-head p { margin: 0; font-size: 13px; color: var(--dy-muted); }
.dy-badge {
  display: inline-flex; align-items: center; height: 22px; padding: 0 8px;
  border-radius: 6px; background: var(--dy-ink); color: #fff;
  font-size: 12px; font-weight: 700; letter-spacing: .5px;
}
.dy-badge::before { content: "♪"; margin-right: 4px; color: #25F4EE; }

.dy-body { display: grid; grid-template-columns: 260px 1fr; gap: 24px; padding: 16px 24px 24px; }
.dy-body--sm { display: block; }

/* ---------- 二维码 ---------- */
.dy-qr { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.dy-qr-box {
  width: 236px; height: 236px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--dy-line); border-radius: 14px; background: #fff; padding: 10px;
}
.dy-qr-box svg { width: 100%; height: 100%; display: block; }
.dy-qr-fallback { font-size: 12px; color: var(--dy-muted); text-align: center; }
.dy-qr-cap { font-size: 12px; color: var(--dy-muted); }

/* ---------- 商品信息 ---------- */
.dy-prod { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; background: #F7F7F9; }
.dy-prod-img { width: 56px; height: 56px; border-radius: 10px; object-fit: cover; flex: none; }
.dy-prod-img--ph { display: inline-flex; align-items: center; justify-content: center; background: var(--dy-ink); color: #fff; font-size: 20px; font-weight: 700; }
.dy-prod-txt { min-width: 0; }
.dy-prod-brand { font-size: 12px; color: var(--dy-muted); }
.dy-prod-title {
  margin: 2px 0 4px; font-size: 14px; font-weight: 600; color: var(--dy-ink);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.dy-prod-price { font-size: 15px; font-weight: 700; color: var(--dy-brand); }

/* ---------- 步骤 ---------- */
.dy-steps { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.dy-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: #444; line-height: 1.55; }
.dy-steps .dy-step-n {
  flex: none; width: 20px; height: 20px; border-radius: 50%; margin-top: 1px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--dy-ink); color: #fff; font-size: 11px; font-weight: 700; font-style: normal;
}
.dy-steps .dy-hl { font-style: normal; font-weight: 700; color: var(--dy-brand); }

/* ---------- 操作 ---------- */
.dy-actions { display: flex; gap: 10px; }
.dy-actions--col { flex-direction: column; }
.dy-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center;
  height: 42px; padding: 0 16px; border-radius: 10px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600; text-decoration: none;
  border: 1px solid transparent; transition: filter .18s ease, background .18s ease;
}
.dy-btn-primary { background: var(--dy-brand); color: #fff; }
.dy-btn-primary:hover { filter: brightness(1.06); }
.dy-btn-ghost { background: #fff; border-color: #DCDCE2; color: var(--dy-ink); }
.dy-btn-ghost:hover { background: #F7F7F9; }
.dy-btn-plain { background: transparent; color: var(--dy-muted); }
.dy-note { margin: 12px 0 0; font-size: 12px; color: var(--dy-muted); line-height: 1.5; }

/* ---------- 移动端底部面板 ---------- */
.dy-backdrop.dy-bottom { align-items: flex-end; padding: 0; }
.dy-backdrop.dy-bottom .dy-sheet {
  width: 100%; max-width: 520px; border-radius: 18px 18px 0 0;
  transform: translateY(24px); padding-bottom: env(safe-area-inset-bottom, 0);
}
.dy-grab { width: 40px; height: 4px; border-radius: 2px; background: #E2E2E7; margin: 10px auto 0; }
.dy-head--sm { padding: 16px 20px 4px; }
.dy-head--sm h2 { font-size: 17px; }
.dy-body--sm { padding: 12px 20px 22px; }

/* ---------- Toast ---------- */
.dy-toast {
  position: fixed; left: 50%; bottom: 64px; transform: translate(-50%, 12px);
  z-index: 10000; max-width: 82vw;
  padding: 10px 18px; border-radius: 999px;
  background: rgba(22, 24, 35, .92); color: #fff; font-size: 13px; line-height: 1.4;
  opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease;
}
.dy-toast.is-show { opacity: 1; transform: translate(-50%, 0); }

.dy-lock { overflow: hidden; }
.dy-copy-proxy { position: fixed; top: -1000px; left: -1000px; opacity: 0; }
.dy-launch-frame { position: absolute; width: 0; height: 0; border: 0; opacity: 0; pointer-events: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 700px) {
  .card-actions.dy-has-pick, .dy-has-pick { flex-wrap: wrap; }
  .dy-pick-btn--card { flex: 1 0 100%; }
}

@media (max-width: 640px) {
  .dy-backdrop { padding: 0; align-items: flex-end; }
  .dy-sheet { width: 100%; max-width: none; border-radius: 18px 18px 0 0; max-height: 88vh; }
  .dy-body { grid-template-columns: 1fr; gap: 16px; }
  .dy-qr-box { width: 200px; height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .dy-backdrop, .dy-sheet, .dy-toast, .dy-pick-btn { transition: none !important; }
}
