/*
 * Keep supplied product photography undistorted. Images retain their complete
 * subject while the surrounding surface provides the art direction.
 */

:root {
  --pibuno-photo-surface: #f4f7fa;
  --pibuno-photo-line: #dce4eb;
  --pibuno-photo-shadow: 0 18px 42px rgba(18, 45, 70, 0.1);
}

/* Homepage product presentation */
.hero-card {
  border-color: #d8e1e8;
  border-radius: 6px;
  box-shadow: 0 22px 46px rgba(17, 40, 61, 0.14);
}

.hero-card img {
  padding: 14px;
  object-fit: contain;
  object-position: center;
  background: linear-gradient(145deg, #ffffff 0%, var(--pibuno-photo-surface) 100%);
}

.hero-card--main img {
  padding: 22px 20px 54px;
}

.hero-card--top img,
.hero-card--bottom img {
  padding: 12px 10px 42px;
}

.hero-card__caption,
.hero-card__mini-copy {
  box-shadow: 0 7px 18px rgba(7, 29, 52, 0.16);
}

.product-card {
  border-color: #dfe5ea;
  box-shadow: 0 4px 16px rgba(18, 45, 70, 0.04);
}

.product-card__image,
.catalog-card__image {
  position: relative;
  background:
    radial-gradient(circle at 72% 18%, rgba(20, 91, 151, 0.07), transparent 42%),
    linear-gradient(145deg, #fbfcfd 0%, var(--pibuno-photo-surface) 100%);
}

.product-card__image::after,
.catalog-card__image::after {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(29, 65, 94, 0.08);
  border-radius: 2px;
  content: "";
  pointer-events: none;
}

.product-card__image img,
.catalog-card__image img {
  position: relative;
  z-index: 1;
  object-fit: contain;
  object-position: center;
}

.product-card__image {
  padding: clamp(16px, 1.7vw, 24px);
}

.catalog-card__image {
  padding: 22px;
}

/* Editorial image tiles on the homepage and About page */
.image-tile,
.about-collage div {
  border: 1px solid var(--pibuno-photo-line);
  background: linear-gradient(145deg, #ffffff 0%, var(--pibuno-photo-surface) 100%);
  box-shadow: var(--pibuno-photo-shadow);
}

.image-tile img,
.about-collage img {
  padding: clamp(18px, 2.2vw, 30px);
  object-fit: contain;
  object-position: center;
}

.image-tile--small {
  border-width: 6px;
}

.image-tile--small img {
  padding: 12px;
}

/* Half-image page heroes such as OEM / private label */
.split-hero__media {
  display: grid;
  min-height: 650px;
  place-items: center;
  padding: clamp(34px, 4vw, 62px);
  background:
    linear-gradient(135deg, transparent 48%, rgba(12, 75, 134, 0.045) 49%, transparent 50%),
    #edf3f7;
  background-size: 86px 86px, auto;
  border-right: 1px solid #d7e0e7;
}

.split-hero__media img {
  width: 100%;
  height: auto;
  max-height: 540px;
  padding: clamp(16px, 2vw, 26px);
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--pibuno-photo-line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--pibuno-photo-shadow);
}

/* Two-image material section used by OEM pages */
.oem-materials__visual img {
  padding: clamp(16px, 2vw, 24px);
  object-fit: contain;
  object-position: center;
  border: 1px solid var(--pibuno-photo-line);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff 0%, var(--pibuno-photo-surface) 100%);
  box-shadow: var(--pibuno-photo-shadow);
}

/* Product-detail hero: make the supplied cut-out photograph feel intentional */
.product-hero__image {
  padding: clamp(12px, 2vw, 24px);
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 8px;
  background: #fff;
  filter: none;
  box-shadow: 0 30px 64px rgba(3, 20, 35, 0.3);
}

.product-hero__halo {
  inset: 62px 48px;
  background: radial-gradient(circle, rgba(80, 151, 211, 0.2), transparent 68%);
}

.page-hero__workbench,
.page-hero__product {
  padding: 14px;
  border: 1px solid var(--pibuno-photo-line);
  background: linear-gradient(145deg, #ffffff 0%, var(--pibuno-photo-surface) 100%);
}

.page-hero__workbench img,
.page-hero__product {
  object-fit: contain;
  object-position: center;
}

@media (max-width: 980px) {
  .split-hero__media {
    min-height: 0;
    padding: 26px;
    border-right: 0;
    border-bottom: 1px solid #d7e0e7;
  }

  .split-hero__media img {
    width: min(100%, 560px);
    height: auto;
    aspect-ratio: 1 / 1;
    margin-inline: auto;
  }
}

@media (max-width: 720px) {
  .hero-card img {
    padding: 9px;
  }

  .hero-card--main img {
    padding: 12px 10px 44px;
  }

  .hero-card--top img,
  .hero-card--bottom img {
    padding: 8px 6px 34px;
  }

  .product-card__image {
    padding: 18px;
  }

  .catalog-card__image {
    padding: 18px;
  }

  .image-tile img,
  .about-collage img {
    padding: 18px;
  }

  .image-tile--small img {
    padding: 10px;
  }

  .split-hero__media {
    padding: 18px;
  }

  .split-hero__media img {
    padding: 14px;
  }

  .oem-materials__visual img,
  .oem-materials__visual img:last-child {
    padding: 14px;
  }

  .page-hero__workbench,
  .page-hero__product {
    padding: 10px;
  }
}
