/**
 * Haat — component layer.
 *
 * Buttons, badges, cards, grids, drawers and the small pieces the sections and
 * WooCommerce templates compose from.
 *
 * @package Haat
 */

/* ── Buttons ─────────────────────────────────────────────────────────────*/
.haat-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	border: 1px solid transparent;
	border-radius: var( --haat-radius-md );
	font-weight: var( --haat-weight-semibold );
	font-size: var( --haat-text-sm );
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	transition: background var( --haat-duration-fast ) var( --haat-ease-out ),
		color var( --haat-duration-fast ) var( --haat-ease-out ),
		border-color var( --haat-duration-fast ) var( --haat-ease-out ),
		transform var( --haat-duration-fast ) var( --haat-ease-out );
}

.haat-button:hover {
	text-decoration: none;
	transform: translateY( -1px );
}

.haat-button:active {
	transform: translateY( 0 );
}

.haat-button--primary {
	background: var( --haat-primary );
	color: var( --haat-primary-foreground );
	box-shadow: var( --haat-shadow-glow );
}

.haat-button--primary:hover {
	background: var( --haat-flame-600 );
	color: var( --haat-primary-foreground );
}

.haat-button--ghost {
	background: transparent;
	color: var( --haat-foreground );
	border-color: var( --haat-border );
}

.haat-button--ghost:hover {
	background: var( --haat-muted );
	color: var( --haat-foreground );
}

.haat-button--block {
	width: 100%;
}

/* ── Badges ──────────────────────────────────────────────────────────────*/
.haat-badge {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	padding: 0.2rem 0.55rem;
	border-radius: var( --haat-radius-full );
	font-size: var( --haat-text-xs );
	font-weight: var( --haat-weight-bold );
	line-height: 1.5;
	white-space: nowrap;
}

/* Tint paired with its own deep shade rather than with a fixed ink colour.
 * This is the pairing the dark-mode ramp inversion in tokens.css relies on:
 * swapping the ends of the ramp keeps the pair legible with no rule here. */
.haat-badge--soft {
	background: var( --haat-flame-50 );
	color: var( --haat-flame-700 );
}

/* Ink, not accent.
 *
 * The discount pill sits on a pale media panel, where near-black has more
 * contrast than the brand orange does — and it stops the badge competing with
 * the accent used for actual actions. It is still the loudest thing on the
 * card, which is the point; it just is not the same colour as the buttons. */
.haat-badge--sale {
	background: var( --haat-foreground );
	color: var( --haat-background );
	letter-spacing: 0.01em;
}

.haat-badge--accent {
	background: var( --haat-saffron-50 );
	color: var( --haat-saffron-700 );
}

.haat-badge--muted {
	background: var( --haat-muted );
	color: var( --haat-muted-foreground );
}

/* Sold out is a STATUS, not a quiet aside. The muted-on-muted treatment it used
 * to share with soft badges disappeared against the pale media panel, so it
 * read as an artefact rather than as the single most important thing about the
 * card. A solid plate with real ink and a hairline holds against any artwork. */
.haat-badge--soldout {
	background: var( --haat-surface );
	color: var( --haat-foreground );
	border: 1px solid var( --haat-border );
	box-shadow: var( --haat-shadow-soft );
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-size: 0.68rem;
}

/* The image carries the status too. A badge alone is easy to skim past in a
 * grid; a desaturated, dimmed product is legible at a glance from across the
 * row, which is where the shopper actually is. */
.haat-product-card.outofstock .haat-product-card__image {
	opacity: 0.45;
	filter: grayscale( 0.5 );
}

.haat-product-card.outofstock:hover .haat-product-card__image {
	transform: none;
}

.haat-badge--vendor {
	background: var( --haat-midnight-50 );
	color: var( --haat-midnight-700 );
	font-weight: var( --haat-weight-medium );
}

.haat-badge--vendor:hover {
	background: var( --haat-midnight-100 );
	text-decoration: none;
}

/* ── Cards ───────────────────────────────────────────────────────────────*/
.haat-card {
	position: relative;
	display: flex;
	flex-direction: column;
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-lg );
	overflow: hidden;
	transition: box-shadow var( --haat-duration-base ) var( --haat-ease-out ),
		transform var( --haat-duration-base ) var( --haat-ease-out ),
		border-color var( --haat-duration-base ) var( --haat-ease-out );
}

.haat-card:hover {
	border-color: color-mix( in oklab, var( --haat-primary ) 35%, var( --haat-border ) );
	box-shadow: var( --haat-shadow-card );
	transform: translateY( -2px );
}

/* ── Product grid ────────────────────────────────────────────────────────*/
.haat-product-grid {
	display: grid;
	gap: 1.25rem;
	margin: 0;
	padding: 0;
	list-style: none;
	/* auto-fill with a floor, not a fixed column count: the grid reflows on its
	 * own at every width, so the responsive breakpoints below only need to move
	 * the floor rather than restate a column count per breakpoint. */
	/* 15rem, not 13. At the smaller floor a product title wrapped to two lines
	 * on most items and the price, rating and brand ran out of room beside each
	 * other — the row read as crowded rather than as dense. */
	grid-template-columns: repeat( auto-fill, minmax( 15rem, 1fr ) );
}

