/* Shared product-page galleries. Homepage image surfaces are deliberately unselected. */
.product-page .cfp-product-gallery{
  display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px;
  width:100%;max-width:1160px;margin:20px auto 0;padding:6px 4px 8px;align-items:stretch;
}
.product-page .cfp-media-card{
  --media-angle:-.75deg;display:flex;flex-direction:column;min-width:0;width:100%;max-width:none;
  margin:0;padding:0;background:#fff;border:1px solid #d6e0e6;border-top:3px solid #c7a349;
  border-radius:12px;overflow:hidden;box-shadow:0 10px 24px #102b4012;
  transform:rotate(var(--media-angle));transform-origin:50% 50%;
  transition:transform 220ms ease,box-shadow 220ms ease,border-color 220ms ease;
}
.product-page .cfp-media-card:nth-child(even){--media-angle:.75deg}
.product-page .cfp-product-gallery>.cfp-media-card:only-child{grid-column:auto}
.product-page .cfp-media-card .screen-open{
  width:100%;display:block;margin:0;padding:0;border:0;border-radius:0;background:#102a3c;
  box-shadow:none;text-align:left;transform:none!important;transition:none;
}
.product-page .cfp-media-card .cfp-media-chrome{
  display:flex;justify-content:space-between;align-items:center;gap:12px;padding:8px 12px;
  border-bottom:1px solid #345061;background:#102a3c;color:#dce6ed;font-size:10px;
  font-weight:700;line-height:1.5;letter-spacing:.08em;text-transform:uppercase;
}
.product-page .cfp-media-card .cfp-media-chrome>span:last-child{color:#edce78;white-space:nowrap;letter-spacing:.02em;text-transform:none}
.product-page .cfp-media-card .screen-viewport{
  display:flex;justify-content:center;align-items:center;position:relative;width:100%;aspect-ratio:16/9;
  overflow:hidden;padding:12px;background:linear-gradient(145deg,#17394d,#0c2131);box-sizing:border-box;
}
.product-page .cfp-media-card .screen-viewport img{
  position:static;inset:auto;display:block;width:100%;height:100%;max-width:100%;max-height:100%;
  object-fit:contain;object-position:center;border-radius:4px;filter:none;
}
.product-page .cfp-media-card figcaption{flex:1;padding:14px 16px 16px;text-align:left;background:#fff;color:#496270;font-size:13px;line-height:1.6}
.product-page .cfp-media-card figcaption h3{margin:0 0 5px;color:#173345;font-size:17px;font-weight:700;line-height:1.35;letter-spacing:-.015em}
.product-page .cfp-media-card figcaption p,.product-page .cfp-media-card figcaption>span{display:block;margin:0;font-size:13px;line-height:1.6;color:#496270}
.product-page .cfp-media-card .screen-open:focus-visible{outline:3px solid #e7bf50;outline-offset:-4px}
.product-page .cfp-phone-gallery{grid-template-columns:repeat(3,minmax(0,1fr))}
.product-page .cfp-phone-gallery .screen-viewport{aspect-ratio:4/5;padding:16px}
.product-page .cfp-phone-gallery .screen-viewport img{width:100%;height:100%;object-fit:contain;border-radius:8px}
@media(hover:hover) and (pointer:fine){
  .product-page .cfp-media-card:hover,.product-page .cfp-media-card:focus-within{transform:translateY(-4px) rotate(0deg);box-shadow:0 15px 28px #102b4024;border-color:#c3a458}
}
@media(max-width:1000px){.product-page .cfp-product-gallery{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.product-page .cfp-phone-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){
  .product-page .cfp-product-gallery{grid-template-columns:1fr;gap:18px;padding:0;margin-top:18px}
  .product-page .cfp-media-card{transform:none;transition:none}
  .product-page .cfp-media-card figcaption{padding:14px 16px 16px}
  .product-page .cfp-media-card .screen-viewport{padding:8px}
  .product-page .cfp-phone-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:500px){.product-page .cfp-phone-gallery{grid-template-columns:1fr}.product-page .cfp-phone-gallery .screen-viewport{aspect-ratio:4/5;max-height:460px}.product-page .cfp-media-card figcaption h3{font-size:18px}}
@media(prefers-reduced-motion:reduce){.product-page .cfp-media-card,.product-page .cfp-media-card:hover,.product-page .cfp-media-card:focus-within{transform:none;transition:none}}
/* One compact, uncropped lightbox across product pages. */
.screen-dialog.screen-dialog-product{
  width:min(1100px,92vw);max-width:92vw;max-height:88vh;max-height:88dvh;padding:0;
  border:1px solid #547085;border-radius:12px;overflow:hidden;background:#0c2131;
}
.screen-dialog-product .screen-dialog-bar{padding:10px 15px;min-height:64px;box-sizing:border-box;background:#102a3c;border-bottom:2px solid #c7a349}
.screen-dialog-product .screen-dialog-bar strong{min-width:0;font-size:13px;line-height:1.4}
.screen-dialog-product .screen-viewport{
  aspect-ratio:auto;display:flex;align-items:center;justify-content:center;padding:12px;
  box-sizing:border-box;max-height:calc(88vh - 68px);max-height:calc(88dvh - 68px);background:#0c2131;
}
.screen-dialog-product .screen-viewport img{
  display:block;position:static;inset:auto;width:auto;height:auto;max-width:100%;max-height:calc(88vh - 92px);
  max-height:calc(88dvh - 92px);object-fit:contain;
}
.screen-dialog.screen-dialog-product.screen-dialog-mobile{width:min(420px,90vw);max-width:90vw}
@media(max-width:620px){.screen-dialog-product .screen-dialog-bar{min-height:72px}.screen-dialog-product .screen-dialog-bar strong{font-size:12px}.screen-dialog-product .screen-viewport{padding:8px}.screen-dialog-product .screen-viewport img{max-height:calc(88dvh - 108px)}}

/* Override legacy narrow gallery widths and generous section spacing. */
.product-page .application-gallery .cfp-product-gallery{width:100%;max-width:1160px}
.product-page .section:has(.cfp-product-gallery){padding-block:36px}
.product-page .section:has(.cfp-product-gallery) .section-intro{margin-bottom:18px}
.product-page .cfp-phone-gallery .screen-viewport{max-height:340px}

/* Center incomplete rows without stretching the final cards. */
@media(min-width:1001px){
 .product-page .cfp-product-gallery{grid-template-columns:repeat(6,minmax(0,1fr))}
 .product-page .cfp-product-gallery>.cfp-media-card{grid-column:span 2}
 .product-page .cfp-product-gallery>.cfp-media-card:last-child:nth-child(3n + 1){grid-column:3 / span 2}
 .product-page .cfp-product-gallery>.cfp-media-card:nth-last-child(2):nth-child(3n + 1){grid-column:2 / span 2}
}
@media(min-width:601px) and (max-width:1000px){
 .product-page .cfp-product-gallery{grid-template-columns:repeat(4,minmax(0,1fr))}
 .product-page .cfp-product-gallery>.cfp-media-card{grid-column:span 2}
 .product-page .cfp-product-gallery>.cfp-media-card:last-child:nth-child(2n + 1){grid-column:2 / span 2}
}
@media(max-width:600px){
 .product-page .cfp-product-gallery{grid-template-columns:minmax(0,1fr)}
 .product-page .cfp-product-gallery>.cfp-media-card{grid-column:auto}
}
