/* Cart Upsell Drawer — frontend
   Matched to dermadealers.com: light blue, black buttons, green accents. */

:root {
	--bmsu-accent: #1787d9;
	--bmsu-accent-soft: #eaf5fd;
	--bmsu-ink: #111111;
	--bmsu-muted: #6f7a82;
	--bmsu-line: #e6eef4;
	--bmsu-ok: #3d9142;
	--bmsu-ok-soft: #e9f5ea;
}

/* Overlay */
.bmsu-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 17, 17, 0.45);
	z-index: 99998;
	opacity: 0;
	transition: opacity 0.25s ease;
}
.bmsu-overlay.bmsu-open { opacity: 1; }

/* Drawer: bottom sheet on mobile, right panel on desktop */
.bmsu-drawer {
	position: fixed;
	z-index: 99999;
	background: #fff;
	display: flex;
	flex-direction: column;
	box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.18);
	left: 0;
	right: 0;
	bottom: 0;
	max-height: 86vh;
	border-radius: 18px 18px 0 0;
	transform: translateY(100%);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}
.bmsu-drawer.bmsu-open { transform: translateY(0); }

/* Grab handle (mobile) */
.bmsu-drawer::before {
	content: "";
	position: absolute;
	top: 8px;
	left: 50%;
	transform: translateX(-50%);
	width: 42px;
	height: 4px;
	border-radius: 999px;
	background: #d8dee3;
}

@media (min-width: 769px) {
	.bmsu-drawer {
		left: auto;
		top: 0;
		bottom: 0;
		width: 420px;
		max-height: none;
		border-radius: 0;
		transform: translateX(100%);
		box-shadow: -8px 0 40px rgba(0, 0, 0, 0.16);
	}
	.bmsu-drawer.bmsu-open { transform: translateX(0); }
	.bmsu-drawer::before { display: none; }
}

.bmsu-drawer-inner {
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	padding: 22px 18px calc(18px + env(safe-area-inset-bottom));
	display: flex;
	flex-direction: column;
	font-size: 15px;
	color: var(--bmsu-ink);
}

/* Header */
.bmsu-head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 14px;
	border-bottom: 1px solid var(--bmsu-line);
	margin-bottom: 14px;
}
.bmsu-check {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: var(--bmsu-ok-soft);
	color: var(--bmsu-ok);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 16px;
	font-weight: 700;
}
.bmsu-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bmsu-head-title { font-weight: 700; font-size: 16px; color: var(--bmsu-ink); }
.bmsu-head-product {
	font-size: 12.5px;
	color: var(--bmsu-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}
.bmsu-close {
	flex: 0 0 32px;
	width: 32px;
	height: 32px;
	border: 0;
	border-radius: 50%;
	background: #f2f5f7;
	color: #5a6870;
	font-size: 13px;
	cursor: pointer;
	line-height: 1;
}
.bmsu-close:hover { background: var(--bmsu-ink); color: #fff; }

/* Added product strip */
.bmsu-added {
	display: flex;
	align-items: center;
	gap: 12px;
	background: var(--bmsu-accent-soft);
	border-radius: 12px;
	padding: 10px 12px;
	margin-bottom: 18px;
}
.bmsu-added img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 8px;
	flex: 0 0 52px;
}
.bmsu-added-info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.bmsu-added-name {
	font-weight: 600;
	font-size: 14px;
	color: var(--bmsu-ink);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.bmsu-added-price { font-size: 13.5px; color: #33454f; }
.bmsu-added-price del { color: #93a4ae; }

/* Section title */
.bmsu-section-title {
	font-weight: 700;
	font-size: 15px;
	color: var(--bmsu-ink);
	margin-bottom: 10px;
}

/* Upsell items */
.bmsu-items { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }

.bmsu-item {
	display: flex;
	align-items: center;
	gap: 12px;
	border: 1.5px solid var(--bmsu-line);
	border-radius: 12px;
	padding: 10px 12px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.bmsu-item:hover { border-color: #bcd9ee; box-shadow: 0 3px 12px rgba(23, 135, 217, 0.08); }
.bmsu-item-img { flex: 0 0 56px; }
.bmsu-item-img img {
	width: 56px;
	height: 56px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}
.bmsu-item-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bmsu-item-name {
	font-weight: 600;
	font-size: 13.5px;
	line-height: 1.3;
	color: var(--bmsu-ink);
	text-decoration: none;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.bmsu-item-name:hover { color: var(--bmsu-accent); }
.bmsu-item-price { font-size: 13.5px; color: #33454f; font-weight: 600; }
.bmsu-item-price del { color: #93a4ae; font-weight: 400; }

.bmsu-item-add {
	flex: 0 0 auto;
	border: 0;
	border-radius: 999px;
	background: var(--bmsu-ink);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	padding: 9px 18px;
	cursor: pointer;
	text-decoration: none;
	min-height: 38px;
	display: inline-flex;
	align-items: center;
	transition: background 0.15s ease, transform 0.1s ease;
}
.bmsu-item-add:hover { background: var(--bmsu-accent); color: #fff; }
.bmsu-item-add:active { transform: scale(0.96); }
.bmsu-item-add.bmsu-done { background: var(--bmsu-ok); pointer-events: none; }
.bmsu-item-add:disabled { opacity: 0.6; }
.bmsu-item-view { background: #fff; color: var(--bmsu-ink); border: 1.5px solid #d3dbe1; }
.bmsu-item-view:hover { border-color: var(--bmsu-accent); color: var(--bmsu-accent); background: #fff; }

/* Footer actions */
.bmsu-actions {
	margin-top: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding-top: 6px;
}
.bmsu-btn-cart {
	background: var(--bmsu-ink);
	color: #fff !important;
	border-radius: 8px;
	text-align: center;
	padding: 15px 18px;
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background 0.15s ease;
}
.bmsu-btn-cart:hover { background: #000; }
.bmsu-btn-continue {
	background: transparent;
	border: 0;
	color: var(--bmsu-muted);
	font-size: 14px;
	padding: 10px;
	cursor: pointer;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.bmsu-btn-continue:hover { color: var(--bmsu-ink); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
	.bmsu-drawer, .bmsu-overlay { transition: none; }
}
