/* ═══════════════════════════════════════════════════════════
   使用帮助
   ═══════════════════════════════════════════════════════════ */

.mall-app.tb-page.mall-app-tmall.mall-app-help {
  background: #e8ebf0;
}

.help-page {
  position: relative;
  padding-bottom: 64px;
}

.help-crumb {
  padding-top: 4px;
  margin-bottom: 20px;
}

/* ── Hero ── */
.help-hero {
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  border-radius: 24px;
  background: linear-gradient(145deg, #121216 0%, #252530 42%, #1a1a22 100%);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.help-hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 92% 8%, rgba(255, 0, 54, 0.22) 0%, transparent 52%),
    radial-gradient(ellipse 45% 35% at 8% 92%, var(--theme-brand-ring) 0%, transparent 48%);
}

.help-hero-inner {
  position: relative;
  padding: 32px 36px 36px;
}

.help-hero h1 {
  margin: 0 0 10px;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: #fff;
}

.help-hero-desc {
  margin: 0 0 22px;
  max-width: 560px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.65);
}

/* ── 搜索 ── */
.help-search {
  position: relative;
  display: flex;
  align-items: center;
}

.help-search-icon {
  position: absolute;
  left: 16px;
  color: rgba(255, 255, 255, 0.45);
  pointer-events: none;
}

.help-search-input {
  width: 100%;
  min-height: 48px;
  padding: 0 44px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  font-size: 15px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.help-search-input::-webkit-search-cancel-button,
.help-search-input::-webkit-search-decoration {
  display: none;
  -webkit-appearance: none;
}

.help-search-input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.help-search-input:focus {
  border-color: rgba(255, 255, 255, 0.35);
  background: rgba(255, 255, 255, 0.14);
}

.help-search-input:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 0, 54, 0.25);
}

