/**
 * YITH WAPO Customizations - Frontend CSS
 * 
 * Voeg hier je custom CSS toe voor de frontend
 */

/* Voorbeeld: Pas de styling van add-ons aan */
.yith-wapo-addon.custom-addon-class {
	/* Jouw custom styles */
}

/* Voorbeeld: Pas de styling van blocks aan */
.yith-wapo-block.custom-block-class {
	/* Jouw custom styles */
}

/* ============================================
   Product Image Zoom/Lightbox Styling
   ============================================ */

/* Wrapper voor product afbeelding met zoom functionaliteit */
.yith-wapo-product-image-wrapper {
	position: relative;
	display: inline-block;
	width: 100%;
}

/* Vergrootglas icoon - Verschijnt alleen bij hover */
.yith-wapo-product-image-wrapper {
	position: relative;
	display: inline-block;
	width: 100%;
	overflow: hidden;
}

/* Overlay die verschijnt bij hover */
.yith-wapo-product-image-wrapper::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0);
	transition: background-color 0.3s ease;
	z-index: 5;
	pointer-events: none;
}

.yith-wapo-product-image-wrapper:hover::before {
	background-color: rgba(0, 0, 0, 0.1);
}

/* Vergrootglas icoon - Zwart in linkerbovenhoek, alleen zichtbaar bij hover */
.yith-wapo-zoom-icon {
	position: absolute;
	top: 8px;
	left: 8px;
	width: 32px;
	height: 32px;
	background-color: rgba(255, 255, 255, 0.95);
	border-radius: 4px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: all 0.3s ease;
	z-index: 10;
	text-decoration: none;
	color: #000;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
}

/* Toon icoon bij hover op de wrapper */
.yith-wapo-product-image-wrapper:hover .yith-wapo-zoom-icon {
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}

.yith-wapo-zoom-icon:hover {
	background-color: rgba(255, 255, 255, 1);
	transform: scale(1.1);
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}

.yith-wapo-zoom-icon svg {
	width: 18px;
	height: 18px;
	stroke: #000;
	stroke-width: 2.5;
	fill: none;
}

/* Lightbox overlay */
.yith-wapo-lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.9);
	z-index: 999999;
	display: none;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.3s ease;
}

.yith-wapo-lightbox-overlay.active {
	display: flex;
	opacity: 1;
}

/* Lightbox content */
.yith-wapo-lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
	text-align: center;
}

.yith-wapo-lightbox-content img {
	max-width: 100%;
	max-height: 90vh;
	width: auto;
	height: auto;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Lightbox title */
.yith-wapo-lightbox-title {
	color: #fff;
	margin-top: 20px;
	font-size: 18px;
	font-weight: 500;
}

/* Close button */
.yith-wapo-lightbox-close {
	position: absolute;
	top: 20px;
	right: 20px;
	width: 40px;
	height: 40px;
	background-color: rgba(255, 255, 255, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	z-index: 1000000;
}

.yith-wapo-lightbox-close:hover {
	background-color: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.8);
	transform: rotate(90deg);
}

.yith-wapo-lightbox-close::before,
.yith-wapo-lightbox-close::after {
	content: '';
	position: absolute;
	width: 20px;
	height: 2px;
	background-color: #fff;
	transform: rotate(45deg);
}

.yith-wapo-lightbox-close::after {
	transform: rotate(-45deg);
}

/* Navigation arrows (optioneel voor meerdere afbeeldingen) */
.yith-wapo-lightbox-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	width: 50px;
	height: 50px;
	background-color: rgba(255, 255, 255, 0.2);
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 50%;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
	color: #fff;
	font-size: 24px;
	font-weight: bold;
	z-index: 1000000;
}

.yith-wapo-lightbox-nav:hover {
	background-color: rgba(255, 255, 255, 0.3);
	border-color: rgba(255, 255, 255, 0.8);
}

.yith-wapo-lightbox-prev {
	left: 20px;
}

.yith-wapo-lightbox-next {
	right: 20px;
}

/* Voorkom scrollen wanneer lightbox open is */
body.yith-wapo-lightbox-open {
	overflow: hidden;
}

/* Responsive aanpassingen */
@media (max-width: 768px) {
	/* Vergrootglas icoon - Verborgen op mobiel */
	.yith-wapo-zoom-icon {
		display: none !important;
	}

	/* Maak de hele product afbeelding klikbaar op mobiel */
	.yith-wapo-product-image-wrapper {
		cursor: pointer;
	}

	.yith-wapo-product-image-wrapper img {
		pointer-events: none;
	}

	/* Product container aanpassingen voor mobiel */
	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .product-container {
		flex-direction: column;
		align-items: center;
		text-align: center;
		padding: 12px;
	}

	/* Product afbeelding groter op mobiel */
	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .product-image {
		width: 100%;
		max-width: 200px;
		margin: 0 auto 10px;
		flex-shrink: 0;
	}

	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .product-image img {
		width: 100%;
		height: auto;
		max-width: 200px;
		object-fit: contain;
	}

	/* Product info compacter op mobiel */
	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .product-container .product-info {
		width: 100%;
		flex: 1;
		padding: 0;
		margin: 0;
	}

	/* Product naam kleiner en compacter */
	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .product-container .product-info .product-name {
		font-size: 14px;
		line-height: 1.3;
		margin-bottom: 6px;
		font-weight: 500;
	}

	/* Prijs compacter */
	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .product-container small.option-price {
		font-size: 15px;
		margin: 4px 0;
		display: block;
	}

	/* Stock info kleiner */
	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .product-container .product-info .stock-info {
		font-size: 12px;
		margin-top: 4px;
	}

	/* Button compacter */
	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .product-container .button {
		font-size: 13px;
		padding: 8px 16px;
		margin-top: 8px;
		width: 100%;
		max-width: 200px;
	}

	/* Quantity selector compacter */
	.yith-wapo-block .yith-wapo-addon.yith-wapo-addon-type-product .yith-wapo-option .option-add-to-cart .quantity {
		margin-top: 8px;
		width: 100%;
		max-width: 200px;
		margin-left: auto;
		margin-right: auto;
	}

	/* Lightbox aanpassingen */
	.yith-wapo-lightbox-content {
		max-width: 95%;
	}

	.yith-wapo-lightbox-close {
		top: 10px;
		right: 10px;
		width: 35px;
		height: 35px;
	}

	.yith-wapo-lightbox-nav {
		width: 40px;
		height: 40px;
		font-size: 20px;
	}
}

