/* CRESTIAL — the rules the mockups cannot carry.
 *
 * shell.css is GENERATED from _source/homepagev2-r2.src.html and must not be
 * hand-edited. This file is its counterpart: everything the design needs that
 * ten static mockups had no way to express, because they are ten pages and the
 * site is roughly nine hundred URLs.
 *
 * Loaded immediately after shell.css, so it can refine shell rules by cascade
 * order without raising specificity.
 *
 * KEEP THIS FILE SMALL. A rule that belongs to a page goes in
 * assets/css/pages/<slug>.css; a rule that belongs to the design's shell goes in
 * the mockup and arrives here via the generator. This is only for the gaps.
 */

/* ============================================================================
 * 1. Clearance under the fixed header
 *
 * `.hdr` is position:fixed, so it sits OVER the top of the document. The
 * designed pages are built for that: `.hero` and `.phero` are full-bleed dark
 * bands meant to run under it, and `.lhead` carries its own padding-top of
 * clamp(142px,14vw,196px). Those pages get `has-band` and want no clearance.
 *
 * Every other screen — the shop archive, 306 product pages, search, 404, a page
 * whose template has not been built yet — opens with ordinary content, and
 * without this its first 82px are hidden behind the header. See
 * crestial_has_band() in inc/setup.php for who gets the class.
 * ========================================================================== */

body:not(.has-band) #main {
	padding-top: 82px; /* = .hdr__in height; they must move together */
}

/* ============================================================================
 * 2. The mobile navigation
 *
 * THE MOCKUPS DO NOT HAVE ONE. At 1330px the shell hides both navs and shows
 * `.burger`, and in all ten design files that button does nothing — they were
 * built and signed off as desktop reviews. Porting them literally would have
 * shipped a site with no navigation at all on a phone, which is most of its
 * traffic, so the drawer below is ours.
 *
 * It is deliberately plain: the same eight links in the order the header lists
 * them, left then right, on the same ink background the footer uses. It has not
 * been through a design review. Flagged on the board as cr-mobile-nav.
 * ========================================================================== */

/*
 * The drawer is a child of <header class="hdr"> — it has to be, or it counts as page content in
 * the empty-page check; see the note in chrome/header.php. That puts it inside .hdr's stacking
 * context (position:fixed + z-index:70), so "under the header" cannot be expressed as a lower
 * z-index than .hdr. It is expressed against its sibling .hdr__in instead, which is already
 * position:relative in the shell and only needs the index.
 */
.hdr__in {
	z-index: 2;
}

.drawer {
	position: fixed;
	inset: 0;
	z-index: 1; /* below .hdr__in, so the burger stays clickable to close */
	background: var(--ink);
	color: var(--cream);
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 100px var(--gut) 40px;
	overflow-y: auto;
	opacity: 0;
	visibility: hidden;
	transition: opacity .4s var(--ease), visibility .4s var(--ease);
}

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

.drawer a {
	display: block;
	padding: 13px 0;
	font-size: clamp(19px, 5vw, 26px);
	font-weight: 300;
	letter-spacing: .01em;
	color: inherit;
}

.drawer a[aria-current] {
	opacity: .5;
}

.drawer__base {
	margin-top: 36px;
	padding-top: 24px;
	border-top: 1px solid rgba(252, 251, 248, .18);
	font-size: 13px;
	line-height: 1.9;
	color: rgba(252, 251, 248, .62);
}

.drawer__base a {
	display: inline;
	padding: 0;
	font-size: inherit;
}

/*
 * While the drawer is open the header is always inverted, whatever the scroll
 * position was when it opened — the drawer's ink background is behind it, so a
 * cream header with a black logo would be unreadable.
 */
body.drawer-open {
	overflow: hidden;
}

body.drawer-open .hdr,
body.drawer-open .hdr.is-stuck {
	background: transparent;
	box-shadow: none;
	backdrop-filter: none;
	color: var(--cream);
}

body.drawer-open .hdr .brand .b-dark {
	display: none;
}

body.drawer-open .hdr .brand .b-light {
	display: block;
}

/* ⚑ THERE WAS A RULE HERE HIDING THE SEARCH AND ACCOUNT ICONS BELOW 1330px, and its own
   comment said why: "no destination yet". They were given destinations on 23 Oct 2026 and
   the rule outlived the reason — it survived as `.util button:not(.util__basket)`, which
   after account became an <a> matched the search button and nothing else. The one icon that
   had just been built was the one icon hidden, on every phone and tablet.

   It stays removed. A phone is where searching a 317-SKU catalogue matters most, the panel
   is already width-clamped to the viewport, and below 1330px the navs are gone so there is
   more room in the header bar than there is on a desktop, not less. Check 1160 fails if any
   of the three is unreachable at 375px. */

