/* 商品使用 · 商品位 + 人物位（并排）+ 出图比例选择
 * ============================================================================
 * 只做本功能需要的两块：并排双上传位（商品必填 / 人物可选）、比例胶囊。
 * 其余（banner / 卡片 / 补充要求 / 效果示例 / 结果区 / toast）复用 xt-* 与 ix-*。
 * ⚠️ 按项目规约：所有选择器带 #sub-productuse 作用域，不碰 style.css。
 * ⚠️ 类名统一 pu- 前缀，与其它功能的 of-/fm-/ms- 不重名。
 * ========================================================================== */

/* ── 双上传位：并排，等高 ───────────────────────────────────── */
#sub-productuse .pu-pair {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 2px;
}

#sub-productuse .pu-slot { position: relative; min-width: 0; }

#sub-productuse .pu-drop {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  min-height: 140px;
  border: 1.5px dashed #f0c9a8;
  border-radius: 16px;
  background: #fffaf6;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

#sub-productuse .pu-drop:active { background: #fff2e8; }
#sub-productuse .pu-drop.drag { border-color: var(--primary); background: #fff2e8; }
#sub-productuse .pu-drop.has-img { border-style: solid; border-color: #ffdcbf; background: #fff; }
#sub-productuse .pu-drop.has-img .pu-hint { display: none; }
#sub-productuse .pu-drop.has-img .pu-prev { display: block; }
#sub-productuse .pu-drop.has-img .pu-del { display: block; }

/* ── 上传位内部 ─────────────────────────────────────────────── */
#sub-productuse .pu-hint {
  text-align: center;
  padding: 0 8px;
  pointer-events: none;
}

#sub-productuse .pu-plus {
  font-size: 22px;
  line-height: 1;
  color: #d8a67a;
  font-weight: 300;
}

#sub-productuse .pu-hint-t {
  margin-top: 6px;
  font-size: 12px;
  color: #9a7b62;
  line-height: 1.5;
}

#sub-productuse .pu-prev {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #faf7f4;
}

#sub-productuse .pu-del {
  display: none;
  position: absolute;
  top: 6px;
  right: 6px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: rgba(0, 0, 0, .45);
  color: #fff;
  font-size: 14px;
  line-height: 22px;
  padding: 0;
  cursor: pointer;
  z-index: 2;
}

#sub-productuse .pu-req {
  position: absolute;
  left: 8px;
  top: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(249, 89, 1, .92);
  color: #fff;
  font-size: 11px;
  line-height: 1.5;
  z-index: 2;
}

#sub-productuse .pu-ok { color: #12a05c; font-weight: 700; margin-left: 4px; }

#sub-productuse .pu-cap {
  margin-top: 6px;
  font-size: 11.5px;
  color: #9a7b62;
  text-align: center;
  line-height: 1.4;
}

/* ── 出图比例胶囊 ───────────────────────────────────────────── */
#sub-productuse .pu-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 2px;
}

#sub-productuse .pu-chip {
  border: 1px solid #f0d8c4;
  background: #fff;
  color: #8a6a52;
  border-radius: 10px;
  padding: 8px 0;
  font-size: 12.5px;
  line-height: 1;
  cursor: pointer;
  flex: 1 1 calc(33.33% - 8px);
  text-align: center;
  transition: all .15s;
}

#sub-productuse .pu-chip.active {
  border-color: var(--primary);
  background: #fff2e8;
  color: var(--primary);
  font-weight: 600;
}

#sub-productuse .pu-note {
  margin: 10px 0 0;
  font-size: 11.5px;
  line-height: 1.6;
  color: #9a8b80;
}

/* ── 上传建议 ───────────────────────────────────────────────── */
#sub-productuse .pu-tips {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

#sub-productuse .pu-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(79, 70, 229, 0.04);
  border: 1px solid rgba(79, 70, 229, 0.10);
  font-size: 13px;
  line-height: 1.55;
}

#sub-productuse .pu-tip b {
  flex: 0 0 auto;
  min-width: 62px;
  color: #4f46e5;
  font-weight: 600;
}

#sub-productuse .pu-tip span { color: #4b5563; flex: 1 1 auto; }

/* ── 窄屏：两个上传位仍然并排，但提示文字小一号 ─────────────── */
@media (max-width: 360px) {
  #sub-productuse .pu-hint-t { font-size: 11px; }
  #sub-productuse .pu-drop { min-height: 120px; }
}
