.torbatart-product-gallery,
.torbatart-product-gallery * {
    box-sizing: border-box;
}

.torbatart-product-gallery {
    width: 100%;
    max-width: var(--tag-max-width, 620px);
    margin-inline: auto;
    direction: rtl;
    font-family: inherit;
    --tag-smart-bg: var(--tag-bg, #f8f8f8);
    --tag-smart-bg-soft: #ffffff;
}

.torbatart-product-gallery .tag-layout {
    display: flex;
    flex-direction: column;
    gap: var(--tag-thumb-gap, 10px);
    align-items: stretch;
}

.torbatart-product-gallery.tag-thumbs-right .tag-layout,
.torbatart-product-gallery.tag-thumbs-left .tag-layout {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
}

.torbatart-product-gallery.tag-thumbs-left .tag-layout {
    grid-template-columns: auto 1fr;
}

.torbatart-product-gallery .tag-stage-wrap {
    min-width: 0;
}

.torbatart-product-gallery .tag-stage {
    position: relative;
    display: flex;
    width: 100%;
    aspect-ratio: var(--tag-ratio, 1 / 1);
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: var(--tag-padding, 18px);
    border: var(--tag-border-width, 0) solid var(--tag-border-color, transparent);
    border-radius: var(--tag-radius, 22px);
    background: var(--tag-stage-bg, var(--tag-bg, #f8f8f8));
    cursor: zoom-in;
    transition: background .28s ease, border-color .2s ease, box-shadow .2s ease;
}

.torbatart-product-gallery.tag-shadow-yes .tag-stage {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.07);
}

.torbatart-product-gallery.tag-bg-neutral .tag-stage {
    background: var(--tag-neutral-bg, #f3f2ee);
}

.torbatart-product-gallery.tag-bg-smart .tag-stage {
    background: var(--tag-stage-bg, linear-gradient(135deg, var(--tag-smart-bg-soft), var(--tag-smart-bg)));
}

.torbatart-product-gallery .tag-stage::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.32), inset 0 0 0 999px rgba(255, 255, 255, 0.02);
}

.torbatart-product-gallery .tag-main-image {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: var(--tag-fit, contain);
    object-position: center;
    transition: opacity .16s ease, transform .18s ease;
    border: 0;
    box-shadow: none;
}

.torbatart-product-gallery .tag-stage:hover .tag-main-image {
    transform: scale(1.008);
}

.torbatart-product-gallery .tag-gallery-badge {
    position: absolute;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 42px;
    height: 38px;
    padding: 0 12px;
    border-radius: 999px;
    color: #111;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    backdrop-filter: blur(8px);
}

.torbatart-product-gallery .tag-badge-icon {
    font-size: 18px;
    line-height: 1;
}

.torbatart-product-gallery.tag-icon-bottom-right .tag-gallery-badge { right: 16px; bottom: 16px; }
.torbatart-product-gallery.tag-icon-bottom-left .tag-gallery-badge { left: 16px; bottom: 16px; }
.torbatart-product-gallery.tag-icon-top-right .tag-gallery-badge { right: 16px; top: 16px; }
.torbatart-product-gallery.tag-icon-top-left .tag-gallery-badge { left: 16px; top: 16px; }

.torbatart-product-gallery .tag-thumbs {
    display: flex;
    gap: var(--tag-thumb-gap, 10px);
    overflow-x: auto;
    overflow-y: hidden;
    padding: 3px 2px 8px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.torbatart-product-gallery.tag-thumbs-right .tag-thumbs,
.torbatart-product-gallery.tag-thumbs-left .tag-thumbs {
    flex-direction: column;
    max-height: calc((var(--tag-thumb-size, 74px) * 5) + (var(--tag-thumb-gap, 10px) * 4));
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 0;
}

.torbatart-product-gallery .tag-thumb {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: var(--tag-thumb-size, 74px);
    height: var(--tag-thumb-size, 74px);
    padding: var(--tag-thumb-padding, 6px);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--tag-thumb-radius, 14px);
    background: #fff;
    cursor: pointer;
    scroll-snap-align: start;
    transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease, opacity .16s ease;
    opacity: .78;
}

.torbatart-product-gallery .tag-thumb:hover,
.torbatart-product-gallery .tag-thumb.is-active {
    opacity: 1;
    border-color: var(--tag-thumb-active, #111);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.torbatart-product-gallery .tag-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border: 0;
    box-shadow: none;
}

.torbatart-product-gallery .tag-stage-nav {
    position: absolute;
    z-index: 4;
    top: 50%;
    width: calc(var(--tag-nav-size, 26px) * 1.85);
    height: calc(var(--tag-nav-size, 26px) * 2.8);
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: transparent;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-50%) scale(.96);
    transition: opacity .18s ease, visibility .18s ease, transform .18s ease, background .18s ease;
    font-family: inherit;
    outline: none;
}

.torbatart-product-gallery .tag-stage-prev { right: var(--tag-nav-offset, 18px); }
.torbatart-product-gallery .tag-stage-next { left: var(--tag-nav-offset, 18px); }

.torbatart-product-gallery .tag-stage-nav::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: var(--tag-nav-size, 26px);
    height: var(--tag-nav-size, 26px);
    border-top: 2px solid var(--tag-nav-color, #fff);
    border-right: 2px solid var(--tag-nav-color, #fff);
    opacity: var(--tag-nav-opacity, .82);
    filter: drop-shadow(0 1px 5px rgba(0, 0, 0, .42));
}

.torbatart-product-gallery .tag-stage-prev::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

.torbatart-product-gallery .tag-stage-next::before {
    transform: translate(-50%, -50%) rotate(-135deg);
}

.torbatart-product-gallery .tag-stage-nav:hover,
.torbatart-product-gallery .tag-stage-nav:focus-visible {
    background: rgba(0, 0, 0, .08);
}

.torbatart-product-gallery .tag-stage:hover .tag-stage-nav,
.torbatart-product-gallery .tag-stage:focus-within .tag-stage-nav {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) scale(1);
}

.tag-noscript-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

.tag-noscript-gallery img {
    width: 100%;
    height: auto;
}

.torbatart-gallery-empty {
    padding: 18px;
    border: 1px dashed #ddd;
    border-radius: 14px;
    background: #fafafa;
    color: #555;
    text-align: center;
}

body.tag-lightbox-open {
    overflow: hidden;
}

.tag-lightbox {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 12, 14, .78);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
    direction: rtl;
}