/* ⚑ AND THE LOGO HAS TO MOVE OUT OF THEIR WAY. The shell centres .brand in the middle grid
   column while .hdr__tools is absolutely positioned against the right gutter, so the two
   are laid out by different mechanisms and neither knows about the other. They collide
   below ~496px: at 375 the wordmark spans 104-272 and the icons start at 211, which put the
   magnifier and the person squarely on top of "AL®".

   ⚑ THIS WAS ALREADY WRONG BEFORE TODAY and the rule above is why nobody saw it — it hid
   the two left-most icons on mobile, so only the basket overlapped, and it overlapped the
   ® where it read as part of the mark. Turning account into an <a> stopped that rule
   matching it, which is the whole reason the collision became visible. Removing the rule
   without this would have shipped three icons across the client's wordmark.

   Left-aligning the brand is the fix rather than shrinking it further: the header below
   1330px has no navigation in it, so a centred logo is centred over nothing. 560px rather
   than 496 so there is air at the boundary and not a near miss. */
@media (max-width: 560px) {
	.brand {
		grid-column: 1 / -1;
		justify-self: start;
	}

	.brand img {
		width: 140px;
	}
}

/* ============================================================================
 * 3. Reduced motion
 *
 * The reveal is handled in JS (site.js reveals everything and skips the
 * observer). This covers the transitions the shell declares directly.
 * ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: .01ms !important;
		animation-duration: .01ms !important;
		animation-iteration-count: 1 !important;
	}
}

/* ============================================================================
 * 4. Utilities
 *
 * ⚑ `.u-sr` IS LOAD-BEARING, NOT DECORATION. The finish swatches on a product card are 17px
 * circles with no text; each carries its finish name in a `.u-sr` span so a screen reader says
 * "Brushed Gunmetal" rather than "link". With the class undefined — which is how it first
 * shipped, because the class was invented in the markup and never written here — nine finish
 * names rendered as visible text stacked on top of the article number. It looked like a layout
 * bug and was a missing rule.
 *
 * WordPress ships `.screen-reader-text` and it is NOT a substitute: it only arrives with
 * wp-block-library or an admin stylesheet, neither of which this theme loads on the front end.
 * ========================================================================== */

.u-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	/* Both: clip-path is the modern one, clip the fallback. Neither alone covers everything
	   still in use, and `display:none` would take it out of the accessibility tree entirely —
	   which defeats the point. */
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* Focusable, for anything that is a control rather than a label. */
.u-sr:focus-visible {
	position: static;
	width: auto;
	height: auto;
	margin: 0;
	overflow: visible;
	clip: auto;
	clip-path: none;
	white-space: normal;
}

/* ============================================================================
 * 5. Finish swatches
 *
 * Here rather than in a page stylesheet because BOTH shop screens need them and only one of
 * shop.css / product.css is ever loaded: defined in either, the other page renders nine
 * invisible circles. (Written in shop.css first, which is exactly what that produced.)
 * ========================================================================== */

.fswatch {
	display: block;
	width: 17px;
	height: 17px;
	border-radius: 50%;
	border: 1px solid var(--line);
	transition: transform .25s var(--ease), box-shadow .25s var(--ease);
	/* ⚑ THE FALLBACK IS FIRST ON PURPOSE. These are all one class deep, so whichever comes
	   last wins — written after the named finishes it silently hatched all nine of them. A
	   finish nobody has styled yet still has to be visible and clickable: an unstyled swatch
	   is a missing product, not a missing colour. */
	background: repeating-linear-gradient(45deg, var(--stone) 0 4px, var(--card) 4px 8px);
}

/*
 * ⚑ THE NINE HARD-CODED SWATCHES ARE GONE, 30 Oct 2026, AND THE FALLBACK ABOVE IS NOW LOAD-
 * BEARING. Each finish's colour is a field on its pa_finish term — Products → Attributes →
 * Finish → Configure terms — rendered as an inline background by crestial_finish_swatch().
 *
 * Keith, 30 Oct 2026: "when he add a new colour on the attributes > finish tab, how can he
 * also edit what colour to show on the round swatch on the product page?" He could not. A
 * tenth finish got the hatching below on the product page and on every shop card, with
 * nothing on any screen to say where the other nine came from.
 *
 * The nine values were not re-derived; they were transcribed into the database by
 * migrations/seed_finish_swatches.php, which records the single difference (sundance
 * chrome's middle stop moves 46% → 50%, under a pixel on a 16px disc). Delete nothing here
 * without reading that file: these colours were hand-mixed, and that is what makes brushed
 * nickel read as metal rather than grey.
 */

.fswatch:hover,
.fswatch:focus-visible {
	transform: scale(1.18);
	box-shadow: 0 0 0 1px var(--ink);
}

