/* HW COMPATIBLE — 推荐软硬件查询表 */
/* 前缀 hwc-（hardware compatible） */

body.hwc-page {
  padding-top: var(--nav-height);
  background: var(--slate-50);
  --hwc-card-overlap: clamp(48px, calc(100vw * 72 / 1440), 72px);
  --hwc-sidebar-w: clamp(168px, calc(100vw * 200 / 1440), 200px);
}

body.hwc-page .nav:not(.is-scrolled) {
  background: #fff;
  border-bottom-color: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

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

/* ── HWC-HERO ── */
.hwc-hero {
  position: relative;
  overflow: hidden;
  background: var(--slate-100);
}

.hwc-hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hwc-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center right;
  display: block;
}

.top-icon {
  position: absolute;
  width: 520px;
  height: 300px;
  top: 50%;
  transform: translateY(-50%);
  right: calc((100vw - 1440px) / 2 + 120px);
  background: url("/static/skin/images/service/top-icon.png") no-repeat center / contain;
}

@media (max-width: 1440px) {
  .top-icon {
    width: calc(520 / 1440 * 100vw);
    height: calc(370 / 1440 * 100vw);
    top: 50%;
    transform: translateY(-50%);
    right: calc(120 / 1440 * 100vw);
  }
}

.hwc-hero-inner {
  position: relative;
  z-index: 1;
  padding: clamp(40px, calc(100vw * 56 / 1440), 56px) 0
    calc(var(--hwc-card-overlap) + clamp(24px, calc(100vw * 32 / 1440), 32px));
}

.hwc-hero-inner .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px) 0 calc(var(--container-px) + 20px);
}

.hwc-hero-title {
  font-size: var(--fs-block-head);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin: 0 0 clamp(12px, calc(100vw * 16 / 1440), 16px);
}

.hwc-hero-desc {
  font-size: var(--fs-16);
  color: var(--on-surface-variant);
  line-height: 1.65;
  margin: 0;
}

.hwc-hero-desc + .hwc-hero-desc {
  margin-top: 4px;
}

/* ── HWC-MAIN / PANEL ── */
.hwc-main {
  margin-top: calc(var(--hwc-card-overlap) * -0.5);
  padding-bottom: clamp(56px, calc(100vw * 80 / 1440), 80px);
  position: relative;
  z-index: 2;
}

.hwc-main .container {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-px);
}

.hwc-panel {
  display: grid;
  grid-template-columns: var(--hwc-sidebar-w) minmax(0, 1fr);
  gap: clamp(30px, calc(100vw * 50 / 1440), 50px);
  background: #fff;
  border-radius: var(--r12);
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  padding: clamp(24px, 2vw, 32px);
  overflow: visible;
}

/* ── HWC-SIDEBAR ── */
.hwc-sidebar {
  padding: clamp(20px, calc(100vw * 24 / 1440), 24px)
    clamp(12px, calc(100vw * 16 / 1440), 16px);

  background: #fff;
  border-radius: var(--r12) 0 0 var(--r12);
}

.hwc-sidebar-group + .hwc-sidebar-group {
  margin-top: clamp(20px, calc(100vw * 24 / 1440), 24px);
  padding-top: clamp(20px, calc(100vw * 24 / 1440), 24px);
}

.hwc-sidebar-label {
  font-size: var(--fs-12);
  font-weight: 600;
  color: var(--slate-400);
  line-height: 1.4;
  margin: 0 0 10px;
  padding: 0 8px;
}

.hwc-nav {
  position: relative;
  margin: 0;
  padding: 0;
  list-style: none;
}

.hwc-nav::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 6px;
  bottom: 6px;
  width: 1px;
  background: #cdd9e8;
}

.hwc-nav-item {
  position: relative;
  display: block;
  width: 100%;
  padding: 10px 8px 10px 18px;
  border: none;
  border-radius: 0;
  background: none;
  font-family: inherit;
  font-size: var(--fs-14);
  font-weight: 500;
  color: var(--on-surface-variant);
  line-height: 1.45;
  text-align: left;
  cursor: pointer;
  transition: color 0.2s;
}

.hwc-nav-item::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 2px;
  background: var(--primary);
  opacity: 0;
  transition: opacity 0.2s;
}

.hwc-nav-item:hover {
  color: var(--primary);
}

.hwc-nav-item.is-active {
  color: var(--primary);
  font-weight: 600;
}

.hwc-nav-item.is-active::before {
  opacity: 1;
}

