/**
 * Cross-sell offer (DR-095) — v2: the confirmation toast.
 *
 * White head, one divider, then the storefront tone #f9f9fa behind the rail,
 * the cards, the selection controls and the actions — the same relationship
 * the shop grid has, so white cards read as cards.
 *
 * v2 re-cuts only the receipt toast. The modal, the rail, the cards and the
 * flight animation are unchanged from v1. What changed, and why:
 *
 * 1. The action row reads View bag (quiet, left) then Checkout (black, right).
 *    v1 appended Checkout first, so the primary action landed under the left
 *    thumb and the row read backwards.
 * 2. At <=760px the row is a deliberate two-button bar pinned to the bottom
 *    of the sheet: 48px Checkout on the right edge, 44px View bag beside it,
 *    8-10px apart, right-aligned, never stretched and never wrapped.
 * 3. The simple one-line toast puts its "View bag" link on the right with the
 *    same 44px tap target.
 *
 * A new filename, because the CDN ignores ?ver (DR-110).
 */

.sm-xs {
	position: fixed;
	inset: 0;
	z-index: 320;
	display: grid;
	place-items: center;
	padding: 24px;
}

.sm-xs[hidden] {
	display: none;
}

.sm-xs__scrim {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 10, 0.44);
	opacity: 0;
	transition: opacity 0.18s ease;
}

.sm-xs.is-open .sm-xs__scrim {
	opacity: 1;
}

.sm-xs__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: min(680px, 100%);
	max-height: 86vh;
	overflow: hidden;
	background: #fff;
	border: 1px solid rgba(17, 18, 20, 0.06);
	border-radius: 20px;
	box-shadow: 0 50px 120px -40px rgba(0, 0, 0, 0.55), 0 10px 30px rgba(0, 0, 0, 0.1);
	opacity: 0;
	transform: translateY(8px) scale(0.995);
	animation: sm-xs-in 0.26s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.sm-xs.is-open .sm-xs__panel {
	opacity: 1;
	transform: none;
}

.sm-xs__panel:focus {
	outline: none;
}

.sm-xs.is-closing .sm-xs__panel {
	animation: sm-xs-out 0.17s ease both;
}

@keyframes sm-xs-in {
	from { opacity: 0.35; transform: translateY(8px) scale(0.995); }
	to { opacity: 1; transform: none; }
}

@keyframes sm-xs-out {
	to { opacity: 0; transform: translateY(10px) scale(0.995); }
}