@media ( min-width: 768px ) {
	.haat-product-grid--2 { grid-template-columns: repeat( 2, minmax( 0, 1fr ) ); }
	.haat-product-grid--3 { grid-template-columns: repeat( 3, minmax( 0, 1fr ) ); }
	.haat-product-grid--4 { grid-template-columns: repeat( 4, minmax( 0, 1fr ) ); }
	.haat-product-grid--5 { grid-template-columns: repeat( 5, minmax( 0, 1fr ) ); }
	.haat-product-grid--6 { grid-template-columns: repeat( 6, minmax( 0, 1fr ) ); }
}

@media ( max-width: 767px ) {
	.haat-product-grid {
		/* Two columns on a phone, not one. A marketplace grid at one column
		 * turns a 24-product page into a very long scroll, and every native
		 * marketplace app uses two. */
		grid-template-columns: repeat( 2, minmax( 0, 1fr ) );
		gap: 0.75rem;
	}
}

/* ── Product card ────────────────────────────────────────────────────────
 * An inset media panel with the product floating on it, then a meta row
 * pairing brand and rating, then title and price. The image is NOT bled to the
 * card edge: product shots arrive on their own white or grey grounds, and a
 * panel gives every one of them the same ground so a mixed catalogue looks like
 * a set rather than a collage.
 */
.haat-product-card {
	height: 100%;
	padding: 0.6rem;
	border-color: transparent;
	background: var( --haat-surface );
}

.haat-product-card:hover {
	border-color: var( --haat-border );
	transform: none;
}

.haat-product-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	background: var( --haat-muted );
	border-radius: var( --haat-radius-lg );
}

.haat-product-card__media-link {
	display: block;
	height: 100%;
}

.haat-product-card__image,
.haat-product-card__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	/* contain, not cover, with padding around it: the product is a subject on a
	 * ground, and cropping a chair's legs off to fill a square is worse than
	 * showing it slightly smaller. */
	padding: 8%;
	transition: transform var( --haat-duration-slow ) var( --haat-ease-out );
}

.haat-product-card:hover .haat-product-card__image {
	transform: scale( 1.04 );
}

.haat-card__badges {
	position: absolute;
	top: 0.7rem;
	left: 0.7rem;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.35rem;
	/* The stack sits over the image link; without this it would swallow clicks
	 * meant for the product. Individual badges that ARE links re-enable it. */
	pointer-events: none;
}

.haat-card__badges a {
	pointer-events: auto;
}

/* ── Card actions ────────────────────────────────────────────────────────
 * Always visible, not hover-revealed. Half of commerce traffic is touch, where
 * there is no hover at all, and a control that only appears on a device class
 * is a control half the audience never finds.
 */
.haat-product-card__actions {
	position: absolute;
	top: 0.7rem;
	right: 0.7rem;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.haat-product-card__actions > * {
	position: relative;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	background: var( --haat-surface );
	border: 1px solid transparent;
	border-radius: var( --haat-radius-full );
	box-shadow: var( --haat-shadow-soft );
	color: var( --haat-foreground );
	transition: background var( --haat-duration-fast ) var( --haat-ease-out ),
		color var( --haat-duration-fast ) var( --haat-ease-out );
}

/* The stack owns the hover treatment for whatever is placed in it, and this
 * selector is deliberately one class longer than it needs to be.
 *
 * Haat Pro's own `.haat-wishlist-button:hover` sets colour to the primary and
 * scores exactly the same 0-2-0 as the shorter form of this rule — and pro.css
 * loads after the theme, so it won the tie and painted the icon primary-on-
 * primary. The heart simply vanished on hover. Raising the specificity here,
 * rather than weakening Pro, keeps the rule where the layout decision lives:
 * anything dropped into this stack looks like it belongs to the stack. */
.haat-product-card .haat-product-card__actions > *:hover,
.haat-product-card .haat-product-card__actions > *:focus-visible {
	background: var( --haat-primary );
	color: var( --haat-primary-foreground );
	border-color: var( --haat-primary );
}

.haat-product-card__body {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.3rem;
	padding: 0.85rem 0.4rem 0.5rem;
	flex: 1 1 auto;
}

/* ── Meta row ────────────────────────────────────────────────────────────*/
.haat-product-card__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	min-height: 1.2rem;
	font-size: var( --haat-text-xs );
}

