/* Palavor — tienda al estilo del demo "Safelight" */

body.pv-shop-page {
	--shop-bg: #f4f3ef;
	--shop-ink: #121212;
	--shop-gray: #8f8d87;
	--shop-soft: #77756f;
	--shop-wide: min(1200px, calc(100% - 40px));
	padding-top: 0;
	background: var(--shop-bg);
}

body.pv-shop-page .pv-progress {
	display: none;
}

/* Encabezado flotante tipo cápsula, con vidrio esmerilado */
body.pv-shop-page .pv-header {
	top: 16px;
	left: 50%;
	right: auto;
	width: min(1120px, calc(100% - 32px));
	height: 60px;
	border: 1px solid rgba(18, 18, 18, 0.06);
	border-radius: 999px;
	background: rgba(250, 250, 247, 0.72);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
	backdrop-filter: blur(16px) saturate(1.4);
	-webkit-backdrop-filter: blur(16px) saturate(1.4);
	transform: translateX(-50%);
}

body.pv-shop-page.admin-bar .pv-header {
	top: 48px;
}

body.pv-shop-page .pv-header__inner {
	width: calc(100% - 12px);
	padding-left: 12px;
}

body.pv-shop-page .pv-nav__list {
	gap: 30px;
}

body.pv-shop-page .pv-nav a {
	color: #7a7873;
	font-size: 15px;
}

body.pv-shop-page .pv-nav a:hover,
body.pv-shop-page .pv-nav li:nth-child(3) a {
	color: var(--shop-ink);
}

body.pv-shop-page .pv-header .pv-btn {
	height: 48px;
	padding: 0 22px;
	border-radius: 999px;
	background: var(--shop-ink);
	color: #fff;
}

body.pv-shop-page .pv-header .pv-btn:hover {
	background: var(--pv-orange);
}

body.pv-shop-page .pv-cart {
	border-radius: 999px;
}

body.pv-shop-page #main {
	padding: 0;
}

/* Portada de la tienda */
.pv-shop__hero {
	width: var(--shop-wide);
	margin: 0 auto;
	padding: 150px 0 40px;
}

.pv-shop__title {
	max-width: 880px;
	margin: 0;
	color: var(--shop-gray) !important;
	font-family: var(--pv-body) !important;
	font-size: clamp(42px, 5.6vw, 80px);
	font-weight: 600 !important;
	line-height: 0.96;
	letter-spacing: -0.055em !important;
}

.pv-shop__title span {
	display: block;
	color: var(--shop-ink);
}

.pv-shop__lead {
	max-width: 640px;
	margin: 34px 0 48px;
	color: var(--shop-soft);
	font-size: 19px;
	line-height: 1.5;
	letter-spacing: -0.01em;
	--d: 2;
}

.pv-shop__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	--d: 3;
}

.pv-shop__chip {
	padding: 9px 16px;
	border: 1px solid #e3e1db;
	border-radius: 999px;
	background: #fff;
	color: var(--shop-ink);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.2;
	text-decoration: none;
	transition: background 0.3s, color 0.3s, border-color 0.3s;
}

.pv-shop__chip:hover {
	border-color: var(--shop-ink);
}

.pv-shop__chip.is-active {
	border-color: var(--shop-ink);
	background: var(--shop-ink);
	color: #fff;
}

body.pv-shop-page .woocommerce-notices-wrapper {
	width: var(--shop-wide);
	margin: 0 auto;
}

/* Cuadrícula */
.pv-shop__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 48px 20px;
	width: var(--shop-wide);
	margin: 0 auto;
	padding-bottom: 140px;
	scroll-margin-top: 110px;
}

.pv-card {
	--tile: #ebe7df;
	position: relative;
	opacity: 0;
	transform: translateY(26px);
	transition: opacity 0.8s var(--pv-ease), transform 0.8s var(--pv-ease);
	transition-delay: calc(var(--i, 0) * 80ms);
}

.pv-card.is-in {
	opacity: 1;
	transform: none;
}

.pv-card[hidden] {
	display: none;
}

.pv-card[data-cats~="creatine"] {
	--tile: #e2e8e6;
}

