.ts-canvas-gallery {
    width: 100%;
}

.ts-canvas-gallery-row {
    display: flex;
    align-items: flex-start;
    width: 100%;
}

/* ========================================
   Thumbnail rail
   ======================================== */

.ts-canvas-thumb-nav {
    flex: 0 0 135px;
    width: 135px;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 20px;
}

.ts-canvas-thumbnails {
    width: 125px;
    height: 392px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    overflow: hidden;
}

.ts-canvas-thumb {
    flex: 0 0 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 92px;
    margin: 0;
    padding: 4px;
    border: 1px solid transparent;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

.ts-canvas-thumb:hover,
.ts-canvas-thumb.active {
    border-color: #999;
}

.ts-canvas-thumb canvas {
    display: block;
    max-width: 110px;
    max-height: 82px;
    width: auto;
    height: auto;
    pointer-events: none;
}

.ts-canvas-360-thumb {
    flex: 0 0 92px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 92px;
    margin: 0;
    padding: 4px;
    border: 1px solid transparent;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
}

    .ts-canvas-360-thumb:hover,
    .ts-canvas-360-thumb.active {
        border-color: #999;
    }

    .ts-canvas-360-thumb img {
        display: block;
        max-width: 110px;
        max-height: 82px;
        width: auto;
        height: auto;
    }

.ts-canvas-thumb-scroll {
    flex: 0 0 28px;
    width: 40px;
    height: 28px;
    padding: 0;
    margin: 2px 0;
    border: 0;
    background: transparent;
    color: #777;
    cursor: pointer;
    font-size: 18px;
    line-height: 28px;
    text-align: center;
}

.ts-canvas-thumb-scroll:hover {
    color: #333;
}

.ts-canvas-thumb-scroll:disabled {
    opacity: .2;
    cursor: default;
}

/* ========================================
   Main canvas
   ======================================== */

.ts-canvas-main {
    flex: 1 1 auto;
    min-width: 0;
}

.ts-canvas-main-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 680px;
    height: 430px;
    margin: 0 auto;
}

.ts-canvas-main-frame {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100% - 90px);
    max-height: 430px;
    overflow: hidden;
    background: #fff;
}

.ts-canvas-main-canvas {
    display: block;
    max-width: 100%;
    max-height: 430px;
    width: auto;
    height: auto;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: pan-y;
}

.ts-canvas-360-frame {
    position: relative;
    width: calc(100% - 90px);
    max-width: 600px;
    height: 430px;
    overflow: hidden;
    background: #fff;
}

.ts-canvas-360-iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #fff;
}
.ts-canvas-main-nav {
    position: absolute;
    top: 50%;
    z-index: 5;
    width: 38px;
    height: 48px;
    margin-top: -24px;
    padding: 0;
    border: 0;
    background: rgba(255, 255, 255, .75);
    color: #777;
    font-size: 20px;
    line-height: 48px;
    text-align: center;
    cursor: pointer;
}

.ts-canvas-main-prev {
    left: 0;
}

.ts-canvas-main-next {
    right: 0;
}

.ts-canvas-main-nav:hover {
    background: rgba(255, 255, 255, .95);
    color: #333;
}

.ts-canvas-main-nav:disabled {
    opacity: .2;
    cursor: default;
}

/* ========================================
   Passive protection
   ======================================== */

.ts-canvas-passive-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 8;
    overflow: hidden;
    pointer-events: none;
}

.ts-canvas-passive-watermarks {
    position: absolute;
    top: -15%;
    left: -15%;
    width: 130%;
    height: 130%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 1fr;
    align-items: center;
    justify-items: center;
    transform: rotate(-18deg);
}

.ts-canvas-passive-watermarks span {
    display: block;
    white-space: nowrap;
    color: rgba(255,255,255,.42);
    font-size: 14px;
    line-height: 18px;
    font-weight: 600;
    letter-spacing: .2px;
    text-shadow: 0 1px 2px rgba(0,0,0,.35);
}

.ts-canvas-main-frame .ts-canvas-passive-watermarks {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 18px 0;
    box-sizing: border-box;
    transform: none;
}

.ts-canvas-main-frame .ts-canvas-passive-watermarks span {
    transform: rotate(-18deg);
}

.ts-canvas-360-frame .ts-canvas-passive-watermarks {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 18px 0;
    box-sizing: border-box;
    transform: none;
}

    .ts-canvas-360-frame .ts-canvas-passive-watermarks span {
        transform: rotate(-18deg);
    }

.ts-canvas-main-stage.passive-protection .ts-canvas-main-canvas {
    filter: brightness(.72);
}

.ts-canvas-main-stage.passive-protection
.ts-canvas-main-frame
.ts-canvas-passive-overlay {
    display: block;
}