/*
 * ⚑ WOOCOMMERCE'S CLEARFIX BECOMES A PHANTOM GRID ITEM.
 *
 * woocommerce.css carries `.woocommerce ul.products::before { content:" "; display:table }` and
 * a matching ::after — a 2010-era clearfix for the float grid. A generated pseudo-element on a
 * grid container IS a grid item, so the ::before silently takes the first cell: four products
 * in a four-column grid came out three-and-one, with an empty space at the start and no element
 * in the DOM to explain it. The grid was correct, the items were correct, and the count was
 * wrong by exactly one.
 *
 * Harmless on the archive at 12 per page, where it only shifts the whole grid along; obvious on
 * a four-up strip, which is how it was found.
 */
.woocommerce ul.products::before,
.woocommerce ul.products::after,
.pdp__more ul.products::before,
.pdp__more ul.products::after {
	display: none;
}

/* ============================================================================
 * 6. An <img> that WordPress sized needs height:auto
 *
 * ⚑ THE MOCKUPS' IMAGES HAVE NO width/height ATTRIBUTES. WordPress's do: every
 * wp_get_attachment_image() emits them, correctly, so the browser can reserve
 * space and not shift the layout as pictures load.
 *
 * But an HTML `height` attribute is a presentational hint that beats the CSS
 * `aspect-ratio` property. So a rule like
 *
 *     .plinth img { width: 100%; aspect-ratio: 596/842 }
 *
 * which was right for three weeks of mockups, renders the brochure cover 329px
 * wide and 842px TALL the moment the same image comes out of the media library
 * — correct width, natural height, a cover stretched to two and a half times its
 * proportions. Found on Resources on 20 Oct; it applies to every image on the
 * site that was sized by aspect-ratio alone.
 *
 * `height: auto` lets aspect-ratio govern again while keeping the attributes
 * doing their job. It sits here rather than in shell.css because shell.css is
 * generated from the mockups, and the mockups do not have this problem.
 *
 * Every rule that genuinely wants a fixed height — the hero's `height:100%`,
 * the card images, the finish plates — names a class and so still wins.
 * ========================================================================== */

img {
	height: auto;
}

/* ============================================================================
 * 7. The Resources dropdown
 *
 * Added 22 Oct 2026, at Keith's request: the video library should be reachable
 * from the header rather than only by scrolling past the brochures.
 *
 * ⚑ NOT IN THE MOCKUPS. All ten draw a flat eight-link header, so this has
 * never been through a client design review — the same standing as the mobile
 * drawer above, and on the board for the same reason.
 *
 * ⚑ IT HANGS FROM THE WORD, NOT FROM THE HEADER BAR — and the first two
 * versions both got that wrong in the same way, which is why there is no magic
 * number here now.
 *
 * The first hung it off the bottom of the 82px header, 8px clear, which put
 * roughly 30px of nothing between "Resources" and the panel. Over a hero
 * photograph that reads as a card dropped on the page rather than a menu
 * belonging to the item above it. Keith, twice: "the spacing between the pop
 * up and the button is too much, can it be connected."
 *
 * So the wrapper is sized to the ANCHOR again, not stretched to the header,
 * and `top: 100%` means the bottom of the word. The anchor carries 6px of
 * bottom padding, so that is where the panel's edge lands — close enough to
 * read as attached, with the parent's own underline sitting exactly on the
 * join and doing the work of a top border.
 *
 * ⚑ WHICH IS WHY THE TOP CORNERS ARE SQUARE. A radius all the way round is
 * what made the first version look like a speech bubble; square at the top and
 * rounded at the bottom is a thing pulled down from somewhere, which is what
 * this is.
 * ========================================================================== */

.nav__has {
	position: relative;
	display: flex;
	align-items: center;
}

/* ⚑ REDESIGNED 23 Oct 2026 — Keith: "looks a bit weird". It was, and measuring it said why:
 * a 184 x 93px cream box with a 14px radius, holding two words of 11px type. The radius made
 * it a speech bubble rather than a menu; it was 100px wider than the word it hung from, so
 * centring it left it sticking out 50px each side and reading as misaligned; and with no
 * shadow and an 8px gap it floated over the hero photograph, attached to nothing.
 *
 * THE GROUND IS NOW --ink, WHICH IS A DECISION THIS SITE HAS ALREADY MADE. The mobile drawer
 * is #14120F with cream type — the same menu, on a phone, signed off. Reusing it means the
 * dropdown is unmistakably navigation rather than a card, it needs no border to hold its edge,
 * and it works over BOTH header states: the transparent header on a dark hero, and the cream
 * one once stuck. The old cream panel matched neither — it was brighter than the stuck header
 * and a glare over the hero.
 *
 * AND IT HANGS FROM THE WORD, not from the middle of it. Left-aligned with a -18px offset, so
 * the rows' text sits on the same vertical as the parent's text rather than the panel's box
 * edge; width follows content. */
