/* Catalog product cards */
.catalog-product-card {
    display: flex;
    flex-direction: column;
    align-self: start;
    width: 100% !important;
    height: auto !important;
    min-height: 0;
    box-sizing: border-box;
}

/* Search uses the same product partial as the catalog, but has no catalog grid. */
.search-products-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    align-items: start;
    align-content: start;
    width: 100%;
    box-sizing: border-box;
}

.search-products-grid .image-left {
    width: 100% !important;
    max-width: 100% !important;
    float: none !important;
    margin: 0 !important;
    padding: 0 !important;
}

.catalog-product-card__body {
    display: flex;
    flex: 0 0 auto;
    flex-direction: column;
    padding-bottom: 15px;
}

.catalog-product-card__title-wrap {
    display: flex;
    flex-direction: column;
    min-height: 61px;
}

.catalog-product-card__title {
    margin-bottom: 0;
}

.catalog-product-card__title a {
    display: -webkit-box;
    overflow: hidden;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.catalog-product-card__footer {
    display: flex;
    flex-direction: column;
    padding-top: 14px;
}

.catalog-product-card__price-list {
    margin-bottom: 10px;
}

.catalog-product-card .catalog-product-card__price-list .cart__price .sales-36 {
    position: static !important;
    top: auto !important;
    left: auto !important;
    display: inline-block;
    color: #003464 !important;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 18px !important;
    font-weight: 700;
    line-height: 1.35;
}

.catalog-product-card__actions {
    width: 100%;
}

.catalog-add-form {
    position: relative;
    display: grid !important;
    grid-template-columns: 96px 124px;
    gap: 8px;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin: 0 !important;
    box-sizing: border-box;
}

.catalog-quantity {
    display: grid;
    grid-template-columns: 32px 32px 32px;
    height: 36px;
    overflow: hidden;
    border: 1px solid #d9dee5;
    border-radius: 6px;
    background: #fff;
    box-sizing: border-box;
}

.catalog-quantity__button,
.catalog-quantity__input {
    width: 32px !important;
    min-width: 0;
    height: 34px !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0;
    box-shadow: none !important;
    box-sizing: border-box;
    line-height: 34px;
    text-align: center;
}

.catalog-quantity__button {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f5f7;
    color: #183f65;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
}

.catalog-quantity__button:hover,
.catalog-quantity__button:focus {
    background: #e7ebef;
    color: #dd2a2a;
}

.catalog-quantity__input {
    border-right: 1px solid #d9dee5 !important;
    border-left: 1px solid #d9dee5 !important;
    background: #fff !important;
    color: #222;
    font-size: 14px;
}

.catalog-add-form__submit-wrap {
    width: 124px;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
}

.catalog-add-button {
    position: static !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: 124px !important;
    height: 36px;
    margin: 0 !important;
    padding: 0 12px !important;
    border: 0;
    border-radius: 6px;
    box-shadow: none !important;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
}

.catalog-product-card .catalog-add-button span,
.catalog-product-card .catalog-add-button i {
    position: static !important;
    top: auto !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    display: inline-block;
    margin: 0 !important;
    padding: 0 !important;
    color: #fff !important;
    line-height: 1 !important;
    transform: none !important;
}

.catalog-product-card .catalog-add-button span {
    font-size: 13px !important;
    font-weight: 600;
}

.catalog-product-card .catalog-add-button i {
    font-size: 14px !important;
}

/* Carousel cards are narrower than catalog grid cards on desktop. */
.owl-carousel .catalog-add-form {
    grid-template-columns: 84px 108px;
    gap: 8px;
}

.owl-carousel .catalog-quantity {
    grid-template-columns: repeat(3, 28px);
    height: 34px;
}

.owl-carousel .catalog-quantity__button,
.owl-carousel .catalog-quantity__input {
    width: 28px !important;
    height: 32px !important;
    line-height: 32px;
}

.owl-carousel .catalog-add-form__submit-wrap,
.owl-carousel .catalog-add-button {
    width: 108px !important;
}

.owl-carousel .catalog-add-button {
    height: 34px;
    padding: 0 8px !important;
    font-size: 12px;
}

.owl-carousel .catalog-product-card__actions {
    min-width: 0;
}

.owl-carousel .catalog-product-card .product-img.shop5 {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 220px;
    overflow: hidden;
}

.owl-carousel .catalog-product-card .product-img.shop5 > a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100% !important;
    height: 100%;
    max-height: none;
}

.owl-carousel .catalog-product-card .product-img.shop5 > a > img {
    display: block;
    width: 100% !important;
    height: 100% !important;
    max-width: 100% !important;
    max-height: 100% !important;
    margin: 0 !important;
    padding: 10px;
    object-fit: contain;
    box-sizing: border-box;
}

@media (max-width: 575px) {
    .search-products-grid {
        grid-template-columns: 1fr;
    }

    .catalog-product-card__title-wrap {
        min-height: 0;
    }
}

@media (min-width: 576px) and (max-width: 991px) {
    .search-products-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
