/**
 * Global chrome: header/nav, footer, the age-gate modal, and the
 * cookie-consent banner. Loaded on every page — everything template- or
 * page-type-specific lives in shop.css / account.css instead (see
 * inc/enqueue.php for what loads where).
 */

/* Without this, every `width: 100%` field with its own padding/border
(inputs, selects, textareas — used throughout account.css, shop.css, the
Cart/Checkout customisations) renders wider than its container under the
browser's content-box default, which is what was causing horizontal
overflow/scrollbars on narrow viewports. */
*, *::before, *::after {
	box-sizing: border-box;
}

/* ---------- Shared helpers ---------- */
h1, h2, h3, h4, h5, h6, .tb-display {
	font-variation-settings: "opsz" 10;
}
.tb-display {
	font-family: var(--wp--preset--font-family--display);
	letter-spacing: -0.005em;
}
.tb-eyebrow {
	display: block;
	font-size: 0.72rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--wp--preset--color--juniper-soft);
}
.tb-eyebrow:empty {
	display: none;
}

/* templates/page-with-eyebrow.html — kept in base.css, not a
   per-template stylesheet, since this template can end up on any page
   sitewide and needs to look right regardless of which (if any)
   page-specific CSS that page also loads. */
.tb-page-hero {
	text-align: center;
	padding: 3rem 1.5rem 0.5rem;
	max-width: none;
}
.tb-page-hero h1 {
	font-size: clamp(2rem, 4.5vw, 3rem);
	font-weight: 500;
}
.tb-btn-quiet {
	background: transparent;
	color: var(--wp--preset--color--juniper);
	border: 1px solid var(--wp--preset--color--juniper-line);
}
.tb-btn-quiet:hover {
	border-color: var(--wp--preset--color--juniper);
	background: transparent;
}

/* ---------- Header / nav ---------- */
/* The sticky positioning has to live on the OUTER wrapper WordPress
generates for <!-- wp:template-part {"tagName":"header"} /-->
(header.wp-block-template-part), not on .site-header itself. .site-header
is that wrapper's only real child (the age-gate overlay/cookie banner are
position:fixed and contribute no height, and the collapsed search bar is
max-height:0), so the wrapper's own height is identical to .site-header's
— which means position:sticky on .site-header had no room to "float"
within its own containing block and unstuck again on the very next
pixel of scroll. Confirmed by testing: the header has never actually
stayed pinned on scroll before this fix. */
header.wp-block-template-part {
	position: sticky;
	top: 0;
	z-index: 100;
}
/* The WP admin toolbar is itself position:fixed at top:0 (only for
logged-in users with it enabled — customers never see it), so without
this our sticky header pins to the same spot and scrolls in underneath
it. body.admin-bar / the 782px breakpoint below mirror the toolbar's own
height and responsive behaviour (32px desktop, 46px on the toolbar's own
mobile breakpoint) exactly, per WordPress core's own admin-bar.css. */
body.admin-bar header.wp-block-template-part {
	top: 32px;
}
@media screen and (max-width: 782px) {
	body.admin-bar header.wp-block-template-part {
		top: 46px;
	}
}
.site-header {
	background: var(--wp--preset--color--oatmilk);
	box-shadow: 0 2px 6px rgba(30, 43, 37, 0.08);
	max-width: none;
	padding-top: 0;
	padding-bottom: 0;
	border-bottom: 1px solid #666;
}
/* First child of .site-header: visible, it pushes the nav row down inside
the sticky block; dismissed (via the [hidden] attribute), it collapses and
the nav becomes the new top edge. Needs its own [hidden] rule because an
author-level `display` declaration always beats the browser's default
`[hidden]{display:none}` UA rule, even at equal specificity. */
/* .site-header is a "constrained" layout group, so WordPress's own global
styles apply `.is-layout-constrained > :where(...) { max-width: <content-
size> }` to every direct child by default — every direct child here (the
announce bar, .tb-nav, the search bar) needs an explicit override or it
gets silently capped and centred instead of spanning full width. */
.tb-announce-bar {
	max-width: none;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	background: var(--wp--preset--color--apricot);
	color: var(--wp--preset--color--juniper);
	text-align: center;
	padding: 1rem 2.8rem 1rem 1rem;
	position: relative;
	font-size: 0.92rem;
	font-weight: 700;
}
.tb-announce-bar[hidden] {
	display: none;
}
.tb-announce-bar a {
	color: var(--wp--preset--color--juniper);
	text-decoration: underline;
	font-weight: 800;
}
.tb-announce-close {
	position: absolute;
	right: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--wp--preset--color--juniper);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	padding: 0.2rem;
	opacity: 0.75;
}
.tb-announce-close:hover {
	opacity: 1;
}
.tb-nav {
	max-width: none;
	padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
}
.tb-nav .wp-block-site-logo img {
	display: block;
}
.tb-nav-links {
	flex: 1;
	justify-content: space-evenly !important;
}
.tb-nav-links .wp-block-navigation__container {
	width: 100%;
	justify-content: space-evenly;
}
.tb-nav-links .wp-block-navigation-item a {
	font-size: 0.78rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	padding-bottom: 0.3rem;
	border-bottom: 2px solid transparent;
	transition: border-color 0.2s ease;
}
.tb-nav-links .wp-block-navigation-item a:hover,
.tb-nav-links .wp-block-navigation-item.tb-current a {
	border-color: var(--wp--preset--color--apricot);
}
.tb-nav-icons {
	gap: 1.3rem;
	align-items: center;
}
.nav-search-toggle {
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	display: flex;
}
.tb-price-toggle {
	background: var(--wp--preset--color--apricot);
	border: 1px solid var(--wp--preset--color--juniper-line);
	padding: 0.3rem 0.6rem;
	cursor: pointer;
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.68rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	font-weight: 600;
	color: var(--wp--preset--color--juniper);

	:hover {
		color: white;
	}
}
.tb-price-toggle:hover,
.tb-price-toggle[aria-pressed="true"] {
	border-color: var(--wp--preset--color--juniper);
}
.nav-search-toggle svg,
.tb-nav-icons svg,
.tb-nav-icons .wc-block-mini-cart__icon {
	width: 19px;
	height: 19px;
	stroke: var(--wp--preset--color--juniper);
	fill: none;
	stroke-width: 1.6;
}
.tb-nav-icons .wc-block-mini-cart__badge {
	background: var(--wp--preset--color--apricot);
	color: var(--wp--preset--color--juniper);
}
.tb-nav-icons .wp-block-woocommerce-customer-account a,
.tb-nav-icons .wc-block-mini-cart__button {
	display: flex;
	padding: 0;
	background: none;
	border: none;
}

