.ps-cart-link {
	gap: 6px;
}

.ps-cart-count {
	box-sizing: border-box;
	display: inline-grid;
	flex: none;
	min-width: 22px;
	min-height: 22px;
	padding: 2px 5px;
	place-items: center;
	border-radius: 999px;
	background: #ad079b;
	color: #fff;
	font: 700 .73rem/1 "General Sans", system-ui, sans-serif;
}

.ps-cart-drawer:not([open]) {
	display: none;
}

html:has(.ps-cart-drawer[open]) {
	overflow: hidden;
}

.ps-cart-drawer[open] {
	--ps-cart-violet: #3f075c;
	--ps-cart-line: #e9deef;
	position: fixed;
	inset: 0 0 0 auto;
	box-sizing: border-box;
	width: min(100%, 450px);
	height: 100%;
	height: 100dvh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 22px 0 0 22px;
	background: #fff;
	color: #271133;
	box-shadow: -16px 0 55px rgb(35 13 45 / 22%);
	font: 400 1rem/1.45 "General Sans", system-ui, sans-serif;
}

.ps-cart-drawer::backdrop {
	background: rgb(16 4 22 / 53%);
	backdrop-filter: blur(3px);
}

.ps-cart-drawer__frame {
	display: flex;
	flex-direction: column;
	height: 100%;
}

.ps-cart-drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: max(20px, env(safe-area-inset-top)) clamp(17px, 5vw, 28px) 17px;
	border-bottom: 1px solid var(--ps-cart-line);
	background: #faf6fc;
}

.ps-cart-drawer .ps-cart-drawer__header h2 {
	margin: 0;
	color: var(--ps-cart-violet);
	font: 700 clamp(1.65rem, 5vw, 2.1rem)/1.1 "General Sans", system-ui, sans-serif;
	letter-spacing: -.04em;
}

.ps-cart-drawer button.ps-cart-drawer__close {
	display: grid;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	padding: 0;
	place-items: center;
	border: 1px solid var(--ps-cart-line);
	border-radius: 50%;
	background: #fff;
	color: var(--ps-cart-violet);
	font: 400 1.65rem/1 system-ui, sans-serif;
	cursor: pointer;
}

.ps-cart-drawer button.ps-cart-drawer__close:hover {
	background: #f3e4f8;
}

.ps-cart-drawer__body {
	flex: 1;
	min-height: 0;
	padding: 18px clamp(17px, 5vw, 28px) max(22px, env(safe-area-inset-bottom));
	overflow: auto;
	overscroll-behavior: contain;
}

.ps-cart-drawer .woocommerce-mini-cart {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ps-cart-drawer .woocommerce-mini-cart-item {
	position: relative;
	display: flow-root;
	min-height: 82px;
	padding: 14px 35px 14px 0;
	border-bottom: 1px solid var(--ps-cart-line);
}

.ps-cart-drawer .woocommerce-mini-cart-item a:not(.remove) {
	display: block;
	color: var(--ps-cart-violet);
	font-weight: 700;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.ps-cart-drawer .woocommerce-mini-cart-item img {
	float: left;
	width: 62px;
	height: 62px;
	margin: 0 12px 4px 0;
	border-radius: 10px;
	background: #f7f0fa;
	object-fit: contain;
}

.ps-cart-drawer .woocommerce-mini-cart-item a.remove {
	position: absolute;
	inset: 15px 0 auto auto;
	display: grid;
	width: 30px;
	height: 30px;
	padding: 0;
	place-items: center;
	border-radius: 50%;
	background: #f7effa;
	color: var(--ps-cart-violet) !important;
	text-decoration: none;
}

.ps-cart-drawer .woocommerce-mini-cart-item a.remove:hover {
	background: #eddcf3;
}

.ps-cart-drawer .woocommerce-mini-cart-item :is(.quantity, .variation) {
	font-size: .85rem;
}

.ps-cart-drawer .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 18px 0 14px;
	color: var(--ps-cart-violet);
}

.ps-cart-drawer .woocommerce-mini-cart__buttons {
	display: grid;
	gap: 8px;
	margin: 0;
}

.ps-cart-drawer .woocommerce-mini-cart__buttons a.button {
	display: grid;
	min-height: 48px;
	margin: 0;
	padding: 10px 14px;
	place-items: center;
	border: 1px solid var(--ps-cart-violet);
	border-radius: 999px;
	background: #fff;
	color: var(--ps-cart-violet);
	font-weight: 700;
	text-align: center;
	text-decoration: none;
}

.ps-cart-drawer .woocommerce-mini-cart__buttons a.checkout {
	background: var(--ps-cart-violet);
	color: #fff;
}

.ps-cart-drawer .woocommerce-mini-cart__buttons a.button:hover {
	border-color: #ad079b;
	background: #ad079b;
	color: #fff;
}

.ps-cart-drawer :focus-visible {
	outline: 2px solid var(--ps-cart-violet);
	outline-offset: 3px;
}

@media (max-width: 500px) {
	.ps-cart-drawer[open] { border-radius: 0; }
}

@media (prefers-reduced-motion: no-preference) {
	.ps-cart-drawer[open] { animation: ps-cart-enter 260ms cubic-bezier(.2,.7,.25,1) both; }
	@keyframes ps-cart-enter {
		from { transform: translateX(100%); }
		to { transform: translateX(0); }
	}
}