.tag-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.tag-lightbox .tag-lb-panel {
    width: min(94vw, 1180px);
    max-height: 94vh;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.tag-lightbox .tag-lb-stage {
    position: relative;
    min-height: min(72vh, 760px);
    border-radius: 24px;
    background: rgba(255, 255, 255, .96);
    overflow: hidden;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.tag-lightbox .tag-lb-image-wrap {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 24px;
    cursor: zoom-in;
    touch-action: pan-y;
}

.tag-lightbox .tag-lb-image-wrap.is-zoomed {
    cursor: grab;
    touch-action: none;
}

.tag-lightbox .tag-lb-image-wrap.is-dragging {
    cursor: grabbing;
}

.tag-lightbox .tag-lb-image {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: center;
    border: 0;
    box-shadow: none;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform, opacity;
    transform-origin: center center;
    transition: opacity .12s ease;
}

.tag-lightbox .tag-lb-image.is-loading {
    opacity: .35;
}

.tag-lightbox .tag-lb-loader {
    position: absolute;
    right: 50%;
    bottom: 22px;
    z-index: 3;
    transform: translateX(50%);
    padding: 8px 14px;
    border-radius: 999px;
    color: #111;
    background: rgba(255, 255, 255, .94);
    font-size: 13px;
    font-weight: 700;
    opacity: 0;
    visibility: hidden;
    transition: opacity .14s ease, visibility .14s ease;
}

.tag-lightbox .tag-lb-loader.is-visible {
    opacity: 1;
    visibility: visible;
}

.tag-lightbox .tag-lb-close,
.tag-lightbox .tag-lb-prev,
.tag-lightbox .tag-lb-next,
.tag-lightbox .tag-lb-zoom-controls button {
    border: 0;
    background: rgba(255, 255, 255, .92);
    color: #111;
    box-shadow: 0 10px 26px rgba(0, 0, 0, .18);
    cursor: pointer;
    font-family: inherit;
}

.tag-lightbox .tag-lb-close {
    position: absolute;
    z-index: 6;
    top: 16px;
    left: 16px;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    font-size: 30px;
    line-height: 1;
}

.tag-lightbox .tag-lb-prev,
.tag-lightbox .tag-lb-next {
    position: absolute;
    z-index: 5;
    top: 50%;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    font-size: 36px;
    line-height: 1;
    transform: translateY(-50%);
}

.tag-lightbox .tag-lb-prev { right: 18px; }
.tag-lightbox .tag-lb-next { left: 18px; }

.tag-lightbox .tag-lb-counter {
    position: absolute;
    z-index: 5;
    right: 16px;
    bottom: 18px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #111;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
    font-weight: 800;
}

.tag-lightbox .tag-lb-zoom-controls {
    position: absolute;
    z-index: 5;
    top: 16px;
    right: 16px;
    display: flex;
    gap: 6px;
}

.tag-lightbox .tag-lb-zoom-controls button {
    min-width: 40px;
    height: 40px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 16px;
    font-weight: 800;
}

.tag-lightbox .tag-lb-thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 8px;
    scrollbar-width: thin;
}

.tag-lightbox .tag-lb-thumb {
    flex: 0 0 auto;
    width: 70px;
    height: 70px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    cursor: pointer;
    opacity: .72;
    transition: opacity .16s ease, transform .16s ease, border-color .16s ease, background .16s ease;
}

.tag-lightbox .tag-lb-thumb:hover,
.tag-lightbox .tag-lb-thumb.is-active {
    opacity: 1;
    transform: translateY(-1px);
    border-color: #fff;
    background: rgba(255, 255, 255, .22);
}

.tag-lightbox .tag-lb-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    border: 0;
    box-shadow: none;
}

