/* =========================================================================
   Handknitted — Mini-cart drawer
   -------------------------------------------------------------------------
   Slides in from the right after add-to-cart. Uses the cart page's design
   language: Nexa names, cyan type line, cyan Checkout button.
   ========================================================================= */

.hk-minicart-overlay {
	position: fixed;
	inset: 0;
	background: rgba(17, 20, 24, 0.35);
	z-index: 9998;
	opacity: 0;
	transition: opacity 0.2s ease;
}
.hk-minicart-overlay.is-open { opacity: 1; }

.hk-minicart {
	position: fixed;
	top: 0;
	right: 0;
	height: 100%;
	width: min(420px, 92vw);
	background: #fff;
	z-index: 9999;
	box-shadow: -12px 0 40px rgba(17, 20, 24, 0.18);
	transform: translateX(105%);
	/* closed drawer must not widen the page (the off-screen transform still
	   extends document scroll overflow → horizontal scrollbar) */
	visibility: hidden;
	transition: transform 0.25s ease, visibility 0s 0.25s;
	display: flex;
	flex-direction: column;
	padding: 1.5rem 1.5rem 1.75rem;
	overflow-y: auto;
}
.hk-minicart.is-open {
	transform: translateX(0);
	visibility: visible;
	transition: transform 0.25s ease, visibility 0s;
}

/* logged-in admin bar overlays fixed elements — keep the drawer below it */
body.admin-bar .hk-minicart-overlay,
body.admin-bar .hk-minicart {
	top: 32px;
	height: calc(100% - 32px);
}
@media screen and (max-width: 782px) {
	body.admin-bar .hk-minicart-overlay,
	body.admin-bar .hk-minicart {
		top: 46px;
		height: calc(100% - 46px);
	}
}

.hk-minicart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-top: 1rem;      /* breathing room above "Added to cart" / × */
	margin-bottom: 1.5rem;
}

/* soften the drawer while an AJAX cart change is in flight */
.hk-minicart.is-busy .hk-minicart__body { opacity: 0.5; pointer-events: none; }
.hk-minicart__title {
	font-family: "Nexa", var(--hk-font);
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--hk-ink);
	margin: 0;
}
.hk-minicart__close {
	background: none;
	border: 0;
	font-size: 1.75rem;
	line-height: 1;
	color: var(--hk-ink);
	cursor: pointer;
	padding: 0.25rem 0.5rem;
}
.hk-minicart__close:hover { color: var(--hk-brand); }

.hk-minicart__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
}

.hk-minicart__items {
	list-style: none;
	margin: 0 0 1.25rem;
	padding: 0;
	flex: 1 1 auto;
}
.hk-minicart__item {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr) auto;
	gap: 0.9rem;
	align-items: stretch;
	padding: 0.8rem 0;
	border-bottom: 1px solid var(--hk-line);
}
.hk-minicart__thumb img {
	display: block;
	width: 64px;
	aspect-ratio: 64 / 80;
	object-fit: contain;
	background: #fff; /* white letterbox — odd image ratios blend in */
	border-radius: 2px;
}
.hk-minicart__info { display: flex; flex-direction: column; gap: 0.1rem; }
.hk-minicart__name {
	font-family: "Nexa", var(--hk-font);
	font-weight: 700;
	font-size: 1rem;
	color: var(--hk-ink);
}
.hk-minicart__desc {
	font-family: "Nexa", var(--hk-font);
	font-size: 0.8125rem;
	color: var(--hk-brand);
}
/* chosen variation ("Color: Acorn #0053" / "Size: M") */
.hk-minicart__variant {
	font-size: 0.8125rem;
	color: var(--hk-ink-soft);
}
/* +/− stepper */
.hk-minicart__stepper {
	display: inline-flex;
	align-items: center;
	gap: 0.1rem;
	margin-top: 0.35rem;
}
.hk-minicart__qty-btn {
	width: 26px;
	height: 26px;
	border: 1px solid var(--hk-line);
	border-radius: 2px;
	background: #fff;
	color: var(--hk-ink);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.hk-minicart__qty-btn:hover { border-color: var(--hk-brand); color: var(--hk-brand); }
.hk-minicart__qty-num {
	min-width: 28px;
	text-align: center;
	font-size: 0.9375rem;
	color: var(--hk-ink);
}

.hk-minicart__right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 0.4rem;
	align-self: stretch;
	justify-content: space-between;
	padding: 0.1rem 0;
}
.hk-minicart__remove {
	background: none;
	border: 0;
	padding: 0 0.2rem;
	font-size: 1.25rem;
	line-height: 1;
	color: var(--hk-muted);
	cursor: pointer;
}
.hk-minicart__remove:hover { color: #d63638; }
.hk-minicart__line {
	font-family: "Nexa", var(--hk-font);
	font-weight: 700;
	font-size: 0.9375rem;
	color: var(--hk-ink);
	white-space: nowrap;
}

.hk-minicart__totals {
	display: flex;
	justify-content: space-between;
	font-family: "Nexa", var(--hk-font);
	font-weight: 700;
	font-size: 1.0625rem;
	color: var(--hk-ink);
	padding-top: 0.4rem;
}
.hk-minicart__totals .woocommerce-Price-amount { font-weight: 700; }
.hk-minicart__note {
	font-size: 0.8125rem;
	color: #8b8b8b;
	margin: 0.35rem 0 1.25rem;
}

.hk-minicart__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.75rem;
}
.hk-minicart__btn {
	display: block;
	height: 48px;
	line-height: 46px;
	text-align: center;
	border-radius: 2px;
	font-family: "Nexa", var(--hk-font);
	font-weight: 700;
	font-size: 1rem;
	text-decoration: none !important;
}
.hk-minicart__btn--outline {
	border: 1px solid var(--hk-brand);
	color: var(--hk-brand) !important;
	background: #fff;
}
.hk-minicart__btn--outline:hover { background: rgba(0, 165, 206, 0.06); }
.hk-minicart__btn--solid {
	border: 1px solid var(--hk-brand-btn);
	background: var(--hk-brand-btn);
	color: #fff !important;
}
.hk-minicart__btn--solid:hover { background: var(--hk-brand-btn-dark); border-color: var(--hk-brand-btn-dark); }

.hk-minicart__empty {
	font-family: "Nexa", var(--hk-font);
	color: var(--hk-muted);
	margin: 1rem 0;
}

/* The hide rule for the .hk-added-marker notice lives in style.css: it has
   to work on pages that do not enqueue this file (e.g. the cart page). */
