/*******************************************************************************************
*   ___  _          ______                     _ _                _                        *
*  / _ \| |         | ___ \                   | (_)              | |              © 2025   *
* / /_\ | | _____  _| |_/ /_ __ __ _ _ __   __| |_ _ __   __ _   | |_ ___  __ _ _ __ ___   *
* |  _  | |/ _ \ \/ / ___ \ '__/ _` | '_ \ / _` | | '_ \ / _` |  | __/ _ \/ _` | '_ ` _ \  *
* | | | | |  __/>  <| |_/ / | | (_| | | | | (_| | | | | | (_| |  | ||  __/ (_| | | | | | | *
* \_| |_/_|\___/_/\_\____/|_|  \__,_|_| |_|\__,_|_|_| |_|\__, |  \___\___|\__,_|_| |_| |_| *
*                                                         __/ |                            *
*                                                        |___/                             *
* ---------------------------------------------------------------------------------------- *
* This is commercial software, only users who have purchased a valid license and accept    *
* to the terms of the License Agreement can install and use this program.                  *
* ---------------------------------------------------------------------------------------- *
* website: https://cs-cart.alexbranding.com                                                *
*   email: info@alexbranding.com                                                           *
*******************************************************************************************/
@pd: 15px;

html[dir="ltr"] .ypi-product-block__img .owl-carousel .owl-wrapper {
	display: flex !important;
}

@media (max-width: 767px) {
    div.ab__vg-videos.ab-vg-videos-wrapper {
        margin: 0 -20px 20px;
        width: calc(~'100% + 40px');
    }
}

.ab__icon_video i.material-icons {
    line-height: 20px;
    margin-left: -1px;

    @media (max-width: 767px) {
        font-size: 14px;
    }
}


@media screen and (max-width: 767px) {
	.ab_vg-images-wrapper {
		& > div {
			width: 100% !important;
		}
		.ab-stickers-wrapper {
			left: 0 !important;
		}
	}
}

a.ab__vg-image_gallery_item {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid @content_bg;
    transition: all .3s ease;

    &:not(:hover) img {
        opacity: .8;
    }
    &.active img {
        opacity: 1;
    }
}
.ab-vg-video-icon {
    max-width: 50%;
}
.cm-image-gallery a {
    display: flex;
    align-items: center;
    justify-content: center;
}

.ypi-product-block__img {
	iframe.ab__vg-image_gallery_video.cm-image-previewer,
	video.ab__vg-image_gallery_video.cm-image-previewer {
		width: 100%;
		height: 100%;
		position: relative;
		z-index: 2;
		min-width: auto;
		min-height: 360px;
	}
}
.ypi-text-image-zoom {
    width: 100%;
    height: 35px;
    float: right;
	clear: both;
}

div.ty-product-thumbnails {
    .ty-product-thumbnails__item {
        box-sizing: border-box;
    }
	&:not(.owl-carousel) {
		overflow: hidden;
		text-align: center;
	}

	@media screen and (min-width: 768px) {
		&.ty-center:not(.cm-image-gallery) {
			justify-content: center;
			margin: 0;
			min-height: auto !important;
		}
	}
	&:not(.cm-image-gallery-wrapper) {
		.cm-image-gallery {
			display: block;
		}
	}
}
@media screen and (min-width: 768px) {
	div.ty-product-thumbnails {
		&.ty-center.ab-vertical-thumbnails:not(.cm-image-gallery) {
			justify-content: flex-start;
		}
	}
}

.ty-product-img.cm-preview-wrapper {
    overflow: hidden;
    min-height: 100%;

	&:not(.ab-vg-vertical-thumbnails) {
		width: 100%;
	}
}

.ab__vg-image_gallery_video {
	width: 100%;
	height: 100%;
	align-content: center;

	iframe, video {
		width: 100%;
		height: 100%;
	}
}