@media (hover: none) {
    .torbatart-product-gallery .tag-stage-nav {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) scale(1);
    }
}

@media (max-width: 768px) {
    .torbatart-product-gallery.tag-thumbs-right .tag-layout,
    .torbatart-product-gallery.tag-thumbs-left .tag-layout {
        display: flex;
        flex-direction: column;
    }

    .torbatart-product-gallery.tag-thumbs-right .tag-thumbs,
    .torbatart-product-gallery.tag-thumbs-left .tag-thumbs {
        flex-direction: row;
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
        padding: 3px 2px 8px;
    }

    .tag-lightbox {
        padding: 10px;
    }

    .tag-lightbox .tag-lb-panel {
        width: 100%;
        max-height: 96vh;
    }

    .tag-lightbox .tag-lb-stage {
        min-height: 72vh;
        border-radius: 18px;
    }

    .tag-lightbox .tag-lb-image-wrap {
        padding: 14px;
    }

    .tag-lightbox .tag-lb-prev,
    .tag-lightbox .tag-lb-next {
        width: 40px;
        height: 40px;
        font-size: 30px;
    }

    .tag-lightbox .tag-lb-prev { right: 10px; }
    .tag-lightbox .tag-lb-next { left: 10px; }

    .tag-lightbox .tag-lb-close {
        top: 10px;
        left: 10px;
        width: 38px;
        height: 38px;
    }

    .tag-lightbox .tag-lb-zoom-controls {
        top: 10px;
        right: 10px;
        gap: 5px;
    }

    .tag-lightbox .tag-lb-zoom-controls button {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
    }

    .tag-lightbox .tag-lb-thumb {
        width: 58px;
        height: 58px;
    }
}

