/* V045: one presentation ratio for raster photographs and product artwork.
   EU funding notices keep their native wide format; original files, SVG identity
   artwork and native inspection zoom are retained. */
:where(img[src]:not([src*=".svg"]):not(.partner):not(.footer-brand):not([src="/assets/eu-2026.jpg"]):not([src="/assets/eu-2026-preview.webp"])){
  display:block;
  box-sizing:border-box;
  width:100% !important;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  max-width:100% !important;
  aspect-ratio:4/3 !important;
  object-fit:contain !important;
  object-position:center !important;
  background:#f3f5f6;
}

/* Remove old fixed-height frames so each row follows its actual media width. */
.card-photo,
.bft-product-image,
.bft-card-remote .bft-product-image,
.bft-main-grid-single .bft-product-image{
  display:block;
  box-sizing:border-box;
  height:auto !important;
  min-height:0 !important;
  max-height:none !important;
  aspect-ratio:4/3;
  padding:0 !important;
  overflow:hidden;
  align-self:start;
}
.card-photo img,
.bft-product-image img,
.bft-card-remote .bft-product-image img,
.bft-main-grid-single .bft-product-image img{
  margin:0 !important;
  align-self:auto;
}
.bft-product-image img{padding:24px;background:#fff !important}
.bft-card-remote .bft-product-image,
.bft-main-grid-single .bft-product-image{border-right:0;border-bottom:1px solid #e5edf2}
.about-image,.smart-image{height:auto !important;min-height:0 !important}
.solar-feature-image picture,
.solar-spotlight picture,
.solar-product-photo picture,
.solar-control-layout picture,
.sb-visual picture{
  display:block;
  height:auto;
  min-height:0;
  aspect-ratio:4/3;
}

/* Product stage and its picture share the same dimensions, without inner crop. */
.gallery-stage,.solar-product-grid .gallery-stage{
  border:0;
  padding:0;
  width:100%;
  height:auto;
  min-height:0;
  aspect-ratio:4/3;
  box-shadow:inset 0 0 0 1px #e0e7ec;
}
.gallery-stage picture{
  position:relative;
  inset:auto;
  display:block;
  width:100%;
  height:auto;
  aspect-ratio:4/3;
}
.gallery-stage .gallery-main-image,
.product-detail .product-gallery .gallery-main-image.detail-photo{
  position:relative;
  inset:auto;
  padding:12px;
  background:#fff;
}
.gallery-thumb,.gallery-thumb[aria-pressed="true"]{
  padding:0;
  border:0;
  min-height:0;
  height:auto;
  aspect-ratio:4/3;
  box-shadow:inset 0 0 0 1px #d8e2e9;
}
.gallery-thumb img{padding:5px;background:#fff !important}
.gallery-thumb[aria-pressed="true"]{box-shadow:inset 0 0 0 2px #0086c5,0 0 0 2px #00a0ea13}
.gallery-thumb:hover{box-shadow:inset 0 0 0 1px #7bb7d6}
.gallery-thumb[aria-pressed="true"]:hover{box-shadow:inset 0 0 0 2px #0086c5,0 0 0 2px #00a0ea13}

/* Fit an uncropped 4:3 viewing canvas inside the dialog on short screens. */
.gallery-dialog-viewport:not(.is-zoomed){
  display:block;
  min-height:0;
  padding:12px;
}
.gallery-dialog-viewport:not(.is-zoomed) .gallery-dialog-image{
  width:min(100%,72dvh) !important;
  margin:0 auto;
  background:#fff;
}
.gallery-dialog-viewport.is-zoomed .gallery-dialog-image{
  width:var(--gallery-native-width) !important;
  height:auto !important;
  max-width:none !important;
  max-height:none !important;
  aspect-ratio:auto !important;
}

/* Small inquiry previews must follow the same shape after a product is chosen. */
.iq-context #iq-image:not([src*=".svg"]){width:96px !important;flex:0 0 96px;background:#fff}

@media(max-width:600px){
  .bft-product-image img{padding:18px}
  .iq-context #iq-image:not([src*=".svg"]){width:80px !important;flex-basis:80px}
  .gallery-dialog-viewport:not(.is-zoomed) .gallery-dialog-image{width:min(100%,64dvh) !important}
}