/* Every cart line item (mini-cart drawer, the /cart/ page, and checkout's
order summary all reuse the same WooCommerce Blocks component) renders
two extra price-adjacent things nobody asked for: .wc-block-cart-item__prices
is a second copy of the same unit price shown again next to the product
name, and .wc-block-components-product-metadata renders each product's
raw "short description" field inline — for a lot of this catalogue that
field holds leftover import data (bare prices, repeated spec text) never
meant to be customer-facing copy. Only the real line total on the right
(.wc-block-cart-item__total, styled separately) is wanted. Unscoped to
any one page's className, since the mini-cart can open from anywhere,
not just /cart/ or /checkout/ — which also rules out beating WooCommerce's
own display:flex rule on .wc-block-cart-item__prices purely on
specificity, since that rule is qualified by a specific table/row
ancestor chain the mini-cart's own markup doesn't necessarily share.
!important, confirmed necessary via the browser's own matched-styles
inspector, not a first resort. */
.wc-block-cart-item__prices,
.wc-block-components-product-metadata {
	display: none !important;
}

.nav-search-bar {
	max-width: none;
	max-height: 0;
	overflow: hidden;
	/* .site-header is a "constrained" layout group, which gives every
	direct child a default margin-block-start (WordPress's blockGap) —
	that showed up as dead space (and a floating shadow edge) below the
	nav row even while this element is collapsed to zero height. */
	margin-top: 0;
	background: var(--wp--preset--color--oatmilk);
	border-bottom: 0 solid var(--wp--preset--color--juniper-line);
	transition: max-height 0.25s ease, border-bottom-width 0.25s ease;
}
.nav-search-bar.open {
	max-height: 80px;
	border-bottom-width: 1px;
}
.nav-search-bar-inner {
	max-width: 1140px;
	margin: 0 auto;
	padding: 1rem clamp(1.2rem, 4vw, 3rem);
	display: flex;
	gap: 0.7rem;
	align-items: center;
}
.nav-search-bar-inner input {
	flex: 1;
	background: transparent;
	border: 1px solid var(--wp--preset--color--juniper-line);
	color: var(--wp--preset--color--juniper);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.92rem;
	padding: 0.65rem 0.9rem;
}
.nav-search-bar-inner input:focus {
	outline: none;
	border-color: var(--wp--preset--color--apricot-deep);
}
.nav-search-bar-inner button {
	background: var(--wp--preset--color--juniper);
	color: var(--wp--preset--color--oatmilk);
	border: none;
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: 0.76rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.7rem 1.2rem;
	cursor: pointer;
}
.nav-search-bar-inner button:hover {
	background: var(--wp--preset--color--apricot-deep);
	color: var(--wp--preset--color--juniper);
}

