/**
 * Snusly button fill — left → right wipe.
 * Rest: brand blue + white text
 * Hover: WHITE fill slides in, text turns BLACK
 */

:root {
	--snusly-btn-bg: #0A6B82;
	--snusly-btn-hover: #3F5EB9;
	--snusly-btn-text: #fff;
	--snusly-btn-dur: 420ms;
	--snusly-btn-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

.scc-section { --snusly-btn-bg: var(--scc-btn-bg, #0A6B82); }
.scp-section { --snusly-btn-bg: var(--scp-btn-bg, #8A4381); }
.sceb-section { --snusly-btn-bg: var(--sceb-btn-bg, #8A4381); }
.scbl-section { --snusly-btn-bg: var(--scbl-btn-bg, #8A4381); }

.scc-card__btn,
.scp-card__btn,
.sceb-card__btn,
.sna-card__btn,
.sna-card a.sna-card__btn,
.snp-btn--solid,
.snp-btn--ghost,
.snp-rcard__btn,
.scbl-cta,
.snc-filters__go,
.snc-picks__cart,
.scrw-btn--solid,
.scrw-btn--ghost,
.scf-contact-btn,
.elementor-button,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce .single_add_to_cart_button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
.wc-proceed-to-checkout .checkout-button,
#place_order,
.wc-block-components-button.contained,
.sch-cart-drawer__checkout,
.scbo-promo__btn,
.scbo-cart,
.scbo-mobile-intro__btn,
.snusly-viewall,
.snusly-fill-btn {
	position: relative !important;
	overflow: hidden !important;
	z-index: 0;
	isolation: isolate;
}

/*
 * Premium Picks / Top Picks cards use a full-card <a class="*-card__hit"> overlay.
 * buttons.css used to force z-index: 0, which put Add to cart under that overlay
 * so :hover never fired and the fill wipe never ran.
 */
.scp-card__btn,
.sceb-card__btn,
.scbo-cart,
.snc-picks__cart {
	z-index: 6 !important;
	pointer-events: auto !important;
}

/* WooCommerce injects .added_to_cart ("View cart") after AJAX add — hide on Snusly cards. */
.scp-card .added_to_cart,
.sceb-card .added_to_cart,
.scbo-card .added_to_cart,
.scbo-actions .added_to_cart,
.snc-picks__row .added_to_cart {
	display: none !important;
}

.snusly-btn__fill {
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	width: 100% !important;
	height: 100% !important;
	background: #fff !important;
	transform: translateX(-101%) !important;
	transition: transform var(--snusly-btn-dur, 420ms) var(--snusly-btn-ease) !important;
	pointer-events: none !important;
	z-index: 1 !important;
}

.scc-card__btn:hover .snusly-btn__fill,
.scc-card__btn:focus-visible .snusly-btn__fill,
.scc-card__btn:active .snusly-btn__fill,
.scp-card__btn:hover .snusly-btn__fill,
.scp-card__btn:focus-visible .snusly-btn__fill,
.scp-card__btn:active .snusly-btn__fill,
.sceb-card__btn:hover .snusly-btn__fill,
.sceb-card__btn:focus-visible .snusly-btn__fill,
.sceb-card__btn:active .snusly-btn__fill,
.sna-card__btn:hover .snusly-btn__fill,
.sna-card__btn:focus-visible .snusly-btn__fill,
.sna-card__btn:active .snusly-btn__fill,
.snp-btn--solid:hover .snusly-btn__fill,
.snp-btn--solid:focus-visible .snusly-btn__fill,
.snp-btn--solid:active .snusly-btn__fill,
.snp-btn--ghost:hover .snusly-btn__fill,
.snp-btn--ghost:active .snusly-btn__fill,
.snp-rcard__btn:hover .snusly-btn__fill,
.snp-rcard__btn:active .snusly-btn__fill,
.scbl-cta:hover .snusly-btn__fill,
.scbl-cta:active .snusly-btn__fill,
.snc-filters__go:hover .snusly-btn__fill,
.snc-picks__cart:hover .snusly-btn__fill,
.scrw-btn--solid:hover .snusly-btn__fill,
.scrw-btn--ghost:hover .snusly-btn__fill,
.scf-contact-btn:hover .snusly-btn__fill,
.elementor-button:hover .snusly-btn__fill,
.elementor-button:focus .snusly-btn__fill,
.wp-block-button__link:hover .snusly-btn__fill,
.woocommerce a.button:hover .snusly-btn__fill,
.woocommerce button.button:hover .snusly-btn__fill,
.woocommerce .single_add_to_cart_button:hover .snusly-btn__fill,
.wc-block-cart__submit-button:hover .snusly-btn__fill,
.wc-block-components-checkout-place-order-button:hover .snusly-btn__fill,
.wc-proceed-to-checkout .checkout-button:hover .snusly-btn__fill,
#place_order:hover .snusly-btn__fill,
.wc-block-components-button.contained:hover .snusly-btn__fill,
.scbo-promo__btn:hover .snusly-btn__fill,
.scbo-promo__btn:focus-visible .snusly-btn__fill,
.scbo-promo__btn:active .snusly-btn__fill,
.scbo-cart:hover .snusly-btn__fill,
.scbo-cart:focus-visible .snusly-btn__fill,
.scbo-cart:active .snusly-btn__fill,
.scbo-mobile-intro__btn:hover .snusly-btn__fill,
.scbo-mobile-intro__btn:focus-visible .snusly-btn__fill,
.scbo-mobile-intro__btn:active .snusly-btn__fill,
.snusly-viewall:hover .snusly-btn__fill,
.snusly-viewall:focus-visible .snusly-btn__fill,
.snusly-viewall:active .snusly-btn__fill,
.snusly-fill-btn:hover .snusly-btn__fill,
.snusly-fill-btn:focus-visible .snusly-btn__fill,
.snusly-fill-btn:active .snusly-btn__fill {
	transform: translateX(0) !important;
}

.snusly-btn__label {
	position: relative !important;
	z-index: 2 !important;
	display: inline-block !important;
}

/* Rest: white text */
.scc-card__btn,
.scp-card__btn,
.sceb-card__btn,
.sna-card__btn,
.sna-card a.sna-card__btn,
.snp-btn--solid,
.snp-rcard__btn,
.scbl-cta,
.snc-filters__go,
.snc-picks__cart,
.scrw-btn--solid,
.scf-contact-btn,
.elementor-button,
.wp-block-button__link,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce .single_add_to_cart_button,
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button,
#place_order,
.wc-block-components-button.contained,
.snusly-fill-btn:not(.snp-btn--ghost),
.scc-card__btn .snusly-btn__label,
.scp-card__btn .snusly-btn__label,
.sceb-card__btn .snusly-btn__label,
.sna-card__btn .snusly-btn__label,
.snusly-fill-btn:not(.snp-btn--ghost) .snusly-btn__label {
	color: #fff !important;
}

/* Hover: black text on white fill */
.scc-card__btn:hover,
.scc-card__btn:focus-visible,
.scc-card__btn:active,
.scp-card__btn:hover,
.scp-card__btn:focus-visible,
.scp-card__btn:active,
.sceb-card__btn:hover,
.sceb-card__btn:focus-visible,
.sceb-card__btn:active,
.snusly-viewall:hover,
.snusly-viewall:focus-visible,
.snusly-viewall:active,
.sna-card__btn:hover,
.sna-card__btn:focus-visible,
.sna-card__btn:active,
.sna-card a.sna-card__btn:hover,
.snp-btn--solid:hover,
.snp-btn--solid:focus-visible,
.snp-btn--solid:active,
.snp-rcard__btn:hover,
.scbl-cta:hover,
.snc-filters__go:hover,
.snc-picks__cart:hover,
.scrw-btn--solid:hover,
.scf-contact-btn:hover,
.elementor-button:hover,
.wp-block-button__link:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce .single_add_to_cart_button:hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover,
#place_order:hover,
.wc-block-components-button.contained:hover,
.snusly-fill-btn:not(.snp-btn--ghost):hover,
.snusly-fill-btn:not(.snp-btn--ghost):focus-visible,
.snusly-fill-btn:not(.snp-btn--ghost):active,
.scc-card__btn:hover .snusly-btn__label,
.scp-card__btn:hover .snusly-btn__label,
.sceb-card__btn:hover .snusly-btn__label,
.sna-card__btn:hover .snusly-btn__label,
.snusly-viewall:hover .snusly-btn__label,
.snusly-fill-btn:not(.snp-btn--ghost):hover .snusly-btn__label {
	color: #111 !important;
}

.snp-btn--ghost {
	background-color: #fff !important;
	color: #8A4381 !important;
	border: 2px solid #8A4381 !important;
}
.snp-btn--ghost .snusly-btn__label {
	color: #8A4381 !important;
}
.snp-btn--ghost .snusly-btn__fill {
	background: #8A4381 !important;
}
.snp-btn--ghost:hover,
.snp-btn--ghost:active,
.snp-btn--ghost:hover .snusly-btn__label {
	color: #fff !important;
}

.scrw-btn--solid {
	background-color: #3F5EB9 !important;
	border: 2px solid #3F5EB9 !important;
	color: #fff !important;
}
.scrw-btn--solid .snusly-btn__label {
	color: #fff !important;
}
.scrw-btn--solid .snusly-btn__fill,
.scrw-btn--ghost .snusly-btn__fill {
	background: #fff !important;
}
.scrw-btn--solid:hover,
.scrw-btn--solid:hover .snusly-btn__label {
	color: #111 !important;
}

.scrw-btn--ghost {
	background-color: #0A6B82 !important;
	border: 2px solid #0A6B82 !important;
	color: #fff !important;
}
.scrw-btn--ghost .snusly-btn__label {
	color: #fff !important;
}
.scrw-btn--ghost:hover,
.scrw-btn--ghost:hover .snusly-btn__label {
	color: #111 !important;
}

.sna-card__btn.is-sold .snusly-btn__fill,
.sna-card__btn:disabled .snusly-btn__fill {
	display: none !important;
}

/* Section "View all" button — same palette and wipe as the card CTAs. */
.snusly-viewall-wrap {
	display: flex;
	justify-content: center;
	margin-top: 30px;
}

.snusly-viewall-wrap.is-left {
	justify-content: flex-start;
}

.snusly-viewall-wrap.is-right {
	justify-content: flex-end;
}

.snusly-viewall {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 30px;
	border: 2px solid #8A4381;
	border-radius: 10px;
	background: #8A4381;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-align: center;
	text-decoration: none !important;
	cursor: pointer;
	transition: color var(--snusly-btn-dur, 420ms) var(--snusly-btn-ease);
}

.snusly-viewall .snusly-btn__label {
	display: inline-flex !important;
	align-items: center;
	gap: 9px;
}

.snusly-viewall__arrow {
	width: 17px;
	height: 17px;
	flex-shrink: 0;
	transition: transform var(--snusly-btn-dur, 420ms) var(--snusly-btn-ease);
}

.snusly-viewall:hover .snusly-viewall__arrow {
	transform: translateX(4px);
}

@media (max-width: 600px) {
	.snusly-viewall-wrap {
		margin-top: 22px;
	}

	.snusly-viewall {
		width: 100%;
		padding: 0 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.snusly-btn__fill {
		transition: none !important;
	}
}