.haat-product-card__brand {
	color: var( --haat-muted-foreground );
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.haat-product-card__rating {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	flex-shrink: 0;
	font-weight: var( --haat-weight-semibold );
	color: var( --haat-foreground );
}

.haat-product-card__star {
	width: 0.85rem;
	height: 0.85rem;
	background: var( --haat-saffron-400 );
	-webkit-mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.6l2.9 6.1 6.6.9-4.8 4.6 1.2 6.6-5.9-3.2-5.9 3.2 1.2-6.6L2.5 9.6l6.6-.9z'/%3E%3C/svg%3E" );
	mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M12 2.6l2.9 6.1 6.6.9-4.8 4.6 1.2 6.6-5.9-3.2-5.9 3.2 1.2-6.6L2.5 9.6l6.6-.9z'/%3E%3C/svg%3E" );
	-webkit-mask-size: contain;
	mask-size: contain;
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
}

.haat-product-card__title {
	margin: 0;
	font-family: var( --haat-font-body );
	font-size: var( --haat-text-base );
	font-weight: var( --haat-weight-bold );
	line-height: 1.35;
	letter-spacing: -0.01em;
}

.haat-product-card__title a {
	color: var( --haat-foreground );
	/* Two lines, then ellipsis. Uncapped titles make neighbouring cards in the
	 * same row different heights, which is the most visible way a product grid
	 * stops looking like a grid. */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.haat-product-card__title a:hover {
	color: var( --haat-primary );
	text-decoration: none;
}

/* ── Price ───────────────────────────────────────────────────────────────
 * Ink, not accent.
 *
 * Every price on the page used to be flame, which meant a 24-product grid was
 * a wall of orange with nothing standing out — the accent stopped signalling
 * anything because it was on everything. A price is information; a DISCOUNTED
 * price is the claim worth making, so that is the one that gets the colour. */
.haat-product-card__price {
	display: flex;
	align-items: baseline;
	gap: 0.5rem;
	margin-top: auto;
	padding-top: 0.35rem;
	font-size: var( --haat-text-lg );
	font-weight: var( --haat-weight-bold );
	color: var( --haat-foreground );
}

.haat-product-card__price del {
	order: 2;
	font-size: var( --haat-text-sm );
	font-weight: var( --haat-weight-normal );
	color: var( --haat-muted-foreground );
	text-decoration-thickness: 1px;
}

.haat-product-card__price ins {
	text-decoration: none;
	color: var( --haat-flame-600 );
}

/* ── Rating stars ────────────────────────────────────────────────────────*/
.haat-card__rating {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	font-size: var( --haat-text-xs );
	color: var( --haat-muted-foreground );
}

.haat-stars {
	position: relative;
	display: inline-block;
	width: 5.2em;
	height: 1em;
	font-size: 0.85rem;
	background: var( --haat-border );
	-webkit-mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20' viewBox='0 0 100 20'%3E%3Cpath fill='%23000' d='M10 0l2.4 7.3H20l-6.2 4.5 2.4 7.3L10 14.6 3.8 19.1l2.4-7.3L0 7.3h7.6zM30 0l2.4 7.3H40l-6.2 4.5 2.4 7.3L30 14.6l-6.2 4.5 2.4-7.3L20 7.3h7.6zM50 0l2.4 7.3H60l-6.2 4.5 2.4 7.3L50 14.6l-6.2 4.5 2.4-7.3L40 7.3h7.6zM70 0l2.4 7.3H80l-6.2 4.5 2.4 7.3L70 14.6l-6.2 4.5 2.4-7.3L60 7.3h7.6zM90 0l2.4 7.3H100l-6.2 4.5 2.4 7.3L90 14.6l-6.2 4.5 2.4-7.3L80 7.3h7.6z'/%3E%3C/svg%3E" );
	mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='20' viewBox='0 0 100 20'%3E%3Cpath fill='%23000' d='M10 0l2.4 7.3H20l-6.2 4.5 2.4 7.3L10 14.6 3.8 19.1l2.4-7.3L0 7.3h7.6zM30 0l2.4 7.3H40l-6.2 4.5 2.4 7.3L30 14.6l-6.2 4.5 2.4-7.3L20 7.3h7.6zM50 0l2.4 7.3H60l-6.2 4.5 2.4 7.3L50 14.6l-6.2 4.5 2.4-7.3L40 7.3h7.6zM70 0l2.4 7.3H80l-6.2 4.5 2.4 7.3L70 14.6l-6.2 4.5 2.4-7.3L60 7.3h7.6zM90 0l2.4 7.3H100l-6.2 4.5 2.4 7.3L90 14.6l-6.2 4.5 2.4-7.3L80 7.3h7.6z'/%3E%3C/svg%3E" );
	-webkit-mask-size: 100% 100%;
	mask-size: 100% 100%;
}

/* The fill is a second layer clipped to a percentage, so a 3.4 average renders
 * as 68% of the row rather than snapping to whole stars. */
.haat-stars::before {
	content: "";
	position: absolute;
	inset: 0;
	width: var( --haat-stars-fill, 0% );
	background: var( --haat-saffron-400 );
}

/* ── Countdown ───────────────────────────────────────────────────────────*/
.haat-countdown {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	font-variant-numeric: tabular-nums;
}

.haat-countdown__unit {
	display: inline-flex;
	align-items: baseline;
	gap: 0.1rem;
	padding: 0.15rem 0.4rem;
	/* Inverse of the page, not a fixed ramp step. This was midnight-900 with
	 * white ink — and midnight-900 INVERTS to a near-white in dark mode, so the
	 * chip became white text on a white plate and the whole "Ends in" timer
	 * rendered as a row of blank boxes. Deriving both from the page roles keeps
	 * the pair inverted together in every scheme. */
	background: var( --haat-foreground );
	color: var( --haat-background );
	border-radius: var( --haat-radius-sm );
	font-size: var( --haat-text-xs );
	font-weight: var( --haat-weight-bold );
}

.haat-countdown__label {
	opacity: 0.65;
	font-weight: var( --haat-weight-normal );
}

.haat-countdown--card {
	margin-top: 0.15rem;
}

.haat-countdown--card .haat-countdown__unit {
	background: var( --haat-flame-50 );
	color: var( --haat-flame-700 );
	padding: 0.05rem 0.3rem;
}

.haat-countdown.is-ended .haat-countdown__unit {
	background: var( --haat-muted );
	color: var( --haat-muted-foreground );
}

/* ── Section heading ─────────────────────────────────────────────────────*/
.haat-section-heading {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.haat-section-heading__title {
	margin: 0;
	font-size: var( --haat-text-3xl );
}

.haat-section-heading__subtitle {
	margin: 0.35rem 0 0;
	color: var( --haat-muted-foreground );
	font-size: var( --haat-text-sm );
}

.haat-section-heading__link {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-shrink: 0;
	font-size: var( --haat-text-sm );
	font-weight: var( --haat-weight-semibold );
}

.haat-section-heading__link:hover .haat-section-heading__chevron {
	transform: translateX( 3px );
}

.haat-section-heading__chevron {
	transition: transform var( --haat-duration-fast ) var( --haat-ease-out );
}

/* ── Category tiles ──────────────────────────────────────────────────────*/
.haat-tile-grid {
	display: grid;
	grid-template-columns: repeat( auto-fill, minmax( 9rem, 1fr ) );
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.haat-tile__link {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.5rem;
	padding: 1.25rem 0.75rem;
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-lg );
	text-align: center;
	transition: border-color var( --haat-duration-base ) var( --haat-ease-out ),
		box-shadow var( --haat-duration-base ) var( --haat-ease-out ),
		transform var( --haat-duration-base ) var( --haat-ease-out );
}

.haat-tile__link:hover {
	border-color: color-mix( in oklab, var( --haat-primary ) 40%, var( --haat-border ) );
	box-shadow: var( --haat-shadow-card );
	transform: translateY( -3px );
	text-decoration: none;
}

.haat-tile__media {
	display: grid;
	place-items: center;
	width: 4.5rem;
	height: 4.5rem;
	overflow: hidden;
	background: var( --haat-flame-50 );
	border-radius: var( --haat-radius-full );
}

.haat-tile__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.haat-tile__placeholder {
	font-family: var( --haat-font-display );
	font-size: var( --haat-text-2xl );
	font-weight: var( --haat-weight-bold );
	color: var( --haat-flame-700 );
	text-transform: uppercase;
}

.haat-tile__name {
	font-size: var( --haat-text-sm );
	font-weight: var( --haat-weight-semibold );
	color: var( --haat-foreground );
}

.haat-tile__count {
	font-size: var( --haat-text-xs );
	color: var( --haat-muted-foreground );
}

/* ── Horizontal rail ─────────────────────────────────────────────────────*/
.haat-rail {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax( 12rem, 1fr );
	gap: 1rem;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var( --haat-gutter );
	/* Room for the card hover lift, which would otherwise be clipped by the
	 * scroll container. */
	padding-block: 0.5rem;
	scrollbar-width: thin;
}

.haat-rail > * {
	scroll-snap-align: start;
}

/* The rail is scrolled by its arrows, by swipe and by keyboard, so the native
 * scrollbar is a bare grey trough sitting under a polished product row. Hidden
 * rather than styled: a visible bar here reads as a layout bug, and hiding it
 * costs no affordance because all three input methods still work. */
.haat-rail {
	scrollbar-width: none;
	-ms-overflow-style: none;
}

.haat-rail::-webkit-scrollbar {
	display: none;
}

@media ( min-width: 768px ) {
	.haat-rail {
		grid-auto-columns: minmax( 16rem, 1fr );
	}
}

.haat-rail__nav {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-full );
	color: var( --haat-foreground );
}

.haat-rail__nav:hover {
	border-color: var( --haat-primary );
	color: var( --haat-primary );
}

.haat-rail__nav[disabled] {
	opacity: 0.4;
	cursor: default;
}

/* ── Carousel ────────────────────────────────────────────────────────────*/
.haat-carousel__nav {
	position: absolute;
	top: 50%;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 2.5rem;
	height: 2.5rem;
	transform: translateY( -50% );
	background: color-mix( in oklab, var( --haat-surface ) 88%, transparent );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-full );
	color: var( --haat-foreground );
	backdrop-filter: blur( 6px );
}

.haat-carousel__nav--prev { left: 0.75rem; }
.haat-carousel__nav--next { right: 0.75rem; }

.haat-carousel__arrow {
	width: 0.55rem;
	height: 0.55rem;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate( 45deg );
	margin-left: -2px;
}

.haat-carousel__nav--prev .haat-carousel__arrow,
.haat-rail__nav:not( .haat-rail__nav--next ) .haat-carousel__arrow {
	transform: rotate( -135deg );
	margin-left: 2px;
}

.haat-carousel__dots {
	position: absolute;
	bottom: 0.9rem;
	left: 50%;
	z-index: 2;
	display: flex;
	gap: 0.4rem;
	transform: translateX( -50% );
}

.haat-carousel__dot {
	width: 0.5rem;
	height: 0.5rem;
	padding: 0;
	/* White at low alpha, not a page-foreground mix. The dots float over the
	 * banner artwork now, and a foreground-derived colour is near-black — which
	 * on a dark hero was a row of dots you could not see. Artwork is
	 * unpredictable, so they also carry a shadow to hold their edge over a pale
	 * photograph. */
	background: rgba( 255, 255, 255, 0.45 );
	box-shadow: 0 1px 3px rgba( 0, 0, 0, 0.35 );
	border: 0;
	border-radius: var( --haat-radius-full );
	transition: width var( --haat-duration-base ) var( --haat-ease-out ),
		background var( --haat-duration-base ) var( --haat-ease-out );
}

.haat-carousel__dot:hover {
	background: rgba( 255, 255, 255, 0.75 );
}

.haat-carousel__dot[aria-selected="true"] {
	width: 1.5rem;
	background: var( --haat-primary );
}

/* ── Marquee ───────────────────────────────────────────*/
.haat-marquee {
	display: flex;
	gap: 1rem;
	overflow: hidden;
	/* Fades the ends so logos enter and leave rather than being cut off mid-
	 * glyph at the container edge. */
	-webkit-mask-image: linear-gradient( to right, transparent, #000 4%, #000 96%, transparent );
	mask-image: linear-gradient( to right, transparent, #000 4%, #000 96%, transparent );
}

.haat-marquee__track {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	gap: 1rem;
	margin: 0;
	padding: 0.25rem 0;
	list-style: none;
	animation: haat-marquee var( --haat-marquee-duration ) linear infinite;
}

.haat-marquee:hover .haat-marquee__track {
	animation-play-state: paused;
}

.haat-marquee__link {
	display: grid;
	place-items: center;
	/* Fixed, not intrinsic. Sized to content, "Apex" got a tile half the width
	 * of "Atlas Supply" and the row read as a ragged pile of pills rather than
	 * a brand wall. Every tile is the same box; the logo inside is what
	 * differs. */
	width: 11.5rem;
	height: 5rem;
	padding: 0.75rem 1rem;
	/* A surface plate under every mark. Brand logos are supplied by the
	 * merchant and are overwhelmingly dark ink on transparent, which is
	 * invisible on a dark page — and greyscale plus 0.65 opacity on top of that
	 * made the whole row disappear. The plate gives every logo a predictable
	 * ground in both schemes, and the row still reads as a set of brand tiles
	 * rather than a strip of floating marks. */
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-lg );
	transition: border-color var( --haat-duration-base ) var( --haat-ease-out ),
		background-color var( --haat-duration-base ) var( --haat-ease-out );
}

.haat-marquee__link:hover {
	background: var( --haat-background );
	border-color: color-mix( in oklab, var( --haat-primary ) 40%, var( --haat-border ) );
}

.haat-marquee__logo {
	/* Bounded on both axes. A height cap alone lets a long wordmark run past
	 * the tile edge; a width cap alone lets a squat mark tower over its
	 * neighbours. */
	/* 2.6rem, not more: every lockup is under 2.64:1, so at this height the
	 * widest is 111px inside 144px of usable tile. Go taller and the long
	 * wordmarks hit the width cap instead and render shorter than the short
	 * ones -- the exact defect this was fixed to remove. */
	max-height: 2.6rem;
	max-width: 100%;
	width: auto;
	object-fit: contain;
}

.haat-marquee__name {
	font-family: var( --haat-font-display );
	font-size: var( --haat-text-base );
	font-weight: var( --haat-weight-bold );
	color: var( --haat-muted-foreground );
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

/* ── Trust badges ────────────────────────────────────────────────────────*/
.haat-trust {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 13rem, 1fr ) );
	gap: 1rem;
	margin: 0;
	padding: 1.5rem;
	list-style: none;
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-lg );
}

