/*
 * Nord System - Devis : front-end styles.
 *
 * Everything is scoped under `.nsd` so it can sit inside a Woodmart product
 * page or a builder page without leaking into, or inheriting from, the theme.
 * Design tokens mirror the reference site (nordsystemdistribution.fr) so the
 * WooCommerce catalogue and the marketing site feel like one brand.
 */

.nsd {
	--nsd-bg: #f7f6f4;
	--nsd-fg: #1a1c1e;
	--nsd-primary: #85be14;
	--nsd-primary-dark: #72a810;
	--nsd-accent: #ff8200;
	--nsd-secondary: #383e42;
	--nsd-muted: #eceae6;
	--nsd-muted-fg: #5a5e62;
	--nsd-card: #ffffff;
	--nsd-border: #e0ddd8;
	--nsd-radius: 2px;
	--nsd-sans: "DM Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
	--nsd-serif: "Fraunces", "Iowan Old Style", "Times New Roman", serif;
	--nsd-shadow: 0 8px 24px rgba(26, 28, 30, 0.08);
	--nsd-shadow-gold: 0 8px 24px rgba(133, 190, 20, 0.35);

	box-sizing: border-box;
	color: var(--nsd-fg);
	font-family: var(--nsd-sans);
	font-weight: 400;
	line-height: 1.55;
}

.nsd *,
.nsd *::before,
.nsd *::after {
	box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
	.nsd {
		--nsd-bg: #16181a;
		--nsd-fg: #f2f1ee;
		--nsd-muted: #232629;
		--nsd-muted-fg: #a4a8ac;
		--nsd-card: #1d2023;
		--nsd-border: #33383c;
		--nsd-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
	}
}

/* -------------------------------------------------------------- Primitives */

.nsd-label {
	margin: 0 0 0.75rem;
	font-family: var(--nsd-sans);
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.4em;
	text-transform: uppercase;
	color: var(--nsd-primary);
}

.nsd-label__value {
	color: var(--nsd-muted-fg);
	font-weight: 400;
	letter-spacing: normal;
	text-transform: none;
}

.nsd-icon {
	flex: 0 0 auto;
}

.nsd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-height: 52px;
	padding: 1rem 2.25rem;
	border: 1.5px solid transparent;
	border-radius: var(--nsd-radius);
	font-family: var(--nsd-sans);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease,
		box-shadow 0.3s ease, border-color 0.3s ease;
}

.nsd-btn--block {
	width: 100%;
}

.nsd-btn--gold {
	background-color: var(--nsd-primary);
	color: #fff;
}

.nsd-btn--gold:hover:not(:disabled) {
	background-color: var(--nsd-primary-dark);
	transform: translateY(-2px);
	box-shadow: var(--nsd-shadow-gold);
	color: #fff;
}

.nsd-btn--outline {
	border-color: var(--nsd-fg);
	color: var(--nsd-fg);
	font-weight: 600;
	background: transparent;
}

.nsd-btn--outline:hover {
	background-color: var(--nsd-fg);
	color: var(--nsd-bg);
}

.nsd-btn--ghost {
	border-color: var(--nsd-border);
	color: var(--nsd-muted-fg);
	background: transparent;
	font-weight: 600;
}

.nsd-btn--ghost:hover {
	border-color: var(--nsd-primary);
	color: var(--nsd-fg);
}

.nsd-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.nsd-btn.is-busy {
	position: relative;
	color: transparent !important;
}

.nsd-btn.is-busy::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: nsd-spin 0.7s linear infinite;
}

@keyframes nsd-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ----------------------------------------------------------- Configurator */

.nsd-configurator {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 1.75rem;
	background: var(--nsd-card);
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
}

.nsd-config__title {
	margin: 0;
	font-family: var(--nsd-serif);
	font-size: 1.35rem;
	font-weight: 600;
	line-height: 1.2;
	color: var(--nsd-fg);
}

.nsd-config__delay {
	margin: 0;
	text-align: center;
	font-size: 0.72rem;
	color: var(--nsd-muted-fg);
	letter-spacing: 0.04em;
}

