/**
 * Lightweight WooCommerce add-to-cart notice.
 *
 * @package Starter_Pro
 */
.spike-cart-notice {
	position: fixed;
	left: clamp(16px, 2.5vw, 32px);
	bottom: clamp(16px, 2.5vw, 32px);
	z-index: 1000;
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) auto;
	align-items: center;
	gap: 16px;
	width: min(460px, calc(100vw - 32px));
	min-height: 92px;
	padding: 14px 14px 14px 15px;
	border: 1px solid rgba(255, 255, 255, .14);
	border-left: 4px solid var(--spike-red-bright, #e00000);
	border-radius: 16px;
	background: linear-gradient(135deg, #171717 0%, #0c0c0c 100%);
	box-shadow: 0 22px 55px rgba(0, 0, 0, .32), 0 3px 12px rgba(0, 0, 0, .12);
	color: #fff;
	opacity: 0;
	pointer-events: none;
	transform: translateY(18px) scale(.98);
	transform-origin: bottom left;
	transition: opacity .32s ease, transform .32s cubic-bezier(.2, .75, .25, 1);
}

.spike-cart-notice.is-visible {
	opacity: 1;
	pointer-events: auto;
	transform: translateY(0) scale(1);
}

.spike-cart-notice__image {
	display: block;
	width: 56px;
	height: 56px;
	border-radius: 10px;
	background: #f5f5f5;
	object-fit: cover;
}

.spike-cart-notice__copy {
	min-width: 0;
	padding: 3px 0;
}

.spike-cart-notice__eyebrow {
	display: block;
	margin-bottom: 4px;
	color: #ff3c3c;
	font-family: var(--spike-font-body, Arial, sans-serif);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: .16em;
	line-height: 1.3;
	text-transform: uppercase;
}

.spike-cart-notice__title {
	display: block;
	overflow: hidden;
	font-family: var(--spike-font-body, Arial, sans-serif);
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.spike-cart-notice__cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 40px;
	margin-right: 26px;
	padding: 0 16px;
	border: 1px solid rgba(255, 255, 255, .08);
	border-radius: 8px;
	background: var(--spike-red-bright, #e00000);
	color: #fff;
	font-family: var(--spike-font-body, Arial, sans-serif);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .1em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

.spike-cart-notice__cart:hover,
.spike-cart-notice__cart:focus-visible {
	background: #b80000;
	color: #fff;
	transform: translateY(-1px);
}

.spike-cart-notice__cart {
	transition: background-color .2s ease, transform .2s ease;
}

.spike-cart-notice__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 30px;
	height: 30px;
	margin: 0;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, .2);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
	font-family: Arial, sans-serif;
	font-size: 18px;
	font-weight: 400;
	line-height: 1;
	opacity: .75;
	transition: background-color .2s ease, border-color .2s ease, opacity .2s ease;
}

.spike-cart-notice__close::before,
.spike-cart-notice__close::after {
	position: absolute;
	top: 13px;
	left: 8px;
	display: block;
	width: 12px;
	height: 1px;
	background: currentColor;
	content: "";
	transform: rotate(45deg);
}

.spike-cart-notice__close::after {
	transform: rotate(-45deg);
}

.spike-cart-notice__close {
	font-size: 0;
}

.spike-cart-notice__close:hover,
.spike-cart-notice__close:focus-visible {
	border-color: rgba(255, 255, 255, .7);
	background: rgba(255, 255, 255, .1);
	opacity: 1;
}

/* The custom toast replaces the duplicate server-rendered message after JS
 * has confirmed the add-to-cart action. Keep the fallback accessible when JS
 * is unavailable. */
.single-product .woocommerce-notices-wrapper .woocommerce-message.spike-cart-notice-consumed {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

/* WooCommerce appends this native helper link after an AJAX add. The
 * persistent notice already provides the cart action, so keep the helper
 * accessible without letting it overlap the product-card button. */
.spike-shop-results ul.products li.product .spike-product-card__media > .added_to_cart {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	white-space: nowrap !important;
}

.spike-shop-results ul.products li.product .spike-product-card__media > .add_to_cart_button.added {
	border-color: var(--spike-black, #000) !important;
	background: var(--spike-black, #000) !important;
	color: var(--spike-white, #fff) !important;
}

@media (prefers-reduced-motion: reduce) {
	.spike-cart-notice {
		transition: none;
	}
}

@media (max-width: 600px) {
	.spike-cart-notice {
		left: 12px;
		right: 12px;
		bottom: 12px;
		width: auto;
		grid-template-columns: 48px minmax(0, 1fr);
		gap: 10px;
		padding: 12px;
	}

	.spike-cart-notice__image {
		width: 48px;
		height: 48px;
	}

	.spike-cart-notice__cart {
		grid-column: 2;
		justify-self: start;
		margin: 0;
		padding: 0 12px;
		font-size: 9px;
	}

	.spike-cart-notice__close {
		top: 6px;
		right: 6px;
		width: 26px;
		height: 26px;
		font-size: 16px;
	}
}
