/* ==========================================================================
   商标买卖页（trademark-trade.html）—— 只在原静态页基础上补的样式
   卡片、筛选、流程仍用 style.css 里的既有类，这里只加：
   咨询弹窗、卖标入口卡、空态与加载态
   ========================================================================== */

/* ---------------- 列表状态 ---------------- */

.tm-status {
  padding: 44px 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-3);
}

.tm-status.bad {
  color: var(--red);
}

.tm-status b {
  color: var(--text-2);
}

/* ---------------- 卡片补充 ---------------- */

/* 同排卡片高度一致，但标签行数不同会让价格行上下错位。
   把 footer 推到卡片底部，一排价格就齐了。 */
.tm-card .tm-foot {
  margin-top: auto;
}

.tm-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.tm-tag {
  font-size: 11px;
  line-height: 1.6;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--brand-light);
  color: var(--brand-deep);
}

.tm-tag.line {
  background: #f4f7f5;
  color: var(--text-3);
}

.tm-remain {
  color: var(--brand-deep);
  font-weight: 600;
}

/* 咨询按钮：和「立即购买」区分开，交易走顾问，不做自助下单 */
.tm-card .tm-buy {
  background: var(--brand);
  border: 0;
  color: #fff;
  cursor: pointer;
  transition: background 0.16s ease;
}

.tm-card .tm-buy:hover {
  background: var(--brand-dark);
}

/* ---------------- 咨询弹窗 ---------------- */

.qm {
  position: fixed;
  inset: 0;
  z-index: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.qm[hidden] {
  display: none;
}

.qm-mask {
  position: absolute;
  inset: 0;
  background: rgba(16, 32, 25, 0.46);
  backdrop-filter: blur(2px);
}

.qm-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  max-height: 90vh;
  overflow-y: auto;
  background: #fff;
  border-radius: 16px;
  padding: 22px 22px 20px;
  box-shadow: 0 24px 60px rgba(9, 74, 45, 0.24);
  animation: qmIn 0.18s ease;
}

@keyframes qmIn {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

.qm-x {
  position: absolute;
  right: 14px;
  top: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.qm-x:hover {
  background: #f4f7f5;
  color: var(--text);
}

.qm-label {
  font-size: 11.5px;
  color: var(--brand-deep);
  background: var(--brand-light);
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-block;
}

.qm-name {
  font-size: 21px;
  font-weight: 700;
  color: var(--text);
  margin-top: 8px;
  line-height: 1.35;
}

.qm-meta {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 3px;
  line-height: 1.6;
}

.qm-price {
  display: flex;
  align-items: baseline;
  gap: 3px;
  margin: 14px 0 4px;
  padding: 12px 14px;
  background: linear-gradient(180deg, #f4fdf8, #ffffff);
  border: 1px solid var(--brand-line);
  border-radius: 10px;
}

.qm-price small {
  font-size: 14px;
  color: var(--price);
}

.qm-price b {
  font-size: 26px;
  color: var(--price);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
}

.qm-price span {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
  text-align: right;
  line-height: 1.5;
}

.qm-form {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.qm-form input,
.qm-form textarea {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fbfdfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.qm-form textarea {
  height: auto;
  padding: 10px 12px;
  line-height: 1.6;
  resize: vertical;
}

.qm-form input:focus,
.qm-form textarea:focus {
  background: #fff;
  border-color: var(--brand-mid);
  box-shadow: 0 0 0 3px rgba(18, 183, 106, 0.12);
}

.qm-form .qm-submit {
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-size: 15px;
  font-family: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease;
}

.qm-form .qm-submit:hover {
  background: var(--brand-dark);
}

.qm-form .qm-submit[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}

.qm-err {
  font-size: 12px;
  color: var(--red);
  min-height: 0;
  line-height: 1.5;
}

.qm-tip {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.7;
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.qm-tip a {
  color: var(--brand-deep);
  font-weight: 600;
}

.qm-done {
  text-align: center;
  padding: 8px 0 2px;
}

.qm-done-ico {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border-radius: 50%;
  background: var(--brand-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.qm-done-ico svg {
  width: 22px;
  height: 22px;
  stroke: var(--brand);
  fill: none;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.qm-done h4 {
  font-size: 16px;
  color: var(--text);
}

.qm-done p {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.7;
  margin-top: 6px;
}

.qm-done .no {
  display: inline-block;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-3);
  padding: 4px 10px;
  background: var(--bg-gray);
  border-radius: 6px;
}

/* ---------------- 卖标入口 ---------------- */

.sell-cta {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 28px;
  align-items: center;
}

.sell-cta-fml {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--brand-line);
  border-radius: 10px;
  padding: 12px 14px;
  margin: 16px 0 14px;
  font-size: 13px;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}

.sell-cta-fml b {
  color: var(--brand-deep);
  font-size: 15px;
}

.sell-cta-ex {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--text-2);
}

.sell-cta-ex span {
  background: rgba(255, 255, 255, 0.86);
  border: 1px solid var(--line-light);
  border-radius: 6px;
  padding: 3px 9px;
}

.sell-cta-ex span b {
  color: var(--brand-deep);
}

.sell-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}

.sell-card h4 {
  font-size: 15px;
  color: var(--text);
  margin-bottom: 12px;
}

.sell-card ol {
  margin: 0 0 16px;
  padding-left: 18px;
  font-size: 13px;
  color: var(--text-2);
  line-height: 2;
}

.sell-card ol b {
  color: var(--text);
}

.sell-card .need {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.8;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  margin-bottom: 16px;
}

.sell-card .need b {
  color: var(--text-2);
}

@media (max-width: 860px) {
  /* 手机端是单列，不需要为了对齐而固定 3 行高度；
     固定高度会让只有一行的说明下方留一大块空白 */
  .tm-card .tm-specs {
    height: auto;
    max-height: 3.6em;
    -webkit-line-clamp: 2;
    margin: 12px 0 14px;
  }

  .sell-cta {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .qm-card {
    padding: 20px 16px 16px;
    max-height: 92vh;
  }

  .qm-price b {
    font-size: 23px;
  }

  .qm-price span {
    display: none;
  }

  .tm-tags {
    margin-top: 8px;
  }
}

/* 窄屏下不希望被拆开的片段（日期、注册号） */
.qm-meta .nw {
  white-space: nowrap;
}
