.vmpe {
    --vmpe-gap: 1.25rem;
    --vmpe-desktop-basis: 25%;
    --vmpe-tablet-basis: 50%;
    --vmpe-mobile-basis: 100%;
    --vmpe-image-width: 280px;
    --vmpe-image-height: 190px;
    --vmpe-product-min-height: 0px;
}

.vmpe__header,
.vmpe__footer {
    margin-block: 0 1rem;
}

.vmpe__footer {
    margin-block: 1rem 0;
}

.vmpe__grid {
    display: flex;
    flex-wrap: wrap;
    margin: calc(var(--vmpe-gap) / -2);
}

.vmpe__item {
    box-sizing: border-box;
    flex: 0 0 var(--vmpe-desktop-basis);
    max-width: var(--vmpe-desktop-basis);
    padding: calc(var(--vmpe-gap) / 2);
}

.vmpe__card {
    display: flex;
    flex-direction: column;
    min-height: var(--vmpe-product-min-height);
    height: 100%;
}

.vmpe__media-container {
    width: 100%;
}

.vmpe__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    width: 100%;
    min-height: var(--vmpe-image-height);
    text-decoration: none;
}

.vmpe__media-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.vmpe__image {
    display: block;
    width: min(100%, var(--vmpe-image-width));
    height: var(--vmpe-image-height);
    object-fit: contain;
}

.vmpe__labels {
    position: absolute;
    inset: .6rem .6rem auto auto;
}

.vmpe__labels ul {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    align-items: flex-end;
    margin: 0;
    padding: 0;
    list-style: none;
}

.vmpe__label {
    display: inline-block;
    padding: .3rem .55rem;
    border-radius: .25rem;
    background: rgba(0, 0, 0, .78);
    color: #fff;
    font-size: .75rem;
    font-weight: 700;
    line-height: 1.2;
}

.vmpe__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
}

.vmpe__title {
    margin: .8rem 0 .55rem;
    font-size: 1.05rem;
    line-height: 1.3;
}

.vmpe__title a {
    color: inherit;
    text-decoration: none;
}

.vmpe__meta {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .8rem;
    margin: 0 0 .75rem;
    padding: 0;
    list-style: none;
    font-size: .92rem;
}

.vmpe__description {
    margin: 0 0 .75rem;
}

.vmpe__price {
    margin-top: auto;
    margin-bottom: .75rem;
    font-weight: 700;
}

.vmpe__actions {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    align-items: center;
}

.vmpe__cart-form {
    margin: 0;
}

.vmpe__cart-button,
.vmpe__detail,
.vmpe__more-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    padding: .5rem .8rem;
    border: 1px solid currentColor;
    border-radius: .25rem;
    background: transparent;
    color: inherit;
    font: inherit;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
}


.vmpe__links {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem 1rem;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.vmpe--carousel {
    position: relative;
}

.vmpe__carousel-controls {
    display: flex;
    justify-content: flex-end;
    gap: .4rem;
    margin-bottom: .5rem;
}

.vmpe__carousel-button {
    width: 2.4rem;
    height: 2.4rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    background: transparent;
    color: inherit;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
}

.vmpe__track {
    display: flex;
    gap: var(--vmpe-gap);
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: inline mandatory;
    scrollbar-width: thin;
}

.vmpe__track .vmpe__item {
    flex: 0 0 calc(var(--vmpe-desktop-basis) - var(--vmpe-gap));
    max-width: none;
    padding: 0;
    scroll-snap-align: start;
}

.vmpe--compact .vmpe__card {
    flex-direction: row;
    gap: 1rem;
}

.vmpe--compact .vmpe__media-container {
    flex: 0 0 min(35%, var(--vmpe-image-width));
    width: auto;
}

.vmpe--compact .vmpe__media {
    min-height: 0;
}

.vmpe--compact .vmpe__media-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.vmpe--compact .vmpe__image {
    height: auto;
    max-height: var(--vmpe-image-height);
}

.vmpe__price--meta {
    margin: 0;
}

@media (max-width: 900px) {
    .vmpe__item {
        flex-basis: var(--vmpe-tablet-basis);
        max-width: var(--vmpe-tablet-basis);
    }

    .vmpe__track .vmpe__item {
        flex-basis: calc(var(--vmpe-tablet-basis) - var(--vmpe-gap));
    }
}

@media (max-width: 600px) {
    .vmpe__item {
        flex-basis: var(--vmpe-mobile-basis);
        max-width: var(--vmpe-mobile-basis);
    }

    .vmpe__track .vmpe__item {
        flex-basis: min(88%, var(--vmpe-mobile-basis));
    }

    .vmpe--compact .vmpe__card {
        flex-direction: column;
    }

    .vmpe--compact .vmpe__media-container {
        flex-basis: auto;
        width: 100%;
    }
}