.nsd-field {
	margin: 0;
}

.nsd-options {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.nsd-option {
	min-height: 40px;
	padding: 0.5rem 0.875rem;
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-card);
	color: var(--nsd-fg);
	font-family: var(--nsd-sans);
	font-size: 0.8rem;
	font-weight: 500;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s, color 0.2s;
}

.nsd-option:hover {
	border-color: var(--nsd-primary);
}

.nsd-option.is-selected {
	border-color: var(--nsd-primary);
	background: var(--nsd-primary);
	color: #fff;
}

/* Custom dimension inputs */

.nsd-custom-dims {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
	margin-top: 0.875rem;
	padding: 1rem;
	background: color-mix(in srgb, var(--nsd-muted) 55%, transparent);
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
}

.nsd-custom-dims[hidden] {
	display: none;
}

.nsd-custom-dims__field {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	flex: 1 1 120px;
}

.nsd-custom-dims__field span {
	font-size: 0.7rem;
	color: var(--nsd-muted-fg);
	letter-spacing: 0.02em;
}

.nsd-custom-dims__field input {
	width: 100%;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-card);
	color: var(--nsd-fg);
	font-family: var(--nsd-sans);
	font-size: 0.85rem;
}

.nsd-custom-dims__field input:focus {
	outline: none;
	border-color: var(--nsd-primary);
}

.nsd-custom-dims__x {
	padding-bottom: 0.6rem;
	color: var(--nsd-muted-fg);
	font-size: 1rem;
}

.nsd-custom-dims__unit {
	padding-bottom: 0.6rem;
	font-size: 0.75rem;
	color: var(--nsd-muted-fg);
}

/* Colour swatches */

.nsd-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

/*
 * The button is only a hit area : the colour is painted by the inner chip.
 * Themes (Woodmart among them) repaint every `button` background, which would
 * otherwise turn every swatch into the same grey circle.
 */
.nsd .nsd-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: none !important;
	box-shadow: none;
	cursor: pointer;
	transition: transform 0.14s ease;
}

.nsd .nsd-swatch__chip {
	display: block;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	border: 1px solid rgba(26, 28, 30, 0.16);
	box-shadow: inset 0 -2px 6px rgba(26, 28, 30, 0.12);
	transition: box-shadow 0.14s ease;
}

.nsd .nsd-swatch:hover {
	transform: scale(1.06);
}

.nsd .nsd-swatch.is-selected {
	transform: scale(1.04);
}

.nsd .nsd-swatch.is-selected .nsd-swatch__chip {
	box-shadow: 0 0 0 2px var(--nsd-card), 0 0 0 4px var(--nsd-primary),
		inset 0 -2px 6px rgba(26, 28, 30, 0.12);
}

/* Extras grid */

.nsd-extras {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.5rem;
}

@media (min-width: 480px) {
	.nsd-extras {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.nsd-extra {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	min-height: 72px;
	padding: 0.75rem;
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-card);
	color: var(--nsd-muted-fg);
	font-family: var(--nsd-sans);
	font-size: 0.72rem;
	font-weight: 500;
	line-height: 1.25;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s, background-color 0.2s;
}

.nsd-extra:hover {
	border-color: color-mix(in srgb, var(--nsd-primary) 45%, transparent);
	color: var(--nsd-fg);
}

.nsd-extra.is-selected {
	border-color: var(--nsd-primary);
	color: var(--nsd-fg);
	background: color-mix(in srgb, var(--nsd-primary) 10%, transparent);
}

.nsd-extra.is-selected .nsd-icon {
	color: var(--nsd-primary);
}

.nsd-extra__label {
	display: block;
}

/* Quantity */

.nsd-qty {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.nsd-qty__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-card);
	color: var(--nsd-fg);
	font-size: 1.1rem;
	cursor: pointer;
	transition: border-color 0.2s;
}

.nsd-qty__btn .nsd-icon {
	display: none;
}

.nsd-qty__btn:hover {
	border-color: var(--nsd-primary);
}