/* ---------- Age verification modal ---------- */
.age-gate-overlay {
	position: fixed;
	inset: 0;
	z-index: 500;
	background: rgba(30, 43, 37, 0.92);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
}
.age-gate-overlay.open {
	display: flex;
}
.age-gate-box {
	background: var(--wp--preset--color--oatmilk);
	max-width: 400px;
	width: 100%;
	padding: 2.4rem 2rem;
	text-align: center;
}
.age-gate-title {
	font-size: 1.4rem;
	font-weight: 600;
	margin: 0 0 0.6rem;
}
.age-gate-sub {
	font-size: 0.88rem;
	color: var(--wp--preset--color--juniper-soft);
	margin: 0 0 1.6rem;
	line-height: 1.55;
}
.age-gate-box label {
	display: block;
	font-size: 0.72rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--juniper-soft);
	margin-bottom: 0.5rem;
	text-align: left;
}
.age-gate-box input {
	width: 100%;
	background: transparent;
	border: 1px solid var(--wp--preset--color--juniper-line);
	color: var(--wp--preset--color--juniper);
	font-family: var(--wp--preset--font-family--body);
	font-size: 1rem;
	padding: 0.75rem 0.9rem;
	text-align: center;
	margin-bottom: 1.1rem;
}
.age-gate-box input:focus {
	outline: none;
	border-color: var(--wp--preset--color--apricot-deep);
}
.age-gate-box button {
	width: 100%;
}
.age-gate-error {
	font-size: 0.8rem;
	color: var(--wp--preset--color--apricot-deep);
	margin-top: 0.8rem;
}
.age-gate-blocked-title {
	color: var(--wp--preset--color--apricot-deep);
}
.age-gate-blocked p:not(.age-gate-blocked-title) {
	font-size: 0.9rem;
	color: var(--wp--preset--color--juniper-soft);
	line-height: 1.6;
}

/* ---------- Cookie-consent banner ---------- */
.cookie-banner {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 400;
	background: var(--wp--preset--color--juniper);
	color: var(--wp--preset--color--oatmilk);
	padding: 1.2rem clamp(1.2rem, 4vw, 2.5rem);
	display: none;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
}
.cookie-banner.open {
	display: flex;
}
.cookie-banner p {
	font-size: 0.85rem;
	line-height: 1.55;
	max-width: 640px;
	color: rgba(244, 241, 234, 0.9);
	margin: 0;
}
.cookie-banner a {
	color: var(--wp--preset--color--apricot);
	text-decoration: underline;
}
.cookie-actions {
	display: flex;
	gap: 0.7rem;
	flex-wrap: wrap;
}
.cookie-actions button {
	font-family: var(--wp--preset--font-family--body);
	font-weight: 600;
	font-size: 0.74rem;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 0.65rem 1.1rem;
	cursor: pointer;
	border: none;
}
.cookie-accept {
	background: var(--wp--preset--color--apricot);
	color: var(--wp--preset--color--juniper);
}
.cookie-accept:hover {
	background: var(--wp--preset--color--apricot-deep);
}
.cookie-necessary {
	background: transparent;
	color: var(--wp--preset--color--oatmilk);
	border: 1px solid rgba(244, 241, 234, 0.4) !important;
}
.cookie-necessary:hover {
	border-color: var(--wp--preset--color--oatmilk) !important;
}