.nav__sub {
	position: absolute;
	top: 100%;
	left: -18px;
	z-index: 2;
	min-width: 168px;
	margin: 0;
	padding: 6px 0;
	list-style: none;
	/*
	 * Cream, because Keith is right that it read better than the dark panel I tried in
	 * between: the header's own type is cream over the hero, and a second dark surface under
	 * it was one dark thing too many. Its own ground rather than an inherited one, because
	 * the header has two — transparent over the hero, cream once stuck — and a panel that
	 * inherited either would be unreadable on the other half of the site.
	 */
	background: var(--cream);
	/* No top border: the panel's top edge is the join, and a line there would draw the gap
	   this version exists to remove. */
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 10px 10px;
	box-shadow: 0 14px 30px rgba(20, 18, 15, .16);
	opacity: 0;
	visibility: hidden;
	/* Slides down out of the word rather than fading in from below — 4px, because a panel
	   that starts further away than it ends is the floating look coming back for the length
	   of the transition. */
	translate: 0 -4px;
	transition: opacity .28s var(--ease), translate .28s var(--ease), visibility .28s;
}

/*
 * :focus-within as well as :hover, and it is not a nicety — hover alone makes
 * these two links unreachable by keyboard, and one of them is the only route
 * to the video library from the header. Tabbing to "Resources" opens the panel
 * and Tab again walks into it.
 */
.nav__has:hover .nav__sub,
.nav__has:focus-within .nav__sub {
	opacity: 1;
	visibility: visible;
	translate: 0 0;
}

/* The nav's own size and tracking, so the panel reads as the header continuing downwards
   rather than as a different control that happens to be underneath it. --taupe at rest
   (5.32:1 on cream) so the rows sit a step below the live menu item above them, --ink on
   hover. */
.nav__sub a {
	display: block;
	padding: 10px 18px;
	color: var(--taupe);
	font-size: 11px;
	letter-spacing: .17em;
	white-space: nowrap;
	transition: color .3s var(--ease), background .3s var(--ease);
}

/* The shell gives `.nav a` a centred underline that grows on hover. In a stacked panel that
   reads as a strikethrough appearing under each row, so the rows lift instead and the rule is
   cancelled rather than fought. */
.nav__sub a::after {
	content: none;
}

.nav__sub a:hover,
.nav__sub a:focus-visible {
	color: var(--ink);
	background: var(--card);
}

/* ⚑ NO UNDERLINE ON THE PARENT WHILE THE PANEL IS OPEN.
 *
 * `.nav a:hover::after` grows an underline across every header item on hover, which is right
 * for the seven that just go somewhere. On the one that opens a panel it lands exactly on the
 * join between the word and the panel — so instead of marking the item it draws a rule across
 * the top of the dropdown, which reads as a seam and undoes the attachment the last change
 * was for.
 *
 * I had written the opposite rule a moment earlier, forcing the underline to full width on the
 * theory that it would mark which item you were inside. It does not: there is a cream panel
 * hanging off the word, which says that already and says it louder.
 *
 * `content: none`, not a colour or an opacity, because the box itself has to go — a
 * transparent 1px element still sits on the join, and the shell transitions `left`/`right`
 * rather than opacity, so anything subtler would animate out rather than not appear.
 *
 * ⚑ IT COSTS NOTHING ELSE. `.nav a.is-here::after` is the shell's current-page underline and
 * NOTHING IN THIS THEME EVER ADDS `.is-here` — checked across every PHP and JS file. The
 * header marks the current page with `aria-current="page"` and there is no CSS for it, so the
 * header has no current-page indicator either way. Worth knowing separately; it is not
 * something this rule takes away.
 */
.nav__has:hover > a::after,
.nav__has:focus-within > a::after {
	content: none;
}

/* The drawer lists the same two links flat — see the note in the header part.
   Indented and a size down, so they read as belonging to Resources above them
   rather than as two more top-level destinations. */
.drawer a.drawer__sub {
	padding: 7px 0 7px 22px;
	font-size: clamp(14px, 3.4vw, 17px);
	color: rgba(252, 251, 248, .66);
}

/* ============================================================================
 * 8. WooCommerce notices
 *
 * "… has been added to your cart", "Please fill in your details", the coupon errors. They
 * appear on a PRODUCT page, on the cart, at checkout and in My Account — four screens that
 * load four different page stylesheets — which is why they are here, in the one file every
 * page gets, rather than repeated in each.
 *
 * ⚑ WooCommerce's own stylesheet is dequeued (inc/woocommerce.php), so without this a notice
 * is a bare line of body text flush to the left edge of the viewport, above the header's
 * gutter and below nothing. It reads as a page that has broken rather than as a confirmation.
 * Found on 23 Oct by adding something to the cart — the first time anybody had, because
 * nothing on this site had a price until 21 Oct.
 * ========================================================================== */

.woocommerce-notices-wrapper:empty {
	display: none;
}

