/*
 * Product image quality V8
 * Preserve source pixels in the detail view instead of stretching/cropping.
 */

.modal-image {
  position: relative;
  min-width: 0;
  padding: clamp(18px, 2.5vw, 38px);
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #f7f3ec;
}

.modal-image img {
  position: absolute;
  inset: clamp(18px, 2.5vw, 38px);
  display: block;
  width: calc(100% - 2 * clamp(18px, 2.5vw, 38px));
  max-width: none;
  height: calc(100% - 2 * clamp(18px, 2.5vw, 38px));
  max-height: none;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
}

.product-card-carne .product-image {
  background: #f7f3ec;
}

.product-card-carne .product-image img {
  object-fit: contain;
  object-position: center;
  transform: none;
}

.product-card-carne:hover .product-image img {
  transform: scale(1.012);
}

@media (max-width: 760px) {
  .modal-image {
    height: min(46svh, 430px) !important;
    padding: 0 !important;
  }

  .modal-image img {
    inset: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    object-fit: contain !important;
  }
}