.haat-trust__item {
	display: flex;
	align-items: center;
	gap: 0.9rem;
}

.haat-trust__icon {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	flex-shrink: 0;
	background: var( --haat-flame-50 );
	border-radius: var( --haat-radius-full );
	position: relative;
}

.haat-trust__icon::after {
	content: "";
	width: 1.35rem;
	height: 1.35rem;
	background: var( --haat-flame-600 );
	-webkit-mask-repeat: no-repeat;
	mask-repeat: no-repeat;
	-webkit-mask-position: center;
	mask-position: center;
	-webkit-mask-size: contain;
	mask-size: contain;
}

.haat-trust__icon--truck::after {
	-webkit-mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpath d='M16 8h4l3 3v5h-7z'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E" );
	mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1' y='3' width='15' height='13'/%3E%3Cpath d='M16 8h4l3 3v5h-7z'/%3E%3Ccircle cx='5.5' cy='18.5' r='2.5'/%3E%3Ccircle cx='18.5' cy='18.5' r='2.5'/%3E%3C/svg%3E" );
}

.haat-trust__icon--shield::after {
	-webkit-mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E" );
	mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z'/%3E%3C/svg%3E" );
}

.haat-trust__icon--refresh::after {
	-webkit-mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3Cpath d='M21 12a9 9 0 0 1-15 6.7L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3C/svg%3E" );
	mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12a9 9 0 0 1 15-6.7L21 8'/%3E%3Cpath d='M21 3v5h-5'/%3E%3Cpath d='M21 12a9 9 0 0 1-15 6.7L3 16'/%3E%3Cpath d='M3 21v-5h5'/%3E%3C/svg%3E" );
}

