/* Product grid with variants as cards. The cards themselves come from the Loop Item
   template; this only lays out the grid, the built-in fallback card and the pagination. */

.m1881w-vg {
    --m1881w-cols: 3;
    --m1881w-col-gap: 20px;
    --m1881w-row-gap: 20px;
}

.m1881w-vg__grid {
    display: grid;
    grid-template-columns: repeat(var(--m1881w-cols), minmax(0, 1fr));
    gap: var(--m1881w-row-gap) var(--m1881w-col-gap);
}

.m1881w-vg__item {
    display: flex;
    min-width: 0;
}

.m1881w-vg__item > * {
    width: 100%;
}

.m1881w-vg__empty {
    padding: 24px 0;
}

/* -- built-in card ---------------------------------------------------------- */

.m1881w-vg .m1881w-vg__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 20px;
    box-sizing: border-box;
    background: #fff;
    box-shadow: 0 0 15px rgba(182, 182, 182, 0.2);
    color: inherit;
    text-decoration: none;
}

.m1881w-vg .m1881w-vg__card:hover,
.m1881w-vg .m1881w-vg__card:focus {
    color: inherit;
    text-decoration: none;
}

.m1881w-vg__media {
    display: block;
    margin-bottom: 12px;
}

.m1881w-vg .m1881w-vg__img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 1;
    object-fit: contain;
}

.m1881w-vg__brand {
    display: block;
    margin-bottom: 6px;
    color: #8a8178;
    font-size: 0.8em;
    text-transform: uppercase;
}

.m1881w-vg__title {
    display: block;
    margin-bottom: 6px;
    line-height: 1.35;
}

.m1881w-vg__price {
    display: block;
    margin-top: auto;
}

/* -- pagination ------------------------------------------------------------- */

.m1881w-vg__pagination {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.m1881w-vg__pagination .page-numbers {
    color: inherit;
    text-decoration: none;
}

.m1881w-vg__pagination .page-numbers.current {
    font-weight: 700;
}
