/* ==========================================================================
   Rumifay Marketplace – tarjetas premium (identidad Rumifay)
   ========================================================================== */

.rf-marketplace,
.rf-product-section,
.rf-premium {
	--rf-blue: #0057ff;
	--rf-blue-2: #0066ff;
	--rf-bg-page: #f5f9ff;
	--rf-card: #ffffff;
	--rf-text: #0b1b3a;
	--rf-text-muted: #6b7280;
	--rf-border: #e5eeff;
	--rf-badge-sale: #ffc400;
	--rf-star: #fbbf24;
	--rf-radius-card: 18px;
	--rf-shadow-card: 0 2px 12px rgba(11, 27, 58, 0.06);
	--rf-shadow-hover: 0 12px 28px rgba(0, 87, 255, 0.14);
	--rf-img-h-mobile: 200px;
	--rf-gap-mobile: 8px;
	--rf-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* —— Marketplace contenedor —— */
.rf-marketplace {
	width: 100%;
	max-width: 100%;
	background: var(--rf-bg-page);
	padding-bottom: 8px;
	overflow-x: hidden;
}

.rf-marketplace .rf-premium-trust {
	max-width: var(--rf-container, 1280px);
	margin: 4px auto 28px;
	padding: 18px 14px;
	background: var(--rf-card);
	border: 1px solid var(--rf-border);
	border-radius: 16px;
	box-shadow: var(--rf-shadow-card);
}

/* —— Sección de bloque —— */
.rf-product-section {
	padding: 18px 10px 6px;
	background: transparent;
}

.rf-product-section__wrap {
	width: 100%;
	max-width: var(--rf-container, 1280px);
	margin: 0 auto;
	box-sizing: border-box;
}

.rf-product-section__head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 14px;
	padding: 0 2px;
}

.rf-product-section__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 800;
	color: var(--rf-text);
	letter-spacing: -0.02em;
	line-height: 1.2;
}

.rf-product-section__subtitle {
	margin: 3px 0 0;
	font-size: 0.75rem;
	color: var(--rf-text-muted);
}

.rf-product-section__more {
	display: inline-flex;
	align-items: center;
	gap: 3px;
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--rf-blue);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.2s var(--rf-ease), gap 0.2s var(--rf-ease);
}

.rf-product-section__more:hover {
	color: var(--rf-blue-2);
	gap: 6px;
}

/* Grid: 2 · 3 · 5 */
.rf-product-section__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--rf-gap-mobile);
	align-items: stretch;
}

/* ==========================================================================
   Tarjeta premium
   ========================================================================== */

.rf-premium-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--rf-card);
	border: 1px solid var(--rf-border);
	border-radius: var(--rf-radius-card);
	box-shadow: var(--rf-shadow-card);
	overflow: hidden;
	transition: transform 0.32s var(--rf-ease), box-shadow 0.32s var(--rf-ease), border-color 0.32s ease;
}

.rf-premium-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--rf-shadow-hover);
	border-color: rgba(0, 87, 255, 0.22);
}

.rf-premium-card__link {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	text-decoration: none;
	color: inherit;
}

/* Imagen protagonista – borde a borde en móvil */
.rf-premium-card__media {
	position: relative;
	padding: 0;
}

.rf-premium-card__badge {
	position: absolute;
	top: 8px;
	left: 8px;
	z-index: 2;
	font-size: 0.5625rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 4px 8px;
	border-radius: 6px;
	line-height: 1.1;
	box-shadow: 0 2px 8px rgba(11, 27, 58, 0.12);
}

.rf-premium-card__badge--sale {
	background: var(--rf-badge-sale);
	color: var(--rf-text);
}

.rf-premium-card__badge--new {
	background: linear-gradient(135deg, var(--rf-blue) 0%, var(--rf-blue-2) 100%);
	color: #fff;
}

.rf-premium-card__badge--hot {
	background: linear-gradient(135deg, #0b1b3a 0%, #1a3a6e 100%);
	color: #fff;
}

.rf-premium-card__img-wrap {
	display: flex;
	align-items: center;
	justify-content: center;
	height: var(--rf-img-h-mobile);
	background: #fff;
	border-radius: 0;
	overflow: hidden;
}

.rf-premium-card__img {
	display: block;
	max-width: 92%;
	max-height: 92%;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: transform 0.4s var(--rf-ease);
}

.rf-premium-card:hover .rf-premium-card__img {
	transform: scale(1.05);
}

.rf-premium-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	gap: 3px;
	padding: 8px 10px 6px;
	min-height: 0;
}

