/*
 * Autor: Sergio Martinez de Unlockers Cloud
 * URL: https://1lockers.net
 * Productos relacionados DC — sin Slick, sin clase ul.products (evita reglas WC/Elementor).
 */

/* Ocultar bloque legacy del tema (Slick / padding 100px) por si algún plugin lo reinyecta */
.single-product section.related.products:not(.dc-related-products),
.single-product .upsells .aro-theme-carousel,
.single-product .cross-sells .aro-theme-carousel {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
}

/* Bloque completo: ancho total, sin banda :before del tema Aro */
.single-product div.product > .dc-related-products,
.single-product .dc-related-products.related.products {
	clear: both !important;
	float: none !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 2.5rem 0 1.5rem;
	padding: 0 !important;
	position: relative;
	box-sizing: border-box;
}

.single-product .dc-related-products.related.products::before {
	display: none !important;
}

.dc-related-products__title {
	font-family: var(--e-global-typography-primary-font-family, "Poppins"), "Montserrat", sans-serif;
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.3;
	margin: 0 0 1.25rem;
	text-align: left;
	letter-spacing: 0.02em;
	color: var(--e-global-color-secondary, #222);
}

.dc-related-products__viewport {
	overflow: visible;
	width: 100%;
	max-width: 100%;
}

/* Lista propia (NO usar clase .products de WooCommerce) */
.dc-related-products__track {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	width: 100% !important;
	box-sizing: border-box;
}

.dc-related-products__track::before,
.dc-related-products__track::after {
	display: none !important;
}

.dc-related-products__track > li.product {
	width: auto !important;
	max-width: none !important;
	flex: none !important;
	float: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0;
	clear: none !important;
	list-style: none;
}

.dc-related-products .product-block.dc-related-card {
	display: flex;
	flex-direction: column;
	height: auto !important;
	min-height: 0 !important;
	--Media_ClipPath: inset(0) !important;
	clip-path: none !important;
}

.dc-related-products .product-transition {
	position: relative;
	overflow: hidden;
}

.dc-related-products .dc-loop-image-wrap {
	position: relative;
	aspect-ratio: 1;
	background: #f8f8f8;
}

.dc-related-products .product-img-wrap {
	position: relative;
	width: 100%;
	height: 100%;
	aspect-ratio: 1;
}

.dc-related-products .product-img-wrap .inner {
	position: absolute;
	inset: 0;
}

.dc-related-products .product-img-wrap .product-image,
.dc-related-products .product-img-wrap .product-image a,
.dc-related-products .product-img-wrap img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dc-related-products .product-img-wrap .product-image.second-image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

.dc-related-products .unlockers-cart-icon-wrapper {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 5;
}

.dc-related-products .unlockers-cart-btn {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0 !important;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	border: none;
	font-size: 0;
	line-height: 1;
}

.dc-related-products .unlockers-cart-btn i {
	font-size: 1rem !important;
	color: #222 !important;
}

.dc-related-products .product-caption.dc-related-card__body {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
	position: relative !important;
	z-index: 2 !important;
	padding: 10px 0 0 !important;
	text-align: left !important;
	overflow: visible !important;
	height: auto !important;
	min-height: 0 !important;
}

.dc-related-products .woocommerce-loop-product__title {
	display: block !important;
	-webkit-line-clamp: unset !important;
	-webkit-box-orient: unset !important;
	overflow: visible !important;
	font-size: 0.95rem !important;
	font-weight: 600 !important;
	line-height: 1.35 !important;
	margin: 0 0 6px !important;
	color: #222222 !important;
}

.dc-related-products .woocommerce-loop-product__title a {
	color: #222222 !important;
	text-decoration: none;
}

.dc-related-products .woocommerce-loop-product__title a:hover {
	text-decoration: underline;
}

.dc-related-products .price,
.dc-related-products .price .amount,
.dc-related-products .price ins,
.dc-related-products .price del {
	display: flex !important;
	visibility: visible !important;
	opacity: 1 !important;
	font-size: 0.9rem !important;
	font-weight: 700 !important;
	color: #222222 !important;
	margin: 0 0 4px !important;
	justify-content: flex-start !important;
}

.dc-related-products .dc-loop-category-desc {
	font-size: 0.85rem;
	color: #666666 !important;
	margin: 0;
	line-height: 1.35;
}

.dc-related-products .group-action {
	display: none !important;
}

.dc-related-products__dots {
	display: none;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin: 10px 0 0;
	padding: 0;
}

.dc-related-products__dots:not([hidden]) {
	display: flex;
}

.dc-related-products__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.2);
	cursor: pointer;
	font-size: 0;
	line-height: 0;
	transition: background 0.2s ease, width 0.2s ease;
}

.dc-related-products__dot.is-active {
	background: rgba(0, 0, 0, 0.6);
	width: 24px;
	border-radius: 4px;
}

@media (max-width: 1023px) {
	.dc-related-products__track {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 767px) {
	.single-product .dc-related-products.related.products {
		margin-top: 1.5rem;
		margin-bottom: 1rem;
	}

	.dc-related-products__title {
		font-size: 1.2rem;
		margin-bottom: 0.75rem;
	}

	.dc-related-products__viewport {
		display: block;
		width: 100%;
		max-width: 100%;
		overflow-x: auto;
		overflow-y: hidden;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		margin: 0 !important;
		padding: 0 !important;
	}

	.dc-related-products__viewport::-webkit-scrollbar {
		display: none;
	}

	.dc-related-products .dc-related-products__track {
		display: flex !important;
		flex-flow: row nowrap !important;
		align-items: stretch !important;
		width: max-content !important;
		min-width: 100%;
		margin: 0 !important;
		padding: 0 0 4px !important;
		gap: 12px;
		grid-template-columns: unset !important;
	}

	.dc-related-products .dc-related-products__track > li.product {
		flex: 0 0 clamp(240px, 72vw, 300px) !important;
		width: clamp(240px, 72vw, 300px) !important;
		max-width: clamp(240px, 72vw, 300px) !important;
		min-width: clamp(240px, 72vw, 300px) !important;
		padding: 0 !important;
		margin: 0 !important;
		scroll-snap-align: start;
	}
}

@media (max-width: 479px) {
	.dc-related-products .dc-related-products__track > li.product {
		flex: 0 0 clamp(220px, 78vw, 280px) !important;
		width: clamp(220px, 78vw, 280px) !important;
		max-width: clamp(220px, 78vw, 280px) !important;
		min-width: clamp(220px, 78vw, 280px) !important;
	}
}
