/**
 * Envío Express Rapident - estilos del front.
 *
 * Los selectores van anidados en .ree-section para ganarle a los estilos
 * globales del tema (button, .button, h3, enlaces).
 */

.ree-section {
	--ree-teal: #00a490;
	--ree-teal-dark: #009e89;
	--ree-red: #f3003f;
	--ree-green: #00cfa2;
	--ree-green-hover: #00b98f;
	--ree-arrow: #00f0aa;
	--ree-badge: #00a672;
	--ree-text: #333;
	--ree-muted: #777e90;
	--ree-border: #ebebeb;
	--ree-gap: 16px;

	margin: 0 auto 32px;
	font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	color: var(--ree-text);
}

.ree-section[hidden],
.ree-section [hidden] {
	display: none !important;
}

.ree-section *,
.ree-section *::before,
.ree-section *::after {
	box-sizing: border-box;
}

.ree-section > * + * {
	margin-top: 24px;
}

/* Barra con cuenta regresiva ------------------------------------------- */

.ree-section .ree-bar {
	padding: 10px 16px;
	border-radius: 8px;
	background: var(--ree-teal);
	box-shadow: 0 2px 6px rgba(0, 0, 0, .16);
	color: #fff;
	text-align: center;
}

.ree-section .ree-bar__text {
	margin: 0;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.6;
	color: #fff;
}

.ree-section .ree-bar__text strong,
.ree-section .ree-bar__text a {
	color: #fff;
}

.ree-section .ree-bar__text u {
	text-underline-offset: 3px;
}

.ree-section .ree-bar__pill {
	display: inline-block;
	margin-left: 4px;
	padding: 1px 8px;
	border-radius: 4px;
	background: var(--ree-red);
	color: #fff;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	letter-spacing: .02em;
	white-space: nowrap;
}

/* Banner ---------------------------------------------------------------- */

.ree-section .ree-banner {
	display: block;
	overflow: hidden;
	line-height: 0;
}

.ree-section .ree-banner picture,
.ree-section .ree-banner__img {
	display: block;
	width: 100%;
	height: auto;
	max-width: 100%;
}

/* Carrusel -------------------------------------------------------------- */

.ree-section .ree-carousel {
	position: relative;
	padding: 0 32px;
}

.ree-section .ree-carousel__track {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: calc((100% - 3 * var(--ree-gap)) / 4);
	gap: var(--ree-gap);
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 4px 1px 8px;
	outline: none;
}

.ree-section .ree-carousel__track::-webkit-scrollbar {
	display: none;
}

.ree-section .ree-carousel__track:focus-visible {
	box-shadow: 0 0 0 2px var(--ree-teal);
	border-radius: 8px;
}

.ree-section button.ree-carousel__arrow {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 30px;
	height: 30px;
	min-width: 0;
	min-height: 0;
	margin: -15px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--ree-arrow);
	box-shadow: 0 1px 4px rgba(0, 0, 0, .15);
	color: #fff;
	font-size: 0;
	line-height: 1;
	cursor: pointer;
	animation: none;
	transition: transform .15s ease, background-color .15s ease;
}

.ree-section button.ree-carousel__arrow:hover {
	background: var(--ree-green);
	transform: scale(1.06);
}

.ree-section button.ree-carousel__arrow:focus-visible {
	outline: 2px solid var(--ree-teal-dark);
	outline-offset: 2px;
}

.ree-section .ree-carousel__arrow--prev {
	left: 0;
}

.ree-section .ree-carousel__arrow--next {
	right: 0;
}

.ree-section .ree-carousel.is-static .ree-carousel__arrow {
	display: none;
}

/* Tarjeta de producto --------------------------------------------------- */

.ree-section .ree-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-width: 0;
	padding: 14px;
	border: 1px solid var(--ree-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .05);
	scroll-snap-align: start;
}

.ree-section .ree-card__media {
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
}

.ree-section .ree-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: contain;
}