.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	max-width: var(--wrap);
	margin: 0 auto clamp(18px, 2vw, 28px);
	padding: 16px clamp(20px, 2vw, 26px);
	background: var(--card);
	border-left: 2px solid var(--orange);
	border-radius: 0 12px 12px 0;
	font-size: 14.5px;
	line-height: 1.7;
	color: var(--ink);
	list-style: none;
}

.woocommerce-error {
	border-left-color: #8C1D18;
	color: #8C1D18;
}

/* The "View cart" link inside a notice is a link, not the page's main action — the pill
   belongs on Proceed to checkout, and two solid pills in a row would compete. */
.woocommerce-message .button,
.woocommerce-info .button {
	margin-left: 14px;
	padding: 0;
	background: none;
	border: 0;
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	font: inherit;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ink);
}

.woocommerce-message .button:hover,
.woocommerce-info .button:hover {
	background: none;
	border-bottom-color: var(--orange);
	color: var(--orange);
}

/* ============================================================================
 * 9. The three header icons
 *
 * ⚑ shell.css STYLES `.util button`, AND TWO OF THE THREE ARE NOW LINKS. Account and Basket
 * became <a> on 23 Oct — a button cannot be opened in a new tab, cannot be copied as a link,
 * and tells a screen reader it will act on this page rather than take you somewhere. shell.css
 * is generated from the mockup and the mockup has buttons, so the <a> rules belong here, and
 * they repeat shell's values exactly rather than inventing new ones. If the mockup ever draws
 * these as links, this block goes.
 * ========================================================================== */

.util a {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	position: relative;
	transition: background .35s;
}

.hdr:not(.is-stuck) .util a:hover { background: rgba(255, 255, 255, .14); }
.hdr.is-stuck .util a:hover       { background: rgba(20, 18, 15, .07); }

/* The count on the basket. Orange is the design's one accent and this is the one place on the
   chrome that has something to announce. */
.util__count {
	position: absolute;
	top: -1px;
	right: -2px;
	min-width: 15px;
	height: 15px;
	padding: 0 4px;
	border-radius: 999px;
	background: var(--orange);
	color: var(--ink);
	font-size: 9.5px;
	font-weight: 500;
	line-height: 15px;
	text-align: center;
	letter-spacing: 0;
}

/* ⚑ EMPTY, NOT ABSENT. The span stays in the DOM at zero so WooCommerce's cart fragment has a
   selector to replace when something is added without a page load; `display:none` on an empty
   badge would mean the first item added never shows a count until the next reload. */
.util__count.is-empty {
	display: none;
}

/* ----------------------------------------------------------------------------
 * The search panel
 *
 * Hangs from the header the same way the Resources dropdown does — square top, rounded
 * bottom, cream — so the two things the header can open look like one idea.
 * -------------------------------------------------------------------------- */

.sitesearch {
	position: absolute;
	top: 100%;
	right: var(--gut);
	z-index: 3;
	display: flex;
	align-items: center;
	gap: 10px;
	width: min(420px, calc(100vw - var(--gut) * 2));
	padding: 14px 16px;
	background: var(--cream);
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 10px 10px;
	box-shadow: 0 14px 30px rgba(20, 18, 15, .16);
}

/* `hidden` is removed by the script when the panel opens; without this the attribute loses to
   `display:flex` and the panel is visible on every page before a click. The commonest way a
   [hidden] element is not hidden. */
.sitesearch[hidden] {
	display: none;
}

.sitesearch__q {
	flex: 1 1 auto;
	min-width: 0;
	font: inherit;
	font-size: 14.5px;
	color: var(--ink);
	background: none;
	border: 0;
	border-bottom: 1px solid var(--line);
	border-radius: 0;
	padding: 8px 0;
	transition: border-color .4s var(--ease);
}

.sitesearch__q:focus {
	outline: none;
	border-color: var(--orange);
}

.sitesearch__go {
	flex: 0 0 auto;
	font: inherit;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	color: var(--cream);
	background: var(--ink);
	border: 1px solid var(--ink);
	border-radius: 999px;
	padding: 10px 18px;
	cursor: pointer;
	transition: background .4s var(--ease), border-color .4s var(--ease);
}

.sitesearch__go:hover {
	background: var(--orange);
	border-color: var(--orange);
}

/* ----------------------------------------------------------------------------
 * The type-ahead's suggestions
 *
 * Hangs below the search panel and shares its edge, so the two read as one control opening
 * downward rather than as a box with a second box under it.
 *
 * ⚑ THE PANEL HAS TO STOP CLIPPING FOR THIS TO WORK. .sitesearch has a border-radius and the
 * list sits outside its bottom edge; the first version set overflow:hidden on the panel to keep
 * the corners tidy and the dropdown was invisible — present in the DOM, measured at the right
 * size, drawn nowhere. There is no overflow rule on .sitesearch and there must not be.
 * -------------------------------------------------------------------------- */

