/* Nido site chrome: nav, menu sheet, footer (2026-11-11). Loads after tokens.css, bundle.css,
   style.css and nido-fonts-icons.css. Only printed while inc/nido-design-system.php is on.
   Every rule is scoped to #nd-header, #nd-menu or #nd-footer: page content is untouched.
   The !important flags answer style.css rules that are themselves !important
   (a, a:hover, nav a, p, button[type=submit], .button). */

@font-face {
	font-family: "Jost";
	src: url("fonts/jost-300-500-latin.woff2") format("woff2");
	font-weight: 300 500;
	font-style: normal;
	font-display: swap;
}

/* ── Shared ─────────────────────────────────────────────────────────── */
.nd-chrome,
.nd-chrome * {
	font-family: var(--font-sans) !important;
	letter-spacing: normal;
	text-transform: none;
}
.nd-chrome .nd-eyebrow { letter-spacing: .18em; text-transform: uppercase; }
.nd-chrome a { color: inherit !important; text-decoration: none !important; }
.nd-chrome a:hover { color: inherit !important; }
.nd-chrome svg { flex: none; }
.nd-badge[hidden] { display: none !important; }
.nd-chrome .nd-badge { font-weight: 400; }
.nd-chrome .nd-badge--light { background: var(--white); color: var(--charcoal); }
.nd-chrome button {
	margin: 0 !important;
	line-height: 1.2 !important;
	font-weight: 400 !important;
	letter-spacing: normal !important;
	box-shadow: none;
}
.nd-chrome :focus-visible { outline: 2px solid var(--charcoal) !important; outline-offset: 3px; }
#nd-footer :focus-visible,
#nd-header .nd-nav--on-photo :focus-visible { outline-color: var(--white) !important; }
.nd-chrome .nd-sr { position: absolute !important; }

/* ── Nav bar ────────────────────────────────────────────────────────────
   Floating, inset 16px at the sides. The top inset is 8px and the bar 60px, so it ends at
   68px: inside the 71px header band every page and sticky offset is keyed to (RULES.md). */
#nd-header {
	position: fixed;
	top: 8px;
	left: 16px;
	right: 16px;
	z-index: 9990;
	padding: 0;
	background: transparent;
	pointer-events: none;
}
body.admin-bar #nd-header { top: 40px; }
@media (max-width: 782px) { body.admin-bar #nd-header { top: 54px; } }
#nd-header .nd-nav {
	pointer-events: auto;
	max-width: 1408px; /* 1440 minus the 16px insets */
	margin: 0 auto;
	padding: 8px 8px 8px 20px;
	gap: 16px;
	transition: background-color .24s var(--ease), color .24s var(--ease);
}
#nd-header .nd-nav__logo { flex: none; align-items: center; }
/* Logo: the kit SVGs have the NIDO letters 100 of 112 units tall, so 22px letters = 24.64px image. */
#nd-header .nd-nav__logo img,
#nd-menu .nd-sheet__bar img { height: 24.64px; width: auto; display: block; }
#nd-header .nd-nav__logo img.nd-logo--light { display: none; }
#nd-header .nd-nav--on-photo .nd-nav__logo img.nd-logo--dark { display: none; }
#nd-header .nd-nav--on-photo .nd-nav__logo img.nd-logo--light { display: block; }

/* Logo hover: STONES (cut from the horizontal lockup, viewBox x 405-583) wipes out of the O and
   slides 14px into place. It lands exactly where the kit's horizontal lockup has it, so the
   resting "open" state is the approved lockup. Wide screens with a pointer only: below 1181px
   the links sit too close to the wordmark for the 47px it needs. */
