/* TI product gallery 20260915.1. No rules for the header, catalog cards or purchase form. */
.ti-gallery { width: 100%; min-width: 0; max-width: 720px; margin-inline: auto; color: var(--ti-navy, #182b49); }
.ti-gallery [hidden], .ti-gallery-dialog [hidden] { display: none !important; }
.ti-gallery *, .ti-gallery-dialog * { box-sizing: border-box; }
.ti-gallery-stage { position: relative; min-width: 0; }
.ti-product-page .ti-gallery .ti-gallery-main { position: relative; display: block; width: 100%; max-width: none; aspect-ratio: 1; padding: 0; border: 1px solid #e6ebf1; border-radius: 9px; background: #fff; overflow: hidden; color: inherit; cursor: zoom-in; touch-action: pan-y pinch-zoom; }
.ti-product-page .ti-gallery .ti-gallery-main > img { position: absolute; inset: 8px; display: block; width: calc(100% - 16px); height: calc(100% - 16px); max-width: none; max-height: none; object-fit: contain; object-position: center; }
.ti-gallery-main[aria-disabled="true"] { cursor: default; }
.ti-gallery-zoom { position: absolute; top: 12px; right: 12px; display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #e0e6ee; border-radius: 50%; background: rgb(255 255 255 / 94%); color: #182b49; }
.ti-gallery-toolbar { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 12px; }
.ti-gallery-button { appearance: none; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 44px; height: 44px; margin: 0; padding: 0; border: 1px solid #cbd6e5; border-radius: 8px; background: #fff; color: #182b49; cursor: pointer; font: inherit; }
.ti-gallery-button:hover { border-color: #b94a1e; background: #fff7f1; color: #a43e16; }
.ti-gallery-button svg { display: block; width: 22px; height: 22px; }
.ti-gallery-counter { min-width: 56px; text-align: center; font-size: 14px; font-variant-numeric: tabular-nums; color: #536175; }
.ti-gallery-thumbs { display: flex; gap: 10px; max-width: 100%; overflow-x: auto; padding: 4px; margin-top: 12px; overscroll-behavior-x: contain; scrollbar-width: thin; }
.ti-gallery-thumb { display: flex; align-items: center; justify-content: center; flex: 0 0 84px; width: 84px; height: 84px; padding: 3px; border: 1px solid #d9e0e8; border-radius: 8px; background: #fff; color: #536175; text-decoration: none; cursor: pointer; }
.ti-gallery-thumb img { display: block; width: 100%; height: 100%; object-fit: contain; border-radius: 4px; }
.ti-gallery-thumb[aria-current="true"] { border-color: #b94a1e; box-shadow: inset 0 0 0 1px #b94a1e; background: #fff7f1; }
.ti-gallery-thumb:hover { border-color: #b94a1e; }
.ti-gallery-thumb:focus-visible, .ti-gallery-main:focus-visible, .ti-gallery-button:focus-visible { outline: 3px solid #b94a1e; outline-offset: 2px; }
.ti-gallery-error { position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; text-align: center; color: #536175; background: #f7f9fb; font-size: 16px; }
.ti-gallery-missing { padding: 6px; font-size: 12px; text-align: center; }
.ti-gallery-dialog { width: min(1240px, calc(100% - 32px)); height: calc(100% - 32px); height: calc(100dvh - 32px); max-width: none; max-height: none; padding: 16px; border: 0; border-radius: 12px; background: #fff; color: #182b49; font-family: Arial, sans-serif; }
.ti-gallery-dialog:not([open]) { display: none; }
.ti-gallery-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; gap: 12px; }
.ti-gallery-dialog::backdrop { background: rgb(12 25 45 / 82%); }
.ti-gallery-dialog-header { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ti-gallery-dialog-title { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 16px; line-height: 1.4; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.ti-gallery-dialog-media { position: relative; display: grid; place-items: center; min-width: 0; min-height: 0; overflow: hidden; touch-action: pan-y pinch-zoom; }
.ti-gallery-dialog-media img { display: block; width: 100%; height: 100%; min-height: 0; object-fit: contain; }
.ti-gallery-dialog .ti-gallery-toolbar { margin: 0; }
html.ti-gallery-modal-open { overflow: hidden; }
@media (max-width: 800px) { .ti-gallery { max-width: 500px; } }
@media (max-width: 520px) {
  .ti-gallery-thumbs { gap: 8px; }
  .ti-gallery-thumb { flex-basis: 68px; width: 68px; height: 68px; }
  .ti-gallery-dialog { width: calc(100% - 16px); height: calc(100% - 16px); height: calc(100dvh - 16px); padding: 10px; border-radius: 8px; }
  .ti-gallery-dialog[open] { gap: 8px; }
  .ti-gallery-dialog-title { font-size: 14px; }
}