.sitesearch__suggest {
	position: absolute;
	top: calc(100% - 1px);
	left: -1px;
	right: -1px;
	z-index: 1;
	max-height: min(58vh, 420px);
	overflow-y: auto;
	background: var(--cream);
	border: 1px solid var(--line);
	border-top: 0;
	border-radius: 0 0 10px 10px;
	box-shadow: 0 16px 34px rgba(20, 18, 15, .18);
}

/* Same trap as .sitesearch and the drawer: the attribute loses to display, and without this
   the empty listbox is a visible 1px seam under the field on every page load. */
.sitesearch__suggest[hidden] {
	display: none;
}

.sitesearch__item {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 14px;
	padding: 11px 16px;
	border-top: 1px solid var(--line);
	color: var(--ink);
	text-decoration: none;
}

.sitesearch__item:first-child {
	border-top: 0;
}

/*
 * ⚑ ONE HIGHLIGHT STATE FOR BOTH MOUSE AND KEYBOARD. :hover alone would mean arrowing down
 * moves an invisible selection while the mouse's row stays lit, and the customer presses Enter
 * on the wrong product. site.js adds .is-active on arrow keys AND on mousemove, so there is
 * only ever one lit row and it is always the one Enter will open.
 */
.sitesearch__item:hover,
.sitesearch__item.is-active {
	background: var(--paper);
}

.sitesearch__itemmain {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.sitesearch__itemtitle {
	font-size: 14px;
	line-height: 1.3;
}

.sitesearch__itemsku {
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--grey);
}

.sitesearch__itemprice {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
}

.sitesearch__none {
	margin: 0;
	padding: 16px;
	font-size: 13.5px;
	color: var(--grey);
}

.sitesearch__all {
	display: block;
	width: 100%;
	font: inherit;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-align: center;
	color: var(--ink);
	background: var(--paper);
	border: 0;
	border-top: 1px solid var(--line);
	padding: 12px 16px;
	cursor: pointer;
	transition: color .3s var(--ease);
}

.sitesearch__all:hover {
	color: var(--orange);
}

/* ============================================================================
 * 10. The cart drawer
 *
 * Markup and the reasoning behind it: inc/cart-drawer.php. The panel's contents are
 * WooCommerce's own mini-cart template.
 *
 * ⚑ WHY THE MINI CART IS DRESSED HERE AND NOT IN woo.css. inc/woocommerce.php dequeues
 * `woocommerce-general` on the BROWSE screens — the catalogue, a product, a term archive — and
 * those are precisely the screens that have Add to cart buttons and therefore the screens this
 * drawer opens on. Leaving the panel to Woo's sheet would style it beautifully on cart and
 * checkout, where the drawer never renders, and leave a raw list of links on all 317 product
 * pages, where it does. Same reason the header and the count badge live in this file.
 * ========================================================================== */

.cartdrawer {
	position: fixed;
	inset: 0;
	z-index: 120;
}

/* The attribute loses to `display:flex`/`block` without this — the commonest way a [hidden]
   element is not hidden, and here it would be a full-screen scrim over every page. */
.cartdrawer[hidden] {
	display: none;
}

.cartdrawer__scrim {
	position: absolute;
	inset: 0;
	background: rgba(20, 18, 15, .46);
	opacity: 0;
	transition: opacity .32s var(--ease);
}

.cartdrawer.is-open .cartdrawer__scrim {
	opacity: 1;
}

.cartdrawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 100vw);
	display: flex;
	flex-direction: column;
	background: var(--cream);
	box-shadow: -18px 0 46px rgba(20, 18, 15, .22);
	transform: translateX(100%);
	transition: transform .32s var(--ease);
}

.cartdrawer.is-open .cartdrawer__panel {
	transform: translateX(0);
}

/* ⚑ 320ms IN site.js MATCHES THE .32s HERE. The script waits out the slide before setting
   `hidden`, because `hidden` is what takes the panel out of the tab order. Change one and
   change the other, or the panel either vanishes mid-slide or stays tabbable after it has
   gone. */
@media (prefers-reduced-motion: reduce) {
	.cartdrawer__scrim,
	.cartdrawer__panel {
		transition: none;
	}
}

.cartdrawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px var(--gut) 18px;
	border-bottom: 1px solid var(--line);
}

.cartdrawer__title {
	margin: 0;
	font-size: 11.5px;
	font-weight: 500;
	letter-spacing: .17em;
	text-transform: uppercase;
	color: var(--ink);
}

.cartdrawer__close {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 32px;
	height: 32px;
	margin-right: -6px;
	background: none;
	border: 0;
	border-radius: 50%;
	color: var(--ink);
	cursor: pointer;
	transition: background .3s var(--ease);
}

.cartdrawer__close:hover {
	background: rgba(20, 18, 15, .07);
}

