/* =========================================================
   cart.css — off-canvas cart drawer, loaded on every page
   ========================================================= */

.cart-overlay {
	position: fixed;
	inset: 0;
	z-index: 200;
	background: rgba(16, 16, 19, .45);
	opacity: 0;
	transition: opacity .25s ease;
}

.cart-overlay.is-visible { opacity: 1; }

body.cart-open { overflow: hidden; }

.cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 201;
	display: flex;
	flex-direction: column;
	width: min(420px, 100vw);
	background: var(--paper);
	box-shadow: -20px 0 50px rgba(16, 16, 19, .2);
	transform: translateX(100%);
	transition: transform .3s ease;
}

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

.cart-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--line);
}

.cart-drawer__head h2 {
	font-size: 17px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.cart-drawer__close {
	background: none;
	border: none;
	font-size: 26px;
	line-height: 1;
	color: var(--muted);
	cursor: pointer;
}

.cart-drawer__close:hover { color: var(--ink); }

[data-cart-fragment] {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.cart-drawer__body {
	flex: 1;
	overflow-y: auto;
	padding: 8px 24px;
}

.cart-items { display: flex; flex-direction: column; }

.cart-item {
	display: flex;
	gap: 14px;
	padding-block: 20px;
	border-bottom: 1px solid var(--line);
}

.cart-item__media {
	flex-shrink: 0;
	width: 76px;
	height: 76px;
	overflow: hidden;
	border-radius: var(--radius);
	background: var(--mist);
}

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

.cart-item__body { flex: 1; min-width: 0; }

.cart-item__head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 8px;
}

.cart-item__brand {
	margin: 0 0 2px;
	font-family: var(--display);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
}

.cart-item__name {
	display: block;
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1.3;
}

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

.cart-item__variant {
	margin: 3px 0 0;
	font-size: 13px;
	color: var(--muted);
}

.cart-item__variant p { margin: 0; }

.cart-item__remove {
	flex-shrink: 0;
	background: none;
	border: none;
	font-size: 18px;
	line-height: 1;
	color: var(--muted);
	cursor: pointer;
	padding: 2px;
}

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

.cart-item__foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 12px;
}

.cart-item__qty {
	display: flex;
	align-items: center;
	border: 1px solid var(--line);
	border-radius: var(--radius);
	overflow: hidden;
}

.cart-item__qty button {
	width: 30px;
	height: 30px;
	background: none;
	border: none;
	font-size: 14px;
	cursor: pointer;
}

.cart-item__qty button:hover { background: var(--mist); }

.cart-item__qty span {
	display: inline-block;
	width: 26px;
	text-align: center;
	font-family: var(--display);
	font-size: 13px;
	font-weight: 600;
}

.cart-item__price {
	font-family: var(--display);
	font-size: 14px;
	font-weight: 600;
}

.cart-empty {
	display: grid;
	place-items: center;
	gap: 16px;
	padding-block: 60px;
	text-align: center;
	color: var(--muted);
}

.cart-drawer__foot {
	padding: 20px 24px 24px;
	border-top: 1px solid var(--line);
}

.cart-drawer__subtotal {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 6px;
	font-family: var(--display);
	font-size: 16px;
}

.cart-drawer__note {
	margin: 0 0 16px;
	font-size: 12.5px;
	color: var(--muted);
}

.cart-drawer__checkout {
	display: flex;
	width: 100%;
	margin-bottom: 10px;
}

.cart-drawer__continue {
	display: block;
	width: 100%;
	padding: 10px;
	background: none;
	border: none;
	font-size: 13px;
	color: var(--muted);
	text-decoration: underline;
	cursor: pointer;
}

.cart-drawer__continue:hover { color: var(--ink); }
