/**
 * Slide-in cart drawer (Figma "Sidebar Overlay", 7263:5485).
 *
 * 457px panel anchored right, over a scrim.
 */

.fsx-drawer {
	position: fixed;
	inset: 0;
	z-index: 900;
}

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

.fsx-drawer__scrim {
	position: absolute;
	inset: 0;
	background: rgba(16, 12, 28, 0.42);
	opacity: 0;
	transition: opacity 260ms ease;
}

.fsx-drawer.is-open .fsx-drawer__scrim {
	opacity: 1;
}

.fsx-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: 457px;
	max-width: 100vw;
	background: #fff;
	border-left: 1px solid var(--g200);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform 280ms cubic-bezier(0.32, 0.72, 0.35, 1);
	box-shadow: -18px 0 48px rgba(16, 24, 40, 0.12);
}

.fsx-drawer.is-open .fsx-drawer__panel {
	transform: none;
}

/* Header (7263:5486) — 455x52 */

.fsx-drawer__head {
	flex-shrink: 0;
	height: 52px;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid var(--g200);
}

.fsx-drawer__title {
	font-family: "Clash Display", "Public Sans", sans-serif;
	font-weight: 600;
	font-size: 20px;
	line-height: 28px;
	color: var(--ink);
}

.fsx-drawer__close {
	position: relative;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: none;
	cursor: pointer;
	transition: background-color 160ms ease;
}

.fsx-drawer__close:hover {
	background: var(--p50);
}

.fsx-drawer__close:focus-visible {
	outline: 2px solid var(--p500);
	outline-offset: 2px;
}

.fsx-drawer__close::before,
.fsx-drawer__close::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 14px;
	height: 1.6px;
	background: var(--g700);
}

.fsx-drawer__close::before { transform: rotate(45deg); }
.fsx-drawer__close::after  { transform: rotate(-45deg); }

/* Free shipping progress (7263:6323) — 415x92 */

.fsx-ship {
	flex-shrink: 0;
	margin: 12px 20px;
	padding: 12px;
	border: 1px solid var(--g200);
	border-radius: 10px;
	background: var(--g50);
}

.fsx-ship__row {
	display: flex;
	align-items: center;
	gap: 12px;
}

.fsx-ship__icon {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--p200);
	position: relative;
	transition: background-color 200ms ease;
}

.fsx-ship__icon::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translateY(-1px) rotate(45deg);
}

.fsx-drawer.is-unlocked .fsx-ship__icon {
	background: #17a34a;
}

.fsx-ship__msg {
	font-size: 13px;
	font-weight: 500;
	line-height: 18px;
	color: var(--g700);
}

.fsx-ship__track {
	height: 6px;
	margin-top: 14px;
	border-radius: 6px;
	background: var(--g200);
	overflow: hidden;
}

.fsx-ship__fill {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 6px;
	background: var(--p500);
	transition: width 320ms cubic-bezier(0.4, 0, 0.2, 1), background-color 200ms ease;
}

.fsx-drawer.is-unlocked .fsx-ship__fill {
	background: #17a34a;
}

.fsx-ship__scale {
	display: flex;
	justify-content: space-between;
	margin-top: 8px;
	font-size: 12px;
	line-height: 18px;
	color: var(--g500);
}

/* Lines (7263:5506) */

.fsx-drawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 4px 20px;
}

.fsx-cartlist {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Figma List Item is 415x107. */
.fsx-cartline {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 0;
	border-bottom: 1px solid var(--g200);
}

.fsx-cartline__media {
	flex-shrink: 0;
	width: 72px;
	height: 72px;
	border-radius: 10px;
	background: var(--media);
	overflow: hidden;
	display: grid;
	place-items: center;
}

.fsx-cartline__media img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.fsx-cartline__text {
	flex: 1 1 auto;
	min-width: 0;
}

.fsx-cartline__title {
	display: block;
	font-size: 15px;
	font-weight: 500;
	line-height: 21px;
	color: var(--g800);
}

.fsx-cartline__title:hover {
	color: var(--p500);
}

.fsx-cartline__qty {
	display: inline-flex;
	align-items: center;
	margin-top: 10px;
	border: 1px solid var(--g300);
	border-radius: 8px;
	overflow: hidden;
}

.fsx-cartline__qty button {
	width: 28px;
	height: 28px;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 15px;
	color: var(--g700);
	cursor: pointer;
	transition: background-color 160ms ease, color 160ms ease;
}

.fsx-cartline__qty button:hover {
	background: var(--p50);
	color: var(--p500);
}

.fsx-cartline__qty span {
	min-width: 28px;
	text-align: center;
	font-size: 14px;
	font-weight: 500;
	color: var(--g800);
}

.fsx-cartline__end {
	flex-shrink: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 10px;
}

.fsx-cartline__price {
	font-weight: 600;
	font-size: 15px;
	color: var(--g800);
	white-space: nowrap;
}

.fsx-cartline__remove {
	position: relative;
	width: 20px;
	height: 20px;
	border: 0;
	background: none;
	cursor: pointer;
	opacity: 0.5;
	transition: opacity 160ms ease;
}

.fsx-cartline__remove:hover {
	opacity: 1;
}

.fsx-cartline__remove::before,
.fsx-cartline__remove::after {
	content: "";
	position: absolute;
	inset: 0;
	margin: auto;
	width: 12px;
	height: 1.4px;
	background: var(--g600);
}

.fsx-cartline__remove::before { transform: rotate(45deg); }
.fsx-cartline__remove::after  { transform: rotate(-45deg); }

.fsx-cartempty {
	padding: 48px 0;
	text-align: center;
	font-size: 15px;
	color: var(--g600);
}

.fsx-cartempty a {
	display: block;
	margin-top: 8px;
	color: var(--p500);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Summary (7263:5579) */

.fsx-drawer__foot {
	flex-shrink: 0;
	padding: 16px 20px 20px;
	border-top: 1px solid var(--g200);
	background: #fff;
}

.fsx-discount {
	border: 0;
	background: none;
	padding: 0;
	font-family: inherit;
	font-size: 15px;
	line-height: 20px;
	color: var(--p500);
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.fsx-subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin-top: 16px;
	font-size: 16px;
	color: var(--g700);
}

.fsx-subtotal strong {
	font-family: "Clash Display", "Public Sans", sans-serif;
	font-weight: 600;
	font-size: 22px;
	color: var(--ink);
}

.fsx-drawer__note {
	margin-top: 6px;
	font-size: 12px;
	line-height: 16px;
	color: var(--g500);
}

.fsx-drawer__actions {
	display: grid;
	gap: 10px;
	margin-top: 16px;
}

.fsx-page .fsx-drawer__actions .fsx-btn {
	width: 100%;
}

/* Card arrow button, for products whose variants must be chosen first. */

.fsx-cartbtn--arrow {
	background: var(--p500);
}

.fsx-cartbtn--arrow img {
	width: 16px;
	height: 16px;
	transform: rotate(180deg);
}

.fsx-card:hover .fsx-cartbtn--arrow {
	background: #4a2a91;
}

/* The cart control is a real button now, so reset UA styling. */
button.fsx-cartbtn {
	border: 0;
	padding: 0;
	cursor: pointer;
	font: inherit;
}

button.fsx-cartbtn:focus-visible {
	outline: 2px solid var(--p500);
	outline-offset: 2px;
}

@media (max-width: 520px) {
	.fsx-drawer__panel {
		width: 100vw;
	}
}
