/* =========================================================================
 * SNX polish layer - subtle motion + finish. Loaded only when the
 * "Visual polish" setting is on. Everything here is decoration: remove the
 * stylesheet and the site still works.
 * ====================================================================== */
:root {
	--snx-glow: 0 0 0 1px rgba(225, 191, 112, 0.35), 0 18px 40px rgba(0, 0, 0, 0.55), 0 0 34px rgba(214, 32, 139, 0.18);
}

/* ---------- Product cards ---------- */
.woocommerce ul.products li.product {
	position: relative;
	border: 1px solid rgba(225, 191, 112, 0.14);
	border-radius: 14px;
	transition: transform 0.35s var(--snx-ease, cubic-bezier(0.16, 1, 0.3, 1)), box-shadow 0.35s ease, border-color 0.35s ease;
}

/* the reveal animation used to hold the card at transform:none forever, which blocked hover lift */
ul.products li.product.snx-enter {
	animation-fill-mode: backwards;
}

@media (hover: hover) {
	.woocommerce ul.products li.product:hover {
		transform: translateY(-6px);
		border-color: rgba(225, 191, 112, 0.55);
		box-shadow: var(--snx-glow);
		z-index: 2;
	}
}

/* every product photo becomes the same neat square */
.woocommerce ul.products li.product a img.attachment-woocommerce_thumbnail,
.woocommerce ul.products li.product a img.wp-post-image {
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #fff;
	border-radius: 10px;
	transition: transform 0.5s var(--snx-ease, cubic-bezier(0.16, 1, 0.3, 1));
}

@media (hover: hover) {
	.woocommerce ul.products li.product:hover a img.attachment-woocommerce_thumbnail,
	.woocommerce ul.products li.product:hover a img.wp-post-image {
		transform: scale(1.045);
	}
}

/* Add to cart: shine sweep + press feedback */
.woocommerce ul.products li.product .button {
	position: relative;
	overflow: hidden;
	border-radius: 999px;
	transition: transform 0.2s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.woocommerce ul.products li.product .button::after {
	content: "";
	position: absolute;
	top: 0;
	left: -130%;
	width: 55%;
	height: 100%;
	background: linear-gradient(100deg, transparent, rgba(255, 255, 255, 0.6), transparent);
	transform: skewX(-20deg);
	pointer-events: none;
}

.woocommerce ul.products li.product .button:hover::after {
	animation: snxShine 0.85s ease;
}

.woocommerce ul.products li.product .button:hover {
	box-shadow: 0 6px 18px rgba(214, 32, 139, 0.35);
}

.woocommerce ul.products li.product .button:active {
	transform: scale(0.95);
}

@keyframes snxShine {
	to {
		left: 150%;
	}
}

/* sale badge */
.woocommerce span.onsale {
	background: var(--snx-pink, #D6208B) !important;
	color: #fff !important;
	border-radius: 999px;
	font-weight: 700;
	letter-spacing: 0.04em;
	animation: snxPulse 2.6s ease-in-out infinite;
}

@keyframes snxPulse {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(214, 32, 139, 0.55);
	}
	60% {
		box-shadow: 0 0 0 10px rgba(214, 32, 139, 0);
	}
}

/* ---------- Section headings and "View all" ---------- */
.snx-row__title::before,
.snx-cats .snx-row__title::before {
	content: "\2726";
	display: inline-block;
	margin-right: 0.45em;
	font-size: 0.62em;
	vertical-align: 0.18em;
	color: var(--snx-pink, #D6208B);
	animation: snxTwinkle 3.4s ease-in-out infinite;
}

@keyframes snxTwinkle {
	0%, 100% {
		opacity: 0.55;
		transform: scale(0.85) rotate(0deg);
	}
	50% {
		opacity: 1;
		transform: scale(1.2) rotate(18deg);
	}
}

.snx-row__more {
	transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease, letter-spacing 0.25s ease;
}

.snx-row__more:hover,
.snx-row__more:focus {
	background: var(--snx-pink, #D6208B) !important;
	color: #111 !important;
	transform: translateX(4px);
}

/* ---------- Shop-by-category tiles ---------- */
.snx-cat-tile {
	border: 1px solid rgba(225, 191, 112, 0.22);
	transition: transform 0.25s ease-out, box-shadow 0.4s ease, border-color 0.4s ease;
	will-change: transform;
}

.snx-cat-tile::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 3;
	background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.2) 50%, transparent 62%);
	transform: translateX(-130%);
	transition: transform 0.9s ease;
	pointer-events: none;
}

