/**
 * Bag v2 (BAG-V2-PORT.md): the bag drawer on every page, quantity stepper and remove, free-shipping
 * progress (drawer and cart page), the gap-closer, the empty bag with collection tiles.
 * Loaded on every page except checkout while `eupepsia_bag_v2` is on.
 *
 * The drawer shell rules repeat product-v3-interactions.css section 6 (same selectors and values)
 * so the drawer renders on pages without the product sheet; motion follows the 2026-09-30 motion
 * spec: drawers slide over 0.5 s on the panel curve; under reduced motion they fade in 0.1 s with
 * no travel. Animated properties: transform, opacity, colours only.
 */

/* --------------------------------------------------------------------------
 * 0. Tokens
 * ----------------------------------------------------------------------- */
:root {
	--eup-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
	--eup-ease-exit: cubic-bezier(0.4, 0, 0.7, 0.2);
	--eup-ease-panel: cubic-bezier(0.7, 0, 0.2, 1);
	--eup-t-drawer-in: 500ms;
	--eup-t-drawer-out: 300ms;
	--eup-t-meter: 420ms;
	--eup-d-drawer: 100%;
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--eup-t-drawer-in: 100ms;
		--eup-t-drawer-out: 100ms;
		--eup-t-meter: 1ms;
		--eup-d-drawer: 0px;
	}
}

:root.eup-rm {
	--eup-t-drawer-in: 100ms;
	--eup-t-drawer-out: 100ms;
	--eup-t-meter: 1ms;
	--eup-d-drawer: 0px;
}

/* --------------------------------------------------------------------------
 * 1. Drawer shell (as product v3)
 * ----------------------------------------------------------------------- */
html.eup-drawer-lock,
html.eup-drawer-lock body {
	overflow: hidden;
}

.eup-drawer {
	inset: 0;
	position: fixed;
	z-index: 200;
}

.eup-drawer[hidden] {
	display: none;
}

.eup-drawer__scrim {
	background: rgba(23, 33, 30, 0.42);
	inset: 0;
	opacity: 0;
	position: absolute;
}