.cm-popup-box[id^="ab__vg_video"] {
    .object-container {
	    text-align: center;
        width: 100%;
        min-height: 400px;
        max-height: 100%;
        margin: 0 auto;
        padding: 0;
        overflow: hidden;
        scrollbar-gutter: auto !important;

        iframe, video {
            width: 100% !important;
            height: 100% !important;
        }

		@media screen and (min-width: 970px) and (min-height: 320px) {
	        height: ~"calc(100vh - 60px)" !important;
			min-height: auto !important;

	        iframe, video {
	            min-height: auto !important;
	        }
        }

        @media screen and (min-width: 970px) and (min-height: 600px) {
	        height: 600px !important;

	        iframe, video {
	            min-height: auto !important;
	        }
        }

        @media screen and (max-width: 969px) and (min-height: 320px) {
	        height: inherit !important;
	        min-height: auto;
	        top: 10px !important;

	        iframe, video {
	            min-height: 70vh;
	        }
        }
        @media screen and (max-width: 969px) and (min-height: 768px) {
	        height: 480px !important;

	        iframe, video {
	            min-height: 100%;
	        }
        }
    }
}

@media screen and (min-width: 767px) {
	.ab-vg-vertical-thumbnails {

    	&.ab-vg-cols > div {
        	padding-left: 5px;
    	}

		& ~ .ty-product-bigpicture-thumbnails_gallery {

			.cm-image-gallery {
				overflow: hidden;
			}
			.ty-thumbnails_gallery {
				position: relative;
				margin-top: 0;

				.ty-product-thumbnails {
					margin-top: 0;
				}
				> .ty-hand + .ty-product-thumbnails {
					margin-top: 22px !important;
				}
			}
			.ty-icon-up-open, .ty-icon-down-open {
				font-size: 1.3rem;
				left: 50%;
				width: 100%;
				position: absolute;
				background: @base;
				.translate(-50%, 0);
			}
			.ty-icon-up-open {
				top: -22px;
			}
			.ty-icon-down-open {
				bottom: -22px;
			}
		}
	}
}

.ty-quick-view__wrapper {
	.ab-vg-vertical-thumbnails {
		& ~ .ty-product-bigpicture-thumbnails_gallery {
			.cm-image-gallery-wrapper {
				position: relative;
				width: 100%;
			}
		}
	}
	.ypi-product-block__img iframe.ab__vg-image_gallery_video.cm-image-previewer,
	.ypi-product-block__img video.ab__vg-image_gallery_video.cm-image-previewer {
		min-height: 240px;
	}
	div.ty-product-thumbnails.ty-center:not(.cm-image-gallery) {
		display: flex;
	    justify-content: center;
	    padding-top: 10px;
	}
}

@media screen and (max-width: 767px) {
	.ty-product-thumbnails {
		min-height: inherit !important;
	}

	.ab-vg-vertical-thumbnails {

		.ty-hand {
			display: none;
		}

		& ~ .ty-center, &.jcarousel-skin {
			max-height: none !important;
			width: auto !important;

			.ty-product-thumbnails__item {
				margin-bottom: 5px;
			}
			.cm-item-gallery {
				display: inline-block;
			}
		}
	}

	.ab-vg-horizontal-thumbnails {
		.owl-item {
			.cm-item-gallery {
				display: flex;
				height: 100%;
			}
		}
	}

	div.ty-product-block .ty-product-thumbnails__item {
		display: flex;
		align-items: center;
	}
}

.cm-image-gallery {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	opacity: 0;

	&.ab__vg_loaded {
		opacity: 1;
	}
}

.notification-body-extended {
	.ab__vg-videos {
		display: inline-block;
		clear: both;
		width: 100%;
	}
}

iframe.ab__vg-image_gallery_video,
video.ab__vg-image_gallery_video,
.ab__vg-image_gallery_video iframe,video {
    background-color: #000;
}

.ab__video_gallery-block {
    padding-block: var(--space-s);
}

@keyframes ab_vg_spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

.ab__vg-product_list-video.hover_image {
	align-content: center;

	.ab__vg-image_gallery_video-wrapper {
		opacity: 1;
		transition: opacity 1s;
	}

	&.ab_vg_spin {
		position: relative;
		background: none;

		&:before {
			content: '';
			width: 32px;
			height: 32px;
			position: absolute;
			top: calc(~"50% - 16px");
			left: calc(~"50% - 16px");
			animation: ab_yt_spin 1s ease-in-out infinite forwards;
			border: 3px solid @base;
			border-top-color: @links;
			border-radius: 50%;
		}

		.ab__vg-image_gallery_video-wrapper {
			opacity: 0;
		}
	}

	.ab__vg-image_gallery_video.ab__vg-progress {
		align-content: center;
	}
}