/* ---------- Footer ---------- */
.site-footer {
	margin-top: 4rem;
	background: var(--wp--preset--color--juniper);
	color: var(--wp--preset--color--oatmilk);
	padding: 2.6rem clamp(1.2rem, 4vw, 3rem) 1.6rem;
	max-width: none;
}
.site-footer a {
	color: inherit;
}
.tb-footer-forms {
	max-width: 920px;
	margin: 0 auto 2.6rem;
	gap: 1rem;
}
.tb-footer-box {
	border: 1px solid rgba(244, 241, 234, 0.25);
	padding: 1.6rem;
}
/* .tb-eyebrow's default colour (juniper-soft, a dark green) is meant for
light backgrounds — invisible against this footer's dark juniper fill,
so it needs the same apricot override the reference design uses here. */
.tb-footer-box .tb-eyebrow {
	color: var(--wp--preset--color--apricot);
}
.tb-footer-box h3 {
	font-size: 1.25rem;
	font-weight: 500;
	margin: 0.4rem 0 1.1rem;
}
.tb-footer-form input,
.tb-footer-form textarea {
	display: block;
	width: 100%;
	background: transparent;
	border: none;
	border-bottom: 1px solid rgba(244, 241, 234, 0.3);
	color: var(--wp--preset--color--oatmilk);
	font-family: var(--wp--preset--font-family--body);
	font-size: 0.9rem;
	padding: 0.6rem 0.1rem;
	margin-bottom: 0.9rem;
}
.tb-footer-form input::placeholder,
.tb-footer-form textarea::placeholder {
	color: rgba(244, 241, 234, 0.5);
}
.tb-footer-form input:focus,
.tb-footer-form textarea:focus {
	outline: none;
	border-color: var(--wp--preset--color--apricot);
}
/* Off-screen, not display:none — a display:none field is skipped by
some bots' form-fillers, defeating the point; this stays in the layout
flow (so a real browser genuinely never shows or tabs to it) but visibly
nowhere near the page. */
.tb-footer-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.tb-footer-form-status {
	font-size: 0.8rem;
	margin: 0.7rem 0 0;
}
.tb-footer-form-status.is-error {
	color: var(--wp--preset--color--apricot);
}
.tb-footer-contact {
	gap: 0.7rem;
	font-size: 0.82rem;
	color: rgba(244, 241, 234, 0.85);
	margin-bottom: 1.2rem;
}
.tb-footer-contact p {
	margin: 0;
}
.tb-footer-contact a:hover {
	color: var(--wp--preset--color--apricot);
}
.tb-footer-phone::before {
	content: "\00B7";
	margin-right: 0.7rem;
	opacity: 0.4;
}
.tb-footer-social {
	margin-bottom: 1.6rem;
}
.tb-footer-social a {
	color: var(--wp--preset--color--oatmilk);
}
.tb-footer-social a:hover {
	color: var(--wp--preset--color--apricot);
}
.tb-footer-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.8rem;
	list-style: none;
	margin: 2rem 0 0;
	padding: 1.6rem 0 0;
	border-top: 1px solid rgba(244, 241, 234, 0.15);
}
.tb-footer-links a {
	font-size: 0.72rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(244, 241, 234, 0.75);
	text-decoration: none;
}
.tb-footer-links a:hover {
	color: var(--wp--preset--color--apricot);
}

/* ---------- 404 ---------- */
.tb-not-found {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 3rem 1.5rem;
	min-height: 60vh;
	max-width: none;
}
.tb-404-code {
	font-size: clamp(5rem, 14vw, 8.5rem);
	font-weight: 500;
	line-height: 1;
	color: var(--wp--preset--color--oatmilk-dim);
	-webkit-text-stroke: 1.5px var(--wp--preset--color--juniper-line);
	margin: 0;
}
.tb-404-sub {
	font-size: 0.9rem;
	color: var(--wp--preset--color--juniper-soft);
	margin: 0.7rem 0 2rem;
	max-width: 440px;
}
.tb-404-search.wp-block-search {
	max-width: 380px;
	width: 100%;
	margin-bottom: 1.8rem;
}

@media (max-width: 780px) {
	.tb-nav-links .wp-block-navigation__container {
		gap: 1.2rem;
	}
}

@media (max-width: 720px) {
	.tb-footer-forms {
		grid-template-columns: 1fr;
	}
}
