/**
 * Beauvit — product showcase (home).
 *
 * Dark glass cards with a luminous "spotlight" media tile. The tile stays light
 * (with mix-blend-mode: multiply on the image) so product photos shot on white
 * drop their background and glow against the dark page — no white boxes.
 *
 * @package Beauvit
 */

.product-grid {
	position: relative;
	padding-block: var(--bv-section-y);
	scroll-margin-top: 90px;
}

.product-grid__header {
	text-align: center;
	max-width: 52ch;
	margin: 0 auto clamp(2.25rem, 5vw, 3.75rem);
}

.product-grid__header .eyebrow {
	justify-content: center;
}

.product-grid__title {
	font-size: clamp(2rem, 5vw, 3rem);
	margin-bottom: 0.4em;
}

.product-grid__subtitle {
	color: var(--bv-muted);
	font-size: 1.06rem;
	margin: 0;
}

/* Grid: 3 columns desktop, 2 tablet, 1 mobile. ----------------------- */
.product-grid__list {
	display: grid;
	gap: clamp(1.25rem, 2.5vw, 2rem);
	grid-template-columns: repeat(3, 1fr);
}

.product-grid__footer {
	margin-top: clamp(2.5rem, 5vw, 3.5rem);
	text-align: center;
}

/* Product card ------------------------------------------------------- */
.product-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var(--bv-glass);
	border: 1px solid var(--bv-glass-border);
	border-radius: var(--bv-radius-lg);
	overflow: hidden;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	transition: transform 0.28s var(--bv-ease), box-shadow 0.28s var(--bv-ease),
		border-color 0.28s var(--bv-ease);
}

.product-card:hover {
	transform: translateY(-6px);
	border-color: rgba(240, 208, 150, 0.34);
	box-shadow: var(--bv-shadow-lg);
}

/* Media: luminous spotlight tile, image contained (never cropped). --- */
.product-card__media {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 4;
	padding: clamp(1rem, 2.4vw, 1.6rem);
	background: var(--bv-media-tile);
	overflow: hidden;
}

.product-card__media::after {
	/* Soft amber halo behind the product. */
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(60% 45% at 50% 42%, rgba(220, 159, 82, 0.18), transparent 70%);
	opacity: 0;
	transition: opacity 0.3s var(--bv-ease);
}

.product-card:hover .product-card__media::after {
	opacity: 1;
}

.product-card__media img {
	position: relative;
	z-index: 1;
	width: auto;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	mix-blend-mode: multiply;
	transition: transform 0.45s var(--bv-ease);
}

.product-card:hover .product-card__media img {
	transform: scale(1.045);
}

.product-card__placeholder {
	display: block;
	width: 70%;
	aspect-ratio: 3 / 4;
	border-radius: 8px;
	background: linear-gradient(160deg, #efe6d7 0%, #e4d8c4 100%);
}

/* Body --------------------------------------------------------------- */
.product-card__body {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	padding: 1.25rem 1.25rem 1.4rem;
	flex: 1 1 auto;
}

.product-card__title {
	font-family: var(--bv-font-sans);
	font-size: 1.06rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0;
}

.product-card__link {
	color: var(--bv-ink);
}

.product-card__link:hover {
	color: var(--bv-accent-strong);
}

.product-card__price {
	font-family: var(--bv-font-serif);
	font-size: 1.3rem;
	color: var(--bv-ink);
	margin-top: auto;
}

.product-card__price del {
	color: var(--bv-muted);
	font-size: 0.85em;
	margin-right: 0.4rem;
}

.product-card__price ins {
	text-decoration: none;
	color: var(--bv-accent-strong);
}

.product-card__price--soon {
	font-family: var(--bv-font-sans);
	font-size: 0.9rem;
	font-style: italic;
	color: var(--bv-muted);
}

/* Actions: two balanced buttons. ------------------------------------- */
.product-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
	margin-top: 0.35rem;
}

.product-card__actions .button {
	flex: 1 1 0;
	min-width: 0;
	padding-inline: 0.9rem;
	font-size: 0.86rem;
	white-space: nowrap;
}

/* WooCommerce appends this "View cart" link after an AJAX add. -------- */
.product-card__actions .added_to_cart {
	flex-basis: 100%;
	text-align: center;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--bv-accent-strong);
	text-decoration: underline;
}

@media (max-width: 900px) {
	.product-grid__list {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.product-grid__list {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 360px) {
	.product-card__actions {
		flex-direction: column;
	}
}