.rf-premium-card__title {
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--rf-text);
	line-height: 1.25;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rf-premium-card__subtitle {
	margin: 0;
	font-size: 0.6875rem;
	color: var(--rf-text-muted);
	line-height: 1.2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.rf-premium-card__rating {
	display: flex;
	align-items: center;
	gap: 4px;
	margin-top: 1px;
}

.rf-premium-card__stars {
	display: inline-flex;
	gap: 0;
	line-height: 1;
}

.rf-premium-card__star {
	font-size: 0.625rem;
	color: #e5eeff;
}

.rf-premium-card__star.is-filled {
	color: var(--rf-star);
}

.rf-premium-card__reviews {
	font-size: 0.5625rem;
	color: var(--rf-text-muted);
	font-weight: 500;
}

.rf-premium-card__price {
	margin-top: auto;
	padding-top: 2px;
	font-size: 1rem;
	font-weight: 800;
	color: var(--rf-blue);
	line-height: 1.15;
}

.rf-premium-card__price .amount,
.rf-premium-card__price ins,
.rf-premium-card__price bdi {
	color: var(--rf-blue);
}

.rf-premium-card__price del {
	font-size: 0.6875rem;
	font-weight: 500;
	color: var(--rf-text-muted);
	margin-right: 4px;
}

.rf-premium-card__price ins {
	text-decoration: none;
}

.rf-premium-card__footer {
	padding: 0 10px 12px;
	margin-top: auto;
}

/* Botón Agregar: ver assets/css/add-to-cart-buttons.css (global) */

/* Barra de confianza */
.rf-premium-trust {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
}

.rf-premium-trust__item {
	display: flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
}

.rf-premium-trust__icon {
	flex-shrink: 0;
	width: 34px;
	height: 34px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--rf-bg-page);
	border-radius: 10px;
	color: var(--rf-blue);
	border: 1px solid var(--rf-border);
}

.rf-premium-trust__icon svg {
	width: 17px;
	height: 17px;
}

.rf-premium-trust__text {
	display: flex;
	flex-direction: column;
	gap: 0;
	min-width: 0;
}

.rf-premium-trust__text strong {
	font-size: 0.6875rem;
	font-weight: 700;
	color: var(--rf-text);
	line-height: 1.2;
}

.rf-premium-trust__text span {
	font-size: 0.5625rem;
	color: var(--rf-text-muted);
	line-height: 1.25;
}

/* ==========================================================================
   Slider horizontal
   ========================================================================== */

.rf-product-section__slider {
	position: relative;
}

.rf-product-section__track {
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	margin: 0 -2px;
	padding-bottom: 2px;
}

.rf-product-section__track::-webkit-scrollbar {
	display: none;
}

.rf-product-section__grid--slider {
	display: flex;
	flex-wrap: nowrap;
	gap: var(--rf-gap-mobile);
}

.rf-product-section__grid--slider .rf-premium-card {
	flex: 0 0 calc(50% - 4px);
	width: calc(50% - 4px);
	max-width: none;
	scroll-snap-align: start;
}

.rf-product-section__arrow {
	display: none;
	position: absolute;
	top: 42%;
	transform: translateY(-50%);
	z-index: 2;
	width: 36px;
	height: 36px;
	border: 1px solid var(--rf-border);
	border-radius: 50%;
	background: var(--rf-card);
	color: var(--rf-text-muted);
	box-shadow: var(--rf-shadow-card);
	cursor: pointer;
	align-items: center;
	justify-content: center;
	transition: color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.rf-product-section__arrow:hover {
	color: var(--rf-blue);
	border-color: rgba(0, 87, 255, 0.3);
	box-shadow: var(--rf-shadow-hover);
}

.rf-product-section__arrow--prev {
	left: 0;
}

.rf-product-section__arrow--next {
	right: 0;
}

/* ==========================================================================
   Tablet
   ========================================================================== */

@media (min-width: 768px) {
	.rf-product-section {
		padding: 24px 16px 10px;
	}

	.rf-product-section__title {
		font-size: 1.375rem;
	}

	.rf-product-section__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 14px;
	}

	:root,
	.rf-marketplace {
		--rf-img-h-mobile: 180px;
		--rf-gap-mobile: 14px;
	}

	.rf-premium-card__media {
		padding: 12px 12px 0;
	}

	.rf-premium-card__img-wrap {
		border-radius: 12px;
		background: var(--rf-bg-page);
	}

	.rf-premium-card__body {
		padding: 10px 12px 8px;
	}

	.rf-premium-card__footer {
		padding: 0 12px 12px;
	}

	.rf-premium-card__title {
		font-size: 0.875rem;
	}

	.rf-premium-card__price {
		font-size: 1.0625rem;
	}


	.rf-product-section__grid--slider .rf-premium-card {
		flex: 0 0 calc(33.333% - 10px);
		width: calc(33.333% - 10px);
	}

	.rf-product-section__arrow {
		display: flex;
	}

	.rf-product-section__slider {
		padding: 0 24px;
	}

	.rf-premium-trust {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: 14px;
		padding: 20px 18px;
	}

	.rf-marketplace .rf-premium-trust {
		margin-bottom: 32px;
		padding-left: 16px;
		padding-right: 16px;
	}
}

/* ==========================================================================
   PC
   ========================================================================== */

@media (min-width: 1200px) {
	.rf-product-section {
		padding: 28px 20px 12px;
	}

	.rf-product-section__title {
		font-size: 1.5rem;
	}

	.rf-product-section__grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
		gap: 18px;
	}

	:root,
	.rf-marketplace {
		--rf-img-h-mobile: 200px;
	}

	.rf-premium-card__img-wrap {
		height: 200px;
	}

	.rf-product-section__grid--slider .rf-premium-card {
		flex: 0 0 calc(20% - 15px);
		width: calc(20% - 15px);
	}
}

@media (min-width: 992px) and (max-width: 1199px) {
	.rf-product-section__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rf-product-section__grid--slider .rf-premium-card {
		flex: 0 0 calc(25% - 14px);
		width: calc(25% - 14px);
	}
}

/* Móvil compacto – estilo marketplace ancho */
@media (max-width: 767px) {
	.rf-premium-card__subtitle {
		display: none;
	}

	.rf-premium-card__badge {
		top: 6px;
		left: 6px;
	}
}
