/* Карточка каталога подстраивается под ориентацию первого фото */

.product-thumb.is-img-landscape .product_mid {
  flex-direction: row;
  align-items: center;
}

.product-thumb.is-img-landscape .image {
  flex: 1 1 58%;
  width: auto;
  max-width: none;
  min-width: 0;
}

.product-thumb.is-img-landscape .property {
  flex: 1 1 42%;
}

.product-thumb.is-img-portrait .product_mid,
.product-thumb.is-img-square .product_mid {
  flex-direction: column;
  align-items: stretch;
}

.product-thumb.is-img-portrait .image,
.product-thumb.is-img-square .image {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.product-thumb.is-img-portrait .image img {
  width: auto;
  max-width: 100%;
  max-height: 220px;
  height: auto;
  margin: 0 auto;
}

.product-thumb.is-img-square .image img {
  width: auto;
  max-width: 100%;
  max-height: 180px;
  height: auto;
  margin: 0 auto;
}

.product-thumb.is-img-portrait .property,
.product-thumb.is-img-square .property {
  width: 100%;
}

.recently-viewed .product-thumb.is-img-landscape .image {
  flex: 0 0 120px;
  width: 120px;
  max-width: 120px;
}

.recently-viewed .product-thumb.is-img-portrait .image img,
.recently-viewed .product-thumb.is-img-square .image img {
  max-height: 160px;
}

@media (max-width: 767.98px) {
  .product-thumb.is-img-landscape .image {
    flex: 0 0 46%;
    width: 46%;
    max-width: 46%;
  }

  .product-thumb.is-img-portrait .image img {
    max-height: 200px;
  }
}
