:root {
  --accent: #ea0c32;
  --accent-dark: #c70929;
  --ink: #2b2929;
  --muted: #6f6b6c;
  --line: #ded9da;
  --stripe: #fff6f7;
  --surface: #ffffff;
  --page: #f7f7f7;
}

.catalog-page,
.catalog-page * {
  box-sizing: border-box;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.catalog-page {
  margin: 0;
  color: var(--ink);
  background: var(--page);
}

.catalog-page a {
  color: inherit;
}

.catalog-page .catalog-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  width: min(1280px, calc(100% - 48px));
  max-width: 100%;
  min-height: calc(100vh - 80px);
  margin: 40px auto;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid #ece9ea;
}

.catalog-page .sidebar {
  min-width: 0;
  padding: 34px 24px;
  border-right: 1px solid #ece9ea;
}

.catalog-page .library-link {
  display: inline-block;
  margin: 0 12px 24px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.catalog-page .library-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.catalog-page .sidebar-label {
  margin: 0 12px 24px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.catalog-page .category-nav {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 4px;
}

.catalog-page .category-link {
  display: block;
  position: relative;
  padding: 11px 12px 11px 16px;
  color: #4d494a;
  font-size: 15px;
  line-height: 1.35;
  text-decoration: none;
  transition: color 160ms ease, background 160ms ease;
}

.catalog-page .category-link:hover {
  color: var(--accent);
  background: #fff7f8;
}

.catalog-page .category-link.active {
  color: var(--accent);
  background: #fff3f5;
  font-weight: 700;
}

.catalog-page .category-link.active::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 4px;
  background: var(--accent);
  content: "";
}

.catalog-page .content {
  min-width: 0;
  padding: 48px 52px 56px;
}

.catalog-page .title {
  margin: 0 0 14px;
  color: var(--accent);
  font-size: 32px;
  font-weight: 600;
  line-height: 1.2;
}

.catalog-page .desc {
  max-width: 840px;
  margin: 0 0 32px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}

.catalog-page .table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
}

.catalog-page table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: fixed;
}

.catalog-page th {
  height: 46px;
  padding: 10px 12px;
  color: #fff;
  background: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.42);
  font-size: 14px;
  font-weight: 600;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.catalog-page td {
  height: 60px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.35;
  text-align: center;
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.catalog-page tbody tr:nth-child(even) {
  background: var(--stripe);
}

.catalog-page tbody tr:hover {
  background: #fff0f2;
}

.catalog-page .col-series {
  width: 13%;
}

.catalog-page .col-dimension {
  width: 26%;
}

.catalog-page .col-frequency {
  width: 29%;
}

.catalog-page .col-pad {
  width: 8%;
}

.catalog-page .col-picture {
  width: 14%;
}

.catalog-page .col-view {
  width: 10%;
}

.catalog-page .frequency-note {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.catalog-page .product-picture {
  display: block;
  width: 72px;
  height: 42px;
  margin: 0 auto;
  object-fit: contain;
}

.catalog-page .detail-link {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.catalog-page .detail-link:hover {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.catalog-page .image-missing {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 42px;
  color: #aaa5a6;
  background: #f5f2f3;
  border: 1px dashed #d8d2d4;
  font-size: 11px;
}

.catalog-page .catalog-count {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 13px;
  text-align: right;
}

.catalog-page .catalog-nojs {
  max-width: 680px;
  margin: 40px auto;
  padding: 28px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}

.catalog-page .catalog-nojs h1 {
  margin: 0 0 10px;
  color: var(--accent);
  font-size: 24px;
}

@media (max-width: 900px) {
  .catalog-page .catalog-shell {
    grid-template-columns: 1fr;
    width: min(100% - 24px, 760px);
    margin: 12px auto;
  }

  .catalog-page .sidebar {
    padding: 18px 18px 16px;
    border-right: 0;
    border-bottom: 1px solid #ece9ea;
  }

  .catalog-page .sidebar-label {
    margin: 0 4px 12px;
  }

  .catalog-page .category-nav {
    flex-direction: row;
    overflow-x: auto;
    padding-bottom: 4px;
  }

  .catalog-page .category-link {
    flex: 0 0 auto;
    max-width: 230px;
    padding: 9px 12px;
    white-space: nowrap;
  }

  .catalog-page .category-link.active::before {
    top: auto;
    right: 8px;
    bottom: 0;
    left: 8px;
    width: auto;
    height: 3px;
  }

  .catalog-page .content {
    padding: 34px 24px 42px;
  }

  .catalog-page .title {
    font-size: 27px;
  }
}

@media (max-width: 560px) {
  .catalog-page .catalog-shell {
    width: 100%;
    margin: 0;
    border-right: 0;
    border-left: 0;
  }

  .catalog-page .content {
    padding: 28px 16px 36px;
  }

  .catalog-page .title {
    font-size: 24px;
  }

  .catalog-page .desc {
    margin-bottom: 24px;
    font-size: 14px;
  }
}
