/* Full photographs for project and technical views, without stretching the files. */
.editorial-hero .photo {
  aspect-ratio: 4 / 3;
  background: var(--soft, #f0f1f1);
}
.editorial-hero .photo img,
.category-banner img,
.builder-card-media img,
.shop-hero img {
  object-fit: contain;
  object-position: center;
}

.category-banner {
  width: min(var(--wrap), calc(100% - 2rem));
  height: clamp(180px, 34vw, 360px);
  margin-inline: auto;
  background: var(--soft, #f0f1f1);
}

.shop-hero img {
  width: min(100%, 18rem);
  height: auto;
  aspect-ratio: auto;
  max-height: none;
  justify-self: center;
}

.catalog-photo img,
.shop-card-example-picture img,
.large-image img {
  object-fit: scale-down;
}

.gallery-dialog img {
  width: auto;
  height: auto;
  max-width: 100%;
  margin-inline: auto;
}

.slide .hero-photo:has(img) {
  inset-inline-start: 48%;
  background: none;
}

.slide .hero-photo img {
  object-fit: contain;
  object-position: center;
}

.slide:has(.hero-photo img)::after {
  background: linear-gradient(90deg, #141619 0 42%, #141619ba 49%, transparent 64%);
}

@media (max-width: 740px) {
  .slide:has(.hero-photo img):not([hidden]) {
    grid-template-rows: auto auto;
    align-content: start;
  }

  .slide .hero-photo:has(img) {
    position: relative;
    z-index: auto;
    inset: auto;
    height: clamp(12rem, 64vw, 19rem);
  }

  .slide:has(.hero-photo img)::after {
    content: none;
  }
}