/* Version 1.4.0 - minimal dark cinematic lightbox */
.tag-lightbox {
    padding: 0;
    background:
        radial-gradient(circle at center, rgba(42, 42, 46, .56) 0%, rgba(10, 10, 12, .90) 58%, rgba(4, 4, 5, .96) 100%);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.tag-lightbox .tag-lb-panel {
    position: relative;
    width: 100vw;
    height: 100vh;
    max-height: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 64px 78px 96px;
}

.tag-lightbox .tag-lb-stage {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 0;
    flex: 1 1 auto;
    border-radius: 0;
    background: transparent;
    overflow: visible;
    box-shadow: none;
}

.tag-lightbox .tag-lb-image-wrap {
    inset: 0;
    padding: 0;
    overflow: hidden;
}

.tag-lightbox .tag-lb-image {
    max-width: min(100%, 1180px);
    max-height: 100%;
    filter: drop-shadow(0 18px 42px rgba(0, 0, 0, .36));
    transition: opacity .12s ease, transform .08s linear;
}

.tag-lightbox .tag-lb-image.is-loading {
    opacity: .22;
}

.tag-lightbox .tag-lb-loader {
    bottom: 18px;
    color: rgba(255, 255, 255, .92);
    background: rgba(0, 0, 0, .34);
    border: 1px solid rgba(255, 255, 255, .12);
    box-shadow: none;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.tag-lightbox .tag-lb-close,
.tag-lightbox .tag-lb-prev,
.tag-lightbox .tag-lb-next,
.tag-lightbox .tag-lb-zoom-controls button {
    background: transparent;
    color: rgba(255, 255, 255, .78);
    box-shadow: none;
    border: 1px solid transparent;
}

.tag-lightbox .tag-lb-zoom-controls {
    position: absolute;
    z-index: 8;
    top: 18px;
    left: 18px;
    right: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 8px;
}

.tag-lightbox .tag-lb-zoom-controls button,
.tag-lightbox .tag-lb-zoom-controls .tag-lb-close {
    position: static;
    top: auto;
    left: auto;
    min-width: 38px;
    width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 500;
    line-height: 1;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .82);
    border-color: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .14s ease, color .14s ease, border-color .14s ease, transform .14s ease;
}

.tag-lightbox .tag-lb-zoom-controls button:hover,
.tag-lightbox .tag-lb-zoom-controls .tag-lb-close:hover,
.tag-lightbox .tag-lb-zoom-controls button:focus-visible,
.tag-lightbox .tag-lb-zoom-controls .tag-lb-close:focus-visible {
    background: rgba(255, 255, 255, .16);
    color: #fff;
    border-color: rgba(255, 255, 255, .28);
    transform: translateY(-1px);
}

.tag-lightbox .tag-lb-zoom-in {
    font-size: 0 !important;
    position: relative;
}

.tag-lightbox .tag-lb-zoom-in::before {
    content: "";
    width: 14px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 999px;
    display: block;
    transform: translate(-1px, -1px);
}

.tag-lightbox .tag-lb-zoom-in::after {
    content: "";
    position: absolute;
    width: 9px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transform: translate(8px, 8px) rotate(45deg);
}

.tag-lightbox .tag-lb-zoom-reset {
    font-size: 19px !important;
}

.tag-lightbox .tag-lb-close {
    font-size: 27px !important;
}

.tag-lightbox .tag-lb-prev,
.tag-lightbox .tag-lb-next {
    z-index: 7;
    width: 58px;
    height: 80px;
    border-radius: 0;
    font-size: 72px;
    font-weight: 200;
    line-height: 1;
    opacity: .56;
    transform: translateY(-50%);
    transition: opacity .14s ease, transform .14s ease, color .14s ease;
}

.tag-lightbox .tag-lb-prev { right: 18px; }
.tag-lightbox .tag-lb-next { left: 18px; }

.tag-lightbox .tag-lb-prev:hover,
.tag-lightbox .tag-lb-next:hover,
.tag-lightbox .tag-lb-prev:focus-visible,
.tag-lightbox .tag-lb-next:focus-visible {
    background: transparent;
    color: #fff;
    opacity: .92;
    transform: translateY(-50%) scale(1.04);
}

.tag-lightbox .tag-lb-counter {
    display: none;
}

.tag-lightbox .tag-lb-thumbs {
    position: absolute;
    z-index: 6;
    left: 50%;
    bottom: 24px;
    transform: translateX(-50%);
    max-width: min(86vw, 680px);
    justify-content: center;
    align-items: center;
    gap: 9px;
    padding: 7px 9px;
    border-radius: 18px;
    background: rgba(0, 0, 0, .22);
    border: 1px solid rgba(255, 255, 255, .10);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    scrollbar-width: thin;
}

.tag-lightbox .tag-lb-thumb {
    width: 58px;
    height: 58px;
    padding: 4px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    border-color: rgba(255, 255, 255, .16);
    opacity: .64;
    box-shadow: none;
}

.tag-lightbox .tag-lb-thumb:hover,
.tag-lightbox .tag-lb-thumb.is-active {
    opacity: 1;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, .86);
    background: rgba(255, 255, 255, .16);
}

