/* Gallery import (URL ngoài, fallback). */
.ht-product-gallery--contain .ht-imported-product-gallery.ht-product-gallery,
.ht-imported-product-gallery.ht-product-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 1.5em;
}
.ht-product-gallery--contain .ht-imported-product-gallery .ht-gallery-item,
.ht-imported-product-gallery .ht-gallery-item {
	margin: 0;
	flex: 0 0 auto;
}
.ht-product-gallery--contain .ht-imported-product-gallery .ht-gallery-item img,
.ht-imported-product-gallery .ht-gallery-item img {
	max-height: 420px;
	width: auto;
	height: auto;
	display: block;
	object-fit: contain;
	object-position: center;
}

.ht-product-gallery--contain .ht-function-product-gallery-wrap .ht-ux-product-gallery,
.ht-function-product-gallery-wrap .ht-ux-product-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 1.5em;
}
.ht-product-gallery--contain .ht-function-product-gallery-wrap .woocommerce-product-gallery__image,
.ht-function-product-gallery-wrap .woocommerce-product-gallery__image {
	margin: 0;
}
.ht-product-gallery--contain .ht-function-product-gallery-wrap .woocommerce-product-gallery__image img,
.ht-function-product-gallery-wrap .woocommerce-product-gallery__image img {
	max-height: 480px;
	width: auto;
	height: auto;
	display: block;
	object-fit: contain;
	object-position: center;
}

/* [product_gallery] → [ux_gallery] Flatsome (image-cover → contain). */
.ht-product-gallery--contain .box-image.image-cover .img-inner > img,
.ht-product-gallery--contain .box-image.image-cover img,
.ht-product-gallery--contain .gallery-box .box-image img,
.ht-product-gallery--contain .ux-slider .flickity-slider .box-image img {
	object-fit: contain !important;
	object-position: center !important;
}

.ht-product-gallery--contain .box-image.image-cover .img-inner {
	background-color: #f8f8f8;
}

/* [product_related] / [product_viewed] → blog_posts ảnh product. */
.ht-product-list-blog-posts--contain .post-item .box-image.image-cover .img-inner > img,
.ht-product-list-blog-posts--contain .post-item .box-image.image-cover img,
.ht-product-list-blog-posts--contain .post-item .box-image img {
	object-fit: contain !important;
	object-position: center !important;
}

.ht-product-list-blog-posts--contain .post-item .box-image.image-cover .img-inner {
	background-color: #f8f8f8;
}

/* [product_content] — nhúng PDF từ link .pdf */
.ht-product-content .ht-product-pdf-embed {
	margin: 1.5em 0;
	width: 100%;
	max-width: 100%;
	background: #f5f5f5;
	border: 1px solid #e5e5e5;
	border-radius: 6px;
	overflow: hidden;
}

.ht-product-content .ht-product-pdf-embed__frame {
	display: block;
	width: 100%;
	min-height: 920px;
	height: 100vh;
	max-height: 1200px;
	border: 0;
}

.ht-product-content .ht-product-pdf-embed__fallback {
	margin: 0;
	padding: 0.65em 1em;
	font-size: 0.875em;
	text-align: center;
	background: #fff;
	border-top: 1px solid #e5e5e5;
}

.ht-product-content .ht-product-pdf-embed__fallback a {
	text-decoration: underline;
}
