/**
 * Neuro Product Grid — Single-product purchase buttons.
 *
 * A row of buy actions for the WooCommerce single product page: a filled
 * "Quick checkout" primary, and outlined "Add to cart" / "Order now"
 * secondaries. Tokens live on .npg-buy-row so a theme (or Elementor) can
 * recolour the row without touching this file.
 */

.npg-buy-block {
	--npg-buy-accent: #214d97;
	--npg-buy-accent-ink: #ffffff;
	--npg-buy-ink: #0d1528;
	--npg-buy-muted: #8a909c;
	--npg-buy-border: #c9ccd4;
	--npg-buy-opt-border: #d3d6dc;
	--npg-buy-divider: #e3e1da;
	--npg-buy-serif: 'Fraunces', Georgia, 'Times New Roman', serif;
	--npg-buy-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

	font-family: var(--npg-buy-sans);
	color: var(--npg-buy-ink);
	max-width: 640px;
}

/* ---- Price header -------------------------------------------------------- */

.npg-buy-price {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 12px;
}

.npg-buy-price__amount {
	font-family: var(--npg-buy-serif);
	font-size: 36px;
	font-weight: 600;
	line-height: 1.05;
	color: var(--npg-buy-ink);
}

/* Normalise WooCommerce's price markup so it inherits the serif heading. */
.npg-buy-price__amount .woocommerce-Price-amount,
.npg-buy-price__amount .amount,
.npg-buy-price__amount bdi,
.npg-buy-price__amount ins,
.npg-buy-price__amount del {
	font: inherit;
	color: inherit;
	background: none;
	text-decoration: none;
}

.npg-buy-price__amount del {
	opacity: 0.5;
	font-size: 0.7em;
	margin-right: 0.3em;
}

.npg-buy-price__unit {
	font-size: 14px;
	color: var(--npg-buy-muted);
}

.npg-buy-divider {
	border: 0;
	border-top: 1px solid var(--npg-buy-divider);
	margin: 18px 0;
}

/* ---- Size options -------------------------------------------------------- */

.npg-buy-sizes__label {
	margin: 0 0 12px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--npg-buy-muted);
}

.npg-buy-options {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

.npg-buy-opt {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin: 0;
	padding: 14px 18px;
	font-family: var(--npg-buy-sans);
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	color: var(--npg-buy-ink);
	background: #fff;
	border: 1px solid var(--npg-buy-opt-border);
	border-radius: 2px;
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.npg-buy-opt:hover {
	border-color: var(--npg-buy-accent);
}

.npg-buy-opt.is-active {
	border-color: var(--npg-buy-accent);
	background: color-mix(in srgb, var(--npg-buy-accent) 6%, #fff);
	box-shadow: inset 0 0 0 1px var(--npg-buy-accent);
}

.npg-buy-opt__sep {
	color: var(--npg-buy-muted);
}

.npg-buy-opt:focus-visible {
	outline: 2px solid var(--npg-buy-accent);
	outline-offset: 2px;
}

/* ---- Feature bullets ----------------------------------------------------- */

.npg-buy-features {
	list-style: none;
	margin: 22px 0;
	padding: 0;
}

.npg-buy-features__item {
	position: relative;
	padding-left: 20px;
	margin: 0 0 10px;
	font-size: 14px;
	line-height: 1.4;
	color: var(--npg-buy-ink);
}

.npg-buy-features__item::before {
	content: '';
	position: absolute;
	left: 2px;
	top: 0.5em;
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--npg-buy-accent);
}

/* ---- Buy buttons --------------------------------------------------------- */

.npg-buy-row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 12px;
	margin: 18px 0 0;
}

.npg-buy {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 14px 22px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0.01em;
	text-align: center;
	text-decoration: none;
	border: 1px solid var(--npg-buy-border);
	border-radius: 2px;
	cursor: pointer;
	transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

/* Backgrounds carry !important on every interactive state so a theme rule that
   styles bare <button> on :hover / :focus (e.g. Hello Elementor's pink) can't
   repaint these. Secondary buttons stay white; primary stays accent. */
.npg-buy,
.npg-buy:hover,
.npg-buy:focus,
.npg-buy:focus-visible,
.npg-buy:active {
	background: #fff !important;
	color: var(--npg-buy-ink) !important;
	box-shadow: none !important;
}

/* Primary — filled accent. */
.npg-buy--quick,
.npg-buy--quick:hover,
.npg-buy--quick:focus,
.npg-buy--quick:focus-visible,
.npg-buy--quick:active {
	background: var(--npg-buy-accent) !important;
	border-color: var(--npg-buy-accent);
	color: var(--npg-buy-accent-ink) !important;
}

.npg-buy--quick:hover,
.npg-buy--quick:focus-visible {
	background: color-mix(in srgb, #000 12%, var(--npg-buy-accent)) !important;
	border-color: color-mix(in srgb, #000 12%, var(--npg-buy-accent));
}

/* Secondary — outlined; accent border + ink on hover/focus, white fill kept. */
.npg-buy--cart:hover,
.npg-buy--cart:focus,
.npg-buy--cart:focus-visible,
.npg-buy--order:hover,
.npg-buy--order:focus,
.npg-buy--order:focus-visible {
	border-color: var(--npg-buy-accent);
	color: var(--npg-buy-accent) !important;
}

.npg-buy:focus-visible {
	outline: 2px solid var(--npg-buy-accent);
	outline-offset: 2px;
}

.npg-buy__arrow {
	font-size: 1em;
	line-height: 1;
}

/* Busy / disabled state while the AJAX request is in flight. */
.npg-buy.is-busy,
.npg-buy:disabled {
	opacity: 0.65;
	cursor: progress;
}

@media (max-width: 520px) {
	.npg-buy-row {
		flex-direction: column;
	}

	.npg-buy {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.npg-buy {
		transition: none;
	}
}