.pv-card[data-cats~="pre-workout"] {
	--tile: #f1e0d6;
}

.pv-card[data-cats~="aminoacids"] {
	--tile: #e8e3ee;
}

.pv-card[data-cats~="fat-burner"] {
	--tile: #e2e1de;
}

.pv-card__media {
	position: relative;
	display: grid;
	place-items: center;
	aspect-ratio: 285 / 356;
	overflow: hidden;
	border-radius: 10px;
	background: radial-gradient(circle at 50% 36%, #fbfaf7 0%, var(--tile) 72%);
}

.pv-card__media img {
	width: 76%;
	height: 80%;
	object-fit: contain;
	filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.16));
	transition: transform 0.8s var(--pv-ease);
}

.pv-card:hover .pv-card__media img {
	transform: scale(1.06) translateY(-1.5%);
}

.pv-card__badge {
	position: absolute;
	top: 12px;
	left: 12px;
	z-index: 1;
	padding: 4px 10px;
	border-radius: 999px;
	background: #fff;
	color: var(--shop-ink);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.3;
}

.pv-card__go {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #fff;
	color: var(--shop-ink);
	opacity: 0;
	transform: scale(0.6) rotate(-45deg);
	transition: opacity 0.35s, transform 0.5s var(--pv-ease);
}

.pv-card__go svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.pv-card:hover .pv-card__go,
.pv-card:focus-within .pv-card__go {
	opacity: 1;
	transform: none;
}

.pv-card__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 14px;
	margin-top: 18px;
}

