.af-nm {
	--af-nm-surface: var(--wp--preset--color--white, #fff);
	--af-nm-text: var(--e-global-color-text, var(--wp--preset--color--contrast, #1a1a1a));
	--af-nm-accent: var(--e-global-color-primary, var(--wp--preset--color--primary, #1a1a1a));
	--af-nm-radius: 16px;
}

/* Don't restyle the single ATC look — inherit theme .button / .single_add_to_cart_button */
.af-nm__trigger--single.single_add_to_cart_button {
	cursor: pointer;
}

.af-nm__trigger--single.single_add_to_cart_button[hidden] {
	display: none !important;
}

.af-nm__cart {
	margin: 0;
}

.af-nm__fallback:not([hidden]) {
	display: block;
	margin: 1rem 0;
}

/* Hide leftover WooCommerce OOS notices on single product. */
.single-product .stock.out-of-stock {
	display: none !important;
}

body.af-nm-open {
	overflow: hidden;
}

.af-nm__overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	box-sizing: border-box;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.af-nm__overlay[hidden] {
	display: flex;
}

.af-nm__overlay.is-open {
	opacity: 1;
	visibility: visible;
}

.af-nm__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(17, 17, 17, 0.55);
	background: color-mix(in srgb, var(--af-nm-text) 55%, transparent);
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.af-nm__panel {
	position: relative;
	width: min(440px, 100%);
	margin-top: clamp(24px, 10vh, 80px);
	padding: 28px 24px 24px;
	border: 1px solid color-mix(in srgb, var(--af-nm-text) 12%, transparent);
	border-radius: var(--af-nm-radius);
	background: var(--af-nm-surface);
	color: var(--af-nm-text);
	box-shadow: 0 24px 64px color-mix(in srgb, var(--af-nm-text) 18%, transparent);
	transform: translateY(-16px) scale(0.98);
	opacity: 0;
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}

.af-nm__overlay.is-open .af-nm__panel {
	transform: translateY(0) scale(1);
	opacity: 1;
}

.af-nm__top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 8px;
}

.af-nm__eyebrow {
	margin: 0 0 4px;
	font-size: 12px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	opacity: 0.65;
}

.af-nm__title {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 650;
	line-height: 1.2;
}

.af-nm__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: -8px -8px 0 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.af-nm__close:hover,
.af-nm__close:focus-visible {
	background: color-mix(in srgb, var(--af-nm-text) 8%, transparent);
	outline: none;
}

.af-nm__product {
	margin: 0 0 8px;
	font-size: 0.95rem;
	font-weight: 600;
}

.af-nm__product:empty {
	display: none;
}

.af-nm__hint {
	margin: 0 0 20px;
	font-size: 0.92rem;
	line-height: 1.45;
	opacity: 0.75;
}

.af-nm__form {
	display: grid;
	gap: 14px;
}

.af-nm__field {
	display: grid;
	gap: 6px;
}

.af-nm__label {
	font-size: 0.82rem;
	font-weight: 600;
}

.af-nm__label abbr {
	text-decoration: none;
	color: #b42318;
}

.af-nm__input {
	width: 100%;
	box-sizing: border-box;
	padding: 12px 14px;
	border: 1px solid rgba(17, 17, 17, 0.18);
	border: 1px solid color-mix(in srgb, var(--af-nm-text) 18%, transparent);
	border-radius: 10px;
	background: color-mix(in srgb, var(--af-nm-text) 3%, var(--af-nm-surface));
	color: inherit;
	font: inherit;
	font-size: 16px;
	-webkit-appearance: none;
	appearance: none;
}

.af-nm__input:focus {
	outline: 2px solid color-mix(in srgb, var(--af-nm-accent) 45%, transparent);
	outline-offset: 1px;
	border-color: color-mix(in srgb, var(--af-nm-text) 40%, transparent);
}

.af-nm__textarea {
	resize: vertical;
	min-height: 84px;
}

.af-nm__message {
	margin: 0;
	padding: 10px 12px;
	border-radius: 8px;
	font-size: 0.88rem;
	line-height: 1.4;
}

.af-nm__message.is-error {
	background: color-mix(in srgb, #b42318 10%, transparent);
	color: #b42318;
}

.af-nm__message.is-success {
	background: color-mix(in srgb, #067647 10%, transparent);
	color: #067647;
}

.af-nm__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	margin-top: 4px;
	padding: 0.85em 1.4em;
	border: 0;
	border-radius: 999px;
	background: var(--af-nm-text);
	color: var(--af-nm-surface);
	font: inherit;
	font-weight: 650;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	-webkit-tap-highlight-color: transparent;
}

.af-nm__submit:hover,
.af-nm__submit:focus-visible {
	opacity: 0.9;
	outline: none;
}

.af-nm__submit:disabled {
	opacity: 0.65;
	cursor: wait;
}

@media (max-width: 560px) {
	.af-nm__panel {
		margin-top: 12px;
		padding: 22px 18px 18px;
	}
}
