/* Product photography: fit the complete source image inside a bounded canvas. */
.product-card .product-card__media {
  position: relative;
  height: 220px;
  aspect-ratio: auto;
  background: #fff;
  display: block;
}
.product-card .product-card__media > a {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}
.product-card .product-card__media img,
.product-card .product-card__media > a > img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  padding: 40px 22px 20px;
  object-fit: scale-down;
  object-position: center;
  transform: none;
}
.product-card:hover .product-card__media img { transform: none; }

.seo-product__media { min-width: 0; width: 100%; max-width: 460px; margin-inline: auto; }
.seo-product__media > img {
  display: block;
  width: 100%;
  height: 340px;
  max-height: 340px;
  box-sizing: border-box;
  padding: 20px;
  object-fit: scale-down;
  object-position: center;
  background: #fff;
}
.modal__media > img#modalImage {
  display: block;
  width: 100%;
  height: 320px;
  max-height: 320px;
  box-sizing: border-box;
  padding: 22px 52px;
  object-fit: scale-down;
  object-position: center;
  background: #fff;
}
.modal__thumbs img,
.seo-gallery img {
  object-fit: scale-down;
  object-position: center;
  background: #fff;
  box-sizing: border-box;
  padding: 4px;
}
.seo-gallery { gap: 9px; margin-top: 10px; }
.seo-gallery button { width: 64px; height: 64px; }
.app-card > img {
  width: 100%;
  height: 210px;
  box-sizing: border-box;
  object-fit: scale-down;
  object-position: center;
  background: #fff;
  padding: 18px;
}
.app-card:hover > img { transform: none; }
.detail-curve img,
.seo-prose figure > img {
  display: block;
  width: 100%;
  height: 320px;
  max-height: 320px;
  box-sizing: border-box;
  padding: 12px;
  object-fit: scale-down;
  object-position: center;
  background: #fff;
}
.product-image-open,
.seo-prose a.product-image-open {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  margin: 8px 0 0;
  padding: 5px 10px;
  border: 1px solid var(--line, #dce2dd);
  border-radius: 8px;
  background: #fff;
  color: var(--accent, #156a52);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  text-decoration: none;
  cursor: zoom-in;
}
.product-image-open:hover { border-color: var(--accent, #156a52); }
.product-image-open[hidden] { display: none; }
.modal__media > .product-image-open { margin: 8px 12px 10px; }
.detail-curve > .product-image-open { margin: 4px 10px 10px; }
[data-product-image-viewable] { cursor: zoom-in; }

.product-image-viewer {
  width: min(1100px, calc(100vw - 32px));
  height: min(900px, calc(100dvh - 32px));
  max-width: calc(100vw - 32px);
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: #fff;
  color: #0e1512;
  box-shadow: 0 24px 90px #0006;
}
.product-image-viewer[open] { display: flex; flex-direction: column; }
.product-image-viewer::backdrop { background: rgba(10, 15, 13, .78); }
.product-image-viewer__header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid #e4e8e5;
  flex: 0 0 auto;
}
.product-image-viewer__title {
  flex: 1 1 220px;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font-size: 13px;
  font-weight: 600;
}
.product-image-viewer__tools { display: flex; align-items: center; gap: 8px; }
.product-image-viewer__tools button,
.product-image-viewer__tools a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #dce2dd;
  border-radius: 7px;
  background: #fff;
  color: #156a52;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.product-image-viewer__tools button[aria-pressed="true"] { background: #e4efe9; }
.product-image-viewer__canvas {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 16px;
  background: #f6f7f5;
}
.product-image-viewer__canvas img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #fff;
}
.product-image-viewer[data-actual-size="true"] .product-image-viewer__canvas {
  display: block;
  overflow: auto;
}
.product-image-viewer[data-actual-size="true"] .product-image-viewer__canvas img {
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  margin: 0 auto;
}
.product-image-viewer__status { padding: 8px 16px; font-size: 12px; }

@media (max-width: 760px) {
  .product-card .product-card__media { height: 205px; }
  .product-card .product-card__media img,
  .product-card .product-card__media > a > img { padding: 38px 20px 18px; }
  .seo-product__media > img { height: 240px; max-height: 240px; padding: 14px; }
  .modal__media > img#modalImage { height: 245px; max-height: 245px; padding: 18px 42px; }
  .seo-gallery button { width: 56px; height: 56px; }
  .modal__thumbs img { width: 56px; height: 56px; }
  .app-card > img { height: 185px; padding: 16px; }
  .detail-curve img,
  .seo-prose figure > img { height: 250px; max-height: 250px; padding: 8px; }
  .product-image-viewer { width: calc(100vw - 16px); height: calc(100dvh - 16px); max-width: calc(100vw - 16px); max-height: calc(100dvh - 16px); border-radius: 12px; }
  .product-image-viewer__header { gap: 8px; padding: 10px 12px; }
  .product-image-viewer__title { flex-basis: 100%; }
  .product-image-viewer__tools { width: 100%; justify-content: flex-end; }
  .product-image-viewer__canvas { padding: 8px; }
}
