/*
 * VIER Custom Related Products
 * Tabs are rendered by Flatsome. Product rows use Flatsome's grid classes and
 * every card still comes from the site's existing content-product.php.
 */

.vier-crp {
	width: 100%;
	min-width: 0;
}

.vier-crp .custom-related-product-tabs {
	width: 100%;
	min-width: 0;
}

/* Flatsome owns equal heights through equalize-box on this product row. */
.vier-crp__products-row {
	margin-bottom: 0;
}

.vier-crp .custom-related-product-tabs > .nav {
	gap: 8px;
}

.vier-crp .custom-related-product-tabs > .nav > li {
	margin: 0;
}

.vier-crp .custom-related-product-tabs > .nav > li > a.portfolio-badge {
	box-sizing: border-box;
	margin: 0;
	cursor: pointer;
	line-height: 1.2;
	text-align: center;
	white-space: nowrap;
}

.vier-crp .custom-related-product-tabs > .nav > li.active > a.portfolio-badge,
.vier-crp .custom-related-product-tabs > .nav > li > a.portfolio-badge.active {
	color: #fff !important;
	background-color: #1c1713 !important;
	border-color: #1c1713 !important;
}

.vier-crp .custom-related-product-tabs > .nav > li > a:focus-visible {
	outline: 2px solid #8d0b28;
	outline-offset: 3px;
}

.vier-crp__empty,
.vier-crp__editor-note {
	box-sizing: border-box;
	width: 100%;
	margin: 0;
	padding: 18px 20px;
	color: #716b64;
	background: #f9f5eb;
	border-radius: 18px;
}

/* Optional alignment with the H3 immediately before the shortcode. */
@media (min-width: 1025px) {
	.vier-crp--align-heading .custom-related-product-tabs > .nav {
		width: min(76%, 850px);
		margin-top: -5rem;
		margin-right: 0;
		margin-bottom: 2.65rem;
		margin-left: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.vier-crp *,
	.vier-crp *::before,
	.vier-crp *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
	}
}
