/* ==========================================================================
   Rumifay – Página de producto (PDP)
   ========================================================================== */

.rf-main--pdp {
	background: var(--rf-bg-page, #f5f9ff);
}

.rf-pdp {
	width: 100%;
	max-width: 100%;
	--rf-blue: #0057ff;
	--rf-blue-2: #0066ff;
	--rf-bg: #f5f9ff;
	--rf-card: #ffffff;
	--rf-text: #0b1b3a;
	--rf-muted: #6b7280;
	--rf-border: #e5eeff;
	--rf-sale: #ffc400;
	--rf-star: #fbbf24;
	--rf-radius: 18px;
	--rf-ease: cubic-bezier(0.22, 1, 0.36, 1);
	color: var(--rf-text);
	padding-bottom: 40px;
}

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

.rf-pdp__notices {
	margin-bottom: 12px;
}

.rf-pdp__notices .woocommerce-message,
.rf-pdp__notices .woocommerce-info,
.rf-pdp__notices .woocommerce-error {
	border-radius: 12px;
	border: 1px solid var(--rf-border);
}

/* Breadcrumb */
.rf-pdp__breadcrumb {
	font-size: 0.75rem;
	color: var(--rf-blue);
	margin-bottom: 16px;
	line-height: 1.5;
}

.rf-pdp__breadcrumb a {
	color: var(--rf-blue);
	text-decoration: none;
}

.rf-pdp__breadcrumb a:hover {
	text-decoration: underline;
}

.rf-pdp__breadcrumb-sep {
	margin: 0 6px;
	color: var(--rf-muted);
}

/* Hero 2 columnas */
.rf-pdp__hero {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

/* —— Galería —— */
.rf-pdp__gallery {
	position: relative;
	background: var(--rf-card);
	border: 1px solid var(--rf-border);
	border-radius: var(--rf-radius);
	box-shadow: 0 4px 20px rgba(11, 27, 58, 0.06);
	overflow: hidden;
}

.rf-pdp__badge-sale {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 3;
	background: var(--rf-sale);
	color: var(--rf-text);
	font-size: 0.625rem;
	font-weight: 800;
	letter-spacing: 0.05em;
	padding: 5px 10px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(255, 196, 0, 0.4);
}

.rf-pdp__wishlist {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 3;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: var(--rf-card);
	color: var(--rf-muted);
	box-shadow: 0 4px 14px rgba(11, 27, 58, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: color 0.2s ease, transform 0.2s ease;
}

.rf-pdp__wishlist:hover,
.rf-pdp__wishlist.is-active {
	color: #ef4444;
	transform: scale(1.05);
}

.rf-pdp__wishlist svg {
	width: 20px;
	height: 20px;
}

.rf-pdp__thumbs {
	display: none;
}

.rf-pdp__main-image {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 280px;
	padding: 20px;
	background: #fff;
}

.rf-pdp__image {
	max-width: 100%;
	max-height: 320px;
	width: auto;
	height: auto;
	object-fit: contain;
	transition: opacity 0.3s ease;
}

.rf-pdp__zoom {
	position: absolute;
	bottom: 14px;
	right: 14px;
	z-index: 2;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--rf-card);
	border: 1px solid var(--rf-border);
	color: var(--rf-muted);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(11, 27, 58, 0.08);
	transition: color 0.2s ease, border-color 0.2s ease;
}

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

.rf-pdp__zoom svg {
	width: 18px;
	height: 18px;
}

.rf-pdp__dots {
	display: flex;
	justify-content: center;
	gap: 6px;
	padding: 12px 0 14px;
	background: #fff;
}

.rf-pdp__dot {
	width: 7px;
	height: 7px;
	border: 0;
	border-radius: 50%;
	padding: 0;
	background: #d1d9e6;
	cursor: pointer;
	transition: background 0.2s ease, transform 0.2s ease;
}

.rf-pdp__dot.is-active {
	background: var(--rf-blue);
	transform: scale(1.15);
}

/* —— Resumen —— */
.rf-pdp__summary-card {
	background: var(--rf-card);
	border: 1px solid var(--rf-border);
	border-radius: var(--rf-radius);
	box-shadow: 0 4px 20px rgba(11, 27, 58, 0.06);
	padding: 20px 18px;
}

.rf-pdp__title {
	margin: 0 0 8px;
	font-size: 1.375rem;
	font-weight: 800;
	line-height: 1.2;
	letter-spacing: -0.02em;
	color: var(--rf-text);
}

.rf-pdp__subtitle {
	margin: 0 0 12px;
	font-size: 0.8125rem;
	color: var(--rf-muted);
	line-height: 1.45;
}

.rf-pdp__category {
	margin: 0 0 10px;
	font-size: 0.75rem;
	line-height: 1.4;
}

.rf-pdp__category a {
	color: var(--rf-blue);
	text-decoration: none;
	font-weight: 600;
}

.rf-pdp__category a:hover {
	text-decoration: underline;
}

.rf-pdp__meta-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 12px;
	margin-bottom: 14px;
}

.rf-pdp__rating {
	display: flex;
	align-items: center;
	gap: 6px;
}

.rf-pdp__stars {
	display: inline-flex;
	gap: 1px;
}

.rf-pdp__star {
	font-size: 0.75rem;
	color: #e5eeff;
}

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

.rf-pdp__rating-text {
	font-size: 0.75rem;
	color: var(--rf-muted);
	font-weight: 500;
}

.rf-pdp__sku {
	font-size: 0.6875rem;
	color: var(--rf-muted);
	white-space: nowrap;
}

.rf-pdp__price-block {
	margin-bottom: 16px;
}

.rf-pdp__price-row {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 10px;
}

.rf-pdp__price {
	font-size: 1.75rem;
	font-weight: 800;
	color: var(--rf-blue);
	line-height: 1.1;
}

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

.rf-pdp__price del {
	display: none;
}

.rf-pdp__discount-badge {
	background: var(--rf-sale);
	color: var(--rf-text);
	font-size: 0.75rem;
	font-weight: 800;
	padding: 4px 8px;
	border-radius: 8px;
}

.rf-pdp__price-extra {
	margin: 6px 0 0;
	font-size: 0.8125rem;
	color: var(--rf-muted);
}

.rf-pdp__price-extra del {
	font-size: 0.875rem;
	margin-right: 8px;
}

.rf-pdp__savings {
	color: var(--rf-muted);
}

/* Formulario WC */
.rf-pdp__form-wrap {
	margin-bottom: 14px;
}

.rf-pdp__form-wrap form.cart {
	margin: 0;
}

.rf-pdp__form-wrap .variations {
	width: 100%;
	margin-bottom: 12px;
}

.rf-pdp__form-wrap .variations td,
.rf-pdp__form-wrap .variations th {
	display: block;
	padding: 0;
	border: 0;
	text-align: left;
}

.rf-pdp__form-wrap .variations label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--rf-text);
	margin-bottom: 8px;
	display: block;
}

