/* ==================================================================
   WideoShop — Frontend styles
   ================================================================== */

.wds-widget {
	box-sizing: border-box;
}
.wds-widget * {
	box-sizing: border-box;
}

/* ------------------------------------------------------------------ */
/* Video card                                                          */
/* ------------------------------------------------------------------ */

.wds-video-card {
	position: relative;
	border-radius: 10px;
	overflow: hidden;
	background: #000;
	cursor: pointer;
	width: 100%;
	max-width: var( --wds-video-width, none );
	margin-left: auto;
	margin-right: auto;
}

.wds-video-media {
	position: relative;
	width: 100%;
	height: 100%;
}

.wds-video-el {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	background: #111;
}

/* Aspect ratio containers */
.wds-aspect-9-16 .wds-video-media { aspect-ratio: 9 / 16; }
.wds-aspect-16-9 .wds-video-media { aspect-ratio: 16 / 9; }
.wds-aspect-1-1  .wds-video-media { aspect-ratio: 1 / 1; }

.wds-play-icon {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.45);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

.wds-video-card.wds-playing .wds-play-icon {
	opacity: 0;
}

.wds-product-tag {
	position: absolute;
	left: 8px;
	right: 8px;
	bottom: 8px;
	background: rgba(255, 255, 255, 0.95);
	color: #111;
	border-radius: 8px;
	padding: 8px 10px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	text-decoration: none;
	font-size: 13px;
	line-height: 1.3;
	backdrop-filter: blur(2px);
}

.wds-product-tag:hover {
	background: #fff;
}

.wds-product-name {
	font-weight: 600;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wds-product-price {
	white-space: nowrap;
	color: #555;
	font-size: 12px;
}

/* ------------------------------------------------------------------ */
/* Grid layout                                                         */
/* ------------------------------------------------------------------ */

.wds-layout-grid {
	display: grid;
	grid-template-columns: repeat( var( --wds-columns-mobile, 2 ), minmax( 0, var( --wds-video-width, 300px ) ) );
	justify-content: center;
	gap: 10px;
}

@media (min-width: 481px) and (max-width: 1024px) {
	.wds-layout-grid {
		grid-template-columns: repeat( var( --wds-columns-tablet, 3 ), minmax( 0, var( --wds-video-width, 300px ) ) );
		gap: 16px;
	}
}

@media (min-width: 1025px) {
	.wds-layout-grid {
		grid-template-columns: repeat( var( --wds-columns-desktop, 4 ), minmax( 0, var( --wds-video-width, 300px ) ) );
		gap: 20px;
	}
}

/* ------------------------------------------------------------------ */
/* Carousel layout (Swiper)                                             */
/* ------------------------------------------------------------------ */

.wds-layout-carousel .wds-swiper {
	padding-bottom: 36px; /* room for pagination dots */
}

.wds-layout-carousel .swiper-slide {
	height: auto;
}

.wds-layout-carousel .swiper-button-prev,
.wds-layout-carousel .swiper-button-next {
	color: #111;
	background: rgba(255, 255, 255, 0.85);
	width: 36px;
	height: 36px;
	border-radius: 50%;
	--swiper-navigation-size: 16px;
}

.wds-layout-carousel .swiper-pagination-bullet-active {
	background: #111;
}

/* ------------------------------------------------------------------ */
/* Lightbox                                                             */
/* ------------------------------------------------------------------ */

.wds-lightbox-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.wds-lightbox-content {
	position: relative;
	max-width: 420px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
}

.wds-lightbox-video-wrap {
	width: 100%;
	border-radius: 10px;
	overflow: hidden;
	background: #000;
}

.wds-lightbox-video-wrap video {
	width: 100%;
	height: 100%;
	max-height: 80vh;
	display: block;
	object-fit: contain;
	background: #000;
}

.wds-lightbox-close {
	position: absolute;
	top: -40px;
	right: 0;
	background: none;
	border: none;
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
}

.wds-lightbox-product {
	margin-top: 10px;
}

.wds-lightbox-product .wds-product-tag {
	position: static;
}

.wds-empty-notice {
	padding: 10px;
	border: 1px dashed #ccc;
	color: #666;
}
