/**
 * WooCommerce Video de Portada - Frontend Styles
 * Optimized for XStore theme (8theme) and Uomo (ApusThemes)
 */

/* ==========================================================================
   1. Fix XStore Vertical Thumbnails (Slick Slider)
   ========================================================================== */
.vertical-thumbnails-wrapper .slick-list {
	position: relative !important;
	display: block !important;
	overflow: hidden !important;
	margin: 0 !important;
	padding: 0 !important;
}

.vertical-thumbnails-wrapper .slick-track {
	position: relative !important;
	top: 0 !important;
	left: 0 !important;
	display: block !important;
}

.vertical-thumbnails-wrapper .slick-slide {
	display: block !important;
	outline: none !important;
}

/* ==========================================================================
   2. Main Gallery Video Slide (XStore Swiper & Apus Slick)
   ========================================================================== */
.xstore-cover-video-slide,
.apus-product-video-slide {
	outline: none;
	box-sizing: border-box;
	position: relative;
}

.xstore-cover-video-slide .wc-cover-video-container,
.apus-product-video-slide .wc-product-video-container {
	position: relative;
	width: 100% !important;
	background-color: #000000;
	overflow: hidden;
}

.xstore-cover-video-slide .wc-video-sizer-img {
	visibility: hidden !important;
	opacity: 0 !important;
	display: block !important;
	width: 100% !important;
	height: auto !important;
	pointer-events: none !important;
}

.xstore-cover-video-slide .wc-cover-video-responsive,
.apus-product-video-slide .wc-cover-video-responsive {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: #000000;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}

.xstore-cover-video-slide .wc-cover-video-iframe,
.xstore-cover-video-slide .wc-cover-video-element,
.apus-product-video-slide .wc-cover-video-iframe,
.apus-product-video-slide .wc-cover-video-element {
	position: absolute;
	top: 0;
	left: 0;
	width: 100% !important;
	height: 100% !important;
	border: 0;
	display: block;
	visibility: visible;
	opacity: 1;
	z-index: 5;
	background-color: #000000;
	pointer-events: auto;
	object-fit: contain;
}

/* Fallback if no sizer image is present */
.xstore-cover-video-slide .wc-cover-video-container:not(:has(.wc-video-sizer-img)) .wc-cover-video-responsive {
	position: relative;
	aspect-ratio: 3 / 4;
	max-height: 80vh;
}

/* Hide theme's redundant popup buttons */
.product-images-wrapper .open-video-popup,
.single-product .open-video-popup,
.apus-woocommerce-product-gallery-wrapper > .video {
	display: none !important;
}

/* Complianz GDPR bypass */
.xstore-cover-video-slide .cmplz-blocked-content-container,
.xstore-cover-video-slide .cmplz-blocked-content-notice,
.xstore-cover-video-slide .cmplz-video-placeholder,
.apus-product-video-slide .cmplz-blocked-content-container,
.apus-product-video-slide .cmplz-blocked-content-notice,
.apus-product-video-slide .cmplz-video-placeholder {
	display: none !important;
}

/* ==========================================================================
   3. Video Thumbnail (XStore)
   ========================================================================== */
.xstore-cover-video-thumb {
	cursor: pointer !important;
	outline: none !important;
	position: relative !important;
	display: block !important;
}

.xstore-cover-video-thumb a {
	position: relative !important;
	display: block !important;
	width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	overflow: hidden !important;
	background: #000000 !important;
	text-decoration: none !important;
}

.xstore-cover-video-thumb img.wc-video-thumb-img {
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 1 / 1 !important;
	object-fit: cover !important;
	display: block !important;
	margin: 0 auto !important;
	opacity: 0.88 !important;
	transition: opacity 0.25s ease, transform 0.25s ease !important;
}

.xstore-cover-video-thumb:hover img.wc-video-thumb-img,
.xstore-cover-video-thumb.active-thumbnail img.wc-video-thumb-img,
.xstore-cover-video-thumb.slick-current img.wc-video-thumb-img {
	opacity: 1 !important;
	transform: scale(1.05) !important;
}

.xstore-cover-video-thumb .wc-play-icon {
	position: absolute !important;
	top: 45% !important;
	left: 50% !important;
	transform: translate(-50%, -50%) !important;
	width: 32px !important;
	height: 32px !important;
	background: rgba(220, 20, 60, 0.9) !important;
	color: #ffffff !important;
	border-radius: 50% !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 14px !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
	pointer-events: none !important;
	transition: transform 0.25s ease, background 0.25s ease !important;
	z-index: 2 !important;
}

.xstore-cover-video-thumb .wc-play-icon:empty::before {
	content: '\25B6';
	font-size: 12px;
	margin-left: 2px;
	color: #ffffff;
}

.xstore-cover-video-thumb:hover .wc-play-icon,
.xstore-cover-video-thumb.active-thumbnail .wc-play-icon {
	background: #ff0000 !important;
	transform: translate(-50%, -50%) scale(1.15) !important;
}

.xstore-cover-video-thumb .wc-video-thumb-badge {
	position: absolute !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.85)) !important;
	color: #ffffff !important;
	font-size: 10px !important;
	font-weight: 700 !important;
	text-align: center !important;
	padding: 6px 2px 3px 2px !important;
	line-height: 1.1 !important;
	letter-spacing: 0.6px !important;
	text-transform: uppercase !important;
	pointer-events: none !important;
	z-index: 2 !important;
}

/* ==========================================================================
   4. Video Thumbnail (Uomo / Apus Themes)
   ========================================================================== */
.apus-product-video-thumb {
	cursor: pointer !important;
	outline: none !important;
}

.apus-product-video-thumb .wc-video-thumb-container {
	position: relative !important;
	width: 100% !important;
	aspect-ratio: 1 / 1 !important;
	background: #000000 !important;
	overflow: hidden !important;
	border-radius: 4px !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.apus-product-video-thumb .wc-video-thumb-container img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
	opacity: 0.85 !important;
	transition: opacity 0.25s ease-in-out, transform 0.25s ease-in-out !important;
}

.apus-product-video-thumb:hover .wc-video-thumb-container img,
.apus-product-video-thumb.slick-current .wc-video-thumb-container img {
	opacity: 1 !important;
	transform: scale(1.04) !important;
}

.apus-product-video-thumb .wc-video-play-badge {
	position: absolute;
	top: 45%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 32px;
	height: 32px;
	background: rgba(0, 0, 0, 0.7);
	border: 1.5px solid rgba(255, 255, 255, 0.8);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
	pointer-events: none;
	transition: all 0.25s ease;
}

.apus-product-video-thumb .wc-video-play-badge svg {
	margin-left: 2px;
	width: 16px;
	height: 16px;
}

.apus-product-video-thumb:hover .wc-video-play-badge,
.apus-product-video-thumb.slick-current .wc-video-play-badge {
	background: #cc0000;
	border-color: #ffffff;
	transform: translate(-50%, -50%) scale(1.15);
}

.apus-product-video-thumb .wc-video-label {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
	color: #ffffff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	text-align: center;
	padding: 6px 2px 3px 2px;
	line-height: 1.1;
	pointer-events: none;
}
