.crlp-drawer {
	position: fixed; inset: 0; z-index: 9999;
	display: flex; justify-content: flex-end;
}
.crlp-drawer[hidden] { display: none; }

.crlp-drawer__overlay {
	position: absolute; inset: 0;
	background: rgba(0,0,0,.45);
	animation: crlp-drawer-fade .2s ease;
}

.crlp-drawer__panel {
	position: relative;
	width: 100%; max-width: 420px;
	background: #fff;
	height: 100%;
	display: flex; flex-direction: column;
	box-shadow: -8px 0 40px rgba(0,0,0,.18);
	animation: crlp-drawer-slide .25s ease;
}
@media (max-width: 460px) {
	.crlp-drawer__panel { max-width: 100%; }
}

@keyframes crlp-drawer-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes crlp-drawer-slide { from { transform: translateX(100%); } to { transform: translateX(0); } }

.crlp-drawer__header {
	display: flex; align-items: center; justify-content: space-between;
	padding: 18px 20px; border-bottom: 1px solid #f0f2f5;
}
.crlp-drawer__title { font-size: 18px; font-weight: 700; margin: 0; }
.crlp-drawer__close {
	width: 34px; height: 34px; border-radius: 8px; border: 1px solid #e6e9ee;
	background: #fff; color: #616b7a; font-size: 22px; line-height: 1; cursor: pointer;
	display: inline-flex; align-items: center; justify-content: center;
}
.crlp-drawer__close:hover { border-color: #d0d4dd; color: #14161b; }

.crlp-drawer__body {
	flex: 1; overflow-y: auto; padding: 16px 20px;
}
.crlp-drawer__empty {
	text-align: center; color: #616b7a; font-size: 15px;
	margin-top: 40px;
}

.crlp-drawer__item {
	display: flex; align-items: center; gap: 12px;
	padding: 14px 0; border-bottom: 1px solid #f0f2f5;
}
.crlp-drawer__item:last-child { border-bottom: 0; }
.crlp-drawer__item.is-loading { opacity: .6; pointer-events: none; }
.crlp-drawer__thumb { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: #f0f2f5; flex: 0 0 auto; }
.crlp-drawer__item-info { flex: 1; min-width: 0; }
.crlp-drawer__item-name { font-size: 14px; font-weight: 600; display: block; margin-bottom: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.crlp-drawer__qty { display: inline-flex; align-items: center; gap: 6px; }
.crlp-drawer__qty-btn {
	width: 28px; height: 28px; border-radius: 6px; border: 1px solid #d8dde6;
	background: #fff; color: #14161b; font-size: 16px; font-weight: 600;
	display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.crlp-drawer__qty-btn:hover:not([disabled]) { border-color: var(--crlp-accent, #2E63F6); color: var(--crlp-accent, #2E63F6); }
.crlp-drawer__qty-btn[disabled] { opacity: .4; cursor: default; }
.crlp-drawer__qty-n { min-width: 20px; text-align: center; font-weight: 700; font-size: 13px; }
.crlp-drawer__item-right { text-align: right; }
.crlp-drawer__item-price { font-size: 14px; font-weight: 700; display: block; margin-bottom: 3px; }
.crlp-drawer__item-remove {
	font-size: 12px; color: #616b7a; background: none; border: 0; padding: 0; cursor: pointer;
}
.crlp-drawer__item-remove:hover { color: var(--crlp-accent, #2E63F6); text-decoration: underline; }

.crlp-drawer__footer {
	padding: 16px 20px 24px; border-top: 1px solid #f0f2f5;
	background: #fafbfc;
}
.crlp-drawer__footer[hidden] { display: none; }
.crlp-drawer__total {
	display: flex; justify-content: space-between; font-size: 16px; font-weight: 700;
	margin-bottom: 14px;
}
.crlp-drawer__checkout,
.crlp-drawer__cart,
.crlp-drawer__continue {
	display: block; width: 100%; text-align: center; text-decoration: none;
	padding: 13px; border-radius: 10px; font-weight: 700; font-size: 15px;
	margin-bottom: 8px; cursor: pointer; border: 0;
}
.crlp-drawer__checkout {
	background: var(--crlp-accent, #2E63F6); color: var(--crlp-accent-ink, #FFFFFF);
}
.crlp-drawer__cart,
.crlp-drawer__continue {
	background: #fff; color: #14161b; border: 1px solid #e6e9ee;
}
.crlp-drawer__checkout:hover { filter: brightness(1.05); }
.crlp-drawer__cart:hover,
.crlp-drawer__continue:hover { border-color: #d0d4dd; }

body.crlp-drawer-open { overflow: hidden; }

/* Modo compatibilidade: remove animações do drawer. */
body.crlp-compat .crlp-drawer__overlay,
body.crlp-compat .crlp-drawer__panel { animation: none !important; }
body.crlp-compat .crlp-drawer__checkout,
body.crlp-compat .crlp-drawer__cart,
body.crlp-compat .crlp-drawer__continue { transition: none !important; }