.cartdrawer__x {
	position: relative;
	width: 12px;
	height: 12px;
}

.cartdrawer__x::before,
.cartdrawer__x::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	right: 0;
	height: 1px;
	background: currentColor;
}

.cartdrawer__x::before { transform: rotate(45deg); }
.cartdrawer__x::after  { transform: rotate(-45deg); }

.cartdrawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 4px var(--gut) 24px;
}

/* ----------------------------------------------------------------------------
 * WooCommerce's mini cart, inside the panel
 *
 * ⚑ .widget_shopping_cart_content IS THE FRAGMENT TARGET and must keep its own element — see
 * inc/cart-drawer.php. Style its CHILDREN, never it, or a rule here is thrown away the first
 * time anything is added to the basket.
 * -------------------------------------------------------------------------- */

.cartdrawer .woocommerce-mini-cart {
	list-style: none;
	margin: 0;
	padding: 0;
}

/*
 * ⚑ THE THUMBNAIL IS NOT A CHILD OF THE ROW, and writing this as a grid on the assumption that
 * it is produced a row that looked perfectly tidy and was wrong. WooCommerce nests the image
 * inside the product link:
 *
 *     <li><a class="remove">×</a><a><img>Product name</a><span class="quantity">1 × S$23.87</span></li>
 *
 * So `grid-template-columns: 58px 1fr` put the LINK in column one, pushed it to column two to
 * sit with the quantity, and left column one empty — indenting the whole row by 72px to make
 * space for a thumbnail that was never going to be placed there. MEASURED: the row started at
 * x=94 inside a panel whose content box starts at 22. Nothing about the screenshot said so,
 * which is the point: a layout can be neat and still be built on a false premise.
 *
 * Positioning the image out of the link's flow, with padding reserving its space, works with
 * the markup as it actually is and assumes nothing about which element lands in which cell.
 */
.cartdrawer .woocommerce-mini-cart-item {
	position: relative;
	padding: 18px 26px 18px 72px; /* 58px thumbnail + 14px gap */
	border-bottom: 1px solid var(--line);
	font-size: 13.5px;
	line-height: 1.45;
}

.cartdrawer .woocommerce-mini-cart-item img {
	position: absolute;
	top: 18px;
	left: 0;
	width: 58px;
	height: auto;
	border-radius: 4px;
	background: var(--paper);
}

.cartdrawer .woocommerce-mini-cart-item a:not(.remove) {
	display: block;
	color: var(--ink);
	text-decoration: none;
}

.cartdrawer .woocommerce-mini-cart-item a:not(.remove):hover {
	color: var(--orange);
}

.cartdrawer .woocommerce-mini-cart-item .quantity {
	display: block;
	margin-top: 3px;
	font-size: 12px;
	color: var(--grey);
}

/*
 * The remove ×. WooCommerce's own control — site.js never touches the cart — pulled out of the
 * flow and into the row's right edge, which is what the 26px of padding-right above is for.
 */
.cartdrawer .woocommerce-mini-cart-item a.remove {
	position: absolute;
	top: 16px;
	right: 0;
	display: grid;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	font-size: 15px;
	line-height: 1;
	color: var(--grey);
	text-decoration: none;
	transition: color .3s var(--ease), background .3s var(--ease);
}

.cartdrawer .woocommerce-mini-cart-item a.remove:hover {
	color: var(--ink);
	background: rgba(20, 18, 15, .07);
}

.cartdrawer .woocommerce-mini-cart__empty-message {
	margin: 28px 0;
	font-size: 13.5px;
	color: var(--grey);
}

.cartdrawer .woocommerce-mini-cart__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin: 20px 0 0;
	padding: 16px 0 0;
	font-size: 13px;
}

.cartdrawer .woocommerce-mini-cart__total strong {
	font-weight: 500;
	letter-spacing: .14em;
	text-transform: uppercase;
	font-size: 10.5px;
}

.cartdrawer .woocommerce-mini-cart__total .amount {
	font-size: 16px;
	font-weight: 500;
}

.cartdrawer .woocommerce-mini-cart__buttons {
	display: grid;
	gap: 10px;
	margin: 18px 0 0;
	padding: 0;
}

/*
 * ⚑ THE TWO BUTTONS ARE WooCommerce's `.button` AND `.checkout`, NOT the design's `.pill`, so
 * they get the pill's look written out here rather than a class they do not carry. Adding the
 * classes with a filter was the alternative and is worse: these are rendered by Woo's mini-cart
 * template, which is replaced wholesale by the cart fragment on every change, so anything that
 * depends on markup we injected has to survive a round trip through WooCommerce's AJAX. CSS
 * does; an injected class does not.
 */