@media (max-width: 768px) {
    .tag-lightbox {
        padding: 0;
    }

    .tag-lightbox .tag-lb-panel {
        width: 100vw;
        height: 100vh;
        max-height: none;
        padding: 58px 42px 88px;
    }

    .tag-lightbox .tag-lb-stage {
        min-height: 0;
        border-radius: 0;
    }

    .tag-lightbox .tag-lb-image-wrap {
        padding: 0;
    }

    .tag-lightbox .tag-lb-zoom-controls {
        top: 12px;
        left: 12px;
        right: auto;
        gap: 6px;
    }

    .tag-lightbox .tag-lb-zoom-controls button,
    .tag-lightbox .tag-lb-zoom-controls .tag-lb-close {
        width: 35px;
        min-width: 35px;
        height: 35px;
    }

    .tag-lightbox .tag-lb-prev,
    .tag-lightbox .tag-lb-next {
        width: 42px;
        height: 70px;
        font-size: 54px;
    }

    .tag-lightbox .tag-lb-prev { right: 4px; }
    .tag-lightbox .tag-lb-next { left: 4px; }

    .tag-lightbox .tag-lb-thumbs {
        bottom: 16px;
        max-width: 92vw;
        justify-content: flex-start;
        padding: 6px;
    }

    .tag-lightbox .tag-lb-thumb {
        width: 50px;
        height: 50px;
    }
}

/* Version 1.4.1 - popup controls, spacing and minimal arrows refinement */
.tag-lightbox .tag-lb-panel {
    padding: 48px 78px calc(var(--tag-lb-thumbs-bottom, 24px) + 58px + var(--tag-lb-image-bottom-gap, 32px));
}

.tag-lightbox .tag-lb-image-wrap {
    transform: translateY(var(--tag-lb-image-offset-y, -14px));
}

.tag-lightbox .tag-lb-zoom-controls {
    top: var(--tag-lb-controls-top, 10px);
    left: 16px;
    gap: 8px;
}

.tag-lightbox .tag-lb-zoom-controls button,
.tag-lightbox .tag-lb-zoom-controls .tag-lb-close {
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0 !important;
    margin: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    vertical-align: middle;
    text-align: center;
    line-height: 1 !important;
    position: relative;
    overflow: visible;
}

.tag-lightbox .tag-lb-zoom-in {
    font-size: 0 !important;
}

.tag-lightbox .tag-lb-zoom-in::before {
    content: "";
    position: absolute;
    left: 47%;
    top: 45%;
    width: 13px;
    height: 13px;
    border: 2px solid currentColor;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-sizing: border-box;
}

.tag-lightbox .tag-lb-zoom-in::after {
    content: "";
    position: absolute;
    left: 58%;
    top: 60%;
    width: 10px;
    height: 2px;
    background: currentColor;
    border-radius: 999px;
    transform: translate(-20%, -50%) rotate(45deg);
}

.tag-lightbox .tag-lb-zoom-reset,
.tag-lightbox .tag-lb-close {
    font-family: Arial, Tahoma, sans-serif !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tag-lightbox .tag-lb-zoom-reset {
    font-size: 20px !important;
    line-height: 1 !important;
}

.tag-lightbox .tag-lb-close {
    font-size: 29px !important;
    line-height: 0 !important;
    padding-bottom: 2px !important;
}

.tag-lightbox .tag-lb-prev,
.tag-lightbox .tag-lb-next {
    width: calc(var(--tag-lb-nav-size, 46px) + 12px);
    height: calc(var(--tag-lb-nav-size, 46px) + 22px);
    font-size: 0 !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, .72);
    opacity: .68;
}

.tag-lightbox .tag-lb-prev { right: var(--tag-lb-nav-offset, 22px); }
.tag-lightbox .tag-lb-next { left: var(--tag-lb-nav-offset, 22px); }

.tag-lightbox .tag-lb-prev::before,
.tag-lightbox .tag-lb-next::before {
    content: "";
    width: calc(var(--tag-lb-nav-size, 46px) * .46);
    height: calc(var(--tag-lb-nav-size, 46px) * .46);
    border-top: 2px solid currentColor;
    border-right: 2px solid currentColor;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(0,0,0,.35));
}

.tag-lightbox .tag-lb-prev::before {
    transform: rotate(45deg);
}

.tag-lightbox .tag-lb-next::before {
    transform: rotate(-135deg);
}

.tag-lightbox .tag-lb-thumbs {
    bottom: var(--tag-lb-thumbs-bottom, 24px);
}

