/* 查看服务 — 服务入口选择（与 webtor.css / 仪表盘卡片风格一致） */
.service-hub {
  max-width: 1120px;
  margin: 0 auto;
}

.service-hub-head {
  text-align: center;
  margin-bottom: 28px;
  padding: 28px 24px 32px;
  border-radius: 12px;
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

html[data-theme="light"] .service-hub-head {
  box-shadow: 0 4px 16px rgba(31, 35, 40, 0.06);
}

.service-hub-eyebrow {
  display: inline-flex;
  align-items: center;
  margin: 0 0 12px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-primary);
  background: rgba(88, 166, 255, 0.12);
  border: 1px solid rgba(88, 166, 255, 0.22);
}

html[data-theme="light"] .service-hub-eyebrow {
  background: rgba(9, 105, 218, 0.08);
  border-color: rgba(9, 105, 218, 0.18);
}

.service-hub-title {
  margin: 0 0 10px;
  font-size: clamp(22px, 3.6vw, 28px);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  line-height: 1.3;
}

.service-hub-sub {
  margin: 0 auto;
  max-width: 520px;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  line-height: 1.65;
}

.service-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  align-items: stretch;
}

.service-hub-platform-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 880px;
  margin: 0 auto;
}

@media (max-width: 960px) {
  .service-hub-grid,
  .service-hub-platform-grid {
    grid-template-columns: 1fr;
  }
}

/* 商品页入口 — 独立紧凑区（商品较多时） */
.service-hub-cg-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

.service-hub-cg-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin-bottom: 16px;
}

.service-hub-cg-heading {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.service-hub-cg-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-color);
  background: var(--bg-tertiary);
}

.service-hub-cg-search {
  flex: 1 1 180px;
  min-width: 0;
  max-width: 320px;
  margin-left: auto;
  padding: 8px 12px;
  font-size: 13px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.service-hub-cg-search:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 2px rgba(88, 166, 255, 0.15);
}

.service-hub-cg-no-match {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  padding: 16px;
  border-radius: 8px;
  border: 1px dashed var(--border-color);
  background: var(--bg-tertiary);
}

.service-hub-cg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  align-items: stretch;
}

@media (max-width: 480px) {
  .service-hub-cg-grid {
    grid-template-columns: 1fr;
  }
}

.service-hub-card--compact {
  min-height: 0;
  padding: 14px 14px 12px;
}

.service-hub-card--compact .service-hub-card-head {
  margin-bottom: 10px;
}

.service-hub-card--compact .service-hub-card-icon {
  width: 38px;
  height: 38px;
  font-size: 18px;
  border-radius: 8px;
}

.service-hub-card--compact h2 {
  font-size: 15px;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-hub-card--compact .service-hub-intro {
  font-size: 12px;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.service-hub-card--compact .service-hub-card-cta {
  margin-top: auto;
  padding: 9px 12px;
  font-size: 13px;
}

.service-hub-card--compact.service-hub-card--hidden {
  display: none !important;
}

.service-hub-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
  position: relative;
  background-color: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 20px 18px 16px;
  min-height: 280px;
  transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
  overflow: hidden;
}

.service-hub-card-tag {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  max-width: calc(100% - 20px);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--accent-primary);
  background: rgba(88, 166, 255, 0.14);
  border: 1px solid rgba(88, 166, 255, 0.28);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}

html[data-theme="light"] .service-hub-card-tag {
  color: #0969da;
  background: rgba(9, 105, 218, 0.08);
  border-color: rgba(9, 105, 218, 0.2);
}

.service-hub-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  opacity: 0.65;
  transition: opacity 0.2s ease;
}

.service-hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--accent-primary);
  background-color: var(--bg-tertiary);
}

.service-hub-card:hover::before {
  opacity: 1;
}

.service-hub-card-head {
  position: relative;
  display: flex;
  gap: 12px;
  margin-bottom: 14px;
  min-height: 0;
  align-items: flex-start;
}

