/* ===========================================================================
   Cart drawer
   Desktop: Figma 131:4212 (600px drawer)
   Mobile:  Figma 231:28096 (393px reference viewport)
   ========================================================================== */

#cart-drawer {
	box-sizing: border-box;
	position: fixed;
	inset: 0 0 0 auto;
	width: min(600px, 100vw);
	height: 100vh;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: visible;
	border: 0;
	border-left: 0;
	border-radius: var(--r-sm) 0 0 var(--r-sm);
	background: var(--fig-siegel-white);
	box-shadow: inset 1px 0 var(--fig-neutral-100);
	color: var(--text-heading-primary);
	translate: 100% 0;
	transition:
		translate var(--dur-base) ease-out,
		overlay var(--dur-base) allow-discrete,
		display var(--dur-base) allow-discrete;
	transition-behavior: allow-discrete;
}

#cart-drawer *,
#cart-drawer *::before,
#cart-drawer *::after {
	box-sizing: border-box;
}

#cart-drawer[open] {
	translate: 0 0;
}

@starting-style {
	#cart-drawer[open] {
		translate: 100% 0;
	}
}

#cart-drawer::backdrop {
	background: rgba(0, 0, 0, 0.35);
	opacity: 0;
	transition:
		opacity var(--dur-base) ease-out,
		overlay var(--dur-base) allow-discrete,
		display var(--dur-base) allow-discrete;
	transition-behavior: allow-discrete;
}

#cart-drawer[open]::backdrop {
	opacity: 1;
}

@starting-style {
	#cart-drawer[open]::backdrop {
		opacity: 0;
	}
}

html.cart-open {
	overflow: hidden;
}

.cart-drawer__panel {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	padding-top: 24px;
	background: var(--fig-siegel-white);
}

.cart-drawer__header {
	flex: 0 0 24px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	margin-bottom: 24px;
	padding: 0 20px;
}

.cart-drawer__title {
	margin: 0;
	color: var(--text-heading-primary);
	white-space: nowrap;
}

.cart-drawer__close {
	position: relative;
	display: grid;
	place-items: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--text-heading-primary);
	cursor: pointer;
}

.cart-drawer__close svg {
	display: block;
	width: 20px;
	height: 20px;
}

.cart-drawer__close::after {
	content: '';
	position: absolute;
	inset: -12px;
}

.cart-drawer__close:focus-visible,
.cart-drawer__upsells-arrow:focus-visible,
.cart-item__remove:focus-visible,
.cart-drawer__upsell-tier:focus-visible,
.cart-drawer__upsell-add:focus-visible,
.cart-drawer__checkout:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

.cart-drawer__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-x: hidden;
	overflow-y: auto;
}

.cart-drawer__items {
	display: flex;
	flex-direction: column;
	gap: 20px;
	padding: 0 32px;
}

.cart-drawer__items.is-loading {
	position: relative;
	min-height: 140px;
	pointer-events: none;
}

.cart-drawer__items.is-loading::before {
	content: '';
	position: absolute;
	z-index: 5;
	inset: 0;
	background: rgba(255, 255, 255, 0.78);
	backdrop-filter: blur(2px);
}

.cart-drawer__items.is-loading::after {
	content: '';
	position: absolute;
	z-index: 6;
	top: 54px;
	left: calc(50% - 14px);
	width: 28px;
	height: 28px;
	border: 3px solid var(--fig-neutral-100);
	border-top-color: var(--btn-primary);
	border-radius: 50%;
	animation: siegel-cart-spin 700ms linear infinite;
}

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

.cart-drawer__empty {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
	margin: 0;
	color: var(--text-body-primary);
}

.cart-drawer__empty-text {
	margin: 0;
}

/* The way out of an empty drawer. Same shape as the drawer's own primary
   action, so it reads as the thing to do next rather than as a stray link. */
.cart-drawer__empty-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0 20px;
	border-radius: var(--r-sm);
	background: var(--btn-primary);
	color: var(--fig-siegel-white);
	font: var(--fw-bold) 0.875rem / 1rem var(--font-heading);
	letter-spacing: var(--ls-wide);
	text-transform: uppercase;
	text-decoration: none;
	transition: background var(--dur-fast) linear;
}

@media (hover: hover) and (pointer: fine) {
	.cart-drawer__empty-link:hover {
		background: var(--btn-primary-hover);
	}
}

@media (prefers-reduced-motion: reduce) {
	.cart-drawer__empty-link { transition: none; }
}

.cart-drawer__empty-link:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

.cart-item {
	display: flex;
	align-items: center;
	gap: 48px;
	width: 100%;
	min-height: 86px;
	transition: opacity var(--dur-fast) linear;
}

