/* Product card hover: see inc/product-card-hover.php. */
.sng-card {
	transition: box-shadow var(--card-hover-ms) ease;
}

.sng-card-hover {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	opacity: 0;
	transition: opacity var(--card-hover-ms) ease;
}

.sng-card-hover video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Round close-up lens, moved to the cursor by product-card-hover.js. */
.sng-card-hover__lens {
	position: absolute;
	top: 0;
	left: 0;
	width: var(--card-lens-size);
	height: var(--card-lens-size);
	border-radius: 50%;
	background-repeat: no-repeat;
	box-shadow: 0 var(--space-4) var(--space-16) var(--shadow-ink-28);
	transform: translate(-50%, -50%);
}

/* Feature labels: photo darkens, labels on the right (Figma Manzil Buti hover). */
.sng-card-hover--labels {
	background-color: var(--shadow-ink-18);
}

.sng-card-hover__labels {
	position: absolute;
	top: 30%;
	right: var(--space-10);
	max-width: calc(100% - var(--space-20)); /* Full attribute values: wrap inside the photo, never cut off. */
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--space-12);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sng-card-hover__labels li {
	display: flex;
	align-items: center;
	gap: var(--space-6);
	font-family: "Work Sans", sans-serif;
	font-size: var(--text-xs);
	font-weight: 500;
	line-height: var(--lh-xs);
	color: var(--color-on-accent);
}

.sng-card-hover__icon {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--icon-sm);
	height: var(--icon-sm);
	padding: calc(var(--space-6) / 2);
	border-radius: 50%;
	background-color: var(--color-on-accent);
	color: var(--color-brand-deep);
}

.sng-card-hover__icon svg {
	width: 100%;
	height: 100%;
}

@media (hover: hover) {
	.sng-card:hover {
		box-shadow: 0 var(--space-10) var(--space-30) var(--shadow-ink-18);
	}

	/* Orange only on the button itself (cards have Add to cart + Buy now now, so not on card hover). */
	.sng-card .sng-card__cta.brxe-product-add-to-cart a.button:is(:hover, :focus-visible),
	.sng-card .sng-card__cta.brxe-product-add-to-cart button.button:not(.sng-card-buy-now):is(:hover, :focus-visible) {
		background-color: var(--color-brand-accent);
	}

	.sng-card:hover .sng-card-hover--labels,
	.sng-card.is-hover-lens .sng-card-hover--lens,
	.sng-card .sng-card-hover--video.is-playing {
		opacity: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sng-card,
	.sng-card-hover {
		transition: none;
	}
}

/* ---------- Out of stock (Figma Wishlist "Manzil Buti" card), phones + desktop ----------
   [sanganeri_card_hover] prints .sng-card-oos in every card photo; it shows while the card offers
   "Notify Me" (.sng-card-notify from inc/back-in-stock.php, switched by colour-swatches.js on dot change):
   photo blurred under a 40% dark layer, sand circle with the box icon, "Out of Stock" + note. */
.sng-card-oos {
	display: none;
}

.sng-card:has(.sng-card-notify) .sng-card__thumb {
	overflow: hidden;
}

.sng-card:has(.sng-card-notify) .sng-card__thumb img {
	filter: blur(5px);
	transform: scale(1.08); /* Blur fades the photo edges: zoom a little so they stay covered. */
}

.sng-card:has(.sng-card-notify) .sng-card-oos {
	position: absolute;
	inset: 0;
	z-index: 1; /* Over the photo, under the badges and heart (z-index 2, earlier in the thumb). */
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: var(--space-10);
	background-color: rgba(0, 0, 0, 0.4);
	color: var(--color-on-accent);
	font-family: "Work Sans", sans-serif;
	text-align: center;
	pointer-events: none;
}

.sng-card-oos__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--icon-lg);
	height: var(--icon-lg);
	border-radius: 50%;
	background-color: var(--color-surface-sand);
	color: var(--color-brand-deep);
}

.sng-card-oos__icon svg {
	width: var(--icon-sm);
	height: var(--icon-sm);
}

.sng-card-oos__title {
	font-size: var(--text-md);
	font-weight: 600;
	line-height: var(--lh-md);
}

.sng-card-oos__text {
	max-width: 130px;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
}

/* Phone grids hide the hover shortcode element (.brxe-sngchv: mobile-account / mobile-home / mobile-listing /
   mobile-product / mobile-order-received.css, id-level selectors); a sold-out card needs it for the overlay. */
.sng-card:has(.sng-card-notify) .brxe-sngchv {
	display: block !important;
}

/* The overlay says it already: no "Out of Stock" badge, no hover labels / lens / video on a sold-out photo. */
.sng-card:has(.sng-card-notify) .brxe-krgevx,
.sng-card:has(.sng-card-notify) .sng-card-hover {
	display: none;
}

/* Card body: rating + price right under the name; only the buttons sit at the bottom, so a one-button
   card (Notify Me) has no gap under the name next to a card with Add to cart + Buy now. */
.sng-card > .brxe-266273 {
	justify-content: flex-start;
}

.sng-card > .brxe-266273 > .brxe-jscwab {
	flex-grow: 1;
}

.sng-card > .brxe-266273 > .brxe-jscwab > .sng-card__cta {
	margin-top: auto;
}