.help-search-clear {
  position: absolute;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(255, 255, 255, 0.55);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.help-search-clear:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.help-search-meta {
  margin: 10px 0 0;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.help-empty {
  margin: 0 0 20px;
  padding: 20px 24px;
  border-radius: 12px;
  border: 1px dashed rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.7);
  color: #666;
  font-size: 14px;
  text-align: center;
}

.help-section--hidden {
  display: none !important;
}

.help-nav--hidden {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── 移动端目录 ── */
.help-mobile-nav {
  display: none;
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -16px 20px;
  padding: 10px 16px;
  background: rgba(232, 235, 240, 0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
}

.help-mobile-nav::-webkit-scrollbar {
  display: none;
}

.help-mobile-nav-track {
  display: flex;
  gap: 8px;
}

.help-mobile-nav-link {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: #fff;
  color: #555;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.15s;
}

.help-mobile-nav-link.is-active {
  border-color: var(--mall-orange, var(--theme-brand));
  background: var(--mall-orange, var(--theme-brand));
  color: #fff;
}

.help-mobile-nav-link:focus-visible {
  outline: 2px solid var(--mall-orange, var(--theme-brand));
  outline-offset: 2px;
}

/* ── 双栏 ── */
.help-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.help-sidebar {
  position: sticky;
  top: 16px;
}

.help-main {
  min-width: 0;
}

.help-toc {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 16px 12px 18px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.help-toc-title {
  margin: 0 0 10px 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid #f0f0f0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #aaa;
}

.help-toc-link {
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 8px;
  color: #666;
  font-size: 13px;
  line-height: 1.45;
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.help-toc-link:focus-visible {
  outline: 2px solid var(--mall-orange, var(--theme-brand));
  outline-offset: 1px;
}

.help-toc-link:hover {
  background: #f8f8f8;
  color: var(--mall-orange, var(--theme-brand));
}

.help-toc-link.is-active {
  background: var(--mall-orange-bg, var(--theme-brand-soft));
  color: var(--mall-orange, var(--theme-brand));
  font-weight: 600;
}

/* ── 正文 ── */
.help-content {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.help-section {
  scroll-margin-top: 96px;
  padding: 0;
  border-radius: 16px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: border-color 0.2s;
}

.help-section:hover {
  border-color: rgba(0, 0, 0, 0.11);
}

.help-section-head {
  margin: 0;
  padding: 20px 24px 16px;
  background: #fafbfc;
  border-bottom: 1px solid #f0f0f0;
}

.help-section-head:has(+ .help-steps),
.help-section-head:has(+ .help-faq) {
  border-bottom: none;
  padding-bottom: 12px;
}

.help-section-head-text h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #111;
}

.help-section-body,
.help-steps,
.help-faq {
  padding: 20px 24px 24px;
}

.help-section-body {
  font-size: 14px;
  line-height: 1.8;
  color: #555;
}

.help-section-body > p {
  margin: 0 0 14px;
}

.help-section-body > p + .help-list,
.help-section-body > .help-list + .help-list {
  margin-top: 14px;
}

.help-section-body .help-ordered {
  margin: 0;
  padding-left: 1.35em;
  color: #555;
}

.help-section-body .help-ordered li + li {
  margin-top: 10px;
}

.help-subblock + .help-subblock {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #f5f5f5;
}

.help-subblock h3 {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  color: #222;
}

.help-subblock p {
  margin: 0;
}

/* ── 步骤 ── */
.help-step {
  display: flex;
}

.help-steps--grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  padding: 4px 20px 20px;
}

.help-steps--grid.help-steps--grid-many {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.help-steps--grid::before {
  display: none;
}

.help-steps--grid .help-step {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 16px 14px;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  background: #f8f9fb;
  transition: border-color 0.2s, background 0.2s;
}

.help-steps--grid .help-step:hover {
  border-color: var(--mall-orange-border, var(--theme-brand-border));
  background: #fff;
}

.help-step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--mall-orange, var(--theme-brand));
  color: #fff;
  font-size: 15px;
  font-weight: 800;
}

.help-step-body strong {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.help-step-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: #666;
}

.help-step-body a {
  color: var(--mall-orange, var(--theme-brand));
  font-weight: 500;
  text-decoration: none;
}

.help-step-body a:hover {
  text-decoration: none;
}

/* ── 列表 ── */
.help-list {
  margin: 0;
  padding-left: 1.3em;
}

.help-list:not(.help-list--cards) li + li {
  margin-top: 10px;
}

.help-list--cards {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.help-list--cards li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 16px 18px;
  border-radius: 12px;
  background: #f8f9fb;
  border: 1px solid rgba(0, 0, 0, 0.07);
  transition: border-color 0.15s, background 0.15s;
}

.help-list--cards li:hover {
  border-color: var(--mall-orange-border, var(--theme-brand-border));
  background: #fff;
}

.help-list--cards li strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #111;
}

.help-list--cards li span {
  display: block;
  font-size: 13px;
  line-height: 1.65;
  color: #666;
}

.help-list--cards-quad {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.help-ordered {
  margin: 0;
  padding-left: 1.35em;
}

.help-ordered li + li {
  margin-top: 10px;
}

/* ── 提示框（预留） ── */
.help-callout {
  margin-bottom: 20px;
  padding: 16px 20px;
  border-radius: 12px;
  border-left: 4px solid var(--mall-orange, var(--theme-brand));
  background: linear-gradient(90deg, var(--mall-orange-bg, var(--theme-brand-soft)), #fff);
}

.help-callout p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: #333;
}

.help-callout--muted {
  border-left-color: #ddd;
  background: #f8f9fa;
}

/* ── 链接 ── */
.help-section-body a,
.help-faq-answer a {
  color: var(--mall-orange, var(--theme-brand));
  font-weight: 500;
  text-decoration: none;
}

.help-section-body a:hover,
.help-faq-answer a:hover {
  text-decoration: none;
}

.help-section-body code {
  padding: 2px 6px;
  border-radius: 4px;
  background: #f0f2f5;
  font-size: 12px;
  color: #444;
}

/* ── FAQ ── */
.help-faq {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.help-faq-item {
  border: 1px solid #eee;
  border-radius: 12px;
  background: #fafbfc;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.help-faq-item[open] {
  border-color: var(--mall-orange-border, var(--theme-brand-border));
  background: #fff;
}

.help-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  color: #222;
  list-style: none;
  user-select: none;
}

.help-faq-item summary:focus-visible {
  outline: 2px solid var(--mall-orange, var(--theme-brand));
  outline-offset: -2px;
  border-radius: 12px;
}

.help-faq-item summary::-webkit-details-marker {
  display: none;
}

.help-faq-item summary::after {
  content: '';
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-right: 2px solid #999;
  border-bottom: 2px solid #999;
  transform: rotate(45deg);
  transition: transform 0.2s;
}

.help-faq-item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
  border-color: var(--mall-orange, var(--theme-brand));
}

.help-faq-answer {
  padding: 0 18px 16px;
}

.help-faq-answer p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: #666;
}

.help-section--faq .help-faq {
  padding-top: 0;
}

/* ── 响应式 ── */
@media (max-width: 1200px) {
  .help-steps--grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .help-steps--grid.help-steps--grid-many {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 992px) {
  .help-layout {
    grid-template-columns: 1fr;
  }

  .help-sidebar {
    display: none;
  }

  .help-mobile-nav {
    display: block;
    top: var(--mall-m-topbar-h, 52px);
    z-index: 140;
  }

  .help-hero-inner {
    padding: 24px 20px 28px;
  }

  .help-hero h1 {
    font-size: 26px;
  }

  .help-section {
    scroll-margin-top: calc(var(--mall-m-topbar-h, 52px) + 52px);
  }

  .help-steps--grid {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 0 16px 16px;
  }

  .help-section-head,
  .help-section-body,
  .help-steps,
  .help-faq {
    padding-left: 18px;
    padding-right: 18px;
  }

  .help-list--cards {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px) {
  .help-mobile-nav {
    margin-left: -24px;
    margin-right: -24px;
  }
}

@media (min-width: 1648px) {
  .help-mobile-nav {
    margin-left: 0;
    margin-right: 0;
  }
}

@media (max-width: 640px) {
  .help-hero {
    border-radius: 16px;
    margin-bottom: 16px;
  }

  .help-hero h1 {
    font-size: 22px;
  }

  .help-hero-desc {
    font-size: 14px;
    margin-bottom: 18px;
  }

  .help-search-input {
    min-height: 44px;
    font-size: 14px;
    padding-left: 40px;
  }

  .help-search-icon {
    left: 14px;
  }
}