.cartdrawer .woocommerce-mini-cart__buttons a {
	display: block;
	text-align: center;
	font-size: 10.5px;
	font-weight: 500;
	letter-spacing: .16em;
	text-transform: uppercase;
	text-decoration: none;
	padding: 13px 20px;
	border-radius: 999px;
	border: 1px solid var(--ink);
	color: var(--ink);
	transition: background .4s var(--ease), color .4s var(--ease), border-color .4s var(--ease);
}

.cartdrawer .woocommerce-mini-cart__buttons a:hover {
	background: rgba(20, 18, 15, .07);
}

.cartdrawer .woocommerce-mini-cart__buttons a.checkout {
	color: var(--cream);
	background: var(--ink);
}

.cartdrawer .woocommerce-mini-cart__buttons a.checkout:hover {
	background: var(--orange);
	border-color: var(--orange);
}

/*
 * ⚑ UNSCOPED, UNLIKE THE COPY IN pages/product.css. WooCommerce hides labels with its own
 * .screen-reader-text, this theme does not load Woo's stylesheet on the browse screens, and
 * product.css defines the class only under `.woocommerce`. The drawer is printed at the end of
 * <body>, outside any .woocommerce wrapper, so that rule cannot reach it and the hidden labels
 * would print as body copy inside the panel. Fourth time this build has paid for a dequeued
 * stylesheet, after the Gravity Forms honeypot, the quantity label and the finish names.
 */
.screen-reader-text {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* Visible to a screen reader, not on screen. */
.u-sr {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

/* ------------------------------------------------------------------ cookie consent
 *
 * In this file and not in a page sheet, for the same reason as the mobile drawer: it appears on
 * every page and no mockup draws it. There is no design to port, so it is assembled from the
 * shell's own tokens and the .pill primitive rather than drawn — see inc/cookie-consent.php.
 *
 * ⚠ IT IS A BANNER, NOT A MODAL. No overlay, no scroll lock, no focus trap: a reader can ignore
 * it and read the page, and ignoring it leaves measurement switched off. Holding somebody
 * hostage for a cookie decision is a dark pattern and an accessibility fault at the same time.
 *
 * ⚑ position:fixed at the FOOT and not the top, because the header is already fixed there and
 * two fixed bars leave a phone with about half a screen of page. 92px of scroll-margin on
 * section[id] exists for the header; nothing has to be reserved for this one, because it sits
 * over the end of the page rather than over a jump target.
 */
.cc {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 90;
	background: var(--ink);
	color: var(--cream);
	box-shadow: 0 -10px 30px rgba(0, 0, 0, .18);
}

.cc[hidden] { display: none; }

.cc__in {
	max-width: 1180px;
	margin: 0 auto;
	padding: 18px var(--gut);
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px 28px;
	justify-content: space-between;
}

.cc__t {
	margin: 0;
	flex: 1 1 420px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--cream);
}

/* ⚑ The link has to clear AA against --ink, which --orange does not at 13px (2.09:1 on paper;
 * on ink it is better but this is body-size text on a dark ground, so underline it and keep it
 * in the text colour rather than inventing a fifth orange). */
.cc__t a {
	color: var(--cream);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.cc__btns {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	flex: 0 0 auto;
}

/* ⚑ BOTH BUTTONS ARE THE SAME SIZE AND NEITHER IS PRE-SELECTED. A banner whose refusal is a
 * link in small print is what regulators object to and what a reader resents; the solid pill is
 * the site's ordinary primary and the outline pill its ordinary secondary, so "accept" is not
 * being shouted. Refusing must cost exactly one press, like accepting. */
.cc__btns .pill {
	font-size: 12px;
	padding: 10px 20px;
	white-space: nowrap;
}

/* ⚠ THE SOLID PILL HAS TO BE INVERTED HERE, and it was invisible until it was measured.
 * `.pill--solid` is ink on the rest of the site — background rgb(20,18,15) — and this banner's
 * ground is `--ink`, the same rgb(20,18,15). So the ACCEPT button was ink on ink: a 1:1
 * contrast ratio, no shape at all, reading as plain text beside an outlined REFUSE button. The
 * screenshot looked almost deliberate, which is why it needed getComputedStyle rather than an
 * eye: the label was legible (cream text), so nothing looked broken, and the only visible
 * button on a consent banner was the one that says no. */
.cc__btns .pill--solid {
	background: var(--cream);
	border-color: var(--cream);
	color: var(--ink);
}

.cc__btns .pill--solid:hover {
	background: #fff;
	border-color: #fff;
}

.cc__btns .pill:not(.pill--solid) {
	border-color: rgba(238, 235, 228, .5);
	color: var(--cream);
}

.cc__btns .pill:not(.pill--solid):hover {
	border-color: var(--cream);
}

@media (max-width: 680px) {
	.cc__in { padding: 14px var(--gut); gap: 12px; }
	.cc__t  { flex-basis: 100%; font-size: 12.5px; }
	.cc__btns { width: 100%; }
	.cc__btns .pill { flex: 1 1 auto; text-align: center; }
}
