/* Products
--------------------------------------------- */

.archive-product .related-products {
  background-color: rgb(var(--base-50));

  & .page-header {
    margin-bottom: 3rem;

    & .title {
      font-weight: var(--font-black);
      font-size: var(--font-3xl);
      line-height: var(--leading-tight);
      margin-bottom: 1.5rem;
    }
  }

  & > .wrapper {
    max-width: var(--max-w-xxl);
    margin: 0 auto;
    padding: 4.5rem 24px;
  }

  & .section-title {
    font-weight: var(--font-black);
    font-size: var(--font-3xl);
    margin-bottom: 1.5rem;
  }

  & .products {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;

    @media (min-width: 960px) {
      grid-template-columns: repeat(4, minmax(0, 1fr));
      gap: 1.5rem;
    }

    & .product {
      & a {
        display: block;
        position: relative;

        & > .wrapper {
          position: absolute;
          z-index: 1;
          width: 100%;
          height: 100%;
          display: flex;
          align-items: end;
          padding: 24px;

          .title {
            flex-grow: 1;
            font-weight: var(--font-black);
            color: rgb(var(--primary-50));
            text-align: center;
            line-height: var(--leading-tight);
            font-size: var(--font-lg);

            @media (min-width: 960px) {
              font-size: var(--font-xl);
            }
          }
        }

        &::after {
          display: block;
          content: '';
          position: absolute;
          bottom: 0;
          left: 0;
          width: 100%;
          height: 50%;
          background: linear-gradient(
            0,
            rgba(var(--base-1000), 1),
            rgba(var(--base-1000), 0)
          );
          opacity: 1;
          transition: opacity 0.3s;
        }

        &:hover::after {
          opacity: 0.75;
        }
      }

      & img {
        object-fit: cover;
        width: 100%;
        height: 100%;
        aspect-ratio: 1 / 1;
        filter: grayscale(0.5);
      }
    }
  }
}