.rf-pdp__form-wrap .variations select {
	width: 100%;
	border: 1px solid var(--rf-border);
	border-radius: 10px;
	padding: 10px 12px;
	font-size: 0.875rem;
	background: #fff;
}

.rf-pdp__form-wrap .reset_variations {
	font-size: 0.75rem;
	color: var(--rf-blue);
	margin-top: 6px;
	display: inline-block;
}

.rf-pdp__form-wrap .woocommerce-variation-price {
	margin-bottom: 10px;
}

.rf-pdp__form-wrap .quantity {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.rf-pdp__form-wrap .single_add_to_cart_button {
	display: none !important;
}

.rf-pdp__qty {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

.rf-pdp__qty-label {
	font-size: 0.8125rem;
	font-weight: 700;
	color: var(--rf-text);
}

.rf-pdp__qty-control {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--rf-border);
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
}

.rf-pdp__qty-btn {
	width: 38px;
	height: 38px;
	border: 0;
	background: var(--rf-bg);
	color: var(--rf-text);
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.rf-pdp__qty-btn svg {
	width: 16px;
	height: 16px;
}

.rf-pdp__qty-input {
	width: 44px;
	height: 38px;
	border: 0;
	text-align: center;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--rf-text);
	-moz-appearance: textfield;
}

.rf-pdp__qty-input::-webkit-outer-spin-button,
.rf-pdp__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

/* Botones */
.rf-pdp__buy-row {
	display: grid;
	grid-template-columns: 1fr;
	gap: 10px;
	margin-bottom: 12px;
}

/* Botones PDP: estilos base en add-to-cart-buttons.css */
.rf-pdp__btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	border: none;
	text-decoration: none;
	cursor: pointer;
	font-family: inherit;
}

.rf-pdp__btn.is-loading {
	opacity: 0.7;
	pointer-events: none;
}

.rf-pdp__stock {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--rf-muted);
	display: flex;
	align-items: center;
	gap: 8px;
}

.rf-pdp__stock-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #94a3b8;
}

.rf-pdp__stock.is-instock .rf-pdp__stock-dot {
	background: #22c55e;
}

.rf-pdp__stock.is-instock {
	color: #15803d;
}

/* Beneficios 4 cols */
.rf-pdp__benefits {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 8px;
	margin: 16px 0 20px;
}

