.category-row-below-media {
    display: block;
    position: relative;
    clear: both;
    width: 100%;
    height: 208px;
    min-height: 208px;
    max-height: 315px;
    overflow: hidden;
    background: #f5f5f5;
    margin-top: 0 !important;
    margin-bottom: 40px !important;
    box-sizing: border-box;
}

/* Keep only media-enabled rows in normal document flow so existing rows stay unchanged. */
.category-products-row-section-has-media {
    display: flow-root;
    padding-bottom: 24px;
}

.category-products-row-section-has-media .category-row-below-media {
    margin-bottom: 0 !important;
}

/* Keep the first category row clear of the homepage hero banner. */
#section_home_categories {
    position: relative;
    clear: both;
    padding-top: 40px !important;
}

.category-row-below-media > a,
.category-row-below-media > div {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 0;
}

.category-row-below-media img,
.category-row-below-media video,
.category-row-below-media iframe {
    display: block !important;
    width: 100%;
    height: 100%;
    min-height: 0;
    object-fit: cover;
}

@media (min-width: 768px) {
    .category-products-row-section-has-media .category-row-below-media {
        height: 315px;
        min-height: 315px;
    }
}

@media (max-width: 767px) {
    #section_home_categories {
        padding-top: 24px !important;
    }
}
