/* CTH listing image preview v1. Scoped to the listing and its own overlays. */
#products .pros-product-thumb { width:80px; height:80px; overflow:visible; background:#fff; }
#products .pros-product-thumb .product-thumbnail { display:block; position:relative; width:100%; height:100%; margin:0; border-radius:4px; }
#products .pros-product-thumb img { display:block; width:100%; height:100%; object-fit:contain; opacity:1; border-radius:4px; }
.cth-zoom-icon { display:none; }
.cth-image-preview-ready #products [data-cth-preview-src] { cursor:zoom-in; }
.cth-image-preview-ready #products .cth-zoom-icon { display:flex; align-items:center; justify-content:center; position:absolute; right:2px; bottom:2px; width:25px; height:25px; color:#03418b; background:#fff; border:1px solid #d8e2ee; border-radius:50%; box-shadow:0 1px 4px #142e4b1a; pointer-events:none; }
#products [data-cth-preview-src]:focus-visible { outline:3px solid #1269bc; outline-offset:3px; }
#products .pros-product-left, #products .pros-product-info { min-width:0; }
#products .pros-product-name, #products .pros-product-sku { overflow-wrap:anywhere; }
.cth-image-hover { position:fixed; z-index:1050; padding:10px; margin:0; border:1px solid #dbe2ea; border-radius:8px; background:#fff; box-shadow:0 12px 40px #142e4b38; cursor:zoom-in; box-sizing:border-box; }
.cth-image-hover[hidden] { display:none !important; }
.cth-image-hover img { display:block; width:100%; height:auto; aspect-ratio:1; object-fit:contain; }
.cth-image-hover p { margin:6px 0 0; text-align:center; font:13px/1.4 Arial,sans-serif; color:#465266; }
.cth-image-dialog { box-sizing:border-box; width:min(900px,calc(100vw - 32px)); max-width:none; max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px); margin:auto; padding:18px; border:0; border-radius:10px; background:#fff; color:#1b1b1e; box-shadow:0 20px 70px #0004; overflow:auto; }
.cth-image-dialog:not([open]) { display:none; }
.cth-image-dialog::backdrop { background:rgb(13 25 42 / 78%); }
.cth-image-dialog__bar { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:12px; }
.cth-image-dialog__title { margin:0; font-size:16px; font-weight:600; line-height:1.4; overflow-wrap:anywhere; }
.cth-image-dialog__close { display:flex; align-items:center; justify-content:center; flex:0 0 44px; width:44px; height:44px; padding:0; border:1px solid #d9e0e8; background:#f6f8fb; color:#172c49; border-radius:50%; font:30px/1 Arial,sans-serif; cursor:pointer; }
.cth-image-dialog__close:focus-visible, .cth-image-dialog__link:focus-visible { outline:3px solid #1269bc; outline-offset:2px; }
.cth-image-dialog__image { display:block; width:auto; height:auto; max-width:100%; max-height:calc(100vh - 190px); max-height:calc(100dvh - 190px); margin:0 auto; object-fit:contain; touch-action:pan-x pan-y pinch-zoom; }
.cth-image-dialog [hidden] { display:none !important; }
.cth-image-dialog__footer { margin:12px 0 0; text-align:center; font-size:14px; line-height:1.5; }
.cth-image-dialog__link { display:inline-block; padding:8px 12px; color:#03418b; text-decoration:underline; }
.cth-image-dialog__error { text-align:center; padding:24px 8px; }
html.cth-image-dialog-open { overflow:hidden; }
@media (max-width:767px) {
  #products .pros-product-thumb { width:100px; height:100px; }
  #products .pros-product-left { gap:12px; }
  #products .pros-product-info { flex:1; }
  #products .pros-product-name { line-height:1.3; }
  .cth-image-hover { display:none !important; }
  .cth-image-dialog { width:calc(100vw - 16px); max-height:calc(100dvh - 16px); padding:12px; border-radius:8px; }
  .cth-image-dialog__title { font-size:14px; }
  .cth-image-dialog__bar { gap:10px; }
  .cth-image-dialog__image { max-height:calc(100dvh - 200px); }
}
