.fm-cart-drawer,
.fm-cart-drawer * {
	box-sizing: border-box;
}

.fm-cart-drawer {
	position: fixed;
	inset: 0;
	z-index: 999999;
	pointer-events: none;
	font-family: "Poppins", sans-serif;
}

.fm-cart-drawer.is-open {
	pointer-events: auto;
}

.fm-cart-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0);
	transition: background .25s ease;
}

.fm-cart-drawer.is-open .fm-cart-drawer__backdrop {
	background: rgba(15, 23, 42, .45);
}

.fm-cart-drawer__panel {
	position: absolute;
	right: 0;
	top: 0;
	bottom: 0;
	width: min(420px, 100vw);
	background: #fff;
	box-shadow: -12px 0 24px rgba(0, 0, 0, .12);
	transform: translateX(110%);
	transition: transform .3s cubic-bezier(.4, 0, .2, 1);
	display: flex;
	flex-direction: column;
}

.fm-cart-drawer.is-open .fm-cart-drawer__panel {
	transform: translateX(0);
}

.fm-cart-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 22px;
	border-bottom: 1px solid #eee;
	flex-shrink: 0;
}

.fm-cart-drawer__head h2 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: #1f2933;
	letter-spacing: .5px;
	text-transform: uppercase;
}

.fm-cart-drawer__close {
	width: 32px;
	height: 32px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 4px;
	color: #4b5563;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.fm-cart-drawer__close:hover {
	background: #f3f4f6;
	color: #1f2933;
}

.fm-cart-drawer__close svg {
	width: 18px;
	height: 18px;
}

.fm-cart-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 14px 22px;
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.fm-cart-drawer__empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	padding: 60px 16px;
	text-align: center;
	color: #6b7280;
	flex: 1;
}

.fm-cart-drawer__empty svg {
	width: 72px;
	height: 72px;
	color: #d1d5db;
}

.fm-cart-drawer__empty p {
	margin: 0;
	font-size: 14px;
}

.fm-cart-drawer__shop {
	margin-top: 6px;
	padding: 11px 24px !important;
	background: var(--fm-color-accent) !important;
	color: #fff !important;
	border-radius: 4px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	letter-spacing: .3px;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease;
	box-shadow: none !important;
	text-shadow: none !important;
	display: inline-block;
	line-height: 1.4;
}

.fm-cart-drawer__shop:hover,
.fm-cart-drawer__shop:focus,
.fm-cart-drawer__shop:active {
	background: #1f2933 !important;
	color: #fff !important;
	text-decoration: none !important;
}

.fm-cart-item {
	display: grid;
	grid-template-columns: 64px 1fr 28px;
	gap: 12px;
	align-items: center;
	padding-bottom: 14px;
	border-bottom: 1px solid #f1f3f5;
}

.fm-cart-item:last-child {
	border-bottom: none;
}

.fm-cart-item__media {
	display: block;
	width: 64px;
	height: 64px;
	border-radius: 4px;
	overflow: hidden;
	background: #f6f7f8;
}

.fm-cart-item__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.fm-cart-item__body {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.fm-cart-item__name {
	font-size: 13.5px;
	color: #1f2933;
	font-weight: 500;
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	line-height: 1.35;
}

.fm-cart-item__name:hover {
	color: var(--fm-color-accent);
}

.fm-cart-item__meta {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 12.5px;
	color: #6b7280;
}

.fm-cart-item__meta strong {
	color: #1f2933;
	font-weight: 600;
}

.fm-cart-item__price {
	font-weight: 700;
	color: #1f2933;
	font-size: 13.5px;
}

.fm-cart-item__price .woocommerce-Price-amount {
	font-weight: 700;
	color: #1f2933;
}

.fm-cart-item__remove {
	width: 26px;
	height: 26px;
	padding: 0;
	background: transparent;
	border: none;
	border-radius: 4px;
	color: #9ca3af;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.fm-cart-item__remove:hover {
	background: #fef2f2;
	color: #dc2626;
}

.fm-cart-item__remove svg {
	width: 14px;
	height: 14px;
}

.fm-cart-drawer__foot {
	border-top: 1px solid #eee;
	padding: 18px 22px 20px;
	flex-shrink: 0;
	background: #fff;
}

.fm-cart-drawer__foot:empty {
	display: none;
}

.fm-cart-drawer__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	margin-bottom: 14px;
}

.fm-cart-drawer__total span {
	font-size: 13px;
	color: #6b7280;
	text-transform: uppercase;
	letter-spacing: .4px;
}

.fm-cart-drawer__total strong {
	font-size: 20px;
	font-weight: 700;
	color: #1f2933;
}

.fm-cart-drawer__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
}

.fm-cart-drawer__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 16px !important;
	background: var(--fm-color-accent) !important;
	color: #fff !important;
	border-radius: 4px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	letter-spacing: .3px;
	text-decoration: none !important;
	transition: background .15s ease, color .15s ease;
	box-shadow: none !important;
	text-shadow: none !important;
}

.fm-cart-drawer__cta:hover,
.fm-cart-drawer__cta:focus,
.fm-cart-drawer__cta:active {
	background: #1f2933 !important;
	color: #fff !important;
	text-decoration: none !important;
}

.fm-cart-drawer__cta--ghost {
	background: #f3f4f6 !important;
	color: #1f2933 !important;
}

.fm-cart-drawer__cta--ghost:hover,
.fm-cart-drawer__cta--ghost:focus,
.fm-cart-drawer__cta--ghost:active {
	background: #e5e7eb !important;
	color: #1f2933 !important;
}

.fm-add-to-cart-loading {
	opacity: .65;
	pointer-events: none;
}

.fm-cart-toast {
	position: fixed;
	right: 22px;
	bottom: 22px;
	background: #16a34a;
	color: #fff;
	padding: 12px 18px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .15);
	transform: translateY(20px);
	opacity: 0;
	transition: transform .25s ease, opacity .25s ease;
	z-index: 999998;
	pointer-events: none;
}

.fm-cart-toast.is-show {
	transform: translateY(0);
	opacity: 1;
}

.fm-cart-toast.is-error {
	background: #dc2626;
}
