/**
 * Tap to Pay — detalhes (como é simples e fácil)
 * Ref: https://www.sumup.com/pt-br/tap-to-pay/
 */

.taptopay-det {
	--taptopay-icon: var(--sumup-ink);
	--taptopay-card: var(--sumup-surface-neutral);
	position: relative;
	overflow: hidden;
	background: #fff;
	color: var(--sumup-ink);
	padding: 4rem 0 4rem !important;
}

/* Bloco título + imagem (empilhado, centralizado) */
.taptopay-det__hero {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 4.8rem;
	max-width: 128rem;
	margin: 0 auto;
	padding: 0 4rem;
	box-sizing: border-box;
}

.taptopay-det__copy {
	display: flex;
	flex-direction: column;
	gap: 1.6rem;
	text-align: center;
}

.taptopay-det__title {
	max-width: 75%;
	margin: 0 auto;
	font-family: var(--font-heading, "SumUp Black", sans-serif);
	font-size: 4.8rem;
	font-weight: 700;
	line-height: 0.9;
	color: var(--sumup-ink);
}

.taptopay-det__subtitle {
	max-width: 72rem;
	margin: 0 auto;
	font-family: var(--font-body, "SumUp Narrow", sans-serif);
	font-size: 1.7rem;
	font-weight: 400;
	line-height: 2.2rem;
	color: var(--sumup-ink);
	max-width: 50rem;
	margin: 0 auto;
	color: var(--sumup-ink-subtle);
	font-size: clamp(1.6rem, 1.3vw, 1.9rem);
	line-height: 1.2;
}

.taptopay-det__actions {
	display: flex;
	justify-content: center;
	gap: 2.4rem;
}

.taptopay-det__picture {
	display: block;
	position: relative;
	overflow: hidden;
	width: 100%;
	min-height: 30rem;
	border-radius: 1.6rem;
}

.taptopay-det__picture img {
	display: block;
	width: 100%;
	height: 100%;
	min-height: 30rem;
	aspect-ratio: 2000 / 1003;
	object-fit: cover;
	object-position: center;
	transition: transform 0.5s cubic-bezier(0.37, 0.01, 0, 0.98);
}

.taptopay-det__picture:hover img {
	transform: scale(1.05);
}

@media (prefers-reduced-motion: reduce) {
	.taptopay-det__picture img {
		transition: none;
	}

	.taptopay-det__picture:hover img {
		transform: none;
	}
}

/* Carrossel */
.taptopay-det__carousel {
	width: 100%;
	margin-top: 4.8rem;
	position: relative;
}

.taptopay-det__track {
	display: inline-flex;
	width: 100%;
	gap: 1.6rem;
	overflow-x: scroll;
	scroll-behavior: smooth;
	scroll-snap-type: x mandatory;
	-ms-overflow-style: none;
	scrollbar-width: none;
	box-sizing: border-box;
	padding: 0 max(calc(50% - 64rem), 4rem);
	scroll-padding: 0 max(calc(50% - 64rem), 4rem);
}

.taptopay-det__track::-webkit-scrollbar {
	display: none;
}

.taptopay-det__slide {
	flex: 0 0 auto;
	scroll-snap-align: center;
}

.taptopay-det__card {
	display: flex;
	flex-direction: column;
	gap: 2.4rem;
	box-sizing: border-box;
	width: 34rem;
	max-width: 40rem;
	height: 100%;
	padding: 4rem;
	border: 3px solid var(--taptopay-card);
	border-radius: 3.2rem;
	background: var(--taptopay-card);
	cursor: default;
	user-select: none;
	transition: box-shadow 0.2s ease;
}