.cart-item__thumb {
	flex: 0 0 86px;
	width: 86px;
	height: 86px;
	overflow: hidden;
	border-radius: var(--r-sm);
	background: var(--bg-primary);
}

.cart-item__thumb img,
.cart-item__thumb-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: inherit;
	object-fit: contain;
	object-position: center;
}

.woocommerce .cart-item__thumb img,
.woocommerce-page .cart-item__thumb img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
}

.cart-item__thumb-placeholder {
	background: var(--fig-neutral-100);
}

.cart-item__info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 12px;
	min-width: 0;
}

.cart-item__heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	min-width: 0;
}

.cart-item__name,
.cart-item__price {
	margin: 0;
	color: var(--text-heading-primary);
}

.cart-item__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* The name is a link now. It keeps the heading's colour rather than taking
   the brand red every other inline link uses - a cart line is a list of what
   you have, and five red product names would read as five warnings. The
   underline on hover is what says it is clickable. */
.cart-item__name a {
	color: inherit;
	text-decoration: none;
}

@media (hover: hover) and (pointer: fine) {
	.cart-item__name a:hover {
		text-decoration: underline;
		text-underline-offset: 2px;
	}
}

.cart-item__name a:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: 2px;
}

.cart-item__price {
	flex: 0 0 auto;
	white-space: nowrap;
}

.cart-item__price .woocommerce-Price-amount {
	font: inherit;
}

.cart-item__size-row,
.cart-item__controls {
	display: flex;
	align-items: center;
	gap: 16px;
}

.cart-item__size-label,
.cart-item__size-value {
	color: var(--text-heading-primary);
}

.cart-item__stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 76px;
	height: 25px;
	overflow: hidden;
	border: 1px solid var(--fig-neutral-100);
	border-radius: var(--r-sm);
	background: var(--fig-siegel-white);
}

.cart-item__stepper-btn {
	position: relative;
	display: grid;
	flex: 0 0 25px;
	place-items: center;
	width: 25px;
	height: 25px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--fig-neutral-400);
	font: var(--fw-regular) 14px/1 var(--font-body);
	cursor: pointer;
	transition: background var(--dur-fast) linear;
}

.cart-item__stepper-btn:focus-visible {
	outline: 2px solid var(--btn-stroke-focused);
	outline-offset: -2px;
}

.cart-item__stepper-btn:disabled {
	opacity: 0.35;
	cursor: default;
}

.cart-drawer__upsells-arrow:disabled {
	color: var(--text-heading-primary);
	cursor: default;
}

.cart-item__qty {
	flex: 1 1 auto;
	padding: 0 2px;
	color: #313144;
	text-align: center;
}

.cart-item__remove {
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--fig-neutral-400);
	text-decoration: underline;
	text-underline-offset: 1px;
	cursor: pointer;
	transition: color var(--dur-fast) linear;
}

.cart-drawer__upsells {
	flex: 0 0 216.424px;
	height: 216.424px;
	margin-bottom: 16px;
	overflow: hidden;
}

.cart-drawer__upsells[hidden] {
	display: none;
}

.cart-drawer__upsells-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 16px;
	margin-bottom: 12px;
	padding: 0 40px 0 20px;
}

.cart-drawer__upsells-arrows {
	display: flex;
	align-items: center;
	gap: 8px;
}

.cart-drawer__upsells-arrows[hidden] {
	display: none;
}

.cart-drawer__upsells-arrow {
	display: grid;
	place-items: center;
	width: 14px;
	height: 14px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--text-heading-primary);
	cursor: pointer;
}

.cart-drawer__upsells-arrow svg {
	display: block;
	width: 14px;
	height: 14px;
}

.cart-drawer__upsells-track {
	display: flex;
	gap: 12px;
	width: 100%;
	padding: 0 20px;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scroll-padding-left: 20px;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
}

.cart-drawer__upsells-track::-webkit-scrollbar {
	display: none;
}

.cart-drawer__upsell-card {
	display: flex;
	flex: 0 0 161.663px;
	flex-direction: column;
	width: 161.663px;
	height: 188.424px;
	padding: 1.293px;
	overflow: hidden;
	border: 1.293px solid var(--fig-neutral-100);
	border-radius: 2.791px;
	background: var(--fig-siegel-white);
	scroll-snap-align: start;
}

.cart-drawer__upsell-img-wrap {
	display: flex;
	flex: 0 0 122.804px;
	align-items: center;
	justify-content: center;
	height: 122.804px;
	overflow: hidden;
	background: #f3f4f6;
}

.cart-drawer__upsell-img-wrap img,
.cart-drawer__upsell-img-placeholder {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center;
}