@media (max-width: 768px) {
    .tag-lightbox .tag-lb-panel {
        padding: 46px 42px calc(var(--tag-lb-thumbs-bottom, 16px) + 50px + var(--tag-lb-image-bottom-gap, 24px));
    }

    .tag-lightbox .tag-lb-zoom-controls {
        top: var(--tag-lb-controls-top, 8px);
        left: 10px;
    }

    .tag-lightbox .tag-lb-prev,
    .tag-lightbox .tag-lb-next {
        width: calc(var(--tag-lb-nav-size, 42px) + 2px);
        height: calc(var(--tag-lb-nav-size, 42px) + 14px);
    }

    .tag-lightbox .tag-lb-prev { right: max(4px, calc(var(--tag-lb-nav-offset, 10px) / 2)); }
    .tag-lightbox .tag-lb-next { left: max(4px, calc(var(--tag-lb-nav-offset, 10px) / 2)); }
}


/* Version 1.4.2 - responsive controls and configurable active popup image area */
.tag-lightbox .tag-lb-image-wrap {
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    width: var(--tag-lb-image-area-width, 100%);
    height: var(--tag-lb-image-area-height, 100%);
    padding: var(--tag-lb-image-padding-y, 0) var(--tag-lb-image-padding-x, 0);
    transform: translate(-50%, -50%) translateY(var(--tag-lb-image-offset-y, -14px));
}

@media (max-width: 768px) {
    .torbatart-product-gallery .tag-layout {
        gap: var(--tag-m-thumb-gap, var(--tag-thumb-gap, 10px));
    }

    .torbatart-product-gallery .tag-stage {
        padding: var(--tag-m-frame-padding, var(--tag-padding, 18px));
    }

    .torbatart-product-gallery .tag-thumbs {
        gap: var(--tag-m-thumb-gap, var(--tag-thumb-gap, 10px));
    }

    .torbatart-product-gallery .tag-thumb {
        width: var(--tag-m-thumb-size, var(--tag-thumb-size, 74px));
        height: var(--tag-m-thumb-size, var(--tag-thumb-size, 74px));
        border-radius: var(--tag-m-thumb-radius, var(--tag-thumb-radius, 14px));
    }

    .torbatart-product-gallery .tag-stage-nav {
        width: calc(var(--tag-m-nav-size, var(--tag-nav-size, 26px)) * 1.85);
        height: calc(var(--tag-m-nav-size, var(--tag-nav-size, 26px)) * 2.8);
    }

    .torbatart-product-gallery .tag-stage-nav::before {
        width: var(--tag-m-nav-size, var(--tag-nav-size, 26px));
        height: var(--tag-m-nav-size, var(--tag-nav-size, 26px));
    }

    .torbatart-product-gallery .tag-stage-prev { right: var(--tag-m-nav-offset, var(--tag-nav-offset, 18px)); }
    .torbatart-product-gallery .tag-stage-next { left: var(--tag-m-nav-offset, var(--tag-nav-offset, 18px)); }

    .tag-lightbox .tag-lb-panel {
        padding: 46px 42px calc(var(--tag-m-lb-thumbs-bottom, 16px) + 50px + var(--tag-m-lb-image-bottom-gap, 24px));
    }

    .tag-lightbox .tag-lb-image-wrap {
        width: var(--tag-m-lb-image-area-width, 100%);
        height: var(--tag-m-lb-image-area-height, 78%);
        padding: 0;
        transform: translate(-50%, -50%) translateY(var(--tag-m-lb-image-offset-y, -8px));
    }

    .tag-lightbox .tag-lb-zoom-controls {
        top: var(--tag-m-lb-controls-top, 8px);
    }

    .tag-lightbox .tag-lb-thumbs {
        bottom: var(--tag-m-lb-thumbs-bottom, 16px);
        padding-top: var(--tag-m-lb-thumbs-padding-y, 6px);
        padding-bottom: var(--tag-m-lb-thumbs-padding-y, 6px);
    }

    .tag-lightbox .tag-lb-prev,
    .tag-lightbox .tag-lb-next {
        width: calc(var(--tag-m-lb-nav-size, 42px) + 2px);
        height: calc(var(--tag-m-lb-nav-size, 42px) + 14px);
    }

    .tag-lightbox .tag-lb-prev { right: var(--tag-m-lb-nav-offset, 8px); }
    .tag-lightbox .tag-lb-next { left: var(--tag-m-lb-nav-offset, 8px); }

    .tag-lightbox .tag-lb-prev::before,
    .tag-lightbox .tag-lb-next::before {
        width: calc(var(--tag-m-lb-nav-size, 42px) * .46);
        height: calc(var(--tag-m-lb-nav-size, 42px) * .46);
    }
}