.ree-section .ree-card__title {
	display: -webkit-box;
	min-height: 2.7em;
	margin: 12px 0 0;
	padding: 0;
	overflow: hidden;
	font-family: inherit;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
	color: var(--ree-text);
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.ree-section .ree-card__title a {
	color: inherit;
	text-decoration: none;
}

.ree-section .ree-card__title a:hover {
	color: var(--ree-teal-dark);
}

.ree-section .ree-card__price {
	margin-top: 12px;
	font-size: 14px;
	font-weight: 500;
	color: var(--ree-text);
}

.ree-section .ree-card__price del {
	margin-right: 4px;
	font-size: 12px;
	color: #999;
}

.ree-section .ree-card__price ins {
	text-decoration: none;
	color: #ff5c68;
}

/* Sello "Envío Express" */

.ree-section .ree-card__badge {
	position: relative;
	display: flex;
	align-items: center;
	gap: 5px;
	margin-top: 10px;
	font-size: 12px;
	color: var(--ree-muted);
}

.ree-section .ree-card__badge-icon {
	flex: none;
	color: var(--ree-badge);
}

.ree-section .ree-card__badge-text {
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.ree-section button.ree-card__tip-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	box-shadow: none;
	color: var(--ree-badge);
	cursor: pointer;
	animation: none;
}

.ree-section button.ree-card__tip-btn:focus-visible {
	outline: 2px solid var(--ree-teal-dark);
	outline-offset: 1px;
}

.ree-section .ree-card__tip-btn[aria-expanded="true"] svg {
	transform: rotate(45deg);
}

.ree-section .ree-card__tip-btn svg {
	transition: transform .15s ease;
}

.ree-section .ree-card__tip {
	position: absolute;
	right: 0;
	bottom: calc(100% + 6px);
	left: 0;
	z-index: 3;
	padding: 8px 10px;
	border-radius: 6px;
	background: var(--ree-teal-dark);
	box-shadow: 0 4px 12px rgba(0, 0, 0, .18);
	font-size: 12px;
	line-height: 1.45;
	color: #fff;
}

.ree-section .ree-card__tip[hidden] {
	display: none;
}

/* Botón Añadir / Seleccionar */

.ree-section .ree-card__actions {
	margin-top: 14px;
}

.ree-section a.ree-card__btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-width: 92px;
	max-width: 100%;
	margin: 0;
	padding: 10px 18px;
	border: 0;
	border-radius: 4px;
	background: var(--ree-green);
	box-shadow: none;
	font-family: inherit !important;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	transition: background-color .15s ease, opacity .15s ease;
}

.ree-section a.ree-card__btn:hover,
.ree-section a.ree-card__btn:focus-visible {
	background: var(--ree-green-hover);
	color: #fff;
}

.ree-section a.ree-card__btn::before,
.ree-section a.ree-card__btn::after {
	content: none !important;
}

.ree-section a.ree-card__btn.loading {
	opacity: .6;
	pointer-events: none;
}

.ree-section .ree-card__btn-check {
	display: none;
}

.ree-section a.ree-card__btn.added .ree-card__btn-icon {
	display: none;
}

.ree-section a.ree-card__btn.added .ree-card__btn-check {
	display: inline;
}

/* WooCommerce agrega "Ver carrito" después del botón; aquí sobra. */
.ree-section .ree-card .added_to_cart {
	display: none !important;
}

/* Aviso de cobertura ---------------------------------------------------- */

.ree-section .ree-notice {
	padding: 18px;
	border-radius: 12px;
	background: var(--ree-teal-dark);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: #fff;
	text-align: center;
}

.ree-section .ree-notice strong,
.ree-section .ree-notice a {
	color: #fff;
}

/* Móvil ----------------------------------------------------------------- */

@media (max-width: 767px) {
	.ree-section {
		--ree-gap: 10px;
	}

	.ree-section > * + * {
		margin-top: 16px;
	}

	.ree-section .ree-bar {
		padding: 10px 12px;
	}

	.ree-section .ree-bar__text {
		font-size: 13px;
	}

	.ree-section .ree-carousel {
		padding: 0;
	}

	/* Dos tarjetas y se asoma la tercera: invita a deslizar con el dedo. */
	.ree-section .ree-carousel__track {
		grid-auto-columns: 44%;
	}

	.ree-section button.ree-carousel__arrow {
		display: none;
	}

	.ree-section .ree-card {
		padding: 10px;
	}

	.ree-section .ree-card__badge {
		gap: 3px;
		font-size: 11px;
	}

	.ree-section a.ree-card__btn {
		width: 100%;
		min-width: 0;
		padding: 10px 8px;
	}

	.ree-section .ree-notice {
		padding: 14px;
		font-size: 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ree-section .ree-carousel__track {
		scroll-behavior: auto;
	}
}