.haat-trust__icon--headset::after,
.haat-trust__icon--wallet::after,
.haat-trust__icon--sparkles::after {
	-webkit-mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18v-6a9 9 0 0 1 18 0v6'/%3E%3Cpath d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/%3E%3C/svg%3E" );
	mask-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 18v-6a9 9 0 0 1 18 0v6'/%3E%3Cpath d='M21 19a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3zM3 19a2 2 0 0 0 2 2h1a2 2 0 0 0 2-2v-3a2 2 0 0 0-2-2H3z'/%3E%3C/svg%3E" );
}

.haat-trust__text {
	display: flex;
	flex-direction: column;
}

.haat-trust__title {
	font-weight: var( --haat-weight-semibold );
	font-size: var( --haat-text-sm );
}

.haat-trust__sub {
	font-size: var( --haat-text-xs );
	color: var( --haat-muted-foreground );
}

/* ── Promo banner ────────────────────────────────────────────────────────*/
.haat-promo {
	position: relative;
	display: grid;
	place-items: center;
	min-height: 16rem;
	padding: 2.5rem;
	overflow: hidden;
	border-radius: var( --haat-radius-xl );
	background: linear-gradient( 135deg, var( --haat-flame-500 ), var( --haat-saffron-400 ) );
	color: #fff;
	text-align: center;
}