.nsd-qty__value {
	min-width: 2rem;
	text-align: center;
	font-weight: 600;
	font-size: 1.1rem;
}

/* Notes */

.nsd-textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-bg);
	color: var(--nsd-fg);
	font-family: var(--nsd-sans);
	font-size: 0.85rem;
	font-weight: 300;
	resize: vertical;
	transition: border-color 0.2s;
}

.nsd-textarea:focus {
	outline: none;
	border-color: var(--nsd-primary);
}

/* Summary */

.nsd-summary {
	padding: 1rem;
	background: color-mix(in srgb, var(--nsd-muted) 50%, transparent);
	border: 1px solid color-mix(in srgb, var(--nsd-border) 60%, transparent);
	border-radius: var(--nsd-radius);
}

.nsd-summary__list {
	margin: 0;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.nsd-summary__row {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
	padding-bottom: 0.4rem;
	border-bottom: 1px solid color-mix(in srgb, var(--nsd-border) 40%, transparent);
	font-size: 0.78rem;
}

.nsd-summary__row:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.nsd-summary__row dt {
	margin: 0;
	flex: 0 0 auto;
	color: var(--nsd-muted-fg);
}

.nsd-summary__row dd {
	margin: 0;
	max-width: 60%;
	text-align: right;
	font-weight: 500;
	overflow-wrap: anywhere;
}

/* Toast */

.nsd-toast {
	position: fixed;
	left: 50%;
	bottom: 1.5rem;
	transform: translate(-50%, 1rem);
	z-index: 9999;
	max-width: min(90vw, 360px);
	padding: 0.875rem 1.25rem;
	background: var(--nsd-secondary);
	color: #fff;
	border-radius: var(--nsd-radius);
	box-shadow: var(--nsd-shadow);
	font-size: 0.85rem;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.nsd-toast[hidden] {
	display: none;
}

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

.nsd-toast.is-error {
	background: #b3261e;
}

/* ----------------------------------------------------------- Quote basket */

.nsd-basket {
	display: grid;
	gap: 2rem;
}

@media (min-width: 900px) {
	.nsd-basket {
		grid-template-columns: minmax(0, 1fr) 320px;
		align-items: start;
	}
}

.nsd-eyebrow {
	margin: 0 0 0.5rem;
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.4em;
	text-transform: uppercase;
	color: var(--nsd-primary);
}

.nsd-basket__title,
.nsd-quote__title {
	margin: 0 0 1.5rem;
	font-family: var(--nsd-serif);
	font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
	font-weight: 600;
	line-height: 1.1;
}

.nsd-lines {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.nsd-line {
	display: grid;
	grid-template-columns: 84px minmax(0, 1fr);
	gap: 1rem;
	padding: 1.25rem;
	background: var(--nsd-card);
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
}

.nsd-line__media {
	width: 84px;
	height: 84px;
	border-radius: var(--nsd-radius);
	overflow: hidden;
	background: var(--nsd-muted);
}

.nsd-line__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nsd-line__body {
	min-width: 0;
}

.nsd-line__cat {
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.3em;
	text-transform: uppercase;
	color: var(--nsd-primary);
}

.nsd-line__name {
	margin: 0.25rem 0 0.5rem;
	font-family: var(--nsd-serif);
	font-size: 1.1rem;
	font-weight: 600;
}

.nsd-line__specs {
	margin: 0 0 0.75rem;
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1rem;
	font-size: 0.78rem;
	color: var(--nsd-muted-fg);
}

.nsd-line__spec strong {
	color: var(--nsd-fg);
	font-weight: 500;
}

.nsd-line__notes {
	margin: 0 0 0.75rem;
	font-size: 0.75rem;
	color: var(--nsd-muted-fg);
	font-style: italic;
}

.nsd-line__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}

/*
 * "Retirer" used to be a bare underlined word and visitors missed it. It is now
 * a real, labelled control with a hit area big enough for a thumb.
 */
.nsd .nsd-line__remove {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	min-height: 36px;
	padding: 0.4rem 0.85rem;
	border: 1px solid var(--nsd-border) !important;
	border-radius: var(--nsd-radius);
	background: var(--nsd-card) !important;
	color: var(--nsd-muted-fg) !important;
	font-family: var(--nsd-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-decoration: none;
	cursor: pointer;
	transition: border-color 0.14s ease, color 0.14s ease, background-color 0.14s ease;
}

.nsd .nsd-line__remove:hover,
.nsd .nsd-line__remove:focus-visible {
	border-color: #b3261e !important;
	background: color-mix(in srgb, #b3261e 8%, var(--nsd-card)) !important;
	color: #b3261e !important;
}

.nsd .nsd-line__remove .nsd-icon {
	width: 16px;
	height: 16px;
}

.nsd-mini-qty {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.nsd-mini-qty button {
	width: 2rem;
	height: 2rem;
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-card);
	color: var(--nsd-fg);
	cursor: pointer;
	font-size: 1rem;
}

.nsd-mini-qty button:hover {
	border-color: var(--nsd-primary);
}

.nsd-mini-qty span {
	min-width: 1.5rem;
	text-align: center;
	font-weight: 600;
	font-size: 0.9rem;
}

/* Basket aside */

.nsd-aside {
	position: sticky;
	top: 1.5rem;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	padding: 1.5rem;
	background: var(--nsd-card);
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
}

.nsd-aside__row {
	display: flex;
	justify-content: space-between;
	font-size: 0.85rem;
	color: var(--nsd-muted-fg);
}

.nsd-aside__row strong {
	color: var(--nsd-fg);
}

.nsd-upload-cta {
	display: block;
	padding: 1.25rem;
	background: var(--nsd-card);
	border: 1px dashed var(--nsd-border);
	border-radius: var(--nsd-radius);
}

.nsd-upload-cta h3 {
	margin: 0 0 0.5rem;
	font-family: var(--nsd-serif);
	font-size: 1.05rem;
	font-weight: 600;
}

.nsd-upload-cta p {
	margin: 0 0 1rem;
	font-size: 0.82rem;
	color: var(--nsd-muted-fg);
}

/* Empty state */

.nsd-empty {
	padding: 3rem 1.5rem;
	text-align: center;
	background: var(--nsd-card);
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
}

.nsd-empty__icon {
	color: var(--nsd-primary);
	margin-bottom: 1rem;
}

.nsd-empty h2 {
	margin: 0 0 0.75rem;
	font-family: var(--nsd-serif);
	font-size: 1.5rem;
	font-weight: 600;
}

.nsd-empty p {
	margin: 0 auto 1.5rem;
	max-width: 42ch;
	color: var(--nsd-muted-fg);
}

.nsd-empty__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	justify-content: center;
}

/* ----------------------------------------------------------- Quote form */

.nsd-quote {
	max-width: 720px;
	margin: 0 auto;
}

.nsd-quote__intro {
	margin: 0 0 2rem;
	color: var(--nsd-muted-fg);
}

.nsd-form {
	display: flex;
	flex-direction: column;
	gap: 2rem;
}

.nsd-fieldset {
	margin: 0;
	padding: 1.5rem;
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-card);
}

.nsd-fieldset legend {
	padding: 0 0.5rem;
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.4em;
	text-transform: uppercase;
	color: var(--nsd-primary);
}

.nsd-grid {
	display: grid;
	gap: 1rem;
}

@media (min-width: 560px) {
	.nsd-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.nsd-input-group {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
}

.nsd-input-group--full {
	grid-column: 1 / -1;
}

.nsd-input-group label {
	font-size: 0.78rem;
	font-weight: 500;
	color: var(--nsd-fg);
}

.nsd-input-group .nsd-required {
	color: var(--nsd-accent);
}

.nsd-input,
.nsd-select {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-bg);
	color: var(--nsd-fg);
	font-family: var(--nsd-sans);
	font-size: 0.9rem;
}

.nsd-input:focus,
.nsd-select:focus {
	outline: none;
	border-color: var(--nsd-primary);
}

.nsd-input--invalid {
	border-color: #b3261e;
}

/* Dropzone */

.nsd-dropzone {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 2rem 1.5rem;
	border: 2px dashed var(--nsd-border);
	border-radius: var(--nsd-radius);
	background: var(--nsd-bg);
	color: var(--nsd-muted-fg);
	text-align: center;
	cursor: pointer;
	transition: border-color 0.2s, background-color 0.2s;
}

.nsd-dropzone.is-dragover {
	border-color: var(--nsd-primary);
	background: color-mix(in srgb, var(--nsd-primary) 8%, transparent);
}

.nsd-dropzone__hint {
	font-size: 0.75rem;
}

.nsd-dropzone strong {
	color: var(--nsd-fg);
}

.nsd-filelist {
	margin: 1rem 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.nsd-filelist li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.5rem 0.75rem;
	background: var(--nsd-muted);
	border-radius: var(--nsd-radius);
	font-size: 0.8rem;
}

.nsd-filelist button {
	border: 0;
	background: none;
	color: var(--nsd-muted-fg);
	cursor: pointer;
	font-size: 1rem;
	line-height: 1;
}

.nsd-filelist button:hover {
	color: #b3261e;
}

.nsd-consent {
	display: flex;
	gap: 0.6rem;
	align-items: flex-start;
	font-size: 0.78rem;
	color: var(--nsd-muted-fg);
}

.nsd-consent input {
	margin-top: 0.2rem;
	accent-color: var(--nsd-primary);
}

.nsd-consent a {
	color: var(--nsd-primary);
}

.nsd-form__feedback {
	margin: 0;
	padding: 0.875rem 1.25rem;
	border-radius: var(--nsd-radius);
	font-size: 0.85rem;
}

.nsd-form__feedback[hidden] {
	display: none;
}

.nsd-form__feedback.is-error {
	background: color-mix(in srgb, #b3261e 12%, transparent);
	color: #b3261e;
}

.nsd-form__feedback.is-success {
	background: color-mix(in srgb, var(--nsd-primary) 14%, transparent);
	color: var(--nsd-primary-dark);
}

/* Honeypot : visually and semantically hidden from real users. */
.nsd-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* Success panel */

.nsd-success {
	text-align: center;
	padding: 3rem 1.5rem;
}

.nsd-success__icon {
	color: var(--nsd-primary);
	margin-bottom: 1rem;
}

.nsd-success h2 {
	font-family: var(--nsd-serif);
	font-size: 1.75rem;
	margin: 0 0 0.75rem;
}

/* ----------------------------------------------------------- Header badge */

.nsd-badge {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 1rem;
	border: 1.5px solid var(--nsd-fg);
	border-radius: var(--nsd-radius);
	color: var(--nsd-fg);
	font-family: var(--nsd-sans);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color 0.3s, color 0.3s;
}

.nsd-badge:hover {
	background: var(--nsd-fg);
	color: var(--nsd-bg);
}

.nsd-badge__count {
	position: absolute;
	top: -8px;
	right: -8px;
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--nsd-accent);
	color: #fff;
	border-radius: 999px;
	font-size: 0.62rem;
	font-weight: 700;
	line-height: 1;
}

.nsd-badge__count[data-count="0"] {
	display: none;
}

/*
 * Card call to action. It lives inside the theme's product card, outside the
 * `.nsd` scope, so every declaration has to stand on its own.
 */
.nsd-loop-button {
	display: block;
	width: 100%;
	margin-top: 0.75rem;
	padding: 0.7rem 1rem !important;
	background-color: #85be14 !important;
	color: #fff !important;
	border: 1.5px solid #85be14 !important;
	border-radius: 2px !important;
	font-family: "DM Sans", "Segoe UI", system-ui, sans-serif;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	font-size: 0.72rem;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.16s ease, border-color 0.16s ease;
}

.nsd-loop-button:hover,
.nsd-loop-button:focus-visible {
	background-color: #72a810 !important;
	border-color: #72a810 !important;
	color: #fff !important;
}

/* Secondary variant : the product exists but cannot be bought right now. */
.nsd-loop-button--ghost {
	background-color: transparent !important;
	border-color: #1a1c1e !important;
	color: #1a1c1e !important;
}

.nsd-loop-button--ghost:hover,
.nsd-loop-button--ghost:focus-visible {
	background-color: #1a1c1e !important;
	border-color: #1a1c1e !important;
	color: #fff !important;
}

/* ------------------------------------------------- Interaction refinements */

/*
 * `hidden` has to win against theme rules that force `display` on layout
 * containers, otherwise the empty state and the basket would stack.
 */
.nsd [hidden] {
	display: none !important;
}

/*
 * Selections must feel instantaneous. The previous 0.2s–0.3s curves read as lag
 * on a page where a visitor clicks a dozen options in a row.
 */
.nsd .nsd-option,
.nsd .nsd-extra,
.nsd .nsd-qty__btn,
.nsd .nsd-mini-qty button {
	transition-duration: 0.12s;
}

.nsd .nsd-btn {
	transition-duration: 0.16s;
}

.nsd .nsd-option:active,
.nsd .nsd-extra:active,
.nsd .nsd-swatch:active {
	transform: scale(0.97);
}

/* Visible keyboard focus everywhere, including inside themed buttons. */
.nsd :focus-visible {
	outline: 2px solid var(--nsd-primary);
	outline-offset: 2px;
}

/* Selected states deserve more than a colour change. */
.nsd .nsd-option.is-selected {
	box-shadow: 0 2px 8px color-mix(in srgb, var(--nsd-primary) 35%, transparent);
}

.nsd .nsd-extra.is-selected {
	box-shadow: inset 0 0 0 1px var(--nsd-primary);
}

/* Confirmation shown on the add button once the server has stored the line. */
.nsd .nsd-btn.is-added {
	background-color: var(--nsd-secondary);
	color: #fff;
}

/* A line being removed collapses instead of blinking out. */
.nsd .nsd-line {
	transition: opacity 0.16s ease, transform 0.16s ease;
}

.nsd .nsd-line.is-removing {
	opacity: 0.45;
	transform: scale(0.99);
	pointer-events: none;
}

/* Secondary, destructive-ish action : readable, never mistaken for a CTA. */
.nsd .nsd-linkbtn {
	align-self: center;
	padding: 0.4rem 0.5rem;
	border: 0 !important;
	background: none !important;
	color: var(--nsd-muted-fg) !important;
	font-family: var(--nsd-sans);
	font-size: 0.75rem;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.nsd .nsd-linkbtn:hover {
	color: #b3261e !important;
}

.nsd-basket__lead {
	margin: -0.75rem 0 1.75rem;
	max-width: 56ch;
	font-size: 0.92rem;
	color: var(--nsd-muted-fg);
}

.nsd-aside__note {
	margin: 0;
	text-align: center;
	font-size: 0.72rem;
	color: var(--nsd-muted-fg);
}

/* The summary is the decision aid : give it the weight of one. */
.nsd .nsd-summary {
	border-left: 3px solid var(--nsd-primary);
}

/* ------------------------------------------------------ Theme button reset */

/*
 * Woodmart repaints every `<button>` element on the page : grey background, no
 * border, no radius, its own typography. Our controls are buttons, so without
 * this block the swatches, the options, the extras and — worst of all — the
 * primary call to action all render as the same grey rectangle.
 *
 * The single-class rules above lose to the theme's own selectors, hence the
 * explicit overrides here. They are deliberately grouped in one place so the
 * cost of coexisting with the theme stays visible and easy to revisit.
 */
.nsd button {
	appearance: none;
	-webkit-appearance: none;
	font-family: var(--nsd-sans);
	line-height: 1.4;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	min-width: 0;
}

.nsd .nsd-option,
.nsd .nsd-extra,
.nsd .nsd-qty__btn,
.nsd .nsd-mini-qty button {
	background-color: var(--nsd-card) !important;
	color: var(--nsd-fg) !important;
	border: 1px solid var(--nsd-border) !important;
	border-radius: var(--nsd-radius) !important;
}

.nsd .nsd-extra {
	color: var(--nsd-muted-fg) !important;
}

.nsd .nsd-option:hover,
.nsd .nsd-extra:hover,
.nsd .nsd-qty__btn:hover,
.nsd .nsd-mini-qty button:hover {
	border-color: var(--nsd-primary) !important;
	color: var(--nsd-fg) !important;
}

.nsd .nsd-option.is-selected {
	background-color: var(--nsd-primary) !important;
	border-color: var(--nsd-primary) !important;
	color: #fff !important;
}

.nsd .nsd-extra.is-selected {
	background-color: color-mix(in srgb, var(--nsd-primary) 10%, var(--nsd-card)) !important;
	border-color: var(--nsd-primary) !important;
	color: var(--nsd-fg) !important;
}

/* The call to action must read as the call to action. */
.nsd button.nsd-btn--gold,
.nsd a.nsd-btn--gold {
	background-color: var(--nsd-primary) !important;
	border-color: var(--nsd-primary) !important;
	color: #fff !important;
	border-radius: var(--nsd-radius) !important;
	text-transform: uppercase;
	letter-spacing: 0.18em;
}

.nsd button.nsd-btn--gold:hover:not(:disabled),
.nsd a.nsd-btn--gold:hover {
	background-color: var(--nsd-primary-dark) !important;
}

.nsd button.nsd-btn--outline,
.nsd a.nsd-btn--outline {
	background-color: transparent !important;
	border: 1.5px solid var(--nsd-fg) !important;
	color: var(--nsd-fg) !important;
	border-radius: var(--nsd-radius) !important;
}

.nsd button.nsd-btn--outline:hover,
.nsd a.nsd-btn--outline:hover {
	background-color: var(--nsd-fg) !important;
	color: var(--nsd-bg) !important;
}

.nsd .nsd-btn.is-added {
	background-color: var(--nsd-secondary) !important;
	border-color: var(--nsd-secondary) !important;
	color: #fff !important;
}

/* -------------------------------------------------- Same-family navigation */

.nsd-siblings {
	margin: 3rem 0;
	padding: 2rem 0 0;
	border-top: 1px solid var(--nsd-border);
}

.nsd-siblings__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.75rem 1.5rem;
	margin-bottom: 1.5rem;
}

.nsd-siblings__title {
	margin: 0;
	font-family: var(--nsd-serif);
	font-size: clamp(1.25rem, 1rem + 1vw, 1.75rem);
	font-weight: 600;
	line-height: 1.15;
}

.nsd-siblings__all {
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--nsd-primary);
	text-decoration: none;
	white-space: nowrap;
	border-bottom: 1px solid transparent;
}

.nsd-siblings__all:hover {
	border-bottom-color: var(--nsd-primary);
	color: var(--nsd-primary-dark);
}

.nsd-siblings__list {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 640px) {
	.nsd-siblings__list {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.nsd-siblings__list {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

.nsd-sibling {
	margin: 0;
	list-style: none;
}

.nsd-sibling__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	background: var(--nsd-card);
	border: 1px solid var(--nsd-border);
	border-radius: var(--nsd-radius);
	overflow: hidden;
	text-decoration: none;
	color: var(--nsd-fg);
	transition: border-color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.nsd-sibling__link:hover {
	border-color: var(--nsd-primary);
	transform: translateY(-2px);
	box-shadow: var(--nsd-shadow);
	color: var(--nsd-fg);
}

.nsd-sibling__media {
	display: block;
	aspect-ratio: 4 / 3;
	background: var(--nsd-muted);
	overflow: hidden;
}

.nsd-sibling__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.nsd-sibling__name {
	display: block;
	padding: 0.875rem 1rem 0.5rem;
	font-family: var(--nsd-serif);
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.25;
}

.nsd-sibling__cta {
	display: block;
	margin-top: auto;
	padding: 0 1rem 1rem;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--nsd-primary);
}

@media (prefers-reduced-motion: reduce) {
	.nsd *,
	.nsd *::before,
	.nsd *::after {
		transition: none !important;
		animation: none !important;
	}
}
