/*
 * Promo Banner block.
 *
 * Desktop / tablet (>=768px): two-column CSS grid, no Swiper DOM.
 * Mobile (<768px): single-slide Swiper carousel with featured-products-style nav.
 */

.rps-promo-banner {
	--rps-gap: 16px;
	position: relative;
}

.rps-promo-banner__track {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rps-promo-banner__item {
	margin: 0;
	padding: 0;
	width: 100%;
  aspect-ratio: 2 / 1;
	position: relative;
	overflow: hidden;
}

.rps-promo-banner__item.swiper-slide {
	height: auto;
	box-sizing: border-box;
}

.rps-promo-banner__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	justify-content: flex-end;
	position: relative;
	text-decoration: none;
}

.rps-promo-banner__image {
	bottom: 0px;
	height: 100%;
	left: 0px;
	max-width: 100%;
	object-fit: cover;
	position: absolute;
	right: 0px;
	top: 0px;
	width: 100%;
	transition: transform 0.25s ease;
}

.rps-promo-banner__item:hover .rps-promo-banner__image {
	transform: scale(1.05);
}

.rps-promo-banner__title {
	color: #fefefe;
	font-size: 30px;
	font-weight: 700;
	line-height: 36px;
	margin-bottom: 0px;
	text-shadow: rgba(0, 0, 0, 1) 0px 0px 10px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0));
	pointer-events: none;
	padding: 30px;
	position: relative;
}

.rps-promo-banner__nav {
	display: none;
}

@media (max-width: 1023px) {
	.rps-promo-banner__title {
		padding: 16px;
		font-size: 24px;
		line-height: 30px;
	}
}

/* Desktop + tablet: two-column grid. */
@media (min-width: 768px) {
	.rps-promo-banner__viewport {
		overflow: visible;
	}

	.rps-promo-banner__track {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: var(--rps-gap);
	}
}

/* Mobile: single-slide Swiper carousel. */
@media (max-width: 767px) {
	.rps-promo-banner {
		--rps-gap: 8px;
	}

	.rps-promo-banner__title {
		font-size: 16px;
		line-height: 20px;
	}

	.rps-promo-banner__viewport {
		overflow: hidden;
	}

	.rps-promo-banner__item:hover .rps-promo-banner__image {
		transform: scale(1);
	}

	.rps-promo-banner:not(.is-rps-slider-ready) .rps-promo-banner__track {
		display: flex;
		gap: var(--rps-gap);
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		-webkit-overflow-scrolling: touch;
	}

	.rps-promo-banner:not(.is-rps-slider-ready) .rps-promo-banner__item {
		flex: 0 0 100%;
		scroll-snap-align: start;
	}

	.rps-promo-banner__nav {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: var(--rps-gap);
		margin-top: 10px;
	}

	.rps-promo-banner__prev,
	.rps-promo-banner__next {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		background: transparent;
		cursor: pointer;
		color: #000;
		padding: 0;
		flex-shrink: 0;
		border: none;
	}

	.rps-promo-banner__prev:hover,
	.rps-promo-banner__next:hover,
	.rps-promo-banner__prev:focus,
	.rps-promo-banner__next:focus {
		background-color: transparent;
		color: #000;
	}

	.rps-promo-banner__prev[aria-disabled="true"],
	.rps-promo-banner__next[aria-disabled="true"] {
		opacity: 0.4;
		cursor: default;
	}

	.rps-promo-banner__pagination {
		flex-grow: 1;
		display: flex;
		justify-content: center;
		align-items: center;
	}

	.rps-promo-banner__pagination .swiper-pagination-bullet {
		height: 14px;
		width: 2px;
		border-radius: 10px;
		background-color: var(--border);
		margin: 0 4px !important;
		opacity: 1;
	}

	.rps-promo-banner__pagination .swiper-pagination-bullet.swiper-pagination-bullet-active {
		height: 20px;
		background-color: #000;
	}
}