.haat-promo__image {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A full-bleed scrim over the image rather than a translucent box behind the
 * text. The boxed version read as a grey rectangle pasted onto the banner —
 * legible, but it looked like a placeholder that had not been styled yet. A
 * gradient across the whole panel darkens what sits under the copy and leaves
 * the artwork clean on the other side. */
.haat-promo--has-image::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient( 90deg, rgba( 10, 14, 39, 0.72 ) 0%, rgba( 10, 14, 39, 0.45 ) 45%, rgba( 10, 14, 39, 0.08 ) 100% );
}

.haat-promo--has-image .haat-promo__content {
	position: relative;
	z-index: 1;
	max-width: 34rem;
	margin-right: auto;
	padding: 0;
	text-align: left;
	text-shadow: 0 1px 2px rgba( 0, 0, 0, 0.25 );
}

.haat-promo__heading {
	margin: 0 0 0.5rem;
	color: inherit;
	font-size: var( --haat-text-4xl );
}

.haat-promo__text {
	margin: 0 0 1.25rem;
	opacity: 0.92;
}

.haat-promo .haat-button--primary {
	background: #fff;
	color: var( --haat-flame-700 );
	box-shadow: none;
}

/* ── Progress ────────────────────────────────────────────────────────────*/
.haat-progress {
	height: 0.4rem;
	overflow: hidden;
	background: var( --haat-muted );
	border-radius: var( --haat-radius-full );
}

.haat-progress__bar {
	display: block;
	height: 100%;
	background: linear-gradient( 90deg, var( --haat-flame-500 ), var( --haat-saffron-400 ) );
	border-radius: inherit;
	transition: width var( --haat-duration-slow ) var( --haat-ease-out );
}

/* ── Drawers ─────────────────────────────────────────────────────────────*/
.haat-overlay {
	position: fixed;
	inset: 0;
	z-index: calc( var( --haat-z-drawer ) - 1 );
	background: rgba( 10, 14, 39, 0.5 );
	opacity: 0;
	transition: opacity var( --haat-duration-base ) var( --haat-ease-out );
}

.haat-overlay.is-visible {
	opacity: 1;
}

.haat-drawer {
	position: fixed;
	top: 0;
	bottom: 0;
	z-index: var( --haat-z-drawer );
	display: flex;
	flex-direction: column;
	width: min( 22rem, 88vw );
	background: var( --haat-surface );
	box-shadow: var( --haat-shadow-pop );
	transition: transform var( --haat-duration-base ) var( --haat-ease-out );
}

.haat-drawer--left {
	left: 0;
	transform: translateX( -100% );
}

.haat-drawer--right {
	right: 0;
	transform: translateX( 100% );
}

.haat-drawer.is-open {
	transform: translateX( 0 );
}

/* The [hidden] attribute is what keeps a closed drawer out of the tab order.
 * JS removes it one frame before adding .is-open so the transform still
 * animates from its off-screen resting position. */
.haat-drawer[hidden] {
	display: none;
}

.haat-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid var( --haat-border );
}

.haat-drawer__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: var( --haat-font-display );
	font-weight: var( --haat-weight-bold );
}

.haat-drawer__count {
	padding: 0.05rem 0.45rem;
	background: var( --haat-flame-50 );
	color: var( --haat-flame-700 );
	border-radius: var( --haat-radius-full );
	font-size: var( --haat-text-xs );
}

.haat-drawer__close {
	position: relative;
	width: 2rem;
	height: 2rem;
	background: none;
	border: 0;
	border-radius: var( --haat-radius-md );
	color: inherit;
}

.haat-drawer__close:hover {
	background: var( --haat-muted );
}

.haat-drawer__close-icon::before,
.haat-drawer__close-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 14px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

.haat-drawer__close-icon::before { transform: translate( -50%, -50% ) rotate( 45deg ); }
.haat-drawer__close-icon::after { transform: translate( -50%, -50% ) rotate( -45deg ); }

.haat-drawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 1.25rem;
	overscroll-behavior: contain;
}

.haat-drawer__footer {
	padding: 1rem 1.25rem;
	border-top: 1px solid var( --haat-border );
}

.haat-cart-drawer__shipping {
	padding: 1rem 1.25rem;
	border-top: 1px solid var( --haat-border );
	background: var( --haat-muted );
}

.haat-cart-drawer__shipping-text {
	margin: 0 0 0.5rem;
	font-size: var( --haat-text-sm );
}

/* ── Mobile nav ──────────────────────────────────────────────────────────*/
.haat-mobile-nav__list,
.haat-mobile-nav__sub {
	margin: 0;
	padding: 0;
	list-style: none;
}

.haat-mobile-nav__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var( --haat-border );
}

.haat-mobile-nav__link {
	flex: 1 1 auto;
	padding: 0.85rem 0;
	color: var( --haat-foreground );
	font-weight: var( --haat-weight-medium );
}

.haat-mobile-nav__toggle {
	width: 2.5rem;
	height: 2.5rem;
	background: none;
	border: 0;
	color: inherit;
	position: relative;
}

.haat-mobile-nav__toggle-icon::before,
.haat-mobile-nav__toggle-icon::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 11px;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
	transform: translate( -50%, -50% );
	transition: transform var( --haat-duration-fast ) var( --haat-ease-out );
}

.haat-mobile-nav__toggle-icon::after {
	transform: translate( -50%, -50% ) rotate( 90deg );
}

.haat-mobile-nav__toggle[aria-expanded="true"] .haat-mobile-nav__toggle-icon::after {
	transform: translate( -50%, -50% ) rotate( 0deg );
}

