.cshop-product-carousel .carousel-card-product-link {
    flex: 0 0 auto;
}

.cshop-product-carousel .product-brand-logo {
    box-sizing: border-box;
    height: 70px;
    min-height: 70px;
    padding: 10px 0 8px;
    display: flex;
    flex: 0 0 70px;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 0;
}

.cshop-product-carousel .product-brand-logo__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.cshop-product-carousel .product-brand-logo__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 52px;
    object-fit: contain;
}

.cshop-product-carousel .card-body .product-name {
    min-height: 3.2em;
}

.cshop-product-carousel .card-body .product-price {
    min-height: 3.2em;
    display: flex;
    align-content: flex-start;
    justify-content: center;
    flex-wrap: wrap;
}

.cshop-product-carousel .product-swatch-carousel {
    min-height: 32px;
}

.cshop-product-carousel .product-swatch-carousel--empty {
    visibility: hidden;
}

/* Category cards keep the logo inside the image box while reserving a stable row for it. */
.product-item,
.product-item .product-card,
.product-item .product-card-main-link,
.product-item .product-card-top,
.product-item .product-card-bottom {
    min-width: 0;
}

.product-item .product-card-top {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.product-item .product-card-main-link {
    flex: 0 0 auto;
    width: 100%;
    align-items: stretch;
}

.product-item .product-card-main-link .image-outer {
    flex: 0 0 auto;
    width: 100%;
}

.product-item .image-outer > img {
    display: block;
    width: 100%;
    max-width: 336px;
    height: auto;
    margin: 0 auto;
}

/* Product-list and search templates may wrap the image in a link. */
.product-item .image-outer img[data-product-swatch-target="image"] {
    display: block;
    width: 100%;
    max-width: 336px;
    height: auto;
    margin-left: auto;
    margin-right: auto;
}

.product-item .image-outer > .product-brand-logo,
.product-item .image-outer + .product-brand-logo {
    box-sizing: border-box;
    width: 100%;
    height: 70px;
    min-height: 70px;
    padding: 10px 0 8px;
    display: block;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 0;
}

.product-item .product-brand-logo__image {
    max-width: 100%;
}

.product-item .product-card .card-body,
.product-item .product-card-bottom {
    flex: 0 0 auto;
    min-width: 0;
}

.product-item .product-brand-logo__link {
    display: flex;
    width: 100%;
    height: 100%;
    margin: 0;
    align-items: center;
    justify-content: center;
    line-height: 0;
}

.product-item .product-brand-logo > .product-brand-logo__image {
    margin-left: auto;
    margin-right: auto;
}

.product-item .product-brand-logo__image {
    display: block;
    width: auto;
    height: auto;
    max-width: 150px;
    max-height: 52px;
    object-fit: contain;
}

.product-item .product-brand-logo--empty,
.product-item .product-swatch-carousel--empty {
    visibility: hidden;
}

.product-item .product-swatch-carousel--empty {
    min-height: 32px;
}

.product-item > .product-swatch-carousel {
    min-height: 32px;
}

.product-item .product-card .card-body {
    min-height: 3.2em;
}

.product-item .product-card-bottom {
    margin-top: auto;
}

@media (max-width: 767px) {
    .cshop-product-carousel .product-brand-logo {
        height: 58px;
        min-height: 58px;
        flex-basis: 58px;
    }

    .product-item .image-outer > .product-brand-logo,
    .product-item .image-outer + .product-brand-logo {
        height: 58px;
        min-height: 58px;
    }
}
