/* H2M Express shared components: icons, buttons, eyebrow, section heading. */

/* Icons */
.h2m-icon {
	display: inline-block;
	flex: none;
	width: 1em;
	height: 1em;
	vertical-align: -0.125em;
}

.h2m-icon--star {
	fill: currentColor;
}

/* Buttons (HANDOFF 4, 5; D8.10). Pill, uppercase, weight 800, tracking .54px, arrow on the right. */
.h2m-btn {
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-3);
	min-height: 44px;
	padding: var(--btn-pad-y) var(--btn-pad-x);
	border: 2px solid transparent;
	border-radius: var(--radius-pill);
	font-family: var(--font-sans);
	font-size: var(--text-button-size);
	line-height: var(--text-button-line);
	font-weight: var(--text-button-weight);
	letter-spacing: var(--text-button-tracking);
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	transition: var(--transition-default);
}

.h2m-btn .h2m-icon--arrow-right {
	width: 13px;
	height: 13px;
}

.h2m-btn--primary {
	background: var(--h2m-rust);
	border-color: var(--h2m-rust);
	color: var(--otw-white);
}

.h2m-btn--primary:hover,
.h2m-btn--primary:focus-visible {
	background: var(--h2m-rust-dark);
	border-color: var(--h2m-rust-dark);
	color: var(--otw-white);
}

.h2m-btn--secondary {
	background: var(--otw-navy);
	border-color: var(--otw-navy);
	color: var(--otw-white);
}

.h2m-btn--secondary:hover,
.h2m-btn--secondary:focus-visible {
	background: var(--otw-slate);
	border-color: var(--otw-slate);
	color: var(--otw-white);
}

.h2m-btn--outline {
	background: transparent;
	border-color: var(--otw-navy);
	color: var(--otw-navy);
}

.h2m-btn--outline:hover,
.h2m-btn--outline:focus-visible {
	background: var(--otw-navy);
	color: var(--otw-white);
}

.h2m-btn--outline-on-dark {
	background: transparent;
	border-color: var(--border-on-dark);
	color: var(--otw-white);
}

.h2m-btn--outline-on-dark:hover,
.h2m-btn--outline-on-dark:focus-visible {
	border-color: var(--otw-white);
	color: var(--otw-white);
}

.h2m-btn--outline-on-dark:focus-visible {
	outline-color: var(--otw-blue-light);
}

.h2m-btn:disabled,
.h2m-btn[aria-disabled="true"],
.h2m-btn.is-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* Loading: a spinner takes the arrow's place. */
.h2m-btn.is-loading .h2m-icon--arrow-right {
	display: none;
}

.h2m-btn.is-loading::after {
	content: "";
	box-sizing: border-box;
	width: 13px;
	height: 13px;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
}

@media (prefers-reduced-motion: no-preference) {
	.h2m-btn.is-loading::after {
		animation: h2m-spin 0.8s linear infinite;
	}
}

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

/* Eyebrow (HANDOFF 4): 14px/22px, weight 700, tracking 3px, uppercase. Rust on light, sunset on dark. */
.h2m-eyebrow {
	margin: 0 0 var(--heading-gap);
	font-size: var(--text-small-size);
	line-height: 22px;
	font-weight: var(--weight-bold);
	letter-spacing: 3px;
	text-transform: uppercase;
}

.h2m-eyebrow--light {
	color: var(--h2m-rust);
}

.h2m-eyebrow--dark,
.is-dark .h2m-eyebrow--light {
	color: var(--h2m-sunset);
}

/* Section heading: H2 clamp(34px, 3.6vw, 52px), line-height 1.15, uppercase (designed copy only). */
.h2m-section-heading {
	margin-bottom: var(--heading-gap-lg);
}

.h2m-section-heading--center {
	text-align: center;
}

.h2m-section-heading__title {
	margin: 0;
	font-size: clamp(34px, 3.6vw, 52px);
	line-height: 1.15;
	font-weight: var(--weight-extrabold);
	text-transform: uppercase;
	color: var(--otw-navy);
}

.is-dark .h2m-section-heading__title {
	color: var(--text-on-dark);
}

.h2m-accent {
	color: var(--h2m-rust);
}

.is-dark .h2m-accent {
	color: var(--h2m-orange);
}

/* ProductCard (HANDOFF 4): used by featured products, the category grid, search results and related products. */
/* Link card, 16:10 media on the navy radial gradient, badge top-left, circular arrow right. */
.h2m-product-card {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--surface-card);
	box-shadow: 0 10px 30px color-mix(in srgb, var(--otw-navy) 6%, transparent);
	color: var(--otw-navy);
	text-decoration: none;
}

.h2m-product-card__media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 16 / 10;
	background: radial-gradient(ellipse at 50% 40%, color-mix(in srgb, var(--otw-slate) 80%, var(--otw-navy)) 0%, var(--otw-navy) 75%);
}

.h2m-product-card__media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.h2m-product-card__badge {
	position: absolute;
	top: 14px;
	left: 14px;
	padding: 7px 12px;
	border-radius: var(--radius-pill);
	background: var(--otw-navy);
	color: var(--otw-white);
	font-size: 11px;
	line-height: 14px;
	font-weight: var(--weight-bold);
	letter-spacing: 0.6px;
	text-transform: uppercase;
	white-space: nowrap;
}

.h2m-product-card__body {
	display: flex;
	flex: 1;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 24px 22px;
}

.h2m-product-card__name {
	display: -webkit-box;
	overflow: hidden;
	margin: 0;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	overflow-wrap: anywhere;
	color: var(--otw-navy);
	font-size: 18px;
	line-height: 24px;
	font-weight: var(--weight-extrabold);
}

.h2m-product-card__go {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--otw-navy);
	color: var(--otw-white);
	font-size: 14px;
	transition: var(--transition-default);
}

.h2m-product-card:hover .h2m-product-card__go,
.h2m-product-card:focus-visible .h2m-product-card__go {
	background: var(--h2m-rust);
}

@media (max-width: 767px) {
	.h2m-product-card__body {
		padding: var(--space-4);
	}
}

/* Product search form (search results and 404): a labelled field and a primary submit button on one row. */
.h2m-search-form {
	max-width: 720px;
}

.h2m-search-form__label {
	display: block;
	margin-bottom: var(--space-2);
	color: var(--text-heading);
	font-size: var(--text-label-size);
	line-height: var(--text-label-line);
	font-weight: var(--weight-bold);
}

.h2m-search-form__row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

.h2m-search-form__input {
	flex: 1 1 260px;
	min-width: 0;
	min-height: 54px;
	box-sizing: border-box;
	padding: 0 var(--space-4);
	border: 0;
	border-radius: var(--radius-pill);
	background: var(--surface-card);
	box-shadow: var(--ring-control);
	color: var(--text-heading);
	font: inherit;
	font-size: var(--text-label-size);
}

.h2m-search-form__input:hover {
	box-shadow: var(--ring-control-hover);
}

.h2m-search-form__input:focus-visible {
	box-shadow: var(--ring-focus);
	outline: 2px solid var(--otw-navy);
	outline-offset: 2px;
}

.h2m-search-form__submit {
	flex: none;
}

