/**
 * Product Gallery Pro
 *
 * @author    Torey <b.zagajski@torey.eu>
 * @copyright 2026 torey.eu
 * @license   Commercial / Proprietary License
 * 
 * Wszelkie prawa zastrzeżone. Kopiowanie, modyfikowanie i rozpowszechnianie 
 * tego pliku bez zgody autora jest surowo zabronione.
 * 
 * All rights reserved. You may not modify, copy or distribute this file 
 * without explicit permission from the author.
 */

.images-container:not(.pgp-hidden-native),
#product-images:not(.pgp-hidden-native) {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.pgp-gallery-wrapper:not(.pgp-loaded) {
    opacity: 0;
    visibility: hidden;
    overflow: hidden;
    pointer-events: none;
    width: 100%;
    aspect-ratio: 1 / 1; 
}

@media (min-width: 768px) {
    .pgp-gallery-wrapper:not(.pgp-loaded) {
        min-height: 500px;
    }
}

.pgp-gallery-wrapper {
    box-sizing: border-box;
}

.pgp-gallery-wrapper *, 
.pgp-gallery-wrapper *::before, 
.pgp-gallery-wrapper *::after {
    box-sizing: inherit;
}

.pgp-gallery-wrapper a, 
.pgp-gallery-wrapper img {
    margin: 0;
    padding: 0;
    border: none;
    text-decoration: none;
}

.pgp-gallery-wrapper.pgp-loaded {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    --swiper-navigation-color: #333333; 
    --swiper-navigation-size: 24px;
}

.pgp-swiper-main {
    width: 100%;
    overflow: hidden;
    border-radius: 0px;
    background: transparent;
    position: relative;
}

.pgp-slide-image a {
    display: block;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.pgp-main-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.pgp-swiper-thumbs {
    width: 100%;
    margin-top: 5px;
    overflow: hidden;
}

.pgp-thumb-slide {
    cursor: pointer;
    outline: none;
}

.pgp-thumb-slide.swiper-slide-thumb-active,
.pgp-thumb-slide.active {
    outline: 1px solid #999;
    outline-offset: -1px;
}

.pgp-thumb-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
}

.pgp-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 100px;
    background: #333;
    color: #fff;
    font-weight: bold;
    font-size: 12px;
}

model-viewer {
    width: 100%;
    height: 100%;
    min-height: 400px;
    --poster-color: transparent;
    touch-action: pan-y; 
}
model-viewer::part(default-poster) {
    transition: none !important;
    display: none !important;
}

.swiper-backface-hidden .swiper-slide {
    height: auto;
}

.pgp-controls-none .pgp-nav-prev,
.pgp-controls-none .pgp-nav-next,
.pgp-controls-none .pgp-pagination {
    display: none !important;
}

.pgp-controls-arrows .pgp-pagination {
    display: none !important;
}

.pgp-controls-dots .pgp-nav-prev,
.pgp-controls-dots .pgp-nav-next {
    display: none !important;
}

.pgp-pagination {
    bottom: 10px !important;
}

.pgp-pagination .swiper-pagination-bullet-active {
    background: var(--brand-primary, #25b9d7);
}

.pgp-nav-prev, 
.pgp-nav-next {
    background: none !important;
    border: none !important;
    color: #333 !important;
    width: 32px;
    height: 32px;
    margin-top: calc(0px - (var(--swiper-navigation-size) / 2));
    opacity: 0.5;
}

.pgp-nav-prev::before,
.pgp-nav-next::before,
.pgp-nav-prev::after, 
.pgp-nav-next::after {
    display: none !important;
    content: none !important;
}

.pgp-nav-prev svg, 
.pgp-nav-next svg {
    display: block;
    width: 100%;
    height: 100%;
}

.pgp-nav-prev:hover, 
.pgp-nav-next:hover {
    opacity: 1;
}

.pgp-nav-icon {
    width: 32px;
    height: 32px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2px;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.layout-classic {
    display: flex;
    flex-direction: column;
}

.layout-left_thumbs, .layout-right_thumbs {
    display: block; 
    width: 100%;
    position: relative; 
}

.layout-left_thumbs {
    padding-left: calc(var(--pgp-thumb-width, 100px) + 5px); 
}
.layout-right_thumbs {
    padding-right: calc(var(--pgp-thumb-width, 100px) + 5px);
}

.layout-left_thumbs .pgp-swiper-thumbs, 
.layout-right_thumbs .pgp-swiper-thumbs {
    width: var(--pgp-thumb-width, 100px); 
    max-width: none; 
    height: 100%; 
    max-height: none; 
    position: absolute;
    top: 0;
    margin: 0; 
}

.layout-left_thumbs .pgp-swiper-thumbs {
    left: 0; 
}
.layout-right_thumbs .pgp-swiper-thumbs {
    right: 0;
}

.layout-left_thumbs .pgp-swiper-main, 
.layout-right_thumbs .pgp-swiper-main {
    width: 100%; 
}

.layout-left_thumbs .pgp-thumb-img,
.layout-right_thumbs .pgp-thumb-img {
    width: 100%;
    height: 100%;
}

.pgp-grid-mode .swiper-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 10px;
    height: auto !important;
}

.pgp-grid-mode .swiper-slide {
    width: 100% !important; 
    margin-right: 0 !important;
    height: auto !important;
}

.pgp-grid-mode .pgp-nav-prev,
.pgp-grid-mode .pgp-nav-next,
.pgp-grid-mode .pgp-pagination {
    display: none !important;
}

.pgp-sticky-row {
    align-items: flex-start;
}

.pgp-sticky-col {
    position: sticky;
    top: 100px;
    z-index: 99;
}

.pswp__button--zoom {
    display: none !important;
}

.pswp__img {
    cursor: grab !important;	
}

.pswp__img:active {
    cursor: grabbing !important;
}

.pswp__counter {
    height: 30px;
    margin-top: 15px;
    margin-inline-start: 20px;
    font-size: 14px;
    line-height: 30px;
    color: #999;
    opacity: 1;
    text-shadow: none;
}

.pswp__bg {
    background: #ffffff !important; 
}

.pswp-media-wrapper .pgp-media-container {
    background: transparent !important;
}

.pswp__button svg.pswp__icn {
    display: none !important;
}

.pswp__button {
    color: #333333 !important;
    background: transparent !important;
    opacity: 1;
}

.pswp__button svg:not(.pswp__icn) {
    display: block;
    margin: 0 auto;
    opacity: 0.5; 
}

.pswp__button svg:not(.pswp__icn):hover {
    opacity: 1;
}

.pgp-force-slide-anim .pswp__container {
    transition: transform 500ms cubic-bezier(.4, 0, .22, 1) !important;
}

.pswp-media-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 0;
    cursor: default !important;
}

