/**
 * Pop-ups de promoción (inc/promo-popup.php, RCM-3015).
 * Desktop: tarjeta centrada. Mobile (≤ 600px): hoja desde abajo, que deja ver la página arriba.
 */

.rc-promo {
	box-sizing: border-box;
	width: min(440px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100dvh - 32px);
	margin: auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: #1b1e20;
	overflow: visible;
}

.rc-promo::backdrop {
	background: rgba(20, 20, 20, .6);
}

.rc-promo__card {
	position: relative;
	box-sizing: border-box;
	max-height: calc(100dvh - 32px);
	overflow: hidden auto;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, .25);
	font-family: "Archivo", sans-serif;
	text-align: center;
}

.rc-promo[open] .rc-promo__card {
	animation: rc-promo-in .25s ease-out;
}

@keyframes rc-promo-in {
	from {
		opacity: 0;
		transform: translateY(16px);
	}
}

.rc-promo__media {
	position: relative;
}

.rc-promo__art {
	box-sizing: content-box; /* un padding-top (art_pad_top) suma alto, no recorta el arte */
	display: block;
	width: 100%;
	height: auto; /* la proporción va en línea (aspect-ratio), según el arte de cada pop-up */
	object-fit: cover;
	background: #111;
}

/* Contador: pastilla centrada sobre el borde entre el arte y el texto, para no tapar nada del arte
   (en Black Friday, el micro ocupa la parte de abajo). */
.rc-promo .rc-promo__count {
	position: absolute;
	left: 50%;
	bottom: 0;
	z-index: 1;
	transform: translate(-50%, 50%);
	margin: 0;
	padding: 7px 14px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: #1b1e20;
	color: #e6e6e6;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
}

.rc-promo .rc-promo__count[hidden] {
	display: none;
}

.rc-promo .rc-promo__count-value {
	margin-left: 2px;
	color: #fff;
	font-weight: 800;
	font-variant-numeric: tabular-nums;
}

.rc-promo__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(0, 0, 0, .55);
	color: #fff;
	cursor: pointer;
}

.rc-promo__close:hover {
	background: rgba(0, 0, 0, .75);
}

.rc-promo__close:focus-visible,
.rc-promo__btn:focus-visible {
	outline: 2px solid #1b1e20;
	outline-offset: 2px;
}

.rc-promo__body {
	padding: 24px;
}

.rc-promo .rc-promo__body--count {
	padding-top: 34px; /* la mitad de abajo de la pastilla del contador */
}

.rc-promo .rc-promo__title {
	margin: 0 0 12px;
	color: #1b1e20;
	font-family: inherit;
	font-size: 26px;
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.01em;
	text-transform: none;
}

.rc-promo .rc-promo__text {
	margin: 0 0 20px;
	color: #373f47;
	font-size: 16px;
	line-height: 1.45;
}

.rc-promo__actions {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.rc-promo .rc-promo__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 20px;
	border-radius: 8px;
	background: #c81832;
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
}

.rc-promo .rc-promo__btn:hover {
	background: #a3122a;
	color: #fff;
}

.rc-promo .rc-promo__btn[hidden] {
	display: none;
}

.rc-promo .rc-promo__note {
	margin: 16px 0 0;
	color: #616972;
	font-size: 12px;
	line-height: 1.4;
}

html.rc-promo-open {
	overflow: hidden;
}

@media (max-width: 600px) {
	.rc-promo {
		width: 100%;
		max-height: calc(100dvh - 48px);
		margin: auto 0 0;
	}

	.rc-promo__card {
		max-height: calc(100dvh - 48px);
		border-radius: 16px 16px 0 0;
	}

	.rc-promo__body {
		padding: 20px 20px calc(20px + env(safe-area-inset-bottom));
	}

	.rc-promo .rc-promo__body--count {
		padding-top: 32px;
	}

	.rc-promo .rc-promo__title {
		font-size: 22px;
	}

	.rc-promo .rc-promo__text {
		margin-bottom: 16px;
		font-size: 15px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rc-promo[open] .rc-promo__card {
		animation: none;
	}
}