.rf-pdp__benefit {
	background: var(--rf-card);
	border: 1px solid var(--rf-border);
	border-radius: 12px;
	padding: 10px 6px;
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
}

.rf-pdp__benefit-icon {
	color: var(--rf-blue);
	display: flex;
}

.rf-pdp__benefit-icon svg {
	width: 18px;
	height: 18px;
}

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

.rf-pdp__benefit span {
	font-size: 0.5rem;
	color: var(--rf-muted);
	line-height: 1.2;
}

/* Bottom tabs */
.rf-pdp__bottom {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
}

.rf-pdp__tabs {
	background: var(--rf-card);
	border: 1px solid var(--rf-border);
	border-radius: var(--rf-radius);
	box-shadow: 0 4px 20px rgba(11, 27, 58, 0.05);
	overflow: hidden;
}

.rf-pdp__tab-nav {
	display: flex;
	gap: 0;
	overflow-x: auto;
	scrollbar-width: none;
	border-bottom: 1px solid var(--rf-border);
	-webkit-overflow-scrolling: touch;
}

.rf-pdp__tab-nav::-webkit-scrollbar {
	display: none;
}

.rf-pdp__tab-btn {
	flex-shrink: 0;
	border: 0;
	background: transparent;
	padding: 14px 18px;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--rf-muted);
	cursor: pointer;
	position: relative;
	white-space: nowrap;
	transition: color 0.2s ease;
}

.rf-pdp__tab-btn.is-active {
	color: var(--rf-blue);
}

.rf-pdp__tab-btn.is-active::after {
	content: "";
	position: absolute;
	left: 12px;
	right: 12px;
	bottom: 0;
	height: 3px;
	background: var(--rf-blue);
	border-radius: 3px 3px 0 0;
}

.rf-pdp__tab-panel {
	display: none;
	padding: 20px 18px;
}

.rf-pdp__tab-panel.is-active {
	display: block;
}

.rf-pdp__prose {
	font-size: 0.875rem;
	line-height: 1.65;
	color: var(--rf-muted);
}

.rf-pdp__prose p {
	margin: 0 0 12px;
}

.rf-pdp__attrs {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.rf-pdp__attrs th,
.rf-pdp__attrs td {
	padding: 10px 12px;
	border-bottom: 1px solid var(--rf-border);
	text-align: left;
}

.rf-pdp__attrs th {
	font-weight: 700;
	color: var(--rf-text);
	width: 40%;
}

.rf-pdp__shipping-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.rf-pdp__shipping-list li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 8px 0;
	font-size: 0.875rem;
	color: var(--rf-muted);
}

.rf-pdp__shipping-list svg {
	width: 18px;
	height: 18px;
	color: var(--rf-blue);
	flex-shrink: 0;
	margin-top: 2px;
}

/* Reseñas WooCommerce dentro del tab */
.rf-pdp__tab-panel #reviews,
.rf-pdp__tab-panel .woocommerce-Reviews {
	margin: 0;
}

.rf-pdp__tab-panel #review_form {
	margin-top: 16px;
}

/* Trust box PC */
.rf-pdp__trust-box {
	display: none;
}

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