.pswp video.pgp-media-element,
.pswp__custom-content video {
    max-width: 100% !important;
    max-height: 100vh !important; 
    width: auto !important;
    height: auto !important;
    object-fit: contain !important; 
    position: absolute !important;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto !important; 
}

.pswp__custom-content {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 0; 
    box-sizing: border-box;
}

.pgp-thumb-media video,
.pswp video.pgp-media-element,
.pswp__custom-content video {
    cursor: pointer !important;
}

.pgp-slide-media {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 1 / var(--pgp-aspect-ratio, 1.333);
    background: #f8f8f8;
    overflow: hidden;
    border-radius: 0px; 
}

.pgp-media-container {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 0px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pgp-media-container .pgp-media-element {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.pgp-media-container video,
.pgp-media-container video.pgp-media-element {
    width: 100%;
    object-fit: contain;
    max-height: 100%;
    outline: none;
}

.pgp-media-container model-viewer {
    width: 100%;
    height: 100%;
    object-fit: contain;
    outline: none;
    touch-action: pan-y;
}

.pgp-container-video { background-color: #000000; }
.pgp-container-3d { background-color: #f8f9fa; }

.pgp-close-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
    cursor: default;
}

.pgp-media-element {
    position: relative;
    z-index: 2;
    max-height: 100%;
}

.pgp-pointer,
video.pgp-media-element.pgp-pointer {
    cursor: pointer;
}

.pgp-flags-wrapper {
    position: absolute;
    top: 5px;
    left: 5px;
    right: 5px; 
    z-index: 15;
    pointer-events: none;
}

.pgp-flags-wrapper .product-flags {
    display: block !important; 
    margin: 0 !important;
    padding: 0 !important;
    list-style: none !important;
    pointer-events: none;
}

.pgp-flags-wrapper .product-flag {
    position: relative !important;
    top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
    display: table !important; 
    float: left;
    clear: left; 
    margin: 0 0 6px 0 !important;
    transform: none !important; 
    pointer-events: auto; 
}

.pgp-flags-wrapper .product-flag.discount {
    position: absolute !important;
    top: 0 !important;
    right: 0 !important; 
    left: auto !important;
    bottom: auto !important;
    float: none !important;
    clear: none !important;
    margin: 0 !important;
}

.pgp-thumb-media {
    position: relative;
}

.pgp-thumb-media.pgp-type-video,
.pgp-thumb-media.pgp-type-3d {
    background: #ededed;
}

.pgp-media-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.6);
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
    transition: background 0.3s ease, transform 0.3s ease;
}

.pgp-badge-icon {
    width: 20px;
    height: 20px;
    fill: #ffffff; 
}

.pgp-media-badge svg {
    margin-left: 2px; 
}

.pgp-badge-3d-text {
    color: #ffffff;
    font-size: 11px;
    font-weight: bold;
    font-family: sans-serif;
    letter-spacing: 0.5px;
    margin-top: 1px;
}

.pgp-thumb-media:hover .pgp-media-badge {
    background: rgba(0, 0, 0, 0.85); 
}

body.pgp-protection-enabled .pgp-gallery-wrapper img,
body.pgp-protection-enabled .pgp-gallery-wrapper video,
body.pgp-protection-enabled .pswp img {
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-touch-callout: none; 
}

body .pswp .pswp__button--arrow--prev,
body .pswp .pswp__button--arrow--next,
body .pswp .pswp__button--arrow {
    display: block !important;
    visibility: visible !important;
}

@media (max-width: 767px) {
    body .pswp .pswp__button--arrow--prev {
        left: -15px  !important; 
    }
    
    body .pswp .pswp__button--arrow--next {
        right: -15px !important;
    }
}

.pgp-loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 40%;
    height: auto;
    max-width: 100px;
    max-height: 100px;
    transform: translate(-50%, -50%);
    z-index: 0;
    pointer-events: none;
    object-fit: contain;
}

.pgp-container-video .pgp-loading-spinner {
    filter: invert(100%);
}

.pgp-slide-image, 
.pgp-media-container {
    background-color: #ffffff;
}
.pgp-container-3d {
    background-color: #f8f9fa;
}
.pgp-container-video {
    background-color: #000000;
}

.pgp-main-img, 
.pgp-media-element {
    position: relative;
    z-index: 1;
}

.pgp-media-loaded .pgp-loading-spinner {
    display: none !important;
    animation: none !important;
}