.woocommerce .cart-drawer__upsell-img-wrap img,
.woocommerce-page .cart-drawer__upsell-img-wrap img {
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: contain;
}

.cart-drawer__upsell-img-placeholder {
	background: var(--fig-neutral-100);
}

.cart-drawer__upsell-info {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 7.756px;
	min-height: 0;
	padding: 5.582px;
}

.cart-drawer__upsell-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 4px;
	height: 16px;
	min-width: 0;
	overflow: hidden;
}

.cart-drawer__upsell-name,
.cart-drawer__upsell-price {
	font-family: var(--font-body);
	font-size: 11.164px;
	font-weight: var(--fw-regular);
	line-height: 15.071px;
	white-space: nowrap;
}

.cart-drawer__upsell-name {
	min-width: 0;
	overflow: hidden;
	color: #0a0a0a;
	text-overflow: ellipsis;
}

.cart-drawer__upsell-price {
	flex: 0 0 auto;
	color: #101828;
}

.cart-drawer__upsell-price .woocommerce-Price-amount {
	font: inherit;
}

.cart-drawer__upsell-cta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	min-width: 0;
}

.cart-drawer__upsell-tier {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 11.164px;
	min-width: 69.864px;
	height: 30.7px;
	padding: 5.582px;
	overflow: hidden;
	border: 1.395px solid var(--fig-neutral-100);
	border-radius: 2.791px;
	background: var(--fig-siegel-white);
	color: var(--text-link);
	font: var(--fw-regular) 15.58px/21.031px var(--font-body);
	letter-spacing: 0;
	text-align: left;
	text-transform: none;
	white-space: nowrap;
	cursor: pointer;
}

.cart-drawer__upsell-tier svg {
	display: block;
	flex: 0 0 auto;
	width: 19.536px;
	height: 19.536px;
	margin-left: auto;
}

.cart-drawer__upsell-add {
	flex: 0 0 auto;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--text-heading-primary);
	font: var(--fw-bold) 14.219px/15.512px var(--font-heading);
	letter-spacing: 0;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
	transition: opacity var(--dur-fast) linear;
}

.cart-drawer__upsell-add:disabled {
	opacity: 0.5;
	cursor: default;
}

.cart-drawer__footer {
	display: flex;
	flex: 0 0 auto;
	flex-direction: column;
	gap: 16px;
	width: 100%;
	padding: 24px 20px;
	border-top: 0;
	box-shadow: inset 0 1px #e5e7eb;
	background: var(--fig-siegel-white);
}

.cart-drawer__footer[hidden] {
	display: none;
}

.cart-drawer__subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 20px;
	color: var(--text-heading-primary);
}

.cart-drawer__subtotal-amount,
.cart-drawer__subtotal-amount .woocommerce-Price-amount {
	font: var(--fw-bold) 1rem/1.2625rem var(--font-body);
}

.cart-drawer__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 53px;
	padding: 16px;
	border: 1px solid var(--btn-primary);
	border-radius: var(--r-sm);
	background: var(--btn-primary);
	color: var(--fig-siegel-white);
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	transition: background var(--dur-fast) linear;
}

.cart-drawer__checkout-stack {
	display: flex;
	flex-direction: column;
	gap: 4px;
	width: 100%;
}

.cart-drawer__payment-marks {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 43.495px;
	height: 29.698px;
}

.cart-payment {
	display: block;
	flex: 0 0 auto;
	object-fit: fill;
}

.cart-payment--paypal {
	position: relative;
	width: 59.163px;
	height: 29.698px;
}

.cart-payment--paypal img {
	position: absolute;
	display: block;
	max-width: none;
}

.cart-payment__paypal-symbol {
	left: 0;
	top: 7.58px;
	width: 12.248px;
	height: 14.441px;
}

.cart-payment__paypal-pay {
	left: 17.07px;
	top: 10.80px;
	width: 23.46px;
	height: 11.21px;
}

.cart-payment__paypal-pal {
	right: 0;
	top: 10.80px;
	width: 18.735px;
	height: 9.236px;
}

.cart-payment--apple-pay {
	width: 36.712px;
	height: 15.077px;
}

.cart-payment--google-pay {
	width: 59.163px;
	height: 10.717px;
}

.cart-payment--visa {
	width: 40.455px;
	height: 13.064px;
}

.cart-payment--mastercard {
	width: 28.529px;
	height: 22.188px;
}

@media (hover: hover) and (pointer: fine) {
	.cart-item__stepper-btn:hover {
		background: var(--bg-primary);
	}

	.cart-item__remove:hover {
		color: var(--text-heading-primary);
	}

	.cart-drawer__upsell-add:hover {
		opacity: 0.6;
	}

	.cart-drawer__checkout:hover {
		background: var(--btn-primary-hover);
	}
}