#nd-header .nd-nav__logo { position: relative; }
#nd-header .nd-nav__logo img.nd-logo-stones {
	position: absolute; top: 50%; left: calc(24.64px * 405 / 112);
	height: 24.64px; width: auto; pointer-events: none;
	opacity: 0; transform: translate(-14px, -50%); clip-path: inset(0 100% 0 0);
	transition: opacity .3s var(--ease), transform .5s var(--ease), clip-path .5s var(--ease);
}
@media (hover: hover) and (min-width: 1181px) {
	#nd-header .nd-nav__logo:hover img.nd-logo-stones,
	#nd-header .nd-nav__logo:focus-visible img.nd-logo-stones {
		opacity: 1; transform: translate(0, -50%); clip-path: inset(0 0 0 0);
	}
}
@media (max-width: 1180px) { #nd-header .nd-nav__logo img.nd-logo-stones { display: none !important; } }

#nd-header .nd-nav__links { gap: 28px; font-size: 16px; line-height: 1.2; }
#nd-header .nd-nav__links a { padding: 12px 0; }
#nd-header .nd-nav__links a[aria-current] { text-decoration: underline !important; text-underline-offset: 6px; }
#nd-header .nd-nav__links a:hover { text-decoration: underline !important; text-underline-offset: 6px; }
#nd-header .nd-nav__icon { background: transparent !important; color: inherit !important; padding: 0 10px !important; min-height: 44px; border-radius: var(--radius-button) !important; }
#nd-header .nd-nav__icon:hover { background: rgba(43, 43, 43, .06) !important; }
#nd-header .nd-nav--on-photo .nd-nav__icon:hover { background: rgba(255, 255, 255, .14) !important; }
#nd-header .nd-nav__acc { margin-right: 4px; }
#nd-header .nd-nav__count { transition: opacity .16s var(--ease); }
#nd-header .nd-nav__count:hover { opacity: .88; }
#nd-header .nd-nav__count--samples { background: var(--stone); color: var(--charcoal) !important; }
#nd-header .nd-nav--on-photo .nd-nav__count--samples { background: var(--glass-light); }
#nd-header .nd-nav__count--order { background: var(--charcoal); color: var(--white) !important; }
#nd-header .nd-nav__count--samples:not(:has(.nd-badge:not([hidden]))) { padding-right: 14px; }
#nd-header .nd-nav--on-photo,
#nd-header .nd-nav--on-photo a:not(.nd-nav__count),
#nd-header .nd-nav--on-photo .nd-nav__icon { color: var(--white) !important; }
#nd-header .nd-nav__links a,
#nd-header .nd-nav__count,
#nd-header .nd-nav__icon { white-space: nowrap; }
/* The theme's button:not(...) rule (display:inline-block) outranks bundle.css's .nd-nav__menu. */
#nd-header .nd-nav__menu { display: none !important; font-size: 15px !important; gap: 8px; }

@media (max-width: 900px) {
	#nd-header .nd-nav__menu { display: inline-flex !important; }
	#nd-header { left: 12px; right: 12px; }
	#nd-header .nd-nav { padding: 8px 6px 8px 16px; gap: 8px; }
}
@media (max-width: 420px) {
	/* 390px: wordmark, Samples, Order, Menu must fit 366px. Menu keeps its label for screen readers. */
	#nd-header .nd-nav__count { padding-left: 12px; gap: 6px; }
	#nd-header .nd-nav__menu-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

/* ── Menu sheet (under 900px only) ─────────────────────────────────── */
#nd-menu { z-index: 9995; padding: 8px 12px 16px; }
body.admin-bar #nd-menu { top: 46px; }
#nd-menu .nd-sheet__bar { padding: 8px 8px 8px 16px; }
#nd-menu .nd-btn--quiet { background: var(--stone) !important; color: var(--charcoal) !important; border: 0 !important; }
#nd-menu .nd-btn--olive { background: var(--olive-deep) !important; color: var(--white) !important; }
#nd-menu .nd-btn--primary { background: var(--charcoal) !important; color: var(--white) !important; }
#nd-menu .nd-btn { display: inline-flex !important; align-items: center; justify-content: center; gap: 8px; padding: 0 16px !important; height: auto !important; border-radius: var(--radius-button) !important; font-size: 16px !important; }
#nd-menu .nd-search { margin: 0; }
#nd-menu .nd-search input[type="search"] {
	height: 50px; padding: 0; border: 0 !important; background: transparent !important;
	font-size: 17px !important; font-weight: 400 !important; color: var(--charcoal) !important; box-shadow: none !important;
}
#nd-menu .nd-search input::placeholder { color: var(--graphite); opacity: 1; }
#nd-menu .nd-search:focus-within { outline: 2px solid var(--charcoal); outline-offset: 3px; }
#nd-menu .nd-sheet__links a { font-size: 30px !important; font-weight: 300 !important; line-height: 1.25; letter-spacing: -.01em; color: var(--charcoal) !important; }
#nd-menu .nd-sheet__links a[aria-current] { font-weight: 500 !important; }
@media (min-width: 1011px) { #nd-menu { display: none !important; } }
html.nd-locked, html.nd-locked body { overflow: hidden !important; }

/* ── Footer ─────────────────────────────────────────────────────────── */
#nd-footer { position: relative; z-index: 1; clear: both; }
#nd-footer .nd-footer { color: var(--on-dark) !important; }
#nd-footer .nd-footer__logo { align-self: flex-start; display: inline-flex; }
/* 28px letters = 31.36px image height. */
#nd-footer .nd-footer__logo img { height: 31.36px; width: auto; display: block; }
#nd-footer .nd-footer__brand p {
	margin: 0 !important; font-size: 22px !important; font-weight: 300 !important;
	line-height: 1.4 !important; color: var(--stone) !important;
}
#nd-footer .nd-footer__col { font-size: 16px; line-height: 1.4; color: var(--on-dark); }
#nd-footer .nd-footer__col a { color: var(--on-dark) !important; }
#nd-footer .nd-footer__col a:hover { color: var(--white) !important; text-decoration: underline !important; text-underline-offset: 4px; }
#nd-footer .nd-footer__head { color: var(--on-dark-muted) !important; font-size: 14px; }
#nd-footer .nd-footer__base { color: var(--on-dark-muted) !important; }
#nd-footer .nd-footer__tbc { color: var(--on-dark); }
#nd-footer .nd-footer__form input[type="email"] {
	height: 48px; padding: 0 16px !important; border: 1px solid var(--graphite) !important;
	border-radius: var(--radius-button) !important; background: transparent !important;
	color: var(--on-dark) !important; font-size: 16px !important; font-weight: 400 !important; width: auto;
}
#nd-footer .nd-footer__form button[type="submit"] {
	min-height: 48px; padding: 0 20px !important; border: 0 !important; border-radius: var(--radius-button) !important;
	background: var(--paper) !important; color: var(--charcoal) !important; font-size: 16px !important; letter-spacing: normal !important;
}
#nd-footer .nd-footer__form [disabled] { opacity: .5; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
	.nd-chrome, .nd-chrome * { transition: none !important; }
}

