/*
 Theme Name:   Woodmart Child
 Description:  Woodmart Child Theme
 Author:       XTemos
 Author URI:   http://xtemos.com
 Template:     woodmart
 Version:      1.0.0
 Text Domain:  woodmart
*/

/* Product gallery: one consistent frame. Portrait photos no longer stretch the page. */
.single-product .woocommerce-product-gallery .wd-gallery-images .wd-carousel-item {
	height: clamp(360px, 62vh, 620px) !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
}

.single-product .woocommerce-product-gallery .wd-gallery-images .woocommerce-product-gallery__image,
.single-product .woocommerce-product-gallery .wd-gallery-images .woocommerce-product-gallery__image > a {
	width: 100%;
	height: 100%;
	min-height: 0 !important;
	display: flex !important;
	align-items: center;
	justify-content: center;
}

.single-product .woocommerce-product-gallery .wd-gallery-images .woocommerce-product-gallery__image > a > img:not(.zoomImg) {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	min-height: 0 !important;
	object-fit: contain;
}

.single-product .woocommerce-product-gallery .wd-gallery-thumb .wd-carousel-item {
	height: 96px !important;
	max-height: 96px !important;
	overflow: hidden;
	border-radius: 8px;
	border: 1px solid #e4dfd4;
	box-sizing: border-box;
	background: #fff;
	opacity: 1 !important;
}

.single-product .woocommerce-product-gallery .wd-gallery-thumb .wd-carousel-item.wd-thumb-active,
.single-product .woocommerce-product-gallery .wd-gallery-thumb .wd-carousel:not(.wd-initialized) .wd-carousel-item:first-child {
	border-color: #69892f;
	box-shadow: inset 0 0 0 1px #69892f;
}

.single-product .woocommerce-product-gallery .wd-gallery-thumb .wd-carousel-item img {
	width: 100% !important;
	height: 96px !important;
	max-height: 96px !important;
	min-height: 0 !important;
	object-fit: cover;
	object-position: center top;
	display: block;
}

@media (max-width: 768px) {
	.single-product .woocommerce-product-gallery .wd-gallery-images .wd-carousel-item {
		height: 380px !important;
	}

	.single-product .woocommerce-product-gallery .wd-gallery-thumb .wd-carousel-item,
	.single-product .woocommerce-product-gallery .wd-gallery-thumb .wd-carousel-item img {
		height: 72px !important;
		max-height: 72px !important;
	}
}
