.product-category {
  & > a {
    position: relative;
    overflow: hidden;
    display: block;
    padding-top: 130%;
    border-radius: var(--ns-radius) ;
  }

  img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    max-width: inherit;
    width: auto !important;
  }

  & > a::before {
    content: "";
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: 0.2s;
  }

  .woocommerce-loop-category__title {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 3;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: 0.2s;

    .count {
      background: #fff;
      color: #333;
      padding: 5px 10px;
      border-radius: var(--ns-radius) ;
    }
  }

  &:hover {
    & > a:before {
      background: rgba(0, 0, 0, 0.6);
    }

    .woocommerce-loop-category__title {
      padding-bottom: 5px;
    }
  }

  &--minimal {
    & > a {
      padding-top: 100%;
      background-color: #fff;
      transition: 0.2s;

      &::before {
        display: none;
      }
    }

    img {
      transform: none;
      top: 20px;
      height: calc(70% - 30px);
      max-width: calc(100% - 40px);
      left: 0;
      right: 0;
      margin-left: auto;
      margin-right: auto;
    }

    .woocommerce-loop-category__title {
      color: #555;
      bottom: 20px;
      height: calc(30% - 20px);
      text-align: center;
      left: 20px;
      right: 20px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-wrap: wrap;

      .count {
        display: none;
      }
    }

    &:hover {
      & > a {
        box-shadow: var(--ns-primary) 0 0 0 2px inset;
      }

      .woocommerce-loop-category__title {
        padding-bottom: 0;
        color: var(--ns-primary);
      }
    }
  }
}