/* ── HWC-CONTENT ── */
.hwc-content {
  min-width: 0;
  padding: clamp(20px, calc(100vw * 28 / 1440), 28px)
    clamp(20px, calc(100vw * 28 / 1440), 28px)
    clamp(16px, calc(100vw * 20 / 1440), 20px);
}

.hwc-content-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: clamp(16px, calc(100vw * 20 / 1440), 20px);
  margin-bottom: clamp(14px, calc(100vw * 18 / 1440), 18px);
  border-bottom: 1px solid #e5e7eb;
}

.hwc-content-title {
  font-size: clamp(18px, calc(100vw * 30 / 1440), 30px);
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
  letter-spacing: -0.01em;
  margin: 0;
  flex-shrink: 0;
}

.hwc-content-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
  min-width: 0;
}

.hwc-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 1;
  max-width: 360px;
  min-width: 120px;
  height: 42px;
  border: 1px solid var(--outline-variant);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.hwc-search:focus-within {
  border-color: var(--primary-container);
  box-shadow: 0 0 0 3px rgba(0, 112, 198, 0.1);
  
}

.hwc-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  padding: 0 14px 0 44px;
  border: none;
  background: none;
  appearance: none;
  -webkit-appearance: none;
  font-family: inherit;
  font-size: var(--fs-14);
  color: var(--on-surface);
}

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

.hwc-search-input::placeholder {
  color: var(--slate-400);
}

.hwc-search-input:focus {
  outline: none;
}

.hwc-search-btn {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: none;
  background: none;
  color: #b8c0cf;
  cursor: pointer;
  transition: color 0.2s;
}

.hwc-search-btn:hover {
  color: var(--primary);
}

.hwc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  gap: 8px;
  height: 42px;
  padding: 0 28px;
  border-radius: 14px;
  border: 1px solid transparent;
  font-family: inherit;
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hwc-btn--primary::before {
  content: "";
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M14 3h7v7'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M10 14L21 3'/%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M21 14v6a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h6'/%3E%3C/svg%3E") no-repeat center / contain;
}

.hwc-btn--primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.hwc-btn--primary:hover {
  background: var(--primary-container);
  border-color: var(--primary-container);
}

/* ── HWC-TOOLBAR ── */
.hwc-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.hwc-filter {
  display: flex;
  align-items: center;
  gap: 14px;
}

.hwc-filter-label {
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.4;
  white-space: nowrap;
}

.hwc-filter-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
}

.hwc-filter-item {
  display: flex;
  align-items: center;
}

.hwc-select {
  min-width: 92px;
  height: 32px;
  padding: 0 26px 0 0;
  border: none;
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23333d4d' stroke-width='2.6'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") no-repeat right 2px center;
  font-family: inherit;
  font-size: var(--fs-16);
  font-weight: 500;
  color: var(--on-surface);
  cursor: pointer;
  appearance: none;
  transition: color 0.2s;
}

.hwc-select:hover {
  color: var(--primary);
}

.hwc-select:focus {
  outline: none;
  color: var(--primary);
}

.hwc-result-count {
  margin: 0;
  font-size: var(--fs-16);
  font-weight: 100;
  color: #222b38;
  letter-spacing: -0.01em;
  line-height: 1.4;
  white-space: nowrap;
}

/* ── HWC-TABLE ── */
.hwc-table-panel {
  position: relative;
  border: none;
  border-radius: var(--r8);
  overflow: hidden;
  background: #fff;
  min-height: 200px;
}

.hwc-table-loading {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(2px);
}

.hwc-table-panel.is-loading .hwc-table-loading {
  display: flex;
}

.hwc-table-panel.is-loading .hwc-table-scroll {
  pointer-events: none;
  user-select: none;
}

.hwc-table-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(30, 91, 181, 0.15);
  border-top-color: var(--primary, #1e5bb5);
  border-radius: 50%;
  animation: hwc-spin 0.8s linear infinite;
}

.hwc-table-loading-text {
  font-size: var(--fs-14);
  color: var(--on-surface-variant);
  line-height: 1.4;
}

@keyframes hwc-spin {
  to {
    transform: rotate(360deg);
  }
}

.hwc-table-scroll {
  overflow-x: auto;
}

.hwc-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: var(--fs-14);
}

.hwc-table thead {
  background: rgba(195, 212, 229, 0.2);
}

.hwc-table th {
  padding: 12px 16px;
  font-weight: 600;
  color: var(--on-surface);
  text-align: left;
  line-height: 1.4;
  border-bottom: none;
  white-space: nowrap;
}