.taptopay-det__card:hover {
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

.taptopay-det__icon {
	display: block;
	width: 3.2rem;
	height: 3.2rem;
	color: var(--taptopay-icon);
}

.taptopay-det__card-body {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.taptopay-det__card-title {
	margin: 0;
	font-family: var(--font-body, "SumUp Narrow", sans-serif);
	font-size: 2.5rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--sumup-ink);
	transition: color 0.2s ease;
}

.taptopay-det__card:hover .taptopay-det__card-title {
	color: var(--taptopay-icon);
}

.taptopay-det__card-text {
	margin: 0;
	font-family: var(--font-body, "SumUp Narrow", sans-serif);
	font-size: 2rem;
	font-weight: 500;
	line-height: 1.3;
	color: var(--sumup-ink);
}

.taptopay-det__nav {
	display: flex;
	justify-content: center;
	gap: 1.6rem;
	margin-top: 2.4rem;
}

.taptopay-det__arrow {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 4.8rem;
	height: 4.8rem;
	padding: 0;
	border: 0;
	border-radius: 1.6rem;
	background: var(--taptopay-card);
	color: var(--sumup-ink);
	font-size: 2rem;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.taptopay-det__arrow:hover:not(:disabled) {
	background: #e1e4e2;
}

.taptopay-det__arrow:focus-visible {
	outline: 2px solid #000;
	outline-offset: 2px;
}

.taptopay-det__arrow:disabled {
	color: #9a9f9c;
	cursor: not-allowed;
}

.taptopay-det__arrow svg {
	width: 1em;
	height: 1em;
}

/* Fade-up em cascata */
.taptopay-det.taptopay-det--anim .taptopay-det__card {
	opacity: 0;
	transform: translateY(2.4rem);
	transition: opacity 1s ease, transform 1s ease, box-shadow 0.2s ease;
}

.taptopay-det.taptopay-det--anim.is-in-view .taptopay-det__card {
	opacity: 1;
	transform: none;
}

.taptopay-det.taptopay-det--anim.is-in-view .taptopay-det__slide:nth-child(2) .taptopay-det__card {
	transition-delay: 0.2s, 0.2s, 0s;
}

.taptopay-det.taptopay-det--anim.is-in-view .taptopay-det__slide:nth-child(3) .taptopay-det__card {
	transition-delay: 0.4s, 0.4s, 0s;
}

.taptopay-det.taptopay-det--anim.is-in-view .taptopay-det__slide:nth-child(4) .taptopay-det__card {
	transition-delay: 0.6s, 0.6s, 0s;
}

.taptopay-det.taptopay-det--anim.is-in-view .taptopay-det__slide:nth-child(5) .taptopay-det__card {
	transition-delay: 0.8s, 0.8s, 0s;
}

@media (prefers-reduced-motion: reduce) {
	.taptopay-det.taptopay-det--anim .taptopay-det__card {
		opacity: 1;
		transform: none;
		transition: none;
	}
}

@media (max-width: 1023px) {
	.taptopay-det__hero {
		padding: 0 3rem;
	}

	.taptopay-det__title {
		font-size: 4rem;
	}
}

@media (max-width: 767px) {
	.taptopay-det {
		padding: 2.4rem 0 4rem !important;
	}

	.taptopay-det__hero {
		gap: 3.2rem;
		padding: 0 2rem;
	}

	.taptopay-det__title {
		max-width: 50rem;
	}

	.taptopay-det__actions {
		flex-direction: column;
		align-items: center;
	}

	/* KV tem texto: sem min-height para não cortar as laterais */
	.taptopay-det__picture,
	.taptopay-det__picture img {
		min-height: 0;
	}

	.taptopay-det__carousel {
		margin-top: 3.2rem;
	}

	.taptopay-det__track {
		gap: 0.8rem;
		padding: 0 2rem;
		scroll-padding: 0 2rem;
	}

	.taptopay-det__card {
		width: 26rem;
		padding: 2.4rem;
		border-radius: 2.4rem;
	}

	.taptopay-det__card-title {
		font-size: 2rem;
	}

	.taptopay-det__card-text {
		font-size: 1.6rem;
	}
}