.haat-mobile-nav__sub {
	padding-left: 1rem;
}

.haat-mobile-nav__sub .haat-mobile-nav__link {
	padding-block: 0.6rem;
	font-weight: var( --haat-weight-normal );
	color: var( --haat-muted-foreground );
}

/* ── Pagination ──────────────────────────────────────────────────────────*/
.haat-pagination,
.woocommerce-pagination {
	margin-top: 2.5rem;
}

.haat-pagination .nav-links,
.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
	border: 0;
}

.haat-pagination .page-numbers,
.woocommerce-pagination .page-numbers {
	display: grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding-inline: 0.75rem;
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-md );
	color: var( --haat-foreground );
	font-size: var( --haat-text-sm );
	font-weight: var( --haat-weight-medium );
}

.haat-pagination .page-numbers.current,
.woocommerce-pagination .page-numbers.current {
	background: var( --haat-primary );
	border-color: var( --haat-primary );
	color: var( --haat-primary-foreground );
}

.haat-pagination .page-numbers:hover,
.woocommerce-pagination .page-numbers:hover {
	border-color: var( --haat-primary );
	text-decoration: none;
}

/*
 * Written at WooCommerce's own specificity, which is high.
 *
 * It ships `.woocommerce nav.woocommerce-pagination ul li a, ... ul li span`
 * (0-3-4) setting `min-width: 1em` and `padding: .5em`, and
 * `... ul li span.current` painting the active page `#e9e6ed` on `#8a7e88`.
 * The theme's `.woocommerce-pagination .page-numbers` was 0-3-0 and lost the
 * lot: cells came out 21-24px wide instead of 40, and the current page was
 * lavender-on-grey with only its BORDER taking the brand colour -- because
 * border is the one property WooCommerce's rule does not set.
 */
/*
 * WooCommerce draws the pager as one bordered box with hairline dividers
 * between cells, and puts `overflow: hidden` on each li -- which also clipped
 * the rounded corners off every button. Undoing all three turns it back into a
 * row of separate controls.
 */
.woocommerce nav.woocommerce-pagination ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin: 0;
	padding: 0;
	border: 0;
	list-style: none;
}

.woocommerce nav.woocommerce-pagination ul li {
	float: none;
	margin: 0;
	padding: 0;
	overflow: visible;
	border: 0;
}

.woocommerce nav.woocommerce-pagination ul li a,
.woocommerce nav.woocommerce-pagination ul li span {
	display: grid;
	place-items: center;
	min-width: 2.5rem;
	height: 2.5rem;
	padding: 0 0.75rem;
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-md );
	color: var( --haat-foreground );
	font-size: var( --haat-text-sm );
	font-weight: var( --haat-weight-medium );
	line-height: 1;
}

.woocommerce nav.woocommerce-pagination ul li span.current,
.woocommerce nav.woocommerce-pagination ul li a.current {
	background: var( --haat-primary );
	border-color: var( --haat-primary );
	color: var( --haat-primary-foreground );
}

.woocommerce nav.woocommerce-pagination ul li a:hover,
.woocommerce nav.woocommerce-pagination ul li a:focus {
	background: var( --haat-surface );
	border-color: var( --haat-primary );
	color: var( --haat-primary );
}

.woocommerce-pagination li {
	border: 0;
}

/* ── Widgets ─────────────────────────────────────────────────────────────*/
.haat-sidebar .haat-widget {
	padding: 1.25rem;
	margin-bottom: 1.25rem;
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-lg );
}

/*
 * Both widget systems, because WordPress ships BLOCK widgets by default.
 *
 * register_sidebar()'s `before_title` wraps a CLASSIC widget's title and is
 * simply not used for a block widget -- a Heading block renders
 * `<h2 class="wp-block-heading">` on its own. So `.haat-widget__title` matched
 * nothing on a default install and every sidebar heading fell back to the
 * global h2 size: "Recent Comments" set at 40px in a 17rem column, which reads
 * as a broken stylesheet rather than as a heading.
 */
.haat-sidebar .haat-widget__title,
.haat-sidebar .haat-widget .wp-block-heading,
.haat-sidebar .haat-widget > h2,
.haat-sidebar .haat-widget > h3 {
	margin: 0 0 0.9rem;
	font-family: var( --haat-font-display );
	font-size: var( --haat-text-base );
	font-weight: var( --haat-weight-bold );
	line-height: 1.3;
	color: var( --haat-foreground );
}

.haat-sidebar .haat-widget ul {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 0.5rem;
	font-size: var( --haat-text-sm );
}

.haat-sidebar .haat-widget a {
	color: var( --haat-foreground );
}

.haat-sidebar .haat-widget a:hover {
	color: var( --haat-primary );
}

/* ── Post cards and entries ──────────────────────────────────────────────*/
.haat-post-grid {
	display: grid;
	gap: 1.5rem;
	grid-template-columns: repeat( auto-fill, minmax( 17rem, 1fr ) );
}

@media ( min-width: 768px ) {
	.haat-post-grid--3 {
		grid-template-columns: repeat( 3, minmax( 0, 1fr ) );
	}
}

.haat-post-card__media {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var( --haat-muted );
}

.haat-post-card__image {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.haat-post-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
	padding: 1.1rem;
}