.hwc-table th + th {
  border-left: none;
}

.hwc-table td {
  padding: 14px 16px;
  color: var(--on-surface-variant);
  line-height: 1.5;
  border-bottom: none;
  vertical-align: middle;
}

.hwc-table td + td {
  border-left: none;
}

.hwc-table tbody tr:nth-child(odd) {
  background: #fff;
}

.hwc-table tbody tr:nth-child(even) {
  background: rgba(195, 212, 229, 0.1);
}

.hwc-table tbody tr:last-child td {
  border-bottom: none;
}

.hwc-table tbody tr:hover td {
  background: transparent;
}

.hwc-table-empty {
  padding: 48px 24px;
  text-align: center;
}

.hwc-table-empty.is-hidden {
  display: none;
}

.hwc-table-panel.is-empty .hwc-table-scroll {
  display: none;
}

.hwc-table-empty-title {
  margin: 0 0 6px;
  font-size: var(--fs-16);
  font-weight: 600;
  color: var(--on-surface);
  line-height: 1.4;
}

.hwc-table-empty-desc {
  margin: 0;
  font-size: var(--fs-14);
  color: var(--on-surface-variant);
  line-height: 1.55;
}

/* ── HWC-PAGINATION ── */
.hwc-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: clamp(20px, calc(100vw * 24 / 1440), 24px);
}

.hwc-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--outline-variant);
  border-radius: var(--r8);
  background: #fff;
  font-family: inherit;
  font-size: var(--fs-14);
  color: var(--on-surface-variant);
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.hwc-page-btn:hover:not(:disabled):not(.is-active) {
  border-color: var(--primary-container);
  color: var(--primary);
}

.hwc-page-btn.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: default;
}

.hwc-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.hwc-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 32px;
  font-size: var(--fs-14);
  color: var(--slate-400);
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .hwc-panel {
    grid-template-columns: 1fr;
  }

  .hwc-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--outline-variant);
    border-radius: var(--r12) var(--r12) 0 0;
  }

  .hwc-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }

  .hwc-nav::before {
    display: none;
  }

  .hwc-nav li {
    flex: 0 1 auto;
  }

  .hwc-nav-item {
    border-radius: var(--r8);
    padding: 8px 12px;
    white-space: nowrap;
  }

  .hwc-nav-item::before {
    display: none;
  }

  .hwc-nav-item.is-active {
    background: rgba(0, 87, 156, 0.06);
  }
}

@media (max-width: 768px) {
  body.hwc-page {
    --hwc-card-overlap: 36px;
  }

  .top-icon {
    width: calc(520 / 1440 * 100vw * 2);
    height: calc(370 / 1440 * 100vw * 2);
    right: -30px;
  }

  .hwc-hero-inner {
    padding-top: 32px;
    padding-bottom: calc(var(--hwc-card-overlap) + 20px);
  }

  .hwc-hero-bg img {
    object-position: 70% center;
  }

  .hwc-content-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .hwc-content-title {
    font-size: 30px;
  }

  .hwc-content-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
    max-width: none;
    gap: 10px;
  }

  .hwc-search {
    max-width: none;
    min-width: 0;
    width: 100%;
    flex: 1;
    height: 46px;
  }

  .hwc-btn--primary {
    height: 46px;
    padding: 0 14px;
    min-width: 104px;
  }

  .hwc-toolbar {
    flex-direction: row;
    align-items: center;
    gap: 12px;
  }

  .hwc-filter {
    justify-content: flex-start;
    gap: 10px;
  }

  .hwc-filter-label {
    font-size: 18px;
  }

  .hwc-select {
    font-size: 18px;
  }

  .hwc-result-count {
    font-size: 30px;
    text-align: right;
  }

  .hwc-table th,
  .hwc-table td {
    padding: 10px 12px;
  }
}

@media (max-width: 640px) {
  .hwc-main .container {
    padding-left: 12px;
    padding-right: 12px;
  }

  .hwc-panel {
    border-radius: var(--r8);
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.08);
  }

  .hwc-content {
    padding: 16px;
  }

  .hwc-content-title {
    font-size: 18px;
  }

  .hwc-content-actions {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
  }

  .hwc-btn--primary {
    min-width: 92px;
    padding: 0 12px;
  }

  .hwc-filter-label {
    font-size: 16px;
  }

  .hwc-select {
    font-size: 16px;
  }

  .hwc-result-count {
    font-size: 14px;
  }
}