/* ── QA fixes, 12 Nov 2026 ─────────────────────────────────────────── */
/* 3.2: five links + five controls overflowed the bar from 901 to ~1002px. The links, search,
   shortlist and log in move into the Menu sheet up to 1010px (was 900). */
@media (max-width: 1010px) {
	#nd-header .nd-nav__links, #nd-header .nd-nav__wide { display: none !important; }
	#nd-header .nd-nav__menu { display: inline-flex !important; }
}
/* 3.2: under 380px the controls didn't fit (Menu clipped at 360, off-screen at 320).
   Samples becomes an icon + count; its name stays "Samples … in your tray" for screen readers. */
#nd-header .nd-nav__samples-icon { display: none; }
@media (max-width: 380px) {
	#nd-header .nd-nav__samples-icon { display: block; }
	#nd-header .nd-nav__samples-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	#nd-header .nd-nav { padding-left: 12px; gap: 4px; }
	#nd-header .nd-nav__actions { gap: 4px; }
	#nd-header .nd-nav__count { padding: 0 6px 0 10px; gap: 4px; }
	#nd-header .nd-nav__logo img { height: 22.4px; } /* 20px letters; the kit's minimum is 16px */
}
/* R5: style.css and the Customizer's Additional CSS set .elementor-kit-8 p to Montserrat !important. */
#nd-header p, #nd-menu p, #nd-footer p { font-family: var(--font-sans) !important; }
/* 7.2i: visible focus on the order path (cart and checkout are still WooCommerce's own pages). */
body.woocommerce-checkout :is(a, button, input, select, textarea):focus-visible,
body.woocommerce-cart :is(a, button, input, select, textarea):focus-visible,
body.woocommerce-account :is(a, button, input, select, textarea):focus-visible {
	outline: 2px solid var(--charcoal) !important; outline-offset: 3px !important;
}
/* axe color-contrast: the enquiry popup's light-olive labels (2.3-2.6:1) on product pages. */
body.nd-chrome-on #nido-inq-reason-label { color: var(--olive-deep) !important; }
body.nd-chrome-on .nido-inq-product-tag__label { color: var(--graphite) !important; }
/* K1: without JavaScript the Menu link targets #nd-menu, which overrides its hidden attribute. */
#nd-menu:target { display: flex !important; }

/* Sticky fix (13 Nov): body had overflow-x: hidden + overflow-y: auto (theme), which made <body> its own
   scroll container, so position: sticky never stuck (the sample tray only showed at the end of the grid).
   clip still stops sideways scroll but creates no scroll container. */
body.nd-chrome-on { overflow-x: clip !important; overflow-y: visible !important; }

/* ── Mobile Safari QA fixes (2026-11-17) ── */
/* One focus ring on wrapped fields: the wrapper draws it (:focus-within), so the input doesn't draw a second. */
#nd-menu .nd-search input:focus-visible,
#nd-content .nd-browser__search input:focus-visible,
#nd-content .nd-qty input:focus-visible { outline: none !important; }
/* Tray toast: keep "Order samples" on one line; the text column takes the squeeze. */
#nd-content .nd-tray > .nd-btn { flex: 0 0 auto; white-space: nowrap; }
#nd-content .nd-tray__text { flex: 1 1 auto; }
/* Lightbox bar on phones: buttons side by side on top, caption below. */
@media (max-width: 600px) {
	#nd-content .nd-lightbox__bar { flex-wrap: wrap; row-gap: 10px; padding: 12px 16px; }
	#nd-content .nd-lightbox__bar > .nd-row { order: -1; width: 100%; flex-wrap: nowrap; justify-content: flex-end; }
}
