/* Carrusel de productos Torres — estilos del frontend.
   Los valores personalizables llegan como variables CSS inline en
   el wrapper (ver TCP_Render::carousel), así que este archivo no
   necesita tocarse para cambiar colores, tipografía o velocidad. */

.tcp-carousel-wrap {
	--tcp-bg: #faf0d7;
	--tcp-card-bg: #ffffff;
	--tcp-title: #0b5940;
	--tcp-price: #0b5940;
	--tcp-accent: #e2762b;
	--tcp-radius: 22px;
	--tcp-title-size: 26px;
	--tcp-price-size: 20px;
	--tcp-title-font: inherit;
	--tcp-price-font: inherit;
	--tcp-button-font: inherit;
	--tcp-speed: 26s;

	background: var(--tcp-bg);
	padding: 40px 24px;
	border-radius: calc(var(--tcp-radius) * 0.7);
	box-sizing: border-box;
}

.tcp-carousel-wrap *,
.tcp-carousel-wrap *::before,
.tcp-carousel-wrap *::after {
	box-sizing: border-box;
}

.tcp-viewport {
	position: relative;
	overflow: hidden;
	-webkit-mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
	mask-image: linear-gradient(to right, transparent 0, #000 40px, #000 calc(100% - 40px), transparent 100%);
}

.tcp-track {
	display: flex;
	gap: 24px;
	width: max-content;
}

.tcp-track.tcp-autoplay {
	animation: tcp-scroll var(--tcp-speed) linear infinite;
}

.tcp-viewport:hover .tcp-track.tcp-autoplay,
.tcp-track.tcp-paused {
	animation-play-state: paused;
}

@keyframes tcp-scroll {
	from { transform: translateX(0); }
	to { transform: translateX(-50%); }
}

.tcp-card {
	flex: 0 0 230px;
	display: flex;
	flex-direction: column;
	background: var(--tcp-card-bg);
	border-radius: var(--tcp-radius);
	border: 1px solid rgba(0, 0, 0, 0.06);
	padding: 20px 18px 20px;
	text-align: center;
	box-shadow: 0 16px 26px -20px rgba(0, 0, 0, 0.35);
	user-select: none;
}

.tcp-card-media {
	position: relative;
	display: block;
	width: 120px;
	height: 120px;
	margin: 4px auto 16px;
	text-decoration: none;
	flex-shrink: 0;
}

.tcp-card-media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	pointer-events: none;
	border-radius: 12px;
}

.tcp-badge {
	position: absolute;
	top: -6px;
	right: -8px;
	background: var(--tcp-accent);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.03em;
	padding: 5px 8px;
	border-radius: 8px;
	line-height: 1.15;
	box-shadow: 0 6px 12px -4px rgba(0, 0, 0, 0.4);
}

.tcp-badge-out {
	background: #6b6b63;
}

.tcp-card-title-link {
	text-decoration: none;
	display: block;
}

.tcp-card-title {
	font-family: var(--tcp-title-font) !important;
	font-size: var(--tcp-title-size);
	line-height: 1.2;
	color: var(--tcp-title);
	margin: 0 0 6px;
	font-weight: 600;
}

.tcp-card-price {
	font-family: var(--tcp-price-font) !important;
	font-size: var(--tcp-price-size);
	font-weight: 700;
	color: var(--tcp-price);
	margin: 0 0 14px;
}

.tcp-card-price ins {
	text-decoration: none;
}
.tcp-card-price del {
	opacity: 0.55;
	font-size: 0.75em;
	margin-right: 6px;
}

.tcp-card-cta {
	margin-top: auto;
	padding-top: 14px;
}

.tcp-card-cta .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 10px 14px;
	border-radius: 999px;
	border: 1px solid transparent;
	background: var(--tcp-title);
	color: #fff;
	font-family: var(--tcp-button-font) !important;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: 0.02em;
	cursor: pointer;
	text-decoration: none;
	transition: transform .15s ease, opacity .15s ease, background .15s ease;
}
.tcp-card-cta .button:hover {
	background: var(--tcp-accent);
	transform: translateY(-2px);
}
.tcp-card-cta .button.loading {
	opacity: 0.7;
}
.tcp-card-cta .added_to_cart {
	display: block;
	margin-top: 8px;
	font-size: 12px;
	text-decoration: underline;
	color: var(--tcp-title);
}

.tcp-empty {
	padding: 20px;
	text-align: center;
	color: #777;
}

@media (max-width: 560px) {
	.tcp-carousel-wrap { padding: 28px 14px; }
	.tcp-card { flex-basis: 190px; }
}

@media (prefers-reduced-motion: reduce) {
	.tcp-track.tcp-autoplay { animation: none; }
}
