.list {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;

  @for $var from 0 to 40 {
    &.count-#{$var} {
      .item:not(.empty):nth-child(n + #{$var + 1}) {
        display: none;
      }
    }
  }
}

.item {
  box-sizing: border-box;
  width: 226px;
  padding: 5px;
  margin-bottom: 1rem;
  cursor: pointer;
  //animation: show 0.3s;

  main {
    width: 216px;
    height: 140px;
    text-align: center;

    img {
      max-width: 100%;
      max-height: 100%;
    }
  }

  footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;

    .info {
      flex: 1;
      overflow: hidden;

      .name,
      .category {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }

      .subtitle {
        color: gray;
        font-size: 0.9rem;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }
    }

    .control {
      display: none;
    }
  }

  &:hover,
  &.hover {
    background-color: var(--main-item-bg-color-hover);

    dstore-star {
      display: none;
    }

    footer .control {
      display: block;
    }

    span {
      display: none;
    }
  }
}

@keyframes show {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.empty {
  height: 0;
  padding: 0;
}
