/* ==========================================================================
   DRAWER LATERAL — Carrinho e Favoritos compartilham a mesma mecânica
   ========================================================================== */

.cart-drawer,
.wishlist-drawer {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(420px, 92vw);
	background: var(--paper);
	z-index: var(--z-drawer);
	display: flex;
	flex-direction: column;
	transform: translateX(100%);
	transition: transform var(--dur-base) var(--ease);
	box-shadow: -8px 0 24px rgba(0, 0, 0, 0.08);
}

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

.drawer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: var(--space-md);
	border-bottom: 1px solid var(--line-color);
}

.drawer__header h2 {
	font-size: var(--fs-md);
}

.drawer__close {
	font-size: 1.6rem;
	line-height: 1;
}

.cart-drawer__content,
.wishlist-drawer__content {
	flex: 1;
	overflow-y: auto;
	padding: var(--space-md);
}

.cart-drawer__items,
.wishlist-list {
	display: flex;
	flex-direction: column;
	gap: var(--space-sm);
}

.cart-drawer__item,
.wishlist-item {
	display: grid;
	grid-template-columns: 72px 1fr auto;
	gap: var(--space-xs);
	align-items: start;
	border-bottom: 1px solid var(--line-color);
	padding-bottom: var(--space-sm);
}

.cart-drawer__item-media img,
.wishlist-item__media img {
	width: 72px;
	height: 90px;
	object-fit: cover;
	border: 1px solid var(--line-color);
}

.cart-drawer__item-info,
.wishlist-item__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.cart-drawer__item-name,
.wishlist-item__name {
	font-size: var(--fs-sm);
	font-weight: 600;
}

.cart-drawer__item-meta,
.wishlist-item__price {
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	color: var(--ash);
}

.cart-drawer__item-remove,
.wishlist-item__remove {
	font-size: 1.3rem;
	line-height: 1;
	color: var(--ash);
}

.cart-drawer__item-remove:hover,
.wishlist-item__remove:hover {
	color: var(--ink);
}

.cart-drawer__footer {
	border-top: 1px solid var(--line-color);
	padding: var(--space-md);
}

.cart-drawer__total {
	display: flex;
	justify-content: space-between;
	font-family: var(--font-mono);
	font-size: var(--fs-md);
	margin-bottom: var(--space-sm);
}

.cart-drawer__buttons {
	display: flex;
	flex-direction: column;
	gap: var(--space-2xs);
}

.cart-drawer__buttons a {
	display: block;
	text-align: center;
	font-family: var(--font-display);
	font-weight: 700;
	text-transform: uppercase;
	font-size: var(--fs-sm);
	padding: 0.9em;
	border: 1px solid var(--ink);
}

.cart-drawer__buttons a.checkout {
	background: var(--ink);
	color: var(--white);
}

.cart-drawer__buttons a:not(.checkout) {
	background: transparent;
	color: var(--ink);
}

.cart-drawer__empty,
.wishlist-empty {
	text-align: center;
	padding-block: var(--space-lg);
	color: var(--ash);
}

.cart-drawer__empty .btn {
	margin-top: var(--space-sm);
}

.wishlist-item__cta {
	font-family: var(--font-mono);
	font-size: var(--fs-xs);
	text-decoration: underline;
}
