/**
 * Slider de presentes — desktop + mobile.
 * Extraído do custom-style.css do tema.
 */

/* ==========================================================
   DESKTOP
========================================================== */

.gift-slider-wrapper {
	position: relative;
	overflow: hidden;
	width: 100vw;
	margin-left: calc(-50vw + 50%); /* descola do padding do container do Elementor, mesmo truque do hero */
	height: 80vh;
}

.gift-slider-track {
	display: flex;
	transition: transform 0.6s ease;
}

.gift-slide {
	width: 100%;
	min-width: 100%;
	height: 80vh;
	min-height: 80vh;
	flex-shrink: 0;

	display: flex;
	overflow: hidden;
}

.gift-image {
	width: 50%;
	display: flex;
	align-items: stretch;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 12px 20px rgba(0, 0, 0, 0.85);
}

.gift-image a,
.gift-image-link {
	display: flex;
	width: 100%;
	height: 100%;
	line-height: 0;
}

.gift-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 50% 50%;
}

.gift-content {
	width: 50%;

	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;

	padding: clamp(32px, 5vw, 80px);
	overflow-y: auto;
	text-align: center;
}

.gift-products {
	display: flex;
	justify-content: center;
	align-items: stretch;
	gap: clamp(18px, 3vw, 36px);
	width: 100%;
	flex-wrap: nowrap;
}

.gift-product {
	flex: 1 1 0;
	max-width: 280px;
	min-width: 0;
	background: #f5f5f5;
	border-radius: 20px;
	box-shadow: 0px 6px 10px rgba(0, 0, 0, 0.5);
	padding: clamp(10px, 2vw, 20px);
	overflow: hidden;
	text-align: center;
	transition: transform 0.25s ease, background-color 0.25s ease, box-shadow 0.25s ease;
}

.gift-product:hover {
	transform: scale(1.05);
	background: #0274be;
	box-shadow: 0 10px 22px rgba(2, 116, 190, 0.35);
}

.gift-product:hover .gift-product-title {
	color: #fff;
}

.gift-product-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-decoration: none;
	color: inherit;
	height: 100%;
}

.gift-product-image {
	width: 100%;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 14px;
}

.gift-product-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.gift-product-title {
	margin: 14px 0 0;
	font-size: 1rem;
	line-height: 1.3;
	color: #222;
	text-align: center;
}

.gift-more-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;

	width: min(100%, 360px);
	margin-top: 28px;
	padding: 6px 18px;

	border: 2px solid #d6d6d6;
	border-radius: 999px;

	background: #fff;
	color: #333;

	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;

	transition: transform 0.25s ease, background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.gift-more-btn:hover {
	transform: scale(1.05);
	background: #025f9c;
	border-color: #025f9c;
	color: #fff;
}

.gift-slider-dots {
	display: none;
}

.slider-arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);

	width: 50px;
	height: 50px;

	border: none;
	border-radius: 50%;

	background: rgba(0, 0, 0, 0.4);
	color: #fff;

	font-size: 24px;
	cursor: pointer;

	z-index: 10;

	transition: 0.3s;
}

.slider-arrow:hover {
	background: rgba(0, 0, 0, 0.7);
}

.slider-arrow.left {
	left: 15px;
}

.slider-arrow.right {
	right: 15px;
}

/* ==========================================================
   MOBILE (até 768px)
========================================================== */
@media (max-width: 768px) {

	.gift-slider-wrapper {
		box-shadow: 0px 10px 15px rgba(0, 0, 0, 0.58);
	}

	.gift-slide {
		flex-direction: column;
		flex: 0 0 100%;
	}

	.gift-image {
		width: 100%;
		aspect-ratio: 1 / 1;
	}

	.gift-content {
		width: 100%;
		padding: 20px 20px 30px;
		/* FIX: cor de fundo mobile já não depende de IDs fixos
		   (#presentes-casais, etc — só funcionavam para os 3 slides
		   originais). Cada slide define a sua própria cor no painel
		   do Elementor, aplicada aqui via variável CSS. */
		background: var( --slide-mobile-bg, #254d73 );
		overflow-y: visible;

		/* FIX: no desktop, o gift-content estica naturalmente para a
		   altura toda do slide (row + stretch, herdado da regra
		   base). No mobile, em coluna, isso não acontece por padrão —
		   sem isto, o fundo só cobria a altura do próprio texto,
		   deixando espaço em branco por baixo em slides com
		   descrições mais curtas. flex:1 cresce para preencher o
		   espaço que sobra depois da imagem; justify-content:center
		   mantém o texto centrado dentro desse espaço, seja ele qual
		   for. */
		flex: 1 1 auto;
	}

	.gift-content h2 {
		position: static;
		margin-bottom: 10px;
		color: #fff;
	}

	.gift-content p {
		margin-bottom: 15px;
		color: #fff;
	}

	.gift-more-btn {
		display: none;
	}

	.gift-slider-dots {
		position: absolute;
		left: 50%;
		top: 20px;
		transform: translateX(-50%);
		display: flex;
		gap: 8px;
		z-index: 20;
	}

	.gift-slider-dots span {
		width: 8px;
		height: 8px;
		border-radius: 999px;
		background: rgba(255, 255, 255, 0.55);
		transition: width 0.25s ease, background-color 0.25s ease;
	}

	.gift-slider-dots span.active {
		width: 24px;
		background: #ffffff;
	}

	.gift-products,
	.slider-arrow {
		display: none;
	}
}