section.products {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

section.products a {
    display: block;
    flex: 0 0 100%;
    background: linear-gradient(to bottom, var(--wc-green), var(--wc-green));
    background-repeat: no-repeat;
    background-size: 100% 0%;
    padding: 0.2rem;
    border-radius: 0.4rem;
    overflow: hidden;
    position: relative;
    transition: all ease 500ms;
}

section.products .product-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--wc-light-white);
    z-index: -1;
}

section.products a:hover {
    background-size: 100% 100%;
    box-shadow: 0 0 16px rgba(0, 0, 0, 0.5);
}

section.products .product-images {
    background-color: var(--wc-white);
    position: relative;
    border-radius: 0.25rem;
    overflow: hidden;
}

section.products .product-images img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: contain;
    background-color: var(--wc-white);
}

section.products .product-card {
    display: flex;
    flex-direction: column;
}

section.products .product-images img:nth-child(2) {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: scale(1);
    transition: opacity ease 300ms, transform ease 2s;
}

section.products .product-card:hover .product-images img:nth-child(2) {
    opacity: 1;
    transform: scale(1.05);
}

section.products .product-card h5 {
    color: var(--wc-dark);
    padding: 0 0.75rem;
    transition: all ease 300ms;
}

section.products a:hover .product-card h5 {
    color: var(--wc-white);
}

@media screen and (min-width: 576px) {
    section.products a {
        flex-basis: calc(50% - 0.5rem);
    }
}

@media screen and (min-width: 768px) {
    section.products {
        gap: 1rem;
    }

    .results section.products,
    .related-products section.products {
        gap: 1rem;
    }

    section.products a {
        flex-basis: calc(33% - 0.6rem);
    }

    .results section.products a,
    .related-products section.products a {
        flex-basis: calc(25% - 1.2rem);
    }
}

@media screen and (min-width: 992px) {
    section.products {
        gap: 2rem;
    }
        section.products a {
        flex-basis: calc(33% - 1.3rem);
    }
}

@media screen and (min-width: 1200px) {
    section.products {
        gap: 3rem;
    }

    section.products a {
        flex-basis: calc(33% - 1.9rem);
    }
}