/**
 * Mini-cart drawer — panneau latéral panier.
 */

.bh-cart-drawer {
	position: fixed;
	inset: 0;
	z-index: 10050;
	pointer-events: none;
}

.bh-cart-drawer.is-open {
	pointer-events: auto;
}

.bh-cart-drawer[hidden] {
	display: none !important;
}

.bh-cart-drawer__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(20, 18, 40, 0.45);
	opacity: 0;
	transition: opacity 0.28s ease;
}

.bh-cart-drawer.is-open .bh-cart-drawer__backdrop {
	opacity: 1;
}

.bh-cart-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	display: flex;
	flex-direction: column;
	width: min(100vw, 420px);
	height: 100%;
	max-height: 100dvh;
	background: #fff;
	color: var(--bh-brand-navy, #1c0671);
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.12);
	transform: translateX(100%);
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
	font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.bh-cart-drawer.is-open .bh-cart-drawer__panel {
	transform: translateX(0);
}

.bh-cart-drawer__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-shrink: 0;
	padding: 22px 22px 16px;
	border-bottom: 1px solid rgba(28, 6, 113, 0.12);
}

.bh-cart-drawer__title {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bh-brand-navy, #1c0671);
}

.bh-cart-drawer__close {
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bh-brand-navy, #1c0671);
	cursor: pointer;
}

.bh-cart-drawer__close:hover {
	opacity: 0.7;
}

.bh-cart-drawer__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 8px 22px 24px;
	-webkit-overflow-scrolling: touch;
}

.bh-cart-drawer__empty {
	padding: 48px 8px;
	text-align: center;
}

.bh-cart-drawer__empty p {
	margin: 0 0 16px;
	font-size: 14px;
	color: rgba(28, 6, 113, 0.7);
}

.bh-cart-drawer__shop {
	display: inline-block;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--bh-brand-navy, #1c0671);
	text-decoration: underline;
}

.bh-cart-drawer__items {
	list-style: none;
	margin: 0;
	padding: 0;
}

.bh-cart-drawer__item {
	display: flex;
	gap: 14px;
	padding: 18px 0;
	border-bottom: 1px solid rgba(28, 6, 113, 0.1);
}

.bh-cart-drawer__item:last-child {
	border-bottom: 0;
}

.bh-cart-drawer__thumb {
	flex: 0 0 88px;
	width: 88px;
	height: 110px;
	overflow: hidden;
	background: #f3f3f5;
}

.bh-cart-drawer__thumb a,
.bh-cart-drawer__thumb img,
.bh-cart-drawer__thumb-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bh-cart-drawer__info {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.bh-cart-drawer__row-top {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
}

.bh-cart-drawer__name {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.35;
	color: var(--bh-brand-navy, #1c0671);
}

.bh-cart-drawer__name a {
	color: inherit;
	text-decoration: none;
}

.bh-cart-drawer__stock {
	font-weight: 400;
	font-size: 12px;
	color: rgba(28, 6, 113, 0.45);
	white-space: nowrap;
}

.bh-cart-drawer__stock.is-oos {
	color: #b42318;
}

.bh-cart-drawer__price {
	margin: 0;
	flex-shrink: 0;
	font-size: 14px;
	font-weight: 700;
	color: var(--bh-brand-navy, #1c0671);
	white-space: nowrap;
}

.bh-cart-drawer__attrs {
	margin: 0;
	font-size: 13px;
	font-weight: 500;
	color: var(--bh-brand-navy, #1c0671);
}

.bh-cart-drawer__qty {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: 6px;
}

.bh-cart-drawer__qty-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 1.5px solid var(--bh-brand-navy, #1c0671);
	border-radius: 50%;
	background: #fff;
	color: var(--bh-brand-navy, #1c0671);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.bh-cart-drawer__qty-btn:hover {
	background: rgba(28, 6, 113, 0.06);
}

.bh-cart-drawer__qty-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.bh-cart-drawer__qty-val {
	min-width: 1.2em;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	color: var(--bh-brand-navy, #1c0671);
}

.bh-cart-drawer__foot {
	flex-shrink: 0;
	padding: 16px 22px calc(18px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid rgba(28, 6, 113, 0.12);
	background: #fff;
}

.bh-cart-drawer__subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bh-brand-navy, #1c0671);
}

.bh-cart-drawer__note {
	margin: 8px 0 16px;
	font-size: 12px;
	font-weight: 400;
	color: rgba(28, 6, 113, 0.45);
}

.bh-cart-drawer__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 52px;
	padding: 14px 18px;
	border: 0;
	background: var(--bh-brand-navy, #1c0671);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	text-decoration: none;
	text-align: center;
	box-sizing: border-box;
}

.bh-cart-drawer__checkout:hover {
	background: var(--bh-brand-navy-hover, #2e0a99);
	color: #fff;
}

.bh-cart-drawer__view {
	display: block;
	margin-top: 12px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: var(--bh-brand-navy, #1c0671);
	text-decoration: underline;
}

body.bh-cart-drawer-open {
	overflow: hidden;
}

@media (max-width: 480px) {
	.bh-cart-drawer__panel {
		width: 100vw;
	}

	.bh-cart-drawer__thumb {
		flex-basis: 76px;
		width: 76px;
		height: 96px;
	}
}