/*
 * Every child fills the column; the category pill is the one exception.
 *
 * `align-items: flex-start` above exists so the pill hugs its own label instead
 * of stretching into a full-width bar -- but it applies to the TITLE too, and a
 * shrink-to-fit box never goes narrower than its min-content. `overflow-wrap:
 * break-word` does NOT lower min-content (only `anywhere` and `word-break` do),
 * so a title with no break opportunity in it kept its full 991px min-content
 * inside a 284px card and laid itself across the two cards to its right.
 *
 * Stretching every child and opting the pill back out fixes the title, the
 * excerpt and whatever gets added to this card next, rather than the one
 * element that happened to be reported.
 */
.haat-post-card__body > * {
	align-self: stretch;
}

.haat-post-card__body > .haat-badge {
	align-self: flex-start;
}

.haat-post-card__title {
	margin: 0;
	font-size: var( --haat-text-lg );
}

.haat-post-card__title a {
	color: var( --haat-foreground );
}

.haat-post-card__excerpt {
	font-size: var( --haat-text-sm );
	color: var( --haat-muted-foreground );
}

.haat-post-card__excerpt p {
	margin: 0;
}

.haat-entry-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	font-size: var( --haat-text-xs );
	color: var( --haat-muted-foreground );
}

.haat-entry {
	max-width: 46rem;
}

.haat-layout--full .haat-entry,
.haat-no-sidebar .haat-entry {
	max-width: none;
}

.haat-entry__header {
	margin-bottom: 1.5rem;
}

.haat-entry__title {
	margin-bottom: 0.5rem;
}

.haat-entry__media {
	margin: 0 0 2rem;
}

.haat-entry__image {
	width: 100%;
	border-radius: var( --haat-radius-lg );
}

.haat-archive-header {
	margin-bottom: 2rem;
}

.haat-archive-header__title {
	margin-bottom: 0.35rem;
}

.haat-archive-header__count {
	margin: 0;
	color: var( --haat-muted-foreground );
	font-size: var( --haat-text-sm );
}

.haat-post-nav {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	margin-top: 3rem;
	padding-top: 1.5rem;
	border-top: 1px solid var( --haat-border );
	font-size: var( --haat-text-sm );
}

.haat-post-nav__label {
	display: block;
	color: var( --haat-muted-foreground );
	font-size: var( --haat-text-xs );
}

/* ── Comments ────────────────────────────────────────────────────────────*/
.haat-comments {
	margin-top: 3rem;
	padding-top: 2rem;
	border-top: 1px solid var( --haat-border );
}

.haat-comments__list,
.haat-comments__list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.haat-comments__list .children {
	margin-left: 1.5rem;
	padding-left: 1.5rem;
	border-left: 1px solid var( --haat-border );
}

.haat-comments__list .comment-body {
	padding: 1.25rem 0;
	border-bottom: 1px solid var( --haat-border );
}

.haat-comments__list .avatar {
	border-radius: var( --haat-radius-full );
}

/* ── Empty states ────────────────────────────────────────────────────────*/
.haat-empty,
.haat-404 {
	max-width: 40rem;
	margin-inline: auto;
	padding-block: 3rem;
	text-align: center;
}

.haat-404 {
	max-width: none;
}

.haat-404__code {
	margin: 0;
	font-family: var( --haat-font-display );
	font-size: var( --haat-text-6xl );
	font-weight: var( --haat-weight-black );
	color: var( --haat-flame-500 );
	line-height: 1;
}

.haat-404__text,
.haat-empty__text {
	color: var( --haat-muted-foreground );
}

.haat-404__search,
.haat-empty__search {
	max-width: 26rem;
	margin: 1.5rem auto;
}

.haat-404__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.75rem;
}

.haat-404__products {
	margin-top: 4rem;
	text-align: left;
}

.haat-searchform {
	display: flex;
	gap: 0.5rem;
}

.haat-searchform__submit {
	display: grid;
	place-items: center;
	width: 2.75rem;
	flex-shrink: 0;
	background: var( --haat-primary );
	color: var( --haat-primary-foreground );
	border: 0;
	border-radius: var( --haat-radius-md );
}

/* ── Back to top ─────────────────────────────────────────────────────────*/
.haat-back-to-top {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: var( --haat-z-sticky );
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	background: var( --haat-surface );
	border: 1px solid var( --haat-border );
	border-radius: var( --haat-radius-full );
	box-shadow: var( --haat-shadow-card );
	color: var( --haat-foreground );
}

.haat-back-to-top[hidden] {
	display: none;
}

.haat-back-to-top__icon {
	width: 0.6rem;
	height: 0.6rem;
	border-top: 2px solid currentColor;
	border-right: 2px solid currentColor;
	transform: rotate( -45deg ) translate( -2px, 2px );
}

/* ── Keyframes ───────────────────────────────────────────────────────────
 * Kept in this always-loaded file rather than in sections.css, because the
 * category bar dot uses haat-pulse-soft on every page while sections.css only
 * loads on the storefront and the shop. An animation whose keyframes are
 * missing does not error, it simply never runs, which is the kind of defect
 * that only shows up on the pages nobody screenshots.
 */
@keyframes haat-marquee {
	from { transform: translateX( 0 ); }
	to { transform: translateX( calc( -100% - 2.5rem ) ); }
}

@keyframes haat-pulse-soft {
	0%, 100% { opacity: 0.55; transform: scale( 0.9 ); }
	50% { opacity: 1; transform: scale( 1 ); }
}

@keyframes haat-fade-in-up {
	from { opacity: 0; transform: translateY( 12px ); }
	to { opacity: 1; transform: translateY( 0 ); }
}

@keyframes haat-shimmer {
	from { background-position: -200% 0; }
	to { background-position: 200% 0; }
}
