/* Layout and thumbnail: .wpb-header--thumbnail in layout/header.css. */
.wpb-header.wpb-header--product-archive { border-top: 1px solid var(--clr-border);
    .wpb-subcategories-ancestors .wpb-ancestor { font-size: 1.4rem; font-weight: 600; color: var(--clr-text-grey);
        i, .icon { font-size: 1rem; }
    }

    .badge-group { gap: 1rem;
        .badge { min-height: 3rem; font-size: 1.4rem; padding: .25rem 1.4rem; }
    }
}

.wpb-product-archive__product-loop {
    /* The CTA card shifts the even/odd count of the products after it: flip the 2-column divider there. */
    @media (max-width: 575.98px) {
        .wpb-product-archive__products .js-results-cta ~ .wpb-card.wpb-card--product {
            &:nth-child(2n) { border-left: none; }
            &:nth-child(2n+1) { border-left: .1rem solid var(--clr-border); }
        }
    }
}

.wpb-product-archive {
    @media(min-width: 768px) { padding-top: 4.8rem; }

    .wpb-product-archive__products:has(.wpb-card--header-cta) { grid-auto-flow: row dense; }

    /* Full width: dense packing fills the cells before it, so it always starts a new row. */
    .wpb-product-archive__products .wpb-card--header-cta { grid-column: span var(--gc, 1); align-content: center; align-items: center;
        @media (max-width: 575.98px) { border-radius: 0; border-width: .1rem 0 0; }

        @container productLoop (width > 600px) {
            grid-template-columns: auto minmax(0, 1fr); grid-template-areas: 'image body' 'image footer'; column-gap: 2.4rem; row-gap: 1.6rem; padding: 2.4rem 3.2rem;
            .wpb-card__header { grid-area: image; width: 8rem; height: 8rem; }
            .wpb-card__body { grid-area: body; }
            .wpb-card__footer { grid-area: footer; grid-column: auto; align-items: center; }
        }

        @container productLoop (width > 1000px) {
            grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: 'image body footer';
            .wpb-card__footer { flex-wrap: nowrap; justify-content: flex-end; }
        }
    }
}