/* ── Drawer overlay ──────────────────────────────── */
.mp-bom-drawer-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	z-index: 99998;
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.3s;
}

.mp-bom-drawer--open .mp-bom-drawer-overlay {
	opacity: 1;
	pointer-events: auto;
}

/* ── Drawer panel ────────────────────────────────── */
.mp-bom-drawer-panel {
	position: fixed;
	top: 0;
	right: 0;
	width: 380px;
	max-width: 100vw;
	height: 100%;
	background: #fff;
	z-index: 99999;
	display: flex;
	flex-direction: column;
	box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mp-bom-drawer--open .mp-bom-drawer-panel {
	transform: translateX(0);
}

/* Body scroll lock */
.mp-bom-drawer-body-lock {
	overflow: hidden;
}

/* ── Header ──────────────────────────────────────── */
.mp-bom-drawer-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 20px;
	background: #010E82;
	color: #fff;
	flex-shrink: 0;
}

.mp-bom-drawer-title {
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.02em;
}

.mp-bom-drawer-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 2px 4px;
	opacity: 0.85;
	transition: opacity 0.15s;
}

.mp-bom-drawer-close:hover {
	opacity: 1;
}

/* ── List ────────────────────────────────────────── */
.mp-bom-drawer-list {
	flex: 1;
	overflow-y: auto;
	padding: 12px 0;
	-webkit-overflow-scrolling: touch;
}

.mp-bom-drawer-empty {
	text-align: center;
	color: #aaa;
	padding: 40px 20px;
	font-size: 14px;
}

/* ── Item row ────────────────────────────────────── */
.mp-bom-drawer-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 20px;
	border-bottom: 1px solid #f0f0f0;
}

.mp-bom-drawer-item:last-child {
	border-bottom: none;
}

/* Thumbnail */
.mp-bom-drawer-thumb {
	flex-shrink: 0;
	width: 56px;
	height: 56px;
	border-radius: 4px;
	overflow: hidden;
	border: 1px solid #ebebeb;
	background: #f5f5f5;
}

.mp-bom-drawer-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mp-bom-drawer-img--empty {
	background: #eee url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' stroke='%23ccc' stroke-width='1.5'%3E%3Crect x='3' y='3' width='18' height='18' rx='2'/%3E%3Ccircle cx='8.5' cy='8.5' r='1.5'/%3E%3Cpolyline points='21 15 16 10 5 21'/%3E%3C/svg%3E") center/28px no-repeat;
}

/* Info */
.mp-bom-drawer-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.mp-bom-drawer-model {
	font-size: 13px;
	font-weight: 700;
	color: #010E82;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.mp-bom-drawer-brand {
	font-size: 12px;
	color: #888;
}

.mp-bom-drawer-qty-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 4px;
}

.mp-bom-drawer-qty-row label {
	font-size: 12px;
	color: #666;
	white-space: nowrap;
}

.mp-bom-drawer-qty {
	width: 64px;
	padding: 3px 6px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	text-align: center;
	outline: none;
}

.mp-bom-drawer-qty:focus {
	border-color: #6ab04c;
}

/* Delete button */
.mp-bom-drawer-del {
	flex-shrink: 0;
	background: none;
	border: none;
	color: #e8a838;
	cursor: pointer;
	padding: 4px;
	opacity: 0.8;
	transition: opacity 0.15s, color 0.15s;
	margin-top: 2px;
}

.mp-bom-drawer-del:hover {
	opacity: 1;
	color: #e74c3c;
}

/* ── Footer ──────────────────────────────────────── */
.mp-bom-drawer-footer {
	flex-shrink: 0;
	padding: 16px 20px;
	border-top: 1px solid #ebebeb;
}

.mp-bom-drawer-next {
	display: block;
	width: 100%;
	padding: 12px;
	background: #010E82;
	color: #fff !important;
	text-align: center;
	font-size: 15px;
	font-weight: 700;
	border-radius: 4px;
	text-decoration: none;
	transition: background-color 0.2s;
}

.mp-bom-drawer-next:hover {
	background: #020732;
	color: #fff;
	text-decoration: none;
}

/* ── Badge on menu item ──────────────────────────── */
.bom-header-menu {
	position: relative;
}

.mp-bom-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 18px;
	height: 18px;
	padding: 0 5px;
	background: #e74c3c;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	border-radius: 9px;
	line-height: 1;
	margin-left: 4px;
	vertical-align: middle;
}

/* ── Mobile ──────────────────────────────────────── */
@media (max-width: 480px) {
	.mp-bom-drawer-panel {
		width: 100vw;
	}
}