@media (max-width: 767px) {
	#cart-drawer {
		inset: 0;
		width: 100%;
		height: 100vh;
		height: 100dvh;
		border: 0;
		border-radius: 0;
		box-shadow: inset 0 0 0 1px var(--fig-neutral-100);
	}

	.cart-drawer__header {
		flex-basis: 20px;
		padding: 0 12px;
	}

	.cart-drawer__title {
		font: var(--fw-bold) 1rem/1.2625rem var(--font-body);
	}

	.cart-drawer__items {
		gap: 12px;
		padding: 0 12px;
	}

	.cart-item {
		gap: 10px;
	}

	.cart-item__size-label {
		font: var(--fw-bold) 0.625rem/0.75rem var(--font-heading);
		letter-spacing: var(--ls-wide);
		text-transform: uppercase;
	}

	.cart-drawer__upsells {
		flex-basis: 159.708px;
		height: 159.708px;
	}

	.cart-drawer__upsells-header {
		height: 12px;
		padding: 0 31px 0 12px;
	}

	.cart-drawer__upsells-title {
		font: var(--fw-bold) 0.625rem/0.75rem var(--font-heading);
		letter-spacing: var(--ls-wide);
	}

	.cart-drawer__upsells-track {
		padding: 0 12px;
		scroll-padding-left: 12px;
	}

	.cart-drawer__upsell-card {
		flex-basis: 115.85px;
		width: 115.85px;
		height: 135.708px;
		padding: 0.926px;
		border-width: 0.926px;
		border-radius: var(--r-sm);
	}

	.cart-drawer__upsell-img-wrap {
		flex-basis: 88.003px;
		height: 88.003px;
	}

	.cart-drawer__upsell-info {
		gap: 5.558px;
		padding: 4px;
	}

	.cart-drawer__upsell-heading {
		height: 10.8px;
	}

	.cart-drawer__upsell-name,
	.cart-drawer__upsell-price {
		font-size: 8px;
		line-height: 10.8px;
	}

	.cart-drawer__upsell-tier {
		min-width: 50px;
		height: 25px;
		gap: 8px;
		padding: 4px;
		border-width: 1px;
		border-radius: var(--r-sm);
		font-size: 8px;
		line-height: 10.8px;
	}

	.cart-drawer__upsell-tier svg {
		width: 14px;
		height: 14px;
	}

	.cart-drawer__upsell-add {
		font-size: 10.19px;
		line-height: 11.116px;
	}

	.cart-drawer__footer {
		padding: 12px;
	}

	.cart-drawer__payment-marks {
		gap: 31px;
		height: 21.167px;
	}

	.cart-payment--paypal {
		width: 42.167px;
		height: 21.167px;
	}

	.cart-payment__paypal-symbol {
		top: 5.39px;
		width: 8.727px;
		height: 10.296px;
	}

	.cart-payment__paypal-pay {
		left: 12.164px;
		top: 7.70px;
		width: 16.721px;
		height: 7.994px;
	}

	.cart-payment__paypal-pal {
		top: 7.70px;
		width: 13.356px;
		height: 6.586px;
	}

	.cart-payment--apple-pay {
		width: 26.165px;
		height: 10.743px;
	}

	.cart-payment--google-pay {
		width: 42.167px;
		height: 7.637px;
	}

	.cart-payment--visa {
		width: 28.833px;
		height: 9.312px;
	}

	.cart-payment--mastercard {
		width: 20.333px;
		height: 15.817px;
	}
}

@media (max-width: 374px) {
	.cart-drawer__payment-marks {
		gap: clamp(16px, 6vw, 24px);
	}
}

@media (pointer: coarse) {
	.cart-drawer__upsell-tier,
	.cart-drawer__upsell-add,
	.cart-drawer__close,
	.cart-item__stepper-btn {
		position: relative;
	}

	.cart-drawer__upsell-tier::after,
	.cart-drawer__upsell-add::after,
	.cart-drawer__close::after,
	.cart-item__stepper-btn::after {
		content: '';
		position: absolute;
	}

	.cart-drawer__upsell-tier::after {
		inset: -9px 0;
	}

	.cart-drawer__upsell-add::after {
		inset: -14px -6px;
	}

	.cart-drawer__close::after {
		inset: -12px;
	}

	.cart-item__stepper-btn::after {
		inset: -10px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	#cart-drawer,
	#cart-drawer::backdrop,
	.cart-drawer__upsells-track {
		transition: none;
		scroll-behavior: auto;
	}

	.cart-drawer__items.is-loading::after {
		animation-duration: 1400ms;
	}
}
