.twdcs-external-gallery {
	width: 100%;
	margin: 0 0 2rem;
}

.twdcs-image-failed-product {
	display: none !important;
}

.twdcs-external-gallery .woocommerce-product-gallery__wrapper {
	margin: 0;
}

.twdcs-external-gallery .woocommerce-product-gallery__image {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 320px;
	background: #fff;
}

.twdcs-external-main-link {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
}

.twdcs-external-gallery .wp-post-image {
	display: block;
	width: 100%;
	max-width: 100%;
	height: auto;
	max-height: 680px;
	object-fit: contain;
}

.twdcs-external-thumbnails {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 10px;
	margin-top: 12px;
}

.twdcs-external-thumbnail {
	min-width: 0;
	padding: 6px;
	border: 1px solid #d5d5d5;
	border-radius: 3px;
	background: #fff;
	cursor: pointer;
}

.twdcs-external-thumbnail:hover,
.twdcs-external-thumbnail:focus-visible,
.twdcs-external-thumbnail.is-active {
	border-color: currentColor;
	outline: 0;
}

.twdcs-external-thumbnail img {
	display: block;
	width: 100%;
	height: 92px;
	object-fit: contain;
}

@media (max-width: 767px) {
	.twdcs-external-gallery .woocommerce-product-gallery__image {
		min-height: 240px;
	}

	.twdcs-external-thumbnails {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}
