.header-actions .ms-commerce-ux__bag {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 2px;
	color: var(--marksake-text);
	font-family: var(--marksake-sans);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
}

.header-actions .ms-commerce-ux__bag:hover,
.header-actions .ms-commerce-ux__bag:focus-visible {
	color: var(--marksake-accent);
	text-decoration: underline;
	text-underline-offset: 4px;
}

.header-actions .ms-commerce-ux__bag:focus-visible,
.ms-commerce-ux__view-bag:focus-visible,
.ms-commerce-ux__close:focus-visible {
	outline: 2px solid var(--marksake-accent);
	outline-offset: 3px;
}

.woocommerce-message:has(.ms-commerce-ux__success),
.woocommerce-message.ms-commerce-ux__notice-host {
	position: fixed;
	top: max(78px, env(safe-area-inset-top));
	right: 24px;
	z-index: 1000;
	box-sizing: border-box;
	width: min(388px, calc(100vw - 48px));
	margin: 0;
	padding: 0;
	border: 1px solid var(--marksake-border);
	border-radius: 3px;
	background: var(--marksake-surface);
	box-shadow: 0 10px 28px rgba(43, 33, 28, 0.08);
	color: var(--marksake-text);
}

.woocommerce-message:has(.ms-commerce-ux__success)::before,
.woocommerce-message.ms-commerce-ux__notice-host::before {
	display: none;
}

.ms-commerce-ux__success,
.ms-commerce-ux__toast {
	display: grid;
	gap: 8px;
	padding: 17px 18px 16px;
	font-family: var(--marksake-sans);
}

.ms-commerce-ux__toast {
	position: fixed;
	top: max(78px, env(safe-area-inset-top));
	right: 24px;
	z-index: 1000;
	box-sizing: border-box;
	width: min(388px, calc(100vw - 48px));
	border: 1px solid var(--marksake-border);
	border-radius: 3px;
	background: var(--marksake-surface);
	box-shadow: 0 10px 28px rgba(43, 33, 28, 0.08);
	color: var(--marksake-text);
}

.ms-commerce-ux__eyebrow {
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.13em;
	line-height: 1.2;
}

.ms-commerce-ux__product {
	font-family: var(--marksake-serif);
	font-size: 1rem;
	font-weight: 400;
	line-height: 1.35;
}

.ms-commerce-ux__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	margin-top: 2px;
}

.ms-commerce-ux__view-bag {
	min-height: 36px;
	color: var(--marksake-text);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 36px;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.ms-commerce-ux__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	min-width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--marksake-text);
	font-size: 1.4rem;
	line-height: 1;
	cursor: pointer;
}

.ms-commerce-ux__close:hover {
	background: rgba(118, 84, 66, 0.08);
}

@media (max-width: 980px) {
	.header-actions .ms-commerce-ux__bag {
		display: inline-flex !important;
	}
}

@media (max-width: 480px) {
	.header-actions {
		gap: 8px;
	}

	.header-actions .ms-commerce-ux__bag {
		font-size: 0.68rem;
		letter-spacing: 0.06em;
	}

	.woocommerce-message:has(.ms-commerce-ux__success),
	.woocommerce-message.ms-commerce-ux__notice-host,
	.ms-commerce-ux__toast {
		top: max(64px, env(safe-area-inset-top));
		right: 12px;
		width: calc(100vw - 24px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ms-commerce-ux__toast,
	.ms-commerce-ux__success {
		animation: none;
	}
}

/* Phase E r1 — mobile commerce header polish.
 * Keeps the theme's desktop header untouched. On small screens the logo owns
 * the left track and Bag/menu own the right track, preventing the injected Bag
 * label from visually colliding with the MARKSAKE wordmark. */
@media (max-width: 720px) {
	.site-header .header-inner {
		grid-template-columns: minmax(0, 1fr) auto !important;
		column-gap: 16px !important;
	}

	.site-header .site-logo {
		justify-self: start !important;
		min-width: 0;
	}

	.site-header .header-actions {
		justify-self: end !important;
		gap: 10px !important;
	}

	.site-header .header-actions .ms-commerce-ux__bag {
		min-width: max-content;
		padding-inline: 4px;
		font-size: 0.67rem;
		letter-spacing: 0.045em;
	}

	.site-header .menu-toggle {
		width: 38px;
		height: 38px;
	}
}