.eup-drawer__panel {
	background: var(--eup-ground, #ffffff);
	bottom: 0;
	box-shadow: -8px 0 24px -16px rgba(23, 33, 30, 0.5);
	color: var(--eup-ink, #3d3935);
	display: flex;
	flex-direction: column;
	opacity: 0;
	position: absolute;
	right: 0;
	top: 0;
	transform: translateX(var(--eup-d-drawer));
	width: min(420px, 100%);
}

.eup-bag-drawer .eup-drawer__scrim {
	transition: opacity var(--eup-t-drawer-out) var(--eup-ease-panel);
}

.eup-bag-drawer .eup-drawer__panel {
	transition: transform var(--eup-t-drawer-out) var(--eup-ease-panel), opacity var(--eup-t-drawer-out) var(--eup-ease-exit);
}

html.eup-drawer-open .eup-drawer__scrim {
	opacity: 1;
}

html.eup-drawer-open .eup-bag-drawer .eup-drawer__scrim {
	transition: opacity var(--eup-t-drawer-in) var(--eup-ease-panel);
}

html.eup-drawer-open .eup-drawer__panel {
	opacity: 1;
	transform: translateX(0);
}

html.eup-drawer-open .eup-bag-drawer .eup-drawer__panel {
	transition: transform var(--eup-t-drawer-in) var(--eup-ease-panel), opacity 1ms;
}

/* Reduced motion: no travel, a short fade. */
@media (prefers-reduced-motion: reduce) {
	.eup-bag-drawer .eup-drawer__panel,
	html.eup-drawer-open .eup-bag-drawer .eup-drawer__panel {
		transform: none;
		transition: opacity var(--eup-t-drawer-in) linear;
	}
}

html.eup-rm .eup-bag-drawer .eup-drawer__panel,
html.eup-rm.eup-drawer-open .eup-bag-drawer .eup-drawer__panel {
	transform: none;
	transition: opacity var(--eup-t-drawer-in) linear;
}

.eup-drawer__hd {
	align-items: center;
	border-bottom: 1px solid var(--eup-hairline, #e4ded9);
	display: flex;
	justify-content: space-between;
	padding: 12px 12px 12px 20px;
}

.eup-drawer .eup-drawer__title {
	color: var(--eup-ink, #3d3935);
	font-family: var(--eup-font-display, "Poppins", system-ui, sans-serif);
	font-size: 26px;
	font-weight: 400;
	line-height: 1.2;
	margin: 0;
}

.eup-drawer__title:focus {
	outline: none;
}

.eup-drawer__title:focus-visible {
	outline: 3px solid var(--eup-deep, #3d3935);
	outline-offset: 2px;
}

.eup-drawer .eup-drawer__close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: var(--eup-radius, 3px);
	color: var(--eup-ink, #3d3935);
	cursor: pointer;
	display: inline-flex;
	height: 48px;
	justify-content: center;
	margin: 0;
	min-height: 48px;
	padding: 0;
	width: 48px;
}

.eup-drawer .eup-drawer__close:hover {
	background: var(--eup-tint, #f0f0ee);
}

.eup-drawer a:focus-visible,
.eup-drawer button:focus-visible,
.eup-bag-cartship a:focus-visible,
.eup-bag-cartship button:focus-visible,
.eup-bag-empty a:focus-visible {
	outline: 3px solid var(--eup-deep, #3d3935);
	outline-offset: 2px;
}

.eup-drawer__body {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-height: 0;
}

.eup-drawer__lines {
	flex: 1 1 auto;
	list-style: none;
	margin: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 20px;
}

.eup-drawer__line {
	border-bottom: 1px solid var(--eup-hairline, #e4ded9);
	display: grid;
	font-size: 14px;
	gap: 12px;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	margin: 0;
	padding: 16px 0;
}

.eup-drawer__thumb {
	background: var(--eup-surface, #ffffff);
	border: 1px solid var(--eup-hairline, #e4ded9);
	display: block;
	height: 64px;
	overflow: hidden;
	width: 64px;
}

.eup-drawer__thumb img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

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

.eup-drawer__name {
	color: var(--eup-ink, #3d3935);
	font-weight: 500;
	overflow-wrap: anywhere;
	text-decoration: none;
	text-underline-offset: 0.18em;
}

a.eup-drawer__name:hover {
	text-decoration: underline;
}

.eup-drawer__meta {
	color: var(--eup-muted, #6b625b);
}

.eup-drawer__amount,
.eup-drawer__sub-amount {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.eup-drawer__ft {
	background: var(--eup-surface, #ffffff);
	border-top: 1px solid var(--eup-hairline, #e4ded9);
	margin-top: auto;
	padding: 16px 20px calc(16px + env(safe-area-inset-bottom, 0px));
}

.eup-drawer__sub {
	display: flex;
	font-weight: 500;
	justify-content: space-between;
	margin: 0 0 4px;
}

.eup-drawer__note {
	color: var(--eup-muted, #6b625b);
	font-size: 13px;
	margin: 0 0 12px;
}

.eup-drawer .eup-btn {
	width: 100%;
}

.eup-drawer .eup-drawer__view {
	margin-top: 8px;
}

/* --------------------------------------------------------------------------
 * 2. Lines: stepper and remove
 * ----------------------------------------------------------------------- */
.eup-bag[aria-busy="true"] .eup-bag__lines,
.eup-bag[aria-busy="true"] .eup-drawer__ft,
.eup-bag[aria-busy="true"] .eup-bag__ship {
	opacity: 0.6;
	transition: opacity 120ms linear;
}

.eup-bag__controls {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin-top: 8px;
}

.eup-bag__qty {
	align-items: center;
	border: 1px solid var(--eup-hairline, #e4ded9);
	border-radius: 999px;
	display: inline-flex;
}

.eup-drawer .eup-bag__step {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--eup-ink, #3d3935);
	cursor: pointer;
	display: inline-flex;
	height: 40px;
	justify-content: center;
	margin: 0;
	min-height: 40px;
	padding: 0;
	transition: background-color 150ms var(--eup-ease-out);
	width: 40px;
}

.eup-drawer .eup-bag__step:hover {
	background: var(--eup-tint, #f0f0ee);
}

.eup-drawer .eup-bag__step[aria-disabled="true"] {
	color: var(--eup-muted, #6b625b);
	cursor: default;
	opacity: 0.45;
}

.eup-drawer .eup-bag__step[aria-disabled="true"]:hover {
	background: transparent;
}

.eup-bag__qty-val {
	font-variant-numeric: tabular-nums;
	min-width: 2ch;
	text-align: center;
}

.eup-bag__qty-one {
	color: var(--eup-muted, #6b625b);
}

.eup-drawer .eup-bag__remove {
	background: transparent;
	border: 0;
	color: var(--eup-muted, #6b625b);
	cursor: pointer;
	font-size: 13px;
	margin: 0;
	min-height: 40px;
	padding: 0 4px;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.eup-drawer .eup-bag__remove:hover {
	color: var(--eup-ink, #3d3935);
}

.eup-bag__error {
	background: #fbf3ec;
	border-left: 3px solid #8a4b1f;
	color: var(--eup-ink, #3d3935);
	font-size: 14px;
	margin: 12px 20px 0;
	padding: 10px 12px;
}

/* --------------------------------------------------------------------------
 * 3. Free-shipping progress and the gap-closer (drawer and cart page)
 * ----------------------------------------------------------------------- */
.eup-bag__ship {
	padding: 16px 20px;
}

.eup-bag__ship--drawer {
	border-bottom: 1px solid var(--eup-hairline, #e4ded9);
}

.eup-bag__ship-msg {
	font-size: 14px;
	margin: 0 0 10px;
}

.eup-bag__ship-msg:focus {
	outline: none;
}

.eup-bag__ship-msg:focus-visible {
	outline: 3px solid var(--eup-deep, #3d3935);
	outline-offset: 2px;
}

.eup-bag__meter {
	background: var(--eup-tint, #f0f0ee);
	border-radius: 2px;
	height: 6px;
	overflow: hidden;
}

.eup-bag__meter i {
	background: var(--eup-deep, #3d3935);
	display: block;
	height: 100%;
	transform: scaleX(var(--eup-fill, 0));
	transform-origin: 0 50%;
	transition: transform var(--eup-t-meter) var(--eup-ease-out);
}

.eup-bag__meter.is-reset i {
	transition: none;
}

.eup-bag__gap {
	align-items: center;
	display: grid;
	gap: 10px 12px;
	grid-template-columns: 48px minmax(0, 1fr) auto;
	margin-top: 14px;
}

.eup-bag__gap-thumb {
	background: var(--eup-surface, #ffffff);
	border: 1px solid var(--eup-hairline, #e4ded9);
	display: block;
	height: 48px;
	overflow: hidden;
	width: 48px;
}

.eup-bag__gap-thumb img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.eup-bag__gap-text {
	font-size: 14px;
	line-height: 1.4;
	margin: 0;
	overflow-wrap: anywhere;
}

.eup-bag__gap-text a {
	color: inherit;
	font-weight: 500;
	text-decoration: underline;
	text-underline-offset: 0.18em;
}

.eup-bag__gap .eup-bag__gap-add {
	background: transparent;
	border: 1px solid var(--eup-ink, #3d3935);
	border-radius: 999px;
	color: var(--eup-ink, #3d3935);
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	line-height: 1;
	margin: 0;
	min-height: 40px;
	padding: 0 16px;
	text-transform: none;
	transition: background-color 150ms var(--eup-ease-out), color 150ms var(--eup-ease-out);
	white-space: nowrap;
}

.eup-bag__gap .eup-bag__gap-add:hover {
	background: var(--eup-ink, #3d3935);
	color: #ffffff;
}

.eup-bag__gap .eup-bag__gap-add[aria-disabled="true"] {
	cursor: progress;
	opacity: 0.6;
}

/* Cart page: the block sits above the Cart block, inside the page's content column. */
.eup-bag-cartship:empty {
	display: none;
}

.eup-bag-cartship {
	margin: 0 0 24px;
}

.eup-bag-cartship .eup-bag__ship {
	background: var(--eup3-surface, #f0f0ee);
	border-radius: var(--eup3-radius-field, 12px);
	max-width: 640px;
}

.eup-bag-cartship .eup-bag__meter {
	background: #ffffff;
}

/* --------------------------------------------------------------------------
 * 4. The empty bag (drawer and cart page)
 * ----------------------------------------------------------------------- */
.eup-bag-empty {
	padding: 24px 20px;
}

.eup-bag-empty__title {
	color: var(--eup-ink, #3d3935);
	font-size: 18px;
	font-weight: 400;
	line-height: 1.35;
	margin: 0 0 6px;
}

.eup-bag-empty__lead {
	color: var(--eup-muted, #6b625b);
	font-size: 15px;
	margin: 0 0 16px;
}

.eup-bag-empty__tiles {
	display: grid;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.eup-bag-empty__tile {
	margin: 0;
}

.eup-bag-tile {
	align-items: center;
	background: var(--eup-surface, #ffffff);
	border: 1px solid var(--eup-hairline, #e4ded9);
	border-radius: 14px;
	color: var(--eup-ink, #3d3935);
	display: grid;
	gap: 14px;
	grid-template-columns: 72px minmax(0, 1fr) 16px;
	overflow: hidden;
	padding: 8px 16px 8px 8px;
	text-decoration: none;
	transition: border-color 150ms var(--eup-ease-out), background-color 150ms var(--eup-ease-out);
}

.eup-bag-tile:hover {
	border-color: var(--eup-ink, #3d3935);
	color: var(--eup-ink, #3d3935);
}

.eup-bag-tile__media {
	background: var(--eup3-sage, #d1dfd9);
	border-radius: 10px;
	display: block;
	height: 72px;
	overflow: hidden;
	width: 72px;
}

.eup-bag-tile__img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.eup-bag-tile__label {
	font-size: 16px;
	font-weight: 500;
}

.eup-bag-tile__arrow {
	border-right: 2px solid currentColor;
	border-top: 2px solid currentColor;
	display: block;
	height: 8px;
	transform: rotate(45deg);
	width: 8px;
}

/* Cart page: icon, statement, line, then the tiles in a row from 768 px. */
.eup-bag-empty--cart {
	margin: 24px auto 48px;
	max-width: 1000px;
	padding: 0;
	text-align: center;
}

.eup-bag-empty__icon {
	align-items: center;
	background: var(--eup3-cream, #f3ebd6);
	border-radius: 50%;
	color: var(--eup3-ink, #3d3935);
	display: inline-flex;
	height: 88px;
	justify-content: center;
	margin-bottom: 16px;
	width: 88px;
}

.eup-bag-empty__svg {
	height: auto;
	width: 40px;
}

.eup-bag-empty--cart .eup-bag-empty__title {
	font-family: var(--eup3-font, "Poppins", system-ui, sans-serif);
	font-size: clamp(22px, 1.4vw + 14px, 30px);
	font-weight: 300;
	letter-spacing: 0;
	line-height: 1.3;
	margin: 0 0 8px;
	text-transform: none;
}

.eup-bag-empty--cart .eup-bag-empty__lead {
	font-size: 16px;
	margin-bottom: 24px;
}

.eup-bag-empty--cart .eup-bag-empty__tiles {
	margin: 0 auto;
	max-width: 420px;
	text-align: left;
}

@media (min-width: 768px) {
	.eup-bag-empty--cart .eup-bag-empty__tiles {
		gap: 20px;
		grid-template-columns: repeat(3, minmax(0, 1fr));
		max-width: none;
	}

	.eup-bag-empty--cart .eup-bag-tile {
		gap: 0;
		grid-template-columns: minmax(0, 1fr) 16px;
		grid-template-rows: auto auto;
		padding: 0 18px 16px 0;
	}

	.eup-bag-empty--cart .eup-bag-tile__media {
		aspect-ratio: 4 / 3;
		border-radius: 0;
		grid-column: 1 / -1;
		height: auto;
		margin-bottom: 14px;
		width: 100%;
	}

	.eup-bag-empty--cart .eup-bag-tile__label {
		padding-left: 18px;
	}
}

/* --------------------------------------------------------------------------
 * 5. Header badge bump on add (no motion under reduced motion: the script skips it)
 * ----------------------------------------------------------------------- */
@keyframes eup-bag-bump {
	0% { transform: scale(1); }
	40% { transform: scale(1.18); }
	100% { transform: scale(1); }
}

.eup-hd__cart-count.eup-bump {
	animation: eup-bag-bump 300ms var(--eup-ease-out);
}

@media (prefers-reduced-motion: reduce) {
	.eup-hd__cart-count.eup-bump {
		animation: none;
	}
}

/* --------------------------------------------------------------------------
 * 6. Print
 * ----------------------------------------------------------------------- */
@media print {
	.eup-drawer,
	.eup-bag-cartship {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
 * 7. The design v4 drawer (D-385, round 3; template-parts/bag-v2/drawer-v4.php)
 *
 * Every rule below needs `.eup-bag-drawer--v4`, which only drawer-v4.php prints (design v4 active), so today's
 * drawer (v4 off) is untouched. Design v4 / brand v2 tokens with today's values as fallbacks.
 *
 * Phone (< 768 px): a bottom sheet whose height follows its content, up to the screen less 24 px: one item makes a
 * short sheet (no empty band under it, owner 2026-10-21); more items grow it, then the list scrolls and the summary
 * stays at the bottom. From 768 px: the side panel, 440 px, full height, list scrolling, summary pinned at the foot.
 * Motion: the sheet rises and the panel slides on the panel curve (0.5 s in, 0.3 s out, the 2026-09-30 spec);
 * reduced motion: no travel; the opacity follows the reduced token (0.1 s, section 0), which the site-wide
 * reduced-motion rule shortens further (measured 1e-06 s on staging, 2026-10-21): the drawer simply appears.
 * Contrast (on white unless noted; research lane-d/verify/contrast.txt): ink #1d1848 16.4:1; soft #646582 5.6:1;
 * accent-text arrow #008674 4.5:1; deep #0b6862 on mint #ecfbf8 6.2:1; coral button #f4795b with an indigo label 6.06:1.
 * ----------------------------------------------------------------------- */
html body.eup-ds4 .eup-bag-drawer--v4 {
	--b4-ink: var(--eup3-ink, #1d1848);
	--b4-soft: var(--eup3-ink-soft, #646582);
	--b4-line: var(--eup3-line, #d1e0da);
	--b4-grey: var(--eup3-grey, #f1f2f2);
	--b4-mint: var(--eup3-mint, #ecfbf8);
	--b4-deep: var(--eup3-deep, #0b6862);
	--b4-accent-text: var(--eup3-accent-text, #008674);
	--b4-radius: var(--eup3-radius, 10px);
	--b4-pad: 20px;
	--b4-safe: env(safe-area-inset-bottom, 0px);
	color: var(--b4-ink);
	font-family: var(--eup3-font, "Poppins", system-ui, sans-serif);
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__scrim {
	background: rgba(13, 25, 34, 0.45);
}

/* 7a. Panel: bottom sheet on phones. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__panel {
	background: #ffffff;
	border-radius: 16px 16px 0 0;
	bottom: 0;
	box-shadow: 0 -12px 32px -18px rgba(13, 25, 34, 0.5);
	color: var(--b4-ink);
	height: auto;
	left: 0;
	max-height: calc(100vh - 24px);
	max-height: calc(100dvh - 24px);
	right: 0;
	top: auto;
	transform: translateY(var(--eup-d-drawer));
	transition: transform var(--eup-t-drawer-out) var(--eup-ease-panel), opacity var(--eup-t-drawer-out) var(--eup-ease-exit);
	width: 100%;
}

html.eup-drawer-open body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__panel {
	opacity: 1;
	transform: none;
	transition: transform var(--eup-t-drawer-in) var(--eup-ease-panel), opacity 1ms;
}

@media (min-width: 768px) {
	html body.eup-ds4 .eup-bag-drawer--v4 {
		--b4-pad: 24px;
	}

	html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__panel {
		border-radius: 0;
		box-shadow: -12px 0 32px -18px rgba(13, 25, 34, 0.5);
		height: auto;
		left: auto;
		max-height: none;
		top: 0;
		transform: translateX(var(--eup-d-drawer));
		width: min(440px, 100%);
	}
}

@media (prefers-reduced-motion: reduce) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__panel,
	html.eup-drawer-open body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__panel {
		transform: none;
		transition: opacity var(--eup-t-drawer-in) linear;
	}
}

html.eup-rm body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__panel,
html.eup-rm.eup-drawer-open body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__panel {
	transform: none;
	transition: opacity var(--eup-t-drawer-in) linear;
}

/* 7b. Header. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__hd {
	border-bottom: 1px solid var(--b4-line);
	flex: none;
	padding: 12px 10px 12px var(--b4-pad);
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__title {
	color: var(--b4-ink);
	font-family: inherit;
	font-size: 22px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.2;
	text-transform: none;
}

@media (min-width: 768px) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__title {
		font-size: 26px;
	}
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__close {
	border-radius: var(--b4-radius);
	color: var(--b4-ink);
}

html body.eup-ds4 .eup-bag-drawer--v4 a:focus-visible,
html body.eup-ds4 .eup-bag-drawer--v4 button:focus-visible,
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__ship-msg:focus-visible {
	outline: 3px solid var(--eup3-focus, #1d1848);
	outline-offset: 2px;
}

/* 7c. Body: the list grows, then scrolls; the summary never leaves the bottom. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-drawer__body {
	display: flex;
	flex: 0 1 auto;
	flex-direction: column;
	min-height: 0;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__lines {
	flex: 0 1 auto;
	list-style: none;
	margin: 0;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 var(--b4-pad);
}

/* 7d. Free-shipping line: a mint band with the delivery icon, the sentence and the bar. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__ship--v4 {
	background: var(--b4-mint);
	border-bottom: 0;
	flex: none;
	padding: 14px var(--b4-pad) 16px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__ship--v4 .eup-bag__ship-msg {
	align-items: center;
	color: var(--b4-ink);
	display: flex;
	font-size: 15px;
	font-weight: 400;
	gap: 10px;
	line-height: 1.4;
	margin: 0 0 10px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__ship-icon {
	color: var(--b4-deep);
	flex: 0 0 auto;
	height: 24px;
	width: 24px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__ship--v4.is-free .eup-bag__ship-msg {
	color: var(--b4-deep);
	font-weight: 500;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__ship--v4 .eup-bag__meter {
	background: rgba(29, 24, 72, 0.12);
	border-radius: 999px;
	height: 6px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__ship--v4 .eup-bag__meter i {
	background: var(--b4-deep);
	border-radius: 999px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__gap {
	grid-template-columns: 48px minmax(0, 1fr) auto;
	margin-top: 14px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__gap-thumb {
	background: var(--b4-grey);
	border: 0;
	border-radius: var(--eup3-radius-sm, 8px);
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__gap-thumb img {
	mix-blend-mode: multiply;
	object-fit: contain;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__gap-text {
	color: var(--b4-ink);
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__gap .eup-bag__gap-add {
	background: #ffffff;
	border: 1px solid var(--b4-ink);
	border-radius: var(--b4-radius);
	color: var(--b4-ink);
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	min-height: 44px;
	padding: 0 18px;
}

@media (hover: hover) and (pointer: fine) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__gap .eup-bag__gap-add:hover {
		background: var(--b4-ink);
		color: #ffffff;
	}
}

/* 7e. Item rows: photo on the page grey, name and line price, variation, unit price, stepper and remove. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__line {
	border-bottom: 1px solid var(--b4-line);
	display: grid;
	font-size: 15px;
	gap: 14px;
	grid-template-columns: 80px minmax(0, 1fr);
	margin: 0;
	padding: 16px 0;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__line:last-child {
	border-bottom: 0;
}

@media (min-width: 768px) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__line {
		grid-template-columns: 88px minmax(0, 1fr);
		padding: 20px 0;
	}
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__thumb {
	align-self: start;
	aspect-ratio: 1;
	background: var(--b4-grey);
	border-radius: var(--eup3-radius-sm, 8px);
	display: block;
	overflow: hidden;
	width: 100%;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__thumb img {
	display: block;
	height: 100%;
	mix-blend-mode: multiply;
	object-fit: contain;
	width: 100%;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__info {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__top {
	align-items: baseline;
	display: flex;
	gap: 12px;
	justify-content: space-between;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__name {
	color: var(--b4-ink);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	overflow-wrap: anywhere;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
	html body.eup-ds4 .eup-bag-drawer--v4 a.eup-bag4__name:hover {
		color: var(--b4-ink);
		text-decoration-color: currentColor;
	}
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__amount {
	color: var(--b4-ink);
	flex: 0 0 auto;
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	white-space: nowrap;
}

html body.eup-ds4 .eup-bag-drawer--v4 :is(.eup-bag4__meta, .eup-bag4__each) {
	color: var(--b4-soft);
	font-size: var(--eup3-fs-micro, 13px);
	font-weight: 400;
	line-height: 1.4;
	margin: 3px 0 0;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__controls {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	margin-top: 10px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__qty {
	border: 1px solid var(--b4-line);
	border-radius: var(--b4-radius);
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__step {
	border-radius: var(--b4-radius);
	color: var(--b4-ink);
	height: 44px;
	min-height: 44px;
	width: 44px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__step[aria-disabled="true"] {
	color: var(--b4-soft);
	opacity: 0.5;
}

@media (hover: hover) and (pointer: fine) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__step:not([aria-disabled="true"]):hover {
		background: var(--b4-grey);
	}
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__qty-val {
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	min-width: 28px;
	text-align: center;
}

/* Remove: a secondary text action in the links v2 manner (medium words, the underline comes on hover and focus). */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__remove {
	background: transparent;
	border: 0;
	color: var(--b4-soft);
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0;
	margin: 0;
	min-height: 44px;
	padding: 0 2px;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-transform: none;
	text-underline-offset: 5px;
	transition: color var(--eup3-dur-fast, 0.25s) var(--eup3-ease-smooth, ease), text-decoration-color var(--eup3-dur-fast, 0.25s) var(--eup3-ease-smooth, ease);
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__remove:focus-visible {
	color: var(--b4-ink);
	text-decoration-color: currentColor;
}

@media (hover: hover) and (pointer: fine) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__remove:hover {
		background: transparent;
		color: var(--b4-ink);
		text-decoration-color: currentColor;
	}
}

/* 7f. Summary: subtotal always shown, the tax line, one primary and one secondary button, 12 px apart. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__summary {
	background: #ffffff;
	border-top: 1px solid var(--b4-line);
	flex: none;
	padding: 16px var(--b4-pad) calc(16px + var(--b4-safe));
}

@media (min-width: 768px) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__summary {
		padding: 20px var(--b4-pad) calc(24px + var(--b4-safe));
	}
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__sub {
	align-items: baseline;
	color: var(--b4-ink);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	margin: 0 0 4px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__sub-label {
	font-size: 16px;
	font-weight: 500;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__sub-count {
	color: var(--b4-soft);
	font-size: 14px;
	font-weight: 400;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__sub-amount {
	font-size: 18px;
	font-variant-numeric: tabular-nums;
	font-weight: 500;
	transition: opacity 120ms linear;
	white-space: nowrap;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__note {
	color: var(--b4-soft);
	font-size: var(--eup3-fs-micro, 13px);
	font-weight: 400;
	line-height: 1.45;
	margin: 0 0 16px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__actions {
	display: grid;
	gap: 12px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__actions .eup-ds4-btn {
	font-size: 17px;
	margin: 0;
	min-height: 48px;
	width: 100%;
}

/* Loading: the last amount stays readable, softly breathing between full and 62 % (ink at 62 % on white is 4.7:1;
   still at 75 %, 7.3:1, under reduced motion); the stepper waits. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag.is-loading .eup-bag__sub-amount,
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag[aria-busy="true"] .eup-bag__sub-amount {
	animation: eup-b4-breathe 0.9s ease-in-out infinite alternate;
	opacity: 0.75;
}

@keyframes eup-b4-breathe {
	from { opacity: 1; }
	to { opacity: 0.62; }
}

/* A cached page printed an empty drawer but the badge counts items: a skeleton until the answer arrives. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag.is-stale .eup-bag-empty {
	display: none;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag.is-stale::before {
	animation: eup-b4-shimmer 1.2s linear infinite;
	background: linear-gradient(90deg, var(--b4-grey) 0%, #f9fafa 50%, var(--b4-grey) 100%) 0 0 / 200% 100%;
	border-radius: var(--b4-radius);
	content: "";
	display: block;
	height: 184px;
	margin: var(--b4-pad);
}

@keyframes eup-b4-shimmer {
	from { background-position: 100% 0; }
	to { background-position: -100% 0; }
}

/* The note when a refresh or a change fails (role="status"), with "Try again". */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__alert {
	align-items: center;
	background: #fdf1ec;
	border-radius: var(--eup3-radius-sm, 8px);
	color: var(--b4-ink);
	display: flex;
	flex-wrap: wrap;
	font-size: 14px;
	gap: 0 12px;
	line-height: 1.45;
	margin: 0 0 14px;
	padding: 8px 12px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__alert[hidden] {
	display: none;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__alert p {
	color: var(--b4-ink);
	font-size: 14px;
	font-weight: 400;
	margin: 0;
	padding: 4px 0;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__retry {
	background: transparent;
	border: 0;
	color: var(--b4-ink);
	cursor: pointer;
	font-family: inherit;
	font-size: 14px;
	font-weight: 500;
	margin: 0;
	min-height: 44px;
	padding: 0;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-transform: none;
	text-underline-offset: 4px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag__error {
	background: #fdf1ec;
	border: 0;
	border-radius: var(--eup3-radius-sm, 8px);
	color: var(--b4-ink);
	margin: 12px var(--b4-pad) 0;
}

/* 7g. Empty: the cart icon in a soft circle, the statement, the three tiles, "Continue shopping". */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 {
	padding: 28px var(--b4-pad) calc(24px + var(--b4-safe));
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty__badge {
	align-items: center;
	background: var(--b4-mint);
	border-radius: 50%;
	color: var(--b4-deep);
	display: inline-flex;
	height: 56px;
	justify-content: center;
	width: 56px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty__badge-icon {
	height: 28px;
	width: 28px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 .eup-bag-empty__title {
	color: var(--b4-ink);
	font-family: inherit;
	font-size: 22px;
	font-weight: 400;
	letter-spacing: 0;
	line-height: 1.3;
	margin: 14px 0 20px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 .eup-bag-empty__tiles {
	gap: 10px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 .eup-bag-tile {
	border: 1px solid var(--b4-line);
	border-radius: var(--b4-radius);
	color: var(--b4-ink);
	gap: 14px;
	grid-template-columns: 64px minmax(0, 1fr) 20px;
	padding: 8px 14px 8px 8px;
}

@media (hover: hover) and (pointer: fine) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 .eup-bag-tile:hover {
		border-color: var(--b4-ink);
		color: var(--b4-ink);
	}
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 .eup-bag-tile__media {
	background: var(--b4-grey);
	border-radius: var(--eup3-radius-sm, 8px);
	height: 64px;
	width: 64px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 .eup-bag-tile__media.is-icon {
	align-items: center;
	background: var(--b4-mint);
	color: var(--b4-deep);
	display: flex;
	justify-content: center;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-tile__icon {
	height: 28px;
	width: 28px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 .eup-bag-tile__label {
	font-size: 15px;
	font-weight: 500;
}

/* The links v2 arrow (assets/css/links-v2.css, D-380) in place of the chevron, on the tiles and the last link. */
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-empty--v4 .eup-bag-tile__arrow,
html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__continue::after {
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h14.5M13.5 6.5 19 12l-5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h14.5M13.5 6.5 19 12l-5.5 5.5'/%3E%3C/svg%3E") center / contain no-repeat;
	background-color: var(--b4-accent-text);
	border: 0;
	height: 20px;
	transform: none;
	transition: transform var(--eup3-dur-fast, 0.25s) var(--eup3-ease-smooth, ease);
	width: 20px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__continue {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--b4-ink);
	cursor: pointer;
	display: inline-flex;
	font-family: inherit;
	font-size: 15px;
	font-weight: 500;
	gap: 0.45em;
	letter-spacing: 0;
	margin: 18px 0 0;
	min-height: 44px;
	padding: 0;
	text-decoration: underline;
	text-decoration-color: transparent;
	text-decoration-thickness: 1px;
	text-transform: none;
	text-underline-offset: 5px;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__continue::after {
	content: "";
	flex: 0 0 auto;
}

html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__continue:focus-visible {
	text-decoration-color: currentColor;
}

@media (hover: hover) and (pointer: fine) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__continue:hover {
		background: transparent;
		color: var(--b4-ink);
		text-decoration-color: currentColor;
	}

	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__continue:hover::after,
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-tile:hover .eup-bag-tile__arrow {
		transform: translateX(3px);
	}
}

@media (prefers-reduced-motion: reduce) {
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag.is-loading .eup-bag__sub-amount,
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag[aria-busy="true"] .eup-bag__sub-amount,
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag.is-stale::before {
		animation: none;
	}

	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag4__continue:hover::after,
	html body.eup-ds4 .eup-bag-drawer--v4 .eup-bag-tile:hover .eup-bag-tile__arrow {
		transform: none;
	}
}

html.eup-rm body.eup-ds4 .eup-bag-drawer--v4 .eup-bag.is-loading .eup-bag__sub-amount,
html.eup-rm body.eup-ds4 .eup-bag-drawer--v4 .eup-bag[aria-busy="true"] .eup-bag__sub-amount,
html.eup-rm body.eup-ds4 .eup-bag-drawer--v4 .eup-bag.is-stale::before {
	animation: none;
}