.service-hub-card-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  line-height: 1;
  border-radius: 10px;
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent-primary);
  border: 1px solid var(--border-color);
}

html[data-theme="light"] .service-hub-card-icon {
  background: rgba(9, 105, 218, 0.08);
}

.service-hub-card[data-supply-channel="smm"] .service-hub-card-icon {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent-primary);
}

.service-hub-card[data-supply-channel="yiciyuan_mall"] .service-hub-card-icon {
  background: rgba(63, 185, 80, 0.12);
  color: var(--accent-success);
}

html[data-theme="light"] .service-hub-card[data-supply-channel="yiciyuan_mall"] .service-hub-card-icon {
  background: rgba(26, 127, 55, 0.1);
}

.service-hub-card[data-supply-channel="custom"] .service-hub-card-icon,
.service-hub-card[data-custom-goods-page="1"] .service-hub-card-icon {
  background: rgba(210, 153, 34, 0.12);
  color: var(--accent-warning);
}

html[data-theme="light"] .service-hub-card[data-supply-channel="custom"] .service-hub-card-icon,
html[data-theme="light"] .service-hub-card[data-custom-goods-page="1"] .service-hub-card-icon {
  background: rgba(154, 103, 0, 0.1);
}

.service-hub-card-head-inner {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
}

.service-hub-card h2 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

.service-hub-intro {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  line-height: 1.55;
}

.service-hub-panel {
  flex: 1;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 14px 16px 16px;
}

html[data-theme="light"] .service-hub-panel {
  background: var(--bg-secondary);
}

.service-hub-panel ul {
  margin: 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
}

.service-hub-panel li {
  margin-bottom: 6px;
}

.service-hub-panel li:last-child {
  margin-bottom: 0;
}

.service-hub-panel-desc {
  margin: 0;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.75;
  white-space: pre-line;
}

.service-hub-card-cta {
  margin-top: 14px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--btn-primary-fg);
  background: linear-gradient(90deg, var(--gradient-start), var(--gradient-end));
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.service-hub-card:hover .service-hub-card-cta {
  opacity: 0.92;
  transform: translateY(-1px);
}

.service-hub-card-cta::after {
  content: '→';
  font-size: 15px;
  font-weight: 600;
}

.service-hub-categories {
  margin-top: 4px;
}

.service-hub-cat-layout {
  display: grid;
  grid-template-columns: minmax(0, 200px) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

@media (max-width: 768px) {
  .service-hub-cat-layout {
    grid-template-columns: 1fr;
  }
}

.service-hub-cat-tabs {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-secondary);
  position: sticky;
  top: 12px;
  max-height: min(70vh, 520px);
  overflow-y: auto;
}

@media (max-width: 768px) {
  .service-hub-cat-tabs {
    flex-direction: row;
    flex-wrap: wrap;
    position: static;
    max-height: none;
  }
}

.service-hub-cat-tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.4;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

@media (max-width: 768px) {
  .service-hub-cat-tab {
    width: auto;
    flex: 1 1 auto;
    min-width: 0;
  }
}

.service-hub-cat-tab:hover {
  color: var(--text-primary);
  background: rgba(88, 166, 255, 0.08);
  border-color: rgba(88, 166, 255, 0.15);
}

.service-hub-cat-tab.active {
  color: var(--text-primary);
  font-weight: 600;
  background: rgba(88, 166, 255, 0.14);
  border-color: rgba(88, 166, 255, 0.35);
}

html[data-theme="light"] .service-hub-cat-tab.active {
  background: rgba(9, 105, 218, 0.1);
  border-color: rgba(9, 105, 218, 0.28);
}

.service-hub-cat-tab:disabled {
  display: none !important;
}

.service-hub-cat-panels {
  min-width: 0;
}

.service-hub-category {
  display: none;
}

.service-hub-category.active {
  display: block;
}

.service-hub-category-desc {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.service-hub-category-grid {
  margin-top: 0;
}

@media (max-width: 960px) {
  .service-hub-category-grid {
    grid-template-columns: 1fr;
  }
}
