.main {
  width: 100%;
  overflow: hidden;
}

.main .box {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
  padding: 8px 2.1% 24px;
}

.main .box > div {
  min-width: 0;
}

/* The legacy catalog uses unclosed wrapper divs around each link. */
.main .box div:has(> a) {
  display: contents;
}

.main .box .sub-category > div {
  padding: 12px 0 0 2.1%;
  font-size: 18px;
}
.main .box .item {
  width: auto;
  height: 100%;
  box-sizing: border-box;
  border: 1px solid #e4ecf3;
  box-shadow: 1px 2px 3px #f2f6f8;
  border-radius: 6px;
  background: #fff;
  padding: 10px;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  transition: all .3s;
}
.main .box a {
  display: block;
  height: 100%;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.main .box .item:hover {
  transform: translateY(-5px);
}
.main .box .item .no-logo {
  color: #3273dc;
  font-weight: bold;
  font-size: 14px;
}
.main .box .item .logo {
  height: 40px;
  position: relative;
  font-size: 14px;
  font-weight: 700;
  color: #3273dc;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 .1rem;
}
.main .box .item .logo img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  vertical-align: middle;
}
.main .box .item .desc {
  color: gray;
  font-size: 12px;
  padding-top: 10px;
  height: 35px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

@media (max-width: 767px) {
  html,
  body {
    overflow-x: hidden;
  }

  .main .box {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 4px 10px 20px;
  }

  .main .box .item {
    padding: 10px 9px;
    border-radius: 8px;
  }

  .main .box .item .logo {
    height: auto;
    min-height: 40px;
    line-height: 20px;
    white-space: normal;
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .main .box .item .logo img {
    flex: 0 0 40px;
  }

  .main .box .item .desc {
    height: 34px;
    padding-top: 8px;
    line-height: 17px;
  }
}

@media (max-width: 360px) {
  .main .box {
    gap: 8px;
    padding-right: 8px;
    padding-left: 8px;
  }

  .main .box .item {
    padding-right: 7px;
    padding-left: 7px;
  }

  .main .box .item .logo {
    font-size: 13px;
    gap: 5px;
  }

  .main .box .item .logo img {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
}