@media (min-width: 768px) {
	.rf-pdp__wrap {
		padding: 16px 20px 0;
	}

	.rf-pdp__hero {
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		gap: 28px;
		align-items: start;
	}

	.rf-pdp__gallery {
		display: flex;
		align-items: flex-start;
		gap: 14px;
		padding: 16px;
	}

	.rf-pdp__badge-sale {
		position: absolute;
		top: 16px;
		left: 16px;
	}

	.rf-pdp__wishlist {
		position: absolute;
		top: 16px;
		right: 16px;
	}

	.rf-pdp__thumbs {
		display: flex;
		flex-direction: column;
		gap: 8px;
		flex-shrink: 0;
		padding: 0;
	}

	.rf-pdp__thumb {
		border: 2px solid transparent;
		border-radius: 12px;
		padding: 4px;
		background: #fff;
		cursor: pointer;
		overflow: hidden;
		transition: border-color 0.2s ease;
	}

	.rf-pdp__thumb.is-active {
		border-color: var(--rf-blue);
	}

	.rf-pdp__thumb img {
		display: block;
		width: 64px;
		height: 64px;
		object-fit: contain;
		border-radius: 8px;
	}

	.rf-pdp__main-image {
		flex: 1;
		min-width: 0;
		min-height: 380px;
		border-radius: 14px;
		border: 1px solid var(--rf-border);
	}

	.rf-pdp__image {
		max-height: 360px;
	}

	.rf-pdp__dots {
		display: none;
	}

	.rf-pdp__title {
		font-size: 1.75rem;
	}

	.rf-pdp__price {
		font-size: 2rem;
	}

	.rf-pdp__buy-row {
		grid-template-columns: 1fr 1fr;
	}

	.rf-pdp__benefits {
		display: none;
	}

	.rf-pdp__bottom {
		grid-template-columns: 1fr 280px;
		gap: 24px;
		align-items: start;
	}

	.rf-pdp__trust-box {
		display: flex;
		flex-direction: column;
		gap: 14px;
		background: var(--rf-bg);
		border: 1px solid var(--rf-border);
		border-radius: var(--rf-radius);
		padding: 20px 16px;
	}

	.rf-pdp__trust-item {
		display: flex;
		align-items: flex-start;
		gap: 12px;
	}

	.rf-pdp__trust-icon {
		width: 40px;
		height: 40px;
		border-radius: 12px;
		background: var(--rf-card);
		border: 1px solid var(--rf-border);
		color: var(--rf-blue);
		display: flex;
		align-items: center;
		justify-content: center;
		flex-shrink: 0;
	}

	.rf-pdp__trust-icon svg {
		width: 20px;
		height: 20px;
	}

	.rf-pdp__trust-item strong {
		display: block;
		font-size: 0.8125rem;
		margin-bottom: 2px;
	}

	.rf-pdp__trust-item span {
		font-size: 0.75rem;
		color: var(--rf-muted);
	}
}

@media (min-width: 1024px) {
	.rf-pdp__summary-card {
		padding: 28px 24px;
	}

	.rf-pdp__tab-btn {
		padding: 16px 22px;
		font-size: 0.875rem;
	}
}

/* Cantidad (PHP fallback + JS) */
.rf-pdp__qty-fallback,
.rf-pdp__qty-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 14px;
}

/* Variaciones tipo color (selectores WC) */
.rf-pdp__form-wrap .variations .value {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.rf-pdp__form-wrap table.variations {
	margin-bottom: 14px;
}

.rf-pdp__form-wrap .variations tr {
	display: block;
	margin-bottom: 12px;
}

/* ==========================================================================
   Móvil – visibilidad garantizada (evita página en blanco)
   ========================================================================== */

@media (max-width: 767px) {
	.rf-main--pdp,
	.rf-pdp,
	.rf-pdp__wrap,
	.rf-pdp__hero,
	.rf-pdp__gallery,
	.rf-pdp__summary,
	.rf-pdp__summary-card,
	.rf-pdp__bottom,
	.rf-pdp__tabs {
		display: block;
		width: 100%;
		max-width: 100%;
		min-height: 0;
		visibility: visible;
		opacity: 1;
		height: auto;
		overflow: visible;
	}

	.rf-pdp__hero {
		display: flex;
		flex-direction: column;
		gap: 16px;
	}

	.rf-pdp__main-image {
		min-height: 260px;
	}

	.rf-pdp__image {
		max-height: 280px;
		width: auto;
		display: block;
	}

	.rf-pdp__breadcrumb {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		white-space: nowrap;
		padding-bottom: 4px;
	}

	.rf-pdp__benefits {
		display: grid;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.rf-pdp__buy-row {
		display: grid;
		grid-template-columns: 1fr;
	}

	.rf-pdp__tab-panel.is-active {
		display: block !important;
	}
}

/* WooCommerce / Elementor no deben ocultar la ficha */
body.single-product .rf-pdp,
body.woocommerce-page .rf-pdp {
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* ==========================================================================
   Bloques de productos debajo de la ficha (relacionados, más vendidos, etc.)
   ========================================================================== */

.rf-pdp__product-blocks {
	width: 100%;
	margin-top: 8px;
	padding-bottom: 32px;
}

.rf-pdp__product-blocks .rf-pdp-block + .rf-pdp-block {
	margin-top: 4px;
}

.rf-pdp__product-blocks .rf-product-section {
	padding: 18px 10px 8px;
	background: transparent;
}

.rf-pdp__product-blocks .rf-product-section__wrap {
	width: 100%;
	max-width: 100%;
	padding: 0 2px;
}

.rf-pdp__product-blocks .rf-product-section__grid {
	/* 2 · 3 · 5 columnas definidas en premium-products.css */
}

.rf-pdp__product-blocks .rf-premium-card__price,
.rf-pdp__product-blocks .rf-premium-card__price .amount,
.rf-pdp__product-blocks .rf-premium-card__price ins,
.rf-pdp__product-blocks .rf-premium-card__price bdi {
	color: var(--rf-blue, #0057ff);
}