@media (hover: hover) {
	.snx-cat-tile:hover {
		border-color: var(--snx-gold, #E1BF70);
		box-shadow: var(--snx-glow);
	}

	.snx-cat-tile:hover::before {
		transform: translateX(130%);
	}
}

.snx-cat-tile.snx-enter {
	animation-fill-mode: backwards;
}

/* ---------- Hero ---------- */
.snx-hero--image .snx-btn:not(.snx-btn--ghost) {
	animation: snxCtaGlow 2.8s ease-in-out infinite;
}

@keyframes snxCtaGlow {
	0%, 100% {
		box-shadow: 0 0 0 0 rgba(225, 191, 112, 0.5);
	}
	60% {
		box-shadow: 0 0 0 14px rgba(225, 191, 112, 0);
	}
}

.snx-sparks {
	position: absolute;
	inset: 0;
	z-index: 1;
	overflow: hidden;
	pointer-events: none;
}

.snx-spark {
	position: absolute;
	bottom: -10px;
	border-radius: 50%;
	background: radial-gradient(circle, #fff6d6 0%, rgba(225, 191, 112, 0.9) 38%, rgba(225, 191, 112, 0) 70%);
	opacity: 0;
	animation: snxSpark linear infinite;
}

@keyframes snxSpark {
	0% {
		transform: translate3d(0, 0, 0) scale(0.4);
		opacity: 0;
	}
	15% {
		opacity: 0.95;
	}
	100% {
		transform: translate3d(var(--snx-dx, 20px), -480px, 0) scale(1.1);
		opacity: 0;
	}
}

/* ---------- Scroll progress, back-to-top, toast ---------- */
.snx-progress {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	background: linear-gradient(90deg, #D6208B, #E1BF70);
	transform-origin: 0 50%;
	transform: scaleX(0);
	z-index: 100000;
	pointer-events: none;
}

.admin-bar .snx-progress {
	top: 32px;
}

@media screen and (max-width: 782px) {
	.admin-bar .snx-progress {
		top: 46px;
	}
}

.snx-top {
	position: fixed;
	left: 18px;
	bottom: 22px;
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 50%;
	background: var(--snx-gold, #E1BF70);
	color: #1A1A1A;
	font-size: 20px;
	line-height: 46px;
	text-align: center;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(0, 0, 0, 0.5);
	opacity: 0;
	transform: translateY(14px) scale(0.9);
	pointer-events: none;
	transition: opacity 0.3s ease, transform 0.3s ease, background-color 0.2s ease;
	z-index: 9990;
	padding: 0;
}

.snx-top.is-visible {
	opacity: 1;
	transform: none;
	pointer-events: auto;
}

.snx-top:hover {
	background: var(--snx-pink, #D6208B);
	color: #fff;
}

.snx-toast {
	position: fixed;
	left: 50%;
	bottom: 26px;
	transform: translate(-50%, 24px);
	background: #141414;
	color: var(--snx-gold-hi, #F2CF7F);
	border: 1px solid var(--snx-gold, #E1BF70);
	border-radius: 999px;
	padding: 11px 22px;
	font-weight: 700;
	font-size: 14px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease, transform 0.3s ease;
	z-index: 100001;
}

.snx-toast.is-visible {
	opacity: 1;
	transform: translate(-50%, 0);
}

.snx-bump {
	animation: snxBump 0.6s ease;
}

@keyframes snxBump {
	0%, 100% {
		transform: scale(1);
	}
	35% {
		transform: scale(1.18);
	}
	65% {
		transform: scale(0.96);
	}
}

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
	.snx-row__title::before,
	.snx-hero--image .snx-btn,
	.woocommerce span.onsale,
	.snx-spark,
	.snx-bump {
		animation: none !important;
	}

	.woocommerce ul.products li.product,
	.snx-cat-tile,
	.snx-top,
	.snx-toast {
		transition: none !important;
	}

	.woocommerce ul.products li.product:hover,
	.snx-cat-tile:hover {
		transform: none !important;
	}

	.snx-sparks,
	.snx-progress {
		display: none !important;
	}
}

/* ---------- Category tiles: clean layout ---------- */
.snx-cats__grid {
	grid-template-columns: repeat(6, 1fr);
	gap: 1rem;
}

@media (max-width: 1000px) {
	.snx-cats__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 600px) {
	.snx-cats__grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 0.75rem;
	}
}

.snx-cat-tile__num,
.snx-cat-tile__name {
	display: none;
}

.snx-cat-tile::after {
	background: linear-gradient(180deg, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.45));
}

.snx-cat-tile__count {
	left: 50%;
	right: auto;
	bottom: 0.9rem;
	transform: translateX(-50%);
	padding: 0.28rem 0.85rem;
	border-radius: 999px;
	background: rgba(20, 20, 20, 0.82);
	border: 1px solid rgba(225, 191, 112, 0.5);
	color: var(--snx-gold-hi, #F2CF7F);
	font-size: 0.74rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	opacity: 1;
	white-space: nowrap;
}