.ts-canvas-main-stage.passive-protection .ts-canvas-360-frame .ts-canvas-360-iframe {
    filter: brightness(.72);
}

.ts-canvas-main-stage.passive-protection
.ts-canvas-360-frame
.ts-canvas-passive-overlay {
    display: block;
}

.ts-canvas-main-stage.protected-state .ts-canvas-360-frame .ts-canvas-360-iframe {
    filter: blur(10px);
}

.ts-canvas-main-stage.protected-state
.ts-canvas-360-frame
.ts-canvas-360-protection {
    display: flex;
}

/* ========================================
   Strong protection
   ======================================== */

.ts-canvas-protection-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 10;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.25);
}

.ts-canvas-protection-content {
    position: relative;
    max-width: 430px;
    margin: 20px;
    padding: 18px 54px 18px 22px;
    background: rgba(0,0,0,.72);
    color: #fff;
    text-align: center;
    border-radius: 3px;
}

.ts-canvas-protection-text {
    font-size: 15px;
    line-height: 21px;
    font-weight: bold;
}

.ts-canvas-protection-close {
    position: absolute;
    top: 6px;
    right: 6px;
    z-index: 11;
    width: 28px;
    height: 28px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 22px;
    line-height: 26px;
    text-align: center;
    cursor: pointer;
}

.ts-canvas-protection-close:hover {
    background: rgba(255,255,255,.12);
}

.ts-canvas-main-stage.protected-state .ts-canvas-main-canvas {
    filter: blur(10px);
    cursor: default;
}

.ts-canvas-main-stage.protected-state
.ts-canvas-main-frame
.ts-canvas-main-protection {
    display: flex;
}

/* ========================================
   360 protection
   ======================================== */

.ts-360-protected-viewer {
    position: relative;
}

.ts-360-passive-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 20;
    overflow: hidden;
    pointer-events: none;
}

.ts-360-passive-watermarks {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
}

    .ts-360-passive-watermarks span {
        color: rgba(255,255,255,.55);
        font-size: 16px;
        font-weight: 600;
        text-shadow: 0 1px 2px rgba(0,0,0,.45);
        transform: rotate(-18deg);
        white-space: nowrap;
    }

.ts-360-protected-viewer.passive-protection #Frame {
    filter: brightness(.72);
}

.ts-360-protected-viewer.passive-protection .ts-360-passive-overlay {
    display: block;
}

.ts-360-protection-overlay {
    display: none;
    position: absolute;
    inset: 0;
    z-index: 30;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.25);
}

.ts-360-protection-content {
    position: relative;
    max-width: 430px;
    margin: 20px;
    padding: 18px 54px 18px 22px;
    background: rgba(0,0,0,.72);
    color: #fff;
    text-align: center;
    border-radius: 3px;
    font-weight: bold;
}

.ts-360-protection-close {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
}

.ts-360-protected-viewer.protected-state #Frame {
    filter: blur(10px);
}

.ts-360-protected-viewer.protected-state .ts-360-protection-overlay {
    display: flex;
}

/* ========================================
   Protected product cards
   ======================================== */

.ts-card-protected-image {
    position: relative;
    overflow: hidden;
}

.ts-card-canvas {
    display: block;
    width: 100%;
    height: auto;
}

.ts-card-protected-image.passive-protection .ts-card-canvas {
    filter: brightness(.72);
}

.ts-card-protected-image.passive-protection .ts-canvas-passive-overlay {
    display: block;
}

.ts-card-protected-image.protected-state .ts-card-canvas {
    filter: blur(10px);
}

.ts-card-protected-image.protected-state .ts-card-protection {
    display: flex;
}

.ts-card-protected-image .ts-canvas-passive-watermarks {
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-evenly;
    padding: 8px 0;
    box-sizing: border-box;
    transform: none;
}

    .ts-card-protected-image .ts-canvas-passive-watermarks span {
        font-size: 10px;
        transform: rotate(-18deg);
        white-space: nowrap;
    }

/* ========================================
   Lightbox
   ======================================== */

body.ts-canvas-lightbox-open {
    overflow: hidden;
}

.ts-canvas-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.ts-canvas-lightbox.open {
    display: flex;
}

.ts-canvas-lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.88);
}

.ts-canvas-lightbox-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(100vw - 80px);
    height: calc(100vh - 80px);
}

.ts-canvas-lightbox-frame {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    max-width: calc(100% - 120px);
    max-height: calc(100% - 60px);
    overflow: hidden;
    order: 1;
}

.ts-canvas-lightbox-caption {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    flex: 0 0 auto;
    width: calc(100% - 120px);
    padding: 4px 16px 0;
    box-sizing: border-box;
    z-index: 3;
    color: #fff;
    text-align: center;
    pointer-events: none;
    order: 2;
}

