/* Keep product and blog card content aligned in carousels and listing grids. */
:is(.products-inner, .yf-aligned-cards) .yf-aligned-card {
    direction: rtl;
    text-align: start;
}

html[lang="en"] :is(.products-inner, .yf-aligned-cards) .yf-aligned-card {
    direction: ltr;
}

:is(.products-inner, .yf-aligned-cards) .yf-aligned-card .product {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 370px;
}

:is(.products-inner, .yf-aligned-cards) .yf-aligned-card .product__image {
    flex: 0 0 auto;
    margin-bottom: 14px;
}

:is(.products-inner, .yf-aligned-cards) .yf-aligned-card .product__body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: stretch;
    min-width: 0;
    text-align: start;
}

:is(.products-inner, .yf-aligned-cards) .yf-aligned-card .product-link {
    display: block;
    width: 100%;
    min-width: 0;
    height: auto;
}

:is(.products-inner, .yf-aligned-cards) .yf-aligned-card .product__body h3 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    overflow-wrap: anywhere;
    max-height: 4.2em;
    margin: 0 !important;
    padding: 0 !important;
    line-height: 1.4 !important;
    text-align: start;
}

:is(.products-inner, .yf-aligned-cards) .yf-product-card .yf-product-meta {
    width: 100%;
    margin-top: auto !important;
    padding-top: 12px;
    align-items: flex-start !important;
    justify-content: flex-end !important;
    text-align: start;
}

:is(.products-inner, .yf-aligned-cards) .yf-product-card .yf-product-meta > a,
:is(.products-inner, .yf-aligned-cards) .yf-product-card .yf-product-meta > strong,
:is(.products-inner, .yf-aligned-cards) .yf-product-card .yf-product-meta > s {
    width: 100%;
    max-width: 100%;
    height: auto !important;
    text-align: start !important;
    overflow-wrap: anywhere;
}

:is(.products-inner, .yf-aligned-cards) .yf-blog-card .product__body h3 {
    font-size: 18px !important;
}

:is(.products-inner, .yf-aligned-cards) .yf-blog-card .yf-blog-date {
    display: block;
    width: 100%;
    margin-top: auto;
    padding-top: 12px;
    color: #4b5360;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.35;
    text-align: start;
}

.products-grid.yf-aligned-cards {
    align-items: stretch;
}

.products-grid.yf-aligned-cards > .yf-aligned-card {
    display: flex;
}

.products-grid.yf-aligned-cards > .yf-aligned-card > .product {
    flex: 1 1 auto;
    width: 100%;
}

@media (max-width: 991px) {
    :is(.products-inner, .yf-aligned-cards) .yf-aligned-card .product {
        min-height: 310px;
    }
}
