/* =========================================================================
   Side cart (concept .hv-drawer), sitewide. Highest overlay in the stack
   (10100): above the sticky header, the mobile nav and the search overlay.
   Closed = invisible AND unclickable (visibility + pointer-events).
   ====================================================================== */

/* =========================================================================
   Cart drawer (concept-level, localStorage)
   ====================================================================== */

.hv-drawer { position: fixed; inset: 0; z-index: 90; display: none; }
.hv-drawer.is-open { display: block; }
.hv-drawer__bg { position: absolute; inset: 0; background: rgba(30, 26, 22, .5); backdrop-filter: blur(2px); }

.hv-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(94vw, 400px);
	display: flex;
	flex-direction: column;
	background: var(--hv-bg);
	box-shadow: var(--hv-shadow-lg);
}

.hv-drawer__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 18px;
	border-bottom: 1px solid var(--hv-line);
}

.hv-drawer__head h2 { font-size: 16px; font-weight: 800; flex: 1 1 auto; }
.hv-drawer__body { flex: 1 1 auto; overflow-y: auto; padding: 14px 18px; }

.hv-drawer__foot {
	padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--hv-line);
	background: var(--hv-card);
}

.hv-citem { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--hv-line); }
.hv-citem:last-child { border-bottom: 0; }

.hv-citem__img {
	flex: 0 0 auto;
	width: 62px;
	height: 74px;
	border-radius: 0;
	background: var(--hv-bg-deep) center/cover no-repeat;
}

.hv-citem__body { flex: 1 1 auto; min-width: 0; }
.hv-citem__title { font-size: 14px; font-weight: 700; line-height: 1.3; }
.hv-citem__meta { font-size: 12.5px; color: var(--hv-muted); line-height: 1.45; margin-top: 3px; }
.hv-citem__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 7px; }
.hv-citem__price { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

.hv-citem__del {
	border: 0;
	background: none;
	font-size: 12.5px;
	color: var(--hv-muted);
	text-decoration: underline;
	cursor: pointer;
}

.hv-citem__del:hover { color: var(--hv-ink); }

.hv-drawer__empty { padding: 44px 10px; text-align: center; color: var(--hv-muted); font-size: 14px; }
.hv-drawer__empty svg { width: 40px; height: 40px; margin: 0 auto 12px; opacity: .35; }

.hv-drawer__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 12px;
	font-size: 18px;
	font-weight: 800;
}

.hv-drawer__total span:last-child { font-variant-numeric: tabular-nums; }


/* WordPress: open/close by class, never display toggling, so it can animate. */
.hv-drawer { z-index: 10100; display: block; visibility: hidden; pointer-events: none; }
.hv-drawer.is-open { visibility: visible; pointer-events: auto; }
.hv-drawer__bg { opacity: 0; transition: opacity .2s ease; }
.hv-drawer.is-open .hv-drawer__bg { opacity: 1; }
.hv-drawer__panel { transform: translateX(102%); transition: transform .26s cubic-bezier(.2, .7, .3, 1); height: 100vh; height: 100dvh; }
.hv-drawer.is-open .hv-drawer__panel { transform: none; }
.hv-drawer__body { min-height: 0; touch-action: pan-y; overscroll-behavior: contain; }
.hv-drawer.is-busy .hv-drawer__body { opacity: .55; pointer-events: none; transition: opacity .12s ease; }
.hv-drawer__foot[hidden] { display: none; }
.hv-drawer__foot { margin-top: auto; }
.hv-citem__img { overflow: hidden; }
.hv-citem__img img { width: 100%; height: 100%; object-fit: cover; }
.hv-citem__title a:hover { color: var(--hv-accent-dark); }
.hv-citem__del { padding: 0; margin-top: 6px; }
.hvl-sc__note { font-size: 12px; color: var(--hv-muted); text-align: center; margin-top: 9px; }
.hvl-sc__upsells[hidden] { display: none; }
.hv-drawer .hv-ship { margin: 0 0 14px; padding: 11px 13px; background: var(--hv-bg-deep); border: 1px solid var(--hv-line); }
.hv-drawer .hv-ship__t { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; }
.hv-drawer .hv-ship__t svg { width: 16px; height: 16px; color: var(--hv-accent-dark); }
.hv-drawer .hv-ship__bar { height: 6px; background: var(--hv-line-strong); margin-top: 8px; overflow: hidden; }
.hv-drawer .hv-ship__fill { height: 100%; background: var(--hv-accent); transition: width .35s cubic-bezier(.2, .7, .3, 1); }
.hv-drawer .hv-ship--done .hv-ship__fill { background: var(--hv-accent-dark); }
html:has(> body.hvl-side-cart-locked) { overflow: hidden; }