.ts-canvas-lightbox-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    background: #fff;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    touch-action: none;
}

.ts-canvas-lightbox-close {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 3;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 34px;
    line-height: 44px;
    cursor: pointer;
}

.ts-canvas-lightbox-nav {
    position: absolute;
    top: 50%;
    z-index: 3;
    width: 48px;
    height: 60px;
    margin-top: -30px;
    padding: 0;
    border: 0;
    background: rgba(0,0,0,.25);
    color: #fff;
    font-size: 24px;
    cursor: pointer;
}

.ts-canvas-lightbox-prev {
    left: 0;
}

.ts-canvas-lightbox-next {
    right: 0;
}

.ts-canvas-lightbox-nav:disabled {
    opacity: .2;
    cursor: default;
}

.ts-canvas-lightbox.protected-state .ts-canvas-lightbox-nav {
    opacity: .25;
    cursor: default;
    pointer-events: none;
}

.ts-canvas-lightbox.passive-protection .ts-canvas-lightbox-canvas {
    filter: brightness(.72);
}

.ts-canvas-lightbox.passive-protection
.ts-canvas-lightbox-frame
.ts-canvas-passive-overlay {
    display: block;
}

.ts-canvas-lightbox.protected-state .ts-canvas-lightbox-canvas {
    filter: blur(10px);
    cursor: default;
}

.ts-canvas-lightbox.protected-state
.ts-canvas-lightbox-frame
.ts-canvas-lightbox-protection {
    display: flex;
}

.ts-canvas-lightbox-description {
    font-size: 13px;
}

.ts-canvas-lightbox-product {
    font-size: 15px;
    font-weight: bold;
}

.ts-canvas-lightbox-sku {
    font-size: 12px;
}

/* ----------------------------------------
   Product listing/card canvas display size
   Keep 600px Listing source for quality,
   render at the established 240px card size.
   ---------------------------------------- */

.SingleProductDisplayPanel .ts-card-protected-image {
    width: 240px;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
}

.SingleProductDisplayPanel .ts-card-canvas {
    display: block;
    width: 240px;
    max-width: 100%;
    height: auto;
}

/* ========================================
   Print
   ======================================== */

@media print {
    .ts-canvas-main-stage .ts-canvas-main-canvas {
        filter: brightness(.65) !important;
    }

    .ts-canvas-main-frame .ts-canvas-passive-overlay {
        display: block !important;
    }

    .ts-canvas-protection-overlay {
        display: none !important;
    }

    .ts-canvas-lightbox,
    .ts-canvas-lightbox.open,
    .ts-canvas-lightbox-content,
    .ts-canvas-lightbox-backdrop {
        display: none !important;
    }

    body.ts-canvas-lightbox-open {
        overflow: visible !important;
    }

    .ts-canvas-main-nav,
    .ts-canvas-thumb-nav {
        display: none !important;
    }
}

/* ========================================
   Mobile
   ======================================== */

@media only screen and (max-width: 767px) {

    .ts-canvas-gallery-row {
        display: flex;
        flex-direction: column-reverse;
    }

    .ts-canvas-main {
        width: 100%;
    }

    .ts-canvas-main-stage {
        height: auto;
        min-height: 260px;
    }

    .ts-canvas-main-frame {
        max-width: calc(100% - 70px);
        max-height: none;
    }

    .ts-canvas-main-canvas {
        max-height: none;
    }

    .ts-canvas-360-frame {
        width: calc(100% - 70px);
        max-width: none;
        height: 360px;
    }

    .ts-canvas-thumb-nav {
        width: 100%;
        flex: 0 0 auto;
        margin: 10px 0 0 0;
        flex-direction: row;
    }

    .ts-canvas-thumbnails {
        width: 100%;
        height: 92px;
        flex-direction: row;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .ts-canvas-thumb-scroll-up,
    .ts-canvas-thumb-scroll-down {
        display: none;
    }

    .ts-canvas-thumb {
        flex: 0 0 90px;
        width: 90px;
    }

    .ts-canvas-360-thumb {
        flex: 0 0 90px;
        width: 90px;
    }

    .ts-canvas-360-thumb img {
            max-width: 80px;
            max-height: 75px;
    }

    .ts-canvas-thumb canvas {
        max-width: 80px;
        max-height: 75px;
    }

    .ts-canvas-lightbox-content {
        width: calc(100vw - 20px);
        height: calc(100vh - 20px);
    }

    .ts-canvas-lightbox-frame {
        max-width: calc(100% - 60px);
        max-height: calc(100% - 60px);
    }

    .ts-canvas-lightbox-caption {
        width: calc(100% - 40px);
        padding: 8px 10px 0;
    }
}