/* PDP upsell product-card grid */
.mt-pdp-upsells__title {
    margin: 0 0 1rem;
}

.mt-pdp-upsells .product-card.mt-pdp-upsells__grid {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.mt-pdp-upsells .product-card.mt-pdp-upsells__grid > .x-row-inner {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    width: 100% !important;
    gap: 0.25rem;
    align-items: start;
}

.mt-pdp-upsells .product-card.mt-pdp-upsells__grid .product-loop {
    box-sizing: border-box;
    width: auto !important;
    max-width: none !important;
    min-width: 0;
    margin: 0.625rem 0.15625rem !important;
}

/* PDP upsell card content alignment */
.mt-pdp-upsells .product-loop .product-cart,
.mt-pdp-upsells .product-loop .x-text-headline,
.mt-pdp-upsells .product-loop .x-text-content,
.mt-pdp-upsells .product-loop .x-text-content-text {
    box-sizing: border-box;
    width: 100% !important;
    max-width: 100% !important;
}

.mt-pdp-upsells .product-loop .product-cart {
    margin: 0 0 0.5rem !important;
}

.mt-pdp-upsells .product-loop .x-text-content-text-primary {
    display: block;
    margin: 0 0 0.375rem !important;
    line-height: 1.35;
}

.mt-pdp-upsells .product-loop h3.x-text-content-text-primary {
    color: #000 !important;
    font-size: 0.8125rem !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
}

@media (max-width: 1023px) {
    .mt-pdp-upsells .product-card.mt-pdp-upsells__grid > .x-row-inner {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .mt-pdp-upsells .product-card.mt-pdp-upsells__grid > .x-row-inner {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