/* ---------- White head ---------- */
.sm-xs__head {
	display: flex;
	align-items: center;
	gap: 13px;
	padding: 26px 30px 23px;
	background: linear-gradient(180deg, #fff, #fcfdfc);
	border-bottom: 1px solid #f1f2f4;
}

.sm-xs__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	border: 1px solid #d5eee0;
	background: linear-gradient(180deg, #eefaf3, #e2f5ea);
	color: #065f46;
	box-shadow: 0 2px 8px rgba(6, 95, 70, 0.07);
}

.sm-xs__icon svg {
	width: 22px;
	height: 22px;
}

.sm-xs__head-copy {
	min-width: 0;
	flex: 1;
}

.sm-xs__title {
	margin: 0;
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.02em;
	line-height: 1.2;
	color: #0a0a0a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sm-xs__kicker {
	margin: 3px 0 0;
	font-size: 12.5px;
	font-weight: 500;
	letter-spacing: -0.005em;
	line-height: 1.35;
	color: #065f46;
}

.sm-xs__close {
	width: 34px;
	height: 34px;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #e7e8ea;
	border-radius: 50%;
	background: #fff;
	color: #3d4046;
	cursor: pointer;
	transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease, transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-xs__close:hover {
	background: #0a0a0a;
	border-color: #0a0a0a;
	color: #fff;
	transform: rotate(90deg);
}

.sm-xs__close svg {
	width: 14px;
	height: 14px;
}

/* ---------- Body ---------- */
.sm-xs__body {
	flex: 1;
	overflow: auto;
	padding: 24px 30px 14px;
	background: #fff;
	overscroll-behavior: contain;
}

.sm-xs__lead {
	margin: 0 0 16px;
	max-width: 56ch;
	font-size: 12.5px;
	line-height: 1.5;
	color: #5f6368;
}

.sm-xs__lead b {
	font-weight: 600;
	color: #0a0a0a;
}

/* The rail bleeds to the panel edge so cards scroll under the fade. */
.sm-xs__carousel {
	position: relative;
	margin: 0 -30px;
	padding: 0 30px;
}

.sm-xs__carousel::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 40px;
	background: linear-gradient(90deg, rgba(255, 255, 255, 0), #fff 82%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease;
}

.sm-xs__carousel.is-more::after {
	opacity: 1;
}

.sm-xs__rail {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	padding: 2px 0 6px;
	scroll-padding-left: 30px;
}

.sm-xs__rail.is-filled .sm-xs__card {
	flex: 1 1 0;
	min-width: 0;
}

.sm-xs__rail::-webkit-scrollbar {
	display: none;
}

.sm-xs__card {
	position: relative;
	flex: 0 0 176px;
	scroll-snap-align: start;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	min-width: 0;
	padding: 8px 8px 12px;
	background: #fff;
	border: 1px solid #e7e8ea;
	border-radius: 15px;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(17, 18, 20, 0.03);
	transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.sm-xs__card:hover {
	border-color: #d2d5d9;
	transform: translateY(-1px);
	box-shadow: 0 8px 20px -16px rgba(17, 18, 20, 0.35);
}

.sm-xs__card.is-on {
	border-color: #047857;
	box-shadow: inset 0 0 0 1px #047857, 0 10px 24px -18px rgba(4, 120, 87, 0.45);
}

.sm-xs__media {
	display: grid;
	place-items: center;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 10px;
	background:
		radial-gradient(95% 70% at 50% 8%, #fff 0%, rgba(255, 255, 255, 0) 62%),
		linear-gradient(165deg, #f5f5f7, #ececef);
}

.sm-xs__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	padding: 9%;
}

.sm-xs__card-body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 10px 2px 0;
}

.sm-xs__name {
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.35;
	letter-spacing: -0.005em;
	color: #0a0a0a;
	min-height: 2.7em;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.sm-xs__var {
	margin-top: 3px;
	font-size: 10px;
	line-height: 1.35;
	color: #6b7280;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sm-xs__var:empty {
	display: none;
}

.sm-xs__price {
	margin-top: auto;
	padding-top: 8px;
	font-size: 12.5px;
	font-weight: 600;
	letter-spacing: -0.01em;
	font-variant-numeric: tabular-nums;
	color: #0a0a0a;
}

.sm-xs__card input {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	appearance: none;
	-webkit-appearance: none;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1.4px solid rgba(15, 15, 17, 0.16);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 1px 3px rgba(15, 15, 17, 0.1);
	cursor: pointer;
	transition: background 0.14s ease, border-color 0.14s ease;
}

.sm-xs__card input:checked {
	background: #047857;
	border-color: #047857;
}

.sm-xs__card input:checked::after {
	content: "";
	position: absolute;
	left: 6.5px;
	top: 2.5px;
	width: 4.5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 1.9px 1.9px 0;
	transform: rotate(45deg);
}

.sm-xs__card input:focus-visible {
	outline: 2px solid #047857;
	outline-offset: 2px;
}

/* ---------- Card quantity ----------
   A card that survives the limit filter still has a ceiling: the stepper is
   bounded by the card's own `remaining`. The `+` is muted at the clamp, never
   disabled — the press is acknowledged with the same 2px nudge the bag uses,
   and the quiet line under the control says why. */
.sm-xs__qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2px;
	box-sizing: border-box;
	margin-top: 8px;
	padding: 2px;
	border: 1px solid #e7e8ea;
	border-radius: 8px;
	background: #fff;
}

.sm-xs__qty button {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: #0a0a0a;
	font-family: inherit;
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	touch-action: manipulation;
	transition: background 0.12s ease;
}

.sm-xs__qty button:hover {
	background: #f2f3f4;
}

.sm-xs__qty button:disabled {
	opacity: 0.32;
	cursor: default;
	background: transparent;
}

.sm-xs__qty button.is-capped {
	opacity: 0.32;
	cursor: not-allowed;
}

.sm-xs__qty button.is-nudge {
	animation: sm-qty-nudge 140ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sm-xs__qty-num {
	min-width: 14px;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	text-align: center;
	color: #0a0a0a;
}

/* The quiet sentence under the control: the same amber ink as the inline hint
   on the bag and the PDP, never a second card. */
.sm-xs__card-limit {
	display: block;
	margin-top: 6px;
	font-size: 10px;
	font-weight: 600;
	line-height: 1.35;
	color: #8a5a12;
}

.sm-xs__card-limit[hidden] {
	display: none;
}

/* ---------- Rail progress ---------- */
.sm-xs__progress {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	margin-top: 12px;
}

.sm-xs__progress[hidden] {
	display: none;
}

.sm-xs__bar {
	flex: 0 0 120px;
	width: 120px;
	height: 2px;
	border-radius: 2px;
	background: #e9eaec;
	overflow: hidden;
}

.sm-xs__bar i {
	display: block;
	height: 100%;
	width: 14%;
	border-radius: 2px;
	background: #0a0a0a;
	transition: width 0.18s ease;
}

.sm-xs__arrows {
	display: flex;
	gap: 8px;
}

.sm-xs__arrow {
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	padding: 0;
	border: 1px solid #d9dce1;
	border-radius: 7px;
	background: #fff;
	color: #0a0a0a;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.sm-xs__arrow svg {
	width: 12px;
	height: 12px;
}

.sm-xs__arrow:hover {
	background: #111113;
	border-color: #111113;
	color: #fff;
}

.sm-xs__arrow[disabled] {
	opacity: 0.35;
	cursor: default;
	background: #fff;
	border-color: #d9dce1;
	color: #0a0a0a;
}

/* ---------- Foot ---------- */
.sm-xs__foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 18px 30px 22px;
	background: linear-gradient(180deg, #fff, #fbfcfb);
	border-top: 1px solid #f1f2f4;
}

.sm-xs__count {
	margin: 0 auto 0 0;
	font-size: 11.5px;
	line-height: 1.4;
	color: #5f6368;
}

.sm-xs__count b {
	font-weight: 600;
	color: #0a0a0a;
	font-variant-numeric: tabular-nums;
}

.sm-xs__count.is-empty {
	color: #6b7280;
}

.sm-xs__btn {
	height: 42px;
	padding: 0 18px;
	border: 1px solid #e7e8ea;
	border-radius: 9px;
	background: #fff;
	font-family: inherit;
	font-size: 12.5px;
	font-weight: 600;
	color: #3d4046;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.sm-xs__btn:hover {
	background: #fff;
	border-color: #cfd2d6;
	color: #0a0a0a;
}

.sm-xs__btn--primary {
	min-width: 156px;
	background: #0a0a0a;
	border-color: #0a0a0a;
	color: #fff;
}

.sm-xs__btn--primary:hover {
	background: #000;
	color: #fff;
}

.sm-xs__btn--primary:disabled {
	opacity: 0.55;
	cursor: default;
	background: #0a0a0a;
}

/* Flying accessory -> header bag */
.sm-xs__fly {
	position: fixed;
	z-index: 330;
	pointer-events: none;
	object-fit: contain;
	filter: drop-shadow(0 14px 20px rgba(15, 15, 17, 0.2));
	will-change: transform, opacity;
}

/* Toast — one dark cardstock sheet for every variant.
   The limit card's material is the language: the same gradient, the same 1px
   cut edge, the same 3px chamfer and the same single elevation. The receipt,
   the one-line message and the error keep their own skeleton, line order,
   actions and positions; only the surface is shared, so no state looks like it
   came from a different product.

   Every variant draws its tones from this block. `--sm-toast-accent` is the
   one accent: green for information, warm neutral for an interrupted action.
   Never a red sheet. */
.sm-xs__toast {
	position: fixed;
	right: 28px;
	bottom: calc(28px + var(--sm-toast-offset, 0px));
	z-index: 340;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	gap: 12px;
	width: 420px;
	max-width: calc(100vw - 32px);
	min-height: 112px;
	padding: 16px;
	--sm-toast-edge: rgba(0, 0, 0, 0.55);
	--sm-toast-band: rgba(255, 255, 255, 0.1);
	--sm-toast-catch: rgba(255, 255, 255, 0.22);
	--sm-toast-catch-soft: rgba(255, 255, 255, 0.13);
	--sm-toast-cut: rgba(0, 0, 0, 0.5);
	--sm-toast-accent: #7ee2a8;
	border: 1px solid var(--sm-toast-edge);
	border-radius: 18px;
	background: linear-gradient(180deg, #191a1c 0%, #101012 52%, #0a0a0c 100%);
	color: #fff;
	box-shadow:
		0 1px 2px rgba(17, 18, 20, 0.06),
		0 18px 36px -22px rgba(17, 18, 20, 0.34);
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px) scale(0.985);
	/* Out: 200ms fade. In: the `.is-on` rule below overrides the transform
	   with the 420ms spring, so the two directions never share a curve. */
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
	pointer-events: none;
}

/* The cut: a 3px chamfer that follows the corner, a 1px catch on the top/left,
   a deeper shade on the bottom edge, one finished outer line. */
.sm-xs__toast::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: inherit;
	pointer-events: none;
	box-shadow:
		inset 0 -2px 0 var(--sm-toast-cut),
		inset 0 1px 0 var(--sm-toast-catch),
		inset 1px 0 0 var(--sm-toast-catch),
		inset 0 3px 0 var(--sm-toast-catch-soft),
		inset 3px 0 0 var(--sm-toast-catch-soft),
		inset 0 0 0 1px var(--sm-toast-edge),
		inset 0 0 0 4px var(--sm-toast-band);
}

.sm-xs__toast.is-on {
	opacity: 1;
	visibility: visible;
	transform: none;
	pointer-events: auto;
	transition: opacity 0.22s ease, transform 0.42s cubic-bezier(0.16, 1, 0.3, 1), visibility 0s;
}

.sm-xs__toast-main {
	order: 0;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	min-width: 0;
}

.sm-xs__toast-icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
	color: var(--sm-toast-accent);
	animation: sm-xs-toast-icon 0.52s 0.04s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes sm-xs-toast-icon {
	from { transform: scale(0.55); opacity: 0; }
	to { transform: none; opacity: 1; }
}

.sm-xs__toast-icon svg {
	width: 20px;
	height: 20px;
}

.sm-xs__toast-copy {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
	padding-top: 1px;
}

.sm-xs__toast-copy b {
	font-size: 13.5px;
	font-weight: 600;
	letter-spacing: -0.012em;
	line-height: 1.25;
	color: #fff;
}

.sm-xs__toast-name {
	font-size: 12px;
	line-height: 1.35;
	font-weight: 500;
	color: #b6bbc2;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sm-xs__toast-extra {
	font-size: 11px;
	line-height: 1.4;
	color: #9aa1a9;
	white-space: normal;
}

/*
 * Actions — the last row of the receipt, always.
 *
 * Right-aligned group: View bag (secondary) then Checkout (primary) sits on
 * the content's right edge, so the eye finishes on the action. `nowrap` and
 * a fixed 10px gap mean the pair never stacks into two lines, and nothing is
 * allowed to stretch across the row.
 */
.sm-xs__toast-actions {
	order: 1;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex: none;
	padding-top: 12px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Checkout — the one primary. Never stretched, never shrunk. It inverts on the
   dark sheet (ink on light) so it stays the loudest action without a second
   colour. */
.sm-xs__toast-cta,
.sm-xs__toast-cta--checkout {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	height: 38px;
	padding: 0 18px;
	border-radius: 9px;
	background: #f4f5f6;
	color: #0a0a0a;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.14s ease, transform 0.14s ease;
}

.sm-xs__toast-cta:hover {
	background: #fff;
	color: #000;
	transform: translateY(-1px);
}

/*
 * View bag — the quiet one, on the left. Same 38px line box as the button, one
 * outlined chip at 11.5px: the pair keeps its hierarchy without a second
 * filled button on the sheet.
 */
.sm-xs__toast-link {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 600;
	color: #cfd4da;
	text-decoration: none;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.07);
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.sm-xs__toast-link:hover {
	background: rgba(255, 255, 255, 0.13);
	border-color: rgba(255, 255, 255, 0.26);
	color: #fff;
	text-decoration: none;
}

.sm-xs__toast-link--bag {
	flex: 0 0 auto;
	min-height: 38px;
	padding: 0 12px;
	white-space: nowrap;
}

.sm-xs__toast-text {
	padding: 1px 0;
	font-size: 12.5px;
	line-height: 1.45;
	color: #fff;
}

/* Simple state: one line, never the receipt box. Same row order as before —
   the 40px tile, then the message, then the quiet link on the right. */
.sm-xs__toast.is-simple {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 10px;
	width: auto;
	max-width: 360px;
	min-height: 0;
	padding: 13px 16px;
}

.sm-xs__toast.is-simple .sm-xs__toast-text {
	flex: 1 1 auto;
	min-width: 0;
}

.sm-xs__toast.is-simple .sm-xs__toast-link {
	flex: 0 0 auto;
	margin-left: auto;
	min-height: 44px;
	padding: 0 10px;
}

/* The error is an interruption, not a different product: same sheet, one warm
   accent on the tile and the 1px edge. Never a red card. */
.sm-xs__toast.is-error {
	--sm-toast-accent: #e2c08a;
	border-color: rgba(226, 192, 138, 0.34);
}

.sm-xs__toast.is-error .sm-xs__toast-icon {
	border-color: rgba(226, 192, 138, 0.28);
	color: #e2c08a;
}

/* ---------- The limit notice: one dark cardstock sheet ----------
   Same toast element as the receipt, re-cut as an advertisement the shopper
   may ignore. Two columns — [icon] | [headline, body, action] — and the action
   never leaves the second column.

   The material is the homepage hero card's, not a second 3D language: the
   dark sheet gradient, the 1px cut edge, the 3px chamfer drawn with inset
   shadows (catch on the top/left, shade on the bottom) and the front sheet's
   single elevation. The hero card has no `perspective`; its depth is paper.

   It sits LOWER than v3 did: the card shares the WhatsApp float's baseline in
   the bottom-right corner and paints over it (the float is z-index 45, this is
   400). The float can never cover the card.

   The stock variant is an availability fact: it keeps the card but drops the
   button and switches the one accent to a warm neutral, never amber-as-error. */

.sm-xs__toast.is-limit.is-b2b {
	/* Anchored to the corner the eye leaves last, on the float's own bottom
	   edge. `position` stays fixed from the base rule: the close button is
	   absolutely positioned inside it, and fixed is already a containing
	   block. */
	top: auto;
	right: 24px;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	z-index: 400;
	width: 404px;
	max-width: calc(100vw - 32px);
	min-height: 0;
	padding: 18px;
	gap: 0;

	/* Per-sheet tones, inverted for the dark sheet exactly as the hero deck
	   inverts them on its black cards. */
	--sm-card-edge: rgba(0, 0, 0, 0.55);
	--sm-card-band: rgba(255, 255, 255, 0.1);
	--sm-card-catch: rgba(255, 255, 255, 0.22);
	--sm-card-catch-soft: rgba(255, 255, 255, 0.13);
	--sm-card-cut: rgba(0, 0, 0, 0.5);

	border: 1px solid var(--sm-card-edge);
	border-radius: 18px;
	background: linear-gradient(180deg, #191a1c 0%, #101012 52%, #0a0a0c 100%);
	color: #fff;
	box-shadow:
		0 1px 2px rgba(17, 18, 20, 0.06),
		0 18px 36px -22px rgba(17, 18, 20, 0.34);
	transform: translateY(12px) scale(0.985);
}

/* The chamfer: a 3px cut band that follows the corner, a 1px catch on the
   top/left, a deeper shade on the bottom edge, one finished outer line. */
.sm-xs__toast.is-limit.is-b2b::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: inherit;
	pointer-events: none;
	box-shadow:
		inset 0 -2px 0 var(--sm-card-cut),
		inset 0 1px 0 var(--sm-card-catch),
		inset 1px 0 0 var(--sm-card-catch),
		inset 0 3px 0 var(--sm-card-catch-soft),
		inset 3px 0 0 var(--sm-card-catch-soft),
		inset 0 0 0 1px var(--sm-card-edge),
		inset 0 0 0 4px var(--sm-card-band);
}

.sm-xs__toast.is-limit.is-b2b.is-on {
	transform: none;
}

/* Two columns, always: a fixed 40px icon column and the text column. The
   action is a child of the text column, so it cannot cross into the icon. */
.sm-xs__toast.is-b2b .sm-xs__toast-main {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	align-items: start;
	gap: 14px;
}

.sm-xs__toast.is-b2b .sm-xs__toast-icon {
	box-sizing: border-box;
	width: 40px;
	height: 40px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 12px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.16);
	color: #7ee2a8;
}

.sm-xs__toast.is-b2b .sm-xs__toast-icon svg {
	width: 20px;
	height: 20px;
}

/* Label, headline, body and action stack on the text column's left edge. The
   right inset clears the 24px close in the corner. */
.sm-xs__toast.is-b2b .sm-xs__toast-copy {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0;
	flex: 1;
	min-width: 0;
	padding-top: 1px;
	padding-right: 20px;
}

/* No eyebrow: the label is empty unless the admin sets one. */
.sm-xs__toast.is-b2b .sm-limit__label {
	display: block;
	margin-bottom: 6px;
	font-size: 9.5px;
	font-weight: 650;
	letter-spacing: 0.13em;
	line-height: 1.2;
	text-transform: uppercase;
	color: #7ee2a8;
}

.sm-limit__close {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 6;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 24px;
	height: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: rgba(255, 255, 255, 0.5);
	cursor: pointer;
	transition: background 0.14s ease, color 0.14s ease;
}

/* The visual box is 24px; the tap target is 44px. */
.sm-limit__close::after {
	content: "";
	position: absolute;
	inset: -10px;
	border-radius: 50%;
}

.sm-limit__close:hover {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
}

.sm-limit__close:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.8);
	outline-offset: 2px;
}

.sm-limit__close svg {
	width: 12px;
	height: 12px;
}

/* The headline leads: 17/600 white against a 13.5px body on a near-black
   sheet. The old 15px title sat too close to the 12px body. */
.sm-xs__toast.is-b2b .sm-limit__title {
	display: block;
	font-size: 17px;
	font-weight: 600;
	letter-spacing: -0.022em;
	line-height: 1.24;
	color: #fff;
}

.sm-xs__toast.is-b2b .sm-limit__body {
	display: block;
	margin-top: 6px;
	font-size: 13.5px;
	font-weight: 400;
	line-height: 1.5;
	color: #b6bbc2;
}

/* One quiet action under the sentence it belongs to: a 32px glass chip, not a
   40px black button. Muted surface, small type, natural width — the headline
   is the loudest thing in the card. */
.sm-xs__toast.is-b2b .sm-limit__cta {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	box-sizing: border-box;
	align-self: flex-start;
	flex: none;
	width: auto;
	height: 32px;
	margin-top: 12px;
	padding: 0 11px;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: 9px;
	background: rgba(255, 255, 255, 0.07);
	color: #e6e8eb;
	font-size: 11.5px;
	font-weight: 550;
	letter-spacing: 0;
	line-height: 1;
	text-decoration: none;
	transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

/* 32px of ink, 44px of target. */
.sm-xs__toast.is-b2b .sm-limit__cta::after {
	content: "";
	position: absolute;
	inset: -6px;
	border-radius: 12px;
}

.sm-xs__toast.is-b2b .sm-limit__cta:hover {
	background: rgba(255, 255, 255, 0.14);
	border-color: rgba(255, 255, 255, 0.26);
	color: #fff;
}

.sm-xs__toast.is-b2b .sm-limit__cta:focus-visible {
	outline: 2px solid rgba(255, 255, 255, 0.8);
	outline-offset: 3px;
}

.sm-xs__toast.is-b2b .sm-limit__cta-text {
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.sm-xs__toast.is-b2b .sm-limit__arrow {
	display: inline-flex;
	flex: none;
	transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.sm-xs__toast.is-b2b .sm-limit__arrow svg {
	width: 13px;
	height: 13px;
}

.sm-xs__toast.is-b2b .sm-limit__cta:hover .sm-limit__arrow {
	transform: translateX(2px);
}

/* Stock-limited: an availability fact. Same card, no pitch, no button. The
   label and the icon tile carry a warm neutral instead of the brand green, so
   it never reads as a wholesale offer. */
.sm-xs__toast.is-b2b.is-stock .sm-limit__label {
	color: #e2c08a;
}

.sm-xs__toast.is-b2b.is-stock .sm-xs__toast-icon {
	border-color: rgba(255, 255, 255, 0.13);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04));
	color: #e2c08a;
}

body.sm-xs-lock {
	overflow: hidden;
}

.sm-bag.is-bumped svg {
	animation: sm-xs-bag-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.sm-bag.is-bumped .sm-cart-dot {
	animation: sm-xs-dot-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sm-xs-bag-pop {
	0% { transform: scale(1); }
	45% { transform: scale(1.16); }
	100% { transform: scale(1); }
}

@keyframes sm-xs-dot-pop {
	0% { transform: scale(0.6); }
	60% { transform: scale(1.25); }
	100% { transform: scale(1); }
}

@media (max-width: 640px) {
	.sm-xs {
		place-items: end center;
		padding: 0;
	}

	.sm-xs__panel {
		width: 100%;
		max-height: 92vh;
		border-radius: 20px 20px 0 0;
	}

	.sm-xs__head {
		padding: 20px 18px 18px;
	}

	.sm-xs__icon {
		width: 40px;
		height: 40px;
		border-radius: 12px;
	}

	.sm-xs__icon svg {
		width: 19px;
		height: 19px;
	}

	.sm-xs__title {
		font-size: 17px;
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
		line-height: 1.2;
	}

	.sm-xs__body {
		padding: 20px 18px 12px;
	}

	.sm-xs__lead {
		font-size: 12px;
		margin-bottom: 18px;
	}

	.sm-xs__carousel {
		margin: 0 -18px;
		padding: 0 18px;
	}

	.sm-xs__rail {
		scroll-padding-left: 18px;
	}

	.sm-xs__foot {
		padding: 16px 18px calc(18px + env(safe-area-inset-bottom, 0));
		flex-wrap: wrap;
		gap: 10px;
	}

	.sm-xs__progress {
		margin-top: 16px;
	}

	.sm-xs__arrow {
		width: 28px;
		height: 28px;
	}

	.sm-xs__count {
		flex-basis: 100%;
		margin: 0 0 2px;
	}

	.sm-xs__card {
		flex-basis: 160px;
	}

	.sm-xs__name {
		font-size: 11px;
	}

	.sm-xs__card input {
		top: 12px;
		right: 12px;
	}

	.sm-xs__btn--ghost {
		order: 1;
		flex: 0 0 auto;
		padding: 0 16px;
	}

	.sm-xs__btn--primary {
		order: 2;
		flex: 1;
		min-width: 0;
	}
}

/*
 * <=760px — the toast is a bottom sheet and the actions are a two-button bar.
 *
 * The row is the last child and `order: 1`, so it is always the bottom row of
 * the sheet: the pair sits in the thumb zone at the right edge, not floating
 * under a paragraph. Checkout keeps its own width (48px tall, 18px padding,
 * flex-shrink 0); View bag takes the space to its left, never on top of it.
 * Nothing is stretched — a full-width primary in a 288px sheet reads as a
 * second sticky bar, and the row would lose the primary/secondary contrast.
 *
 * Safe area: the sheet's `bottom` already adds env(safe-area-inset-bottom),
 * so the whole card — and therefore this last row — clears the home
 * indicator. Do not add the inset to the padding as well; that leaves a
 * 34px dead strip under the buttons on notched phones.
 */
@media (max-width: 760px) {
	.sm-xs__toast {
		left: 16px;
		right: 16px;
		bottom: calc(16px + env(safe-area-inset-bottom, 0px) + var(--sm-toast-offset, 0px));
		width: auto;
		max-width: calc(100vw - 32px);
		min-height: 0;
		padding: 14px;
	}

	.sm-xs__toast.is-simple {
		max-width: calc(100vw - 32px);
	}

	.sm-xs__toast-main {
		order: 0;
	}

	.sm-xs__toast-actions {
		order: 1;
		flex: none;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: flex-end;
		gap: 10px;
		padding-top: 12px;
		border-top: 1px solid rgba(255, 255, 255, 0.1);
	}

	/* Primary: right edge of the content box, 48px tall, never stretched. */
	.sm-xs__toast-cta,
	.sm-xs__toast-cta--checkout {
		flex: 0 0 auto;
		height: 48px;
		padding: 0 18px;
		border-radius: 10px;
		font-size: 12.5px;
	}

	/* Secondary: 44px tap target immediately to its left, still the quiet one. */
	.sm-xs__toast-link--bag {
		box-sizing: border-box;
		flex: 0 1 auto;
		min-width: 0;
		height: 44px;
		min-height: 44px;
		padding: 0 14px;
		border: 1px solid rgba(255, 255, 255, 0.18);
		border-radius: 10px;
		background: rgba(255, 255, 255, 0.07);
		color: #e6e8eb;
		font-size: 11.5px;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.sm-xs__toast-link--bag:hover {
		border-color: rgba(255, 255, 255, 0.3);
		text-decoration: none;
	}

	/* Simple toast: message left, link right, same 44px target. */
	.sm-xs__toast.is-simple {
		padding: 12px 14px;
	}

	.sm-xs__toast.is-simple .sm-xs__toast-link {
		min-height: 44px;
		font-size: 11.5px;
	}

	/* Limit card: full width minus 32px, sitting on the WhatsApp float's own
	   bottom edge (20px + safe area), so the two overlap and the card wins on
	   z-index. Headline, body and the quiet action stay in the second column. */
	.sm-xs__toast.is-limit.is-b2b {
		top: auto;
		left: 16px;
		right: 16px;
		bottom: calc(20px + env(safe-area-inset-bottom, 0px));
		width: auto;
		max-width: calc(100vw - 32px);
		padding: 16px;
		gap: 0;
		border-radius: 18px;
		transform: translateY(12px) scale(0.985);
	}

	.sm-xs__toast.is-b2b .sm-xs__toast-main {
		gap: 12px;
	}

	.sm-limit__close {
		top: 9px;
		right: 9px;
	}

	.sm-xs__toast.is-b2b .sm-limit__cta {
		height: 32px;
		min-height: 32px;
	}
}

/*
 * The PDP sticky bar owns the bottom edge while it is on screen, and the
 * WhatsApp float raises itself by the same amount. The card follows the float,
 * so the two never trade places: the bar at the bottom, then the float, then
 * the card on top of both.
 */
body.sm-bar-on .sm-xs__toast.is-limit.is-b2b {
	bottom: calc(var(--sm-bar-h, 61px) + 12px + env(safe-area-inset-bottom, 0px));
}

/* Below 360px the pair must still fit on one line: the secondary shrinks
   first, to a 12px inner padding, and keeps its 44px height. */
@media (max-width: 359px) {
	.sm-xs__toast-link--bag {
		padding: 0 12px;
		font-size: 11px;
	}

	.sm-xs__toast-actions {
		gap: 8px;
	}

	.sm-xs__toast-cta,
	.sm-xs__toast-cta--checkout {
		padding: 0 16px;
		font-size: 12px;
	}

	.sm-xs__card {
		flex-basis: 146px;
	}

	/* The limit card at 280-359px: a little tighter and one step down in type,
	   so the headline still leads and "Talk to our B2B Sales Team" never
	   truncates. */
	.sm-xs__toast.is-limit.is-b2b {
		padding: 15px;
	}

	.sm-xs__toast.is-b2b .sm-limit__title {
		font-size: 16px;
	}

	.sm-xs__toast.is-b2b .sm-limit__body {
		font-size: 13px;
		line-height: 1.5;
	}

	.sm-xs__toast.is-b2b .sm-limit__cta {
		padding: 0 10px;
		font-size: 11px;
	}
}

@media (max-width: 310px) {
	.sm-xs__toast.is-limit.is-b2b {
		padding: 14px;
	}

	.sm-xs__toast.is-b2b .sm-limit__title {
		font-size: 15.5px;
	}

	.sm-xs__toast.is-b2b .sm-limit__body {
		font-size: 12.5px;
	}

	.sm-xs__toast.is-b2b .sm-limit__cta {
		font-size: 11px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sm-xs__panel,
	.sm-xs__scrim,
	.sm-xs__card {
		transition: none !important;
	}

	/* A toast that springs in is motion; with reduced motion it is simply
	   there, and it fades out instantly when dismissed. */
	.sm-xs__toast,
	.sm-xs__toast-icon,
	.sm-limit__arrow {
		animation: none !important;
		transition: none !important;
		transform: none !important;
	}
}

/* -------------------------------------------------------------------------
 * Inline quantity state, shared by every surface that renders a stepper.
 *
 * A limit is a state, not an error: light amber paper, a 1px border and amber
 * ink, never red. Written with an element qualifier (p.smc-qty-hint) so it
 * wins over the bundled PDP rule whatever the sheet order, and so the bag,
 * the edit modal and quick view render the same notice as the PDP.
 *
 * The sentence owns the box: `width: fit-content` means the notice is as wide
 * as its words, never a bar across the container. `display: flex` (not
 * inline-flex) keeps it on its own line under an inline stepper. 6px puts it a
 * few pixels under the control it explains, close enough to belong to it and
 * far enough not to touch it.
 * ---------------------------------------------------------------------- */

.sm-pdp p[data-smc-qty-hint],
p.smc-qty-hint {
	display: flex;
	align-items: center;
	gap: 7px;
	box-sizing: border-box;
	width: fit-content;
	max-width: 100%;
	margin: 6px 0 0;
	padding: 5px 9px;
	border: 1px solid rgb(240, 220, 184);
	border-radius: 8px;
	background: rgb(253, 247, 234);
	color: rgb(138, 90, 18);
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.sm-pdp p[data-smc-qty-hint]::before,
p.smc-qty-hint::before {
	content: "";
	flex: none;
	width: 5px;
	height: 5px;
	border-radius: 50%;
	background: #c08a2e;
}

.sm-pdp p[data-smc-qty-hint][hidden],
p.smc-qty-hint[hidden] {
	display: none;
}

/* -------------------------------------------------------------------------
 * The notice inside a wrapping flex row.
 *
 * `.buy-meta-col` (PDP Configure), `.p-row` (the v1 hero) and `.item-foot`
 * (a bag row) are wrap-flex rows: an inline-flex child would sit IN the row,
 * beside the stepper, not under it. When a notice is visible those three turn
 * into a two-row grid — control row, then the notice — and `justify-self:
 * start` keeps the amber pill at its natural width. `:has()` means a row with
 * no notice is untouched, and a browser without `:has()` falls back to the
 * pre-existing full-width line rather than breaking the row.
 * ---------------------------------------------------------------------- */

.sm-pdp .config-panel .config-qty .buy-meta-col:has(> p[data-smc-qty-hint]:not([hidden])),
.sm-pdp .p-row:has(> p[data-smc-qty-hint]:not([hidden])),
.smc-bag .item-foot:has(> .smc-qty-hint:not([hidden])) {
	display: grid;
	align-items: center;
	column-gap: 12px;
	row-gap: 6px;
}

.sm-pdp .config-panel .config-qty .buy-meta-col:has(> p[data-smc-qty-hint]:not([hidden])) {
	grid-template-columns: minmax(0, 1fr) auto;
}

.sm-pdp .p-row:has(> p[data-smc-qty-hint]:not([hidden])) {
	grid-template-columns: auto minmax(0, 1fr);
}

.smc-bag .item-foot:has(> .smc-qty-hint:not([hidden])) {
	grid-template-columns: auto minmax(0, 1fr);
}

/* Row 1 keeps the label and the control where they were. */
.sm-pdp .config-panel .config-qty .buy-meta-col:has(> p[data-smc-qty-hint]:not([hidden])) > .buy-meta-label {
	grid-area: 1 / 1;
	margin: 0;
}

.sm-pdp .config-panel .config-qty .buy-meta-col:has(> p[data-smc-qty-hint]:not([hidden])) > .qty {
	grid-area: 1 / 2;
	justify-self: end;
}

.smc-bag .item-foot:has(> .smc-qty-hint:not([hidden])) > .qty {
	grid-area: 1 / 1;
}

.smc-bag .item-foot:has(> .smc-qty-hint:not([hidden])) > .item-links {
	grid-area: 1 / 2;
	justify-self: end;
}

/* Row 2 is the notice: one line under the control, as wide as its sentence.
   It anchors to the control's own side — the Configure row keeps its stepper
   on the right, the bag foot and the v1 row keep it on the left. */
.sm-pdp .config-panel .config-qty .buy-meta-col:has(> p[data-smc-qty-hint]:not([hidden])) > p[data-smc-qty-hint],
.sm-pdp .p-row:has(> p[data-smc-qty-hint]:not([hidden])) > p[data-smc-qty-hint],
.smc-bag .item-foot:has(> .smc-qty-hint:not([hidden])) > .smc-qty-hint {
	grid-column: 1 / -1;
	justify-self: start;
	align-self: start;
	width: auto;
	margin: 0;
}

/* The Configure row's stepper is right-aligned, so "under the stepper" means
   the right edge of the block, not the label's left edge. */
.sm-pdp .config-panel .config-qty .buy-meta-col:has(> p[data-smc-qty-hint]:not([hidden])) > p[data-smc-qty-hint] {
	justify-self: end;
}

/* The PDP bundle tightens this to -2px inside the Configure panel, which is
   what made the notice touch the stepper. */
.sm-pdp .config-panel .config-qty .buy-meta-col > p[data-smc-qty-hint] {
	margin-top: 6px;
}

/* -------------------------------------------------------------------------
 * Bag row notice: short, compact, directly under the stepper.
 *
 * The row foot wraps so the notice takes its own line inside the same block as
 * the +/- control, instead of falling to the bottom of the row. One line of
 * 11px text, a 4px gap, no card padding.
 * ---------------------------------------------------------------------- */

.item-foot {
	flex-wrap: wrap;
}

.item-foot .smc-qty-hint,
.smc-row-qty .smc-qty-hint {
	flex: 0 0 auto;
	order: 3;
	margin: 5px 0 0;
	padding: 4px 8px;
	border-radius: 7px;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.3;
}

/* The row notice must fit the row: border-box and a hard max-width stop the
   amber bar running past the content edge on a 390 px bag. */
.smc-qty-hint,
.sm-pdp p[data-smc-qty-hint] {
	box-sizing: border-box;
	max-width: 100%;
	overflow-wrap: anywhere;
}

/* -------------------------------------------------------------------------
 * Limit card � the final frame is guaranteed (2026-11-05)
 *
 * `.is-on` starts the 220 ms fade/420 ms spring. If that entry transition
 * never runs (background tab, throttled timers, an interrupted transition)
 * the card would stay at opacity 0 while claiming to be on screen.
 * `sm-cross-sell-13.js` double-checks on rAF and adds `.is-static`, which
 * paints the final state with no transition. Reduced motion is handled by the
 * media query below: motion off, card still visible.
 * ---------------------------------------------------------------------- */

.sm-xs__toast.is-on.is-static,
.sm-xs__toast.is-on.is-static.is-over-dialog,
body.sm-bar-on .sm-xs__toast.is-on.is-static {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: none;
}

/* -------------------------------------------------------------------------
 * Quantity stepper � one press language on every surface
 *
 * Bag row, Edit-bag row, PDP: the same numbers, so the surfaces cannot drift.
 *   normal press    .94, 90 ms      + number flip, 120 ms
 *   press at cap    2 px nudge, 140 ms (the `+` is muted, never disabled)
 * The classes are written by one delegated handler in sm-cross-sell-13.js;
 * the `:active` rules are the no-JS fallback.
 * ---------------------------------------------------------------------- */

.qty button,
.sm-qb button,
.smc-modal .qty button {
	touch-action: manipulation;
}

.qty button.is-press,
.smc-bag .bag-item .qty button.is-press,
.smc-modal .edit-row .qty button.is-press,
.sm-pdp .qty button.is-press,
.qty button:active:not(:disabled) {
	transform: scale(0.94);
	transition: transform 90ms cubic-bezier(0.22, 1, 0.36, 1);
}

.qty button.is-nudge,
.smc-bag .bag-item .qty button[data-smc-qty-inc].is-capped:active,
.smc-bag .bag-item .qty button[data-smc-qty-inc][aria-disabled="true"]:active,
.sm-pdp .qty button[data-smc-qty-inc].is-at-max:active {
	animation: sm-qty-nudge 140ms cubic-bezier(0.22, 1, 0.36, 1);
	transform: none;
}

@keyframes sm-qty-nudge {
	0%, 100% { transform: translateX(0); }
	30% { transform: translateX(-2px); }
	70% { transform: translateX(2px); }
}

/* The number flips only when the press was accepted; a refused press gets the
   nudge instead, so a number that did not change never moves. */
.qty.is-step output,
.qty.is-step .num {
	animation: sm-qty-flip 120ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes sm-qty-flip {
	0% { transform: translateY(0); opacity: 1; }
	45% { transform: translateY(-4px); opacity: 0.35; }
	100% { transform: translateY(0); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
	.qty button.is-press,
	.qty button.is-nudge,
	.qty button:active:not(:disabled),
	.smc-bag .bag-item .qty button[data-smc-qty-inc].is-capped:active,
	.smc-bag .bag-item .qty button[data-smc-qty-inc][aria-disabled="true"]:active,
	.sm-pdp .qty button[data-smc-qty-inc].is-at-max:active {
		animation: none !important;
		transform: none !important;
		transition: none !important;
	}

	.qty.is-step output,
	.qty.is-step .num {
		animation: none !important;
	}
}