/* Version 1.4.3 - stronger mobile responsive bindings */
@media (max-width: 768px) {
    .tag-lightbox .tag-lb-thumbs {
        padding-left: var(--tag-m-lb-thumbs-padding-x, 8px);
        padding-right: var(--tag-m-lb-thumbs-padding-x, 8px);
        gap: var(--tag-m-lb-thumb-gap, 8px);
    }

    .tag-lightbox .tag-lb-thumb {
        width: var(--tag-m-lb-thumb-size, 50px);
        height: var(--tag-m-lb-thumb-size, 50px);
    }
}


/* Version 1.5.0 - free cinematic zoom, glass gallery and mobile pinch zoom */
.tag-lightbox {
    touch-action: none;
    background:
        radial-gradient(circle at center, rgba(54, 54, 58, .48) 0%, rgba(12, 12, 15, .88) 56%, rgba(3, 3, 5, .97) 100%);
}

.tag-lightbox .tag-lb-panel {
    width: 100vw;
    height: 100vh;
    padding: 0 !important;
    overflow: visible;
}

.tag-lightbox .tag-lb-stage {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tag-lightbox .tag-lb-image-wrap {
    position: fixed;
    inset: 0;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    transform: none !important;
    overflow: visible !important;
    display: flex;
    align-items: center;
    justify-content: center;
    touch-action: none;
}

.tag-lightbox .tag-lb-image {
    display: block;
    width: auto;
    height: auto;
    max-width: min(92vw, 1280px);
    max-height: 88vh;
    object-fit: contain;
    cursor: zoom-in;
    user-select: none;
    -webkit-user-drag: none;
    will-change: transform, opacity;
    transition: opacity .18s ease, filter .18s ease, transform .18s cubic-bezier(.2,.8,.2,1);
    filter: drop-shadow(0 22px 58px rgba(0, 0, 0, .46));
}

.tag-lightbox .tag-lb-image-wrap.is-dragging .tag-lb-image {
    cursor: grabbing;
    transition: opacity .12s ease, filter .12s ease;
}

.tag-lightbox .tag-lb-image-wrap.is-zoomed .tag-lb-image {
    cursor: grab;
}

.tag-lightbox .tag-lb-image.is-loading {
    opacity: .16;
    filter: blur(1px) drop-shadow(0 22px 58px rgba(0, 0, 0, .40));
}

.tag-lightbox .tag-lb-thumbs {
    bottom: max(18px, var(--tag-lb-thumbs-bottom, 24px));
    max-width: min(88vw, 720px);
    padding: 8px 10px;
    border-radius: 22px;
    background: linear-gradient(135deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
    border: 1px solid rgba(255, 255, 255, .20);
    box-shadow: 0 14px 40px rgba(0, 0, 0, .24);
    backdrop-filter: blur(18px) saturate(1.25);
    -webkit-backdrop-filter: blur(18px) saturate(1.25);
    transition: opacity .22s ease, transform .24s cubic-bezier(.2,.8,.2,1), visibility .22s ease;
}

.tag-lightbox.is-zoomed .tag-lb-thumbs,
.tag-lightbox.tag-thumbs-hidden .tag-lb-thumbs {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(-50%) translateY(120%);
}

.tag-lightbox .tag-lb-thumb {
    background: rgba(255, 255, 255, .12);
    border-color: rgba(255, 255, 255, .20);
    transition: opacity .18s ease, transform .18s ease, border-color .18s ease, background .18s ease;
}

.tag-lightbox .tag-lb-thumb:hover,
.tag-lightbox .tag-lb-thumb.is-active {
    transform: translateY(-2px) scale(1.02);
    background: rgba(255, 255, 255, .24);
}

.tag-lightbox .tag-lb-prev,
.tag-lightbox .tag-lb-next {
    background: transparent !important;
    transition: opacity .16s ease, transform .18s cubic-bezier(.2,.8,.2,1), color .16s ease;
}

.tag-lightbox .tag-lb-prev:hover,
.tag-lightbox .tag-lb-next:hover {
    transform: translateY(-50%) scale(1.08);
}

.tag-lightbox .tag-lb-zoom-controls {
    z-index: 20;
}

.tag-lightbox .tag-lb-loader {
    left: 50%;
    right: auto;
    bottom: 50%;
    transform: translate(-50%, 50%);
}

@media (max-width: 768px) {
    .tag-lightbox .tag-lb-image {
        max-width: 96vw;
        max-height: 88vh;
    }

    .tag-lightbox .tag-lb-thumbs {
        bottom: max(12px, var(--tag-m-lb-thumbs-bottom, 16px));
        max-width: 94vw;
        padding-top: var(--tag-m-lb-thumbs-padding-y, 6px);
        padding-bottom: var(--tag-m-lb-thumbs-padding-y, 6px);
        padding-left: var(--tag-m-lb-thumbs-padding-x, 8px);
        padding-right: var(--tag-m-lb-thumbs-padding-x, 8px);
    }
}

/* Version 1.5.1 - robust center alignment for free cinematic lightbox */
.tag-lightbox.is-open .tag-lb-panel,
.tag-lightbox.is-open .tag-lb-stage,
.tag-lightbox.is-open .tag-lb-image-wrap {
    box-sizing: border-box;
}

.tag-lightbox.is-open .tag-lb-panel {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
}

.tag-lightbox.is-open .tag-lb-stage {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    display: block !important;
    overflow: visible !important;
    margin: 0 !important;
    padding: 0 !important;
}

.tag-lightbox.is-open .tag-lb-image-wrap {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    transform: none !important;
    overflow: visible !important;
}

.tag-lightbox.is-open .tag-lb-image {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    height: auto !important;
    max-width: min(92vw, 1280px) !important;
    max-height: 88vh !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform-origin: center center !important;
}

.tag-lightbox.is-open .tag-lb-image:not([style*="transform"]) {
    transform: translate(-50%, -50%) !important;
}

@media (max-width: 768px) {
    .tag-lightbox.is-open .tag-lb-image {
        max-width: 96vw !important;
        max-height: 88vh !important;
    }
}


/* Version 1.5.2 - definitive centered lightbox image using flex centering */
.tag-lightbox.is-open .tag-lb-panel,
.tag-lightbox.is-open .tag-lb-stage,
.tag-lightbox.is-open .tag-lb-image-wrap {
    box-sizing: border-box !important;
}

.tag-lightbox.is-open .tag-lb-panel {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    display: block !important;
}

.tag-lightbox.is-open .tag-lb-stage,
.tag-lightbox.is-open .tag-lb-image-wrap {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.tag-lightbox.is-open .tag-lb-image-wrap {
    transform: none !important;
}

.tag-lightbox.is-open .tag-lb-image {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: min(92vw, 1280px) !important;
    max-height: 88vh !important;
    margin: auto !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform-origin: center center !important;
}

.tag-lightbox.is-open .tag-lb-image:not([style*="transform"]) {
    transform: translate3d(0, 0, 0) scale(1) !important;
}

@media (max-width: 768px) {
    .tag-lightbox.is-open .tag-lb-image {
        max-width: 96vw !important;
        max-height: 88vh !important;
    }
}


/* Version 1.5.3 - definitive override for Elementor/body-appended lightbox centering */
.tag-lightbox.is-open[data-tag-gallery] .tag-lb-panel,
.tag-lightbox.is-open[data-tag-gallery] .tag-lb-stage,
.tag-lightbox.is-open[data-tag-gallery] .tag-lb-image-wrap {
    position: fixed !important;
    inset: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    min-width: 100vw !important;
    min-height: 100vh !important;
    max-width: none !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 0 !important;
    overflow: visible !important;
}

.tag-lightbox.is-open[data-tag-gallery] .tag-lb-image-wrap {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transform: none !important;
}

.tag-lightbox.is-open[data-tag-gallery] .tag-lb-image {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    max-width: min(92vw, 1280px) !important;
    max-height: 88vh !important;
    margin: 0 !important;
    object-fit: contain !important;
    object-position: center center !important;
    transform-origin: center center !important;
}

@media (max-width: 768px) {
    .tag-lightbox.is-open[data-tag-gallery] .tag-lb-image {
        max-width: 96vw !important;
        max-height: 88vh !important;
    }
}