.pv-card__head h2 {
	display: -webkit-box;
	margin: 0;
	overflow: hidden;
	font-family: var(--pv-body) !important;
	font-size: 17px !important;
	font-weight: 600 !important;
	line-height: 1.25 !important;
	letter-spacing: -0.02em !important;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.pv-card__head h2 a {
	color: var(--shop-ink);
	text-decoration: none;
}

/* Toda la tarjeta es clicable a través del enlace del nombre */
.pv-card__head h2 a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.pv-card__price {
	flex: none;
	color: var(--shop-ink);
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.02em;
	white-space: nowrap;
}

.pv-card__price del {
	margin-right: 4px;
	color: var(--shop-gray);
	font-size: 13px;
	font-weight: 400;
}

.pv-card__price ins {
	text-decoration: none;
}

.pv-card__teaser {
	margin: 8px 0 0;
	color: var(--shop-soft);
	font-size: 15px;
	line-height: 1.35;
}

.pv-card__meta {
	margin: 6px 0 0;
	color: #a19f98;
	font-size: 13px;
}

.pv-shop__empty {
	grid-column: 1 / -1;
	color: var(--shop-soft);
}

/* Cierre oscuro: imágenes que vuelan en 3D y se ordenan en una fila */
.pv-shelf {
	position: relative;
	height: 420vh;
	background: #141414;
	color: #f2f2f2;
}

.pv-shelf__sticky {
	position: sticky;
	top: 0;
	height: 100vh;
	overflow: hidden;
}

.pv-shelf__fly {
	position: absolute;
	inset: 0;
	perspective: 1000px;
	perspective-origin: 50% 50%;
	transform-style: preserve-3d;
	pointer-events: none;
}

.pv-shelf__item {
	position: absolute;
	top: 50%;
	left: 50%;
	display: grid;
	place-items: center;
	width: var(--w);
	aspect-ratio: 4 / 5;
	margin: calc(var(--w) * -0.625) 0 0 calc(var(--w) * -0.5);
	overflow: hidden;
	border-radius: 8px;
	background: radial-gradient(circle at 50% 36%, #fbfaf7 0%, #e3dfd6 75%);
	opacity: 0;
	will-change: transform, opacity;
}

.pv-shelf__item img,
.pv-shelf__thumb img {
	width: 82%;
	height: 84%;
	object-fit: contain;
}

.pv-shelf__end {
	--t: 0;
	--rz: -5000px;
	--ro: 0;
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 60px 40px 0;
}

.pv-shelf__title {
	margin: 0;
	color: #6f6f6f !important;
	font-family: var(--pv-body) !important;
	font-size: clamp(48px, 7vw, 104px);
	font-weight: 600 !important;
	line-height: 1;
	letter-spacing: -0.055em !important;
	opacity: var(--t);
	filter: blur(calc((1 - var(--t)) * 14px));
	transform: translateY(calc((1 - var(--t)) * 30px));
}

.pv-shelf__title span {
	color: #f2f2f2;
}

.pv-shelf__bar {
	display: grid;
	grid-template-columns: 1fr auto auto auto;
	align-items: center;
	gap: 40px;
	margin-top: 36px;
	padding-top: 34px;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	opacity: var(--t);
	transform: translateY(calc((1 - var(--t)) * 24px));
}

.pv-shelf__text {
	max-width: 400px;
	margin: 0;
	color: #a7a7a7;
	font-size: 16px;
	line-height: 1.55;
}

.pv-shelf__price {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin: 0;
}

.pv-shelf__price strong {
	color: #fff;
	font-size: 52px;
	font-weight: 600;
	letter-spacing: -0.04em;
	line-height: 1;
}

.pv-shelf__price small {
	color: #9a9a9a;
	font-size: 15px;
}

.pv-shelf__cta {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 14px 22px;
	border-radius: 999px;
	background: var(--pv-orange);
	color: #fff;
	font-size: 15px;
	font-weight: 500;
	text-decoration: none;
	transition: background 0.3s, color 0.3s;
}

.pv-shelf__cta svg {
	width: 16px;
	height: 16px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
}

.pv-shelf__cta:hover {
	background: #fff;
	color: var(--shop-ink);
}

.pv-shelf__link {
	color: #dcdcdc;
	font-size: 15px;
	text-underline-offset: 4px;
}

.pv-shelf__link:hover {
	color: #fff;
}

.pv-shelf__row {
	display: grid;
	grid-auto-columns: minmax(0, 1fr);
	grid-auto-flow: column;
	gap: 14px;
	margin-top: 40px;
	opacity: var(--ro);
	transform: perspective(1000px) translateZ(var(--rz));
	will-change: transform;
}

.pv-shelf__thumb {
	display: grid;
	place-items: center;
	aspect-ratio: 101 / 126;
	overflow: hidden;
	border-radius: 6px;
	background: radial-gradient(circle at 50% 36%, #fbfaf7 0%, #e3dfd6 75%);
	transition: transform 0.4s var(--pv-ease);
}

.pv-shelf__thumb:hover {
	transform: translateY(-6px);
}

.pv-shelf__end:not(.is-live) .pv-shelf__row,
.pv-shelf__end:not(.is-live) .pv-shelf__bar {
	pointer-events: none;
}

@media (max-width: 1080px) {
	.pv-shop__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 860px) {
	body.pv-shop-page .pv-header {
		top: 10px;
		height: 56px;
	}

	body.pv-shop-page .pv-header .pv-btn {
		display: none;
	}

	.pv-shop__hero {
		padding-top: 110px;
	}

	.pv-shop__lead {
		font-size: 16px;
	}

	.pv-shop__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 32px 12px;
	}

	.pv-card__head {
		display: block;
	}

	.pv-card__price {
		display: block;
		margin-top: 4px;
	}

	.pv-card__teaser {
		display: none;
	}
}

/* Móvil y movimiento reducido: el cierre queda fijo, sin vuelo 3D */
@media (max-width: 860px), (prefers-reduced-motion: reduce) {
	.pv-shelf {
		height: auto;
	}

	.pv-shelf__sticky {
		position: relative;
		height: auto;
	}

	.pv-shelf__fly {
		display: none;
	}

	.pv-shelf__end {
		--t: 1;
		--rz: 0px;
		--ro: 1;
		position: relative;
		padding: 90px 16px 80px;
	}

	.pv-shelf__bar {
		grid-template-columns: 1fr;
		gap: 22px;
	}

	.pv-shelf__cta {
		justify-self: start;
	}

	.pv-shelf__row {
		grid-auto-columns: 30vw;
		overflow-x: auto;
		transform: none;
		scrollbar-width: none;
	}

	.pv-card {
		opacity: 1;
		transform: none;
	}
}

body.pv-shop-page .pv-burger {
	border-radius: 999px;
}
