/* Mini cart dropdown (Nick 2026-10-25) — replaces the "added to cart" banner. */

.nav__right { position: relative; }

.mwp-minicart {
	position: absolute;
	top: calc(100% + 0.65rem);
	right: 0;
	z-index: 120;
	width: min(23rem, calc(100vw - 2rem));
	background: #fff;
	border: 1px solid var(--color-sand, #e3dacc);
	border-radius: 14px;
	box-shadow: 0 14px 40px rgba(46, 42, 38, 0.18);
	/* hidden but still laid out, so opening does not reflow the header */
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity .18s ease, transform .18s ease, visibility .18s;
}

.mwp-minicart.is-open {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.mwp-minicart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	padding: 0.75rem 0.9rem;
	border-bottom: 1px solid #f2ebe1;
	font-size: 0.85rem;
}

/* 44px tap target around a small glyph, pulled back so the header row keeps its height. */
.mwp-minicart__close {
	display: grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	margin: -0.7rem -0.6rem -0.7rem 0;
	border: 0;
	background: none;
	padding: 0;
	font-size: 1.5rem;
	line-height: 1;
	color: #8a7a6a;
	cursor: pointer;
}

.mwp-minicart__close:hover { color: #2e2a26; }

.mwp-minicart__items {
	list-style: none;
	margin: 0;
	padding: 0.25rem 0.9rem;
	max-height: 19rem;
	overflow-y: auto;
}

.mwp-minicart__item {
	display: grid;
	/* no thumbnail column unless the row actually has one */
	grid-template-columns: minmax(0, 1fr) auto auto;
	align-items: center;
	gap: 0.6rem;
	padding: 0.55rem 0;
	font-size: 0.82rem;
}

.mwp-minicart__item.has-thumb { grid-template-columns: 2.6rem minmax(0, 1fr) auto auto; }

.mwp-minicart__item + .mwp-minicart__item { border-top: 1px solid #f7f1e8; }

.mwp-minicart__thumb img {
	width: 2.6rem;
	height: 2.6rem;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.mwp-minicart__name { display: block; font-weight: 600; }

/* Woo's formatted item data is a <dl>; flatten it to one quiet line. */
.mwp-minicart__meta,
.mwp-minicart__meta dl,
.mwp-minicart__meta dt,
.mwp-minicart__meta dd,
.mwp-minicart__meta p {
	display: inline;
	margin: 0;
	padding: 0;
	font-size: 0.72rem;
	color: #9a8876;
}

.mwp-minicart__meta dt { font-weight: 400; }
.mwp-minicart__meta dd::after { content: " "; }

.mwp-minicart__qty { color: #9a8876; font-size: 0.75rem; }
.mwp-minicart__price { font-weight: 700; white-space: nowrap; }

.mwp-minicart__foot {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.45rem;
	padding: 0.7rem 0.9rem 0.25rem;
	border-top: 1px solid #f2ebe1;
}

.mwp-minicart__total {
	grid-column: 1 / -1;
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	font-size: 0.82rem;
	color: #7a6a5c;
	margin-bottom: 0.2rem;
}

.mwp-minicart__total strong { font-size: 1.05rem; color: #2e2a26; }

.mwp-minicart__btn {
	display: block;
	padding: 0.6rem;
	border-radius: 999px;
	background: var(--color-terracotta, #b5633a);
	color: #fff;
	text-align: center;
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
}

.mwp-minicart__btn--ghost {
	background: #fff;
	color: #2e2a26;
	border: 1.5px solid var(--color-sand, #e3dacc);
}

.mwp-minicart__btn:hover { opacity: .92; }

/* Closes the panel: full-width, quiet, but a real button with a real tap target. */
.mwp-minicart__keep {
	display: block;
	width: 100%;
	min-height: 2.75rem;
	margin: 0;
	padding: 0.45rem 0.9rem 0.8rem;
	border: 0;
	background: none;
	font: inherit;
	font-size: 0.8rem;
	font-weight: 600;
	color: #8a6a52;
	text-align: center;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}

.mwp-minicart__keep:hover { color: #2e2a26; }

@media (max-width: 480px) {
	/* Pinned just under the nav bar (Nick 2026-10-27). --mwp-nav-bottom is measured by
	   mini-cart.js; the fallback is the nav's resting height. Never taller than the
	   screen below the nav, so the buttons stay reachable; the item list scrolls. */
	.mwp-minicart {
		position: fixed;
		top: calc(var(--mwp-nav-bottom, 3.5rem) + 0.5rem);
		bottom: auto;
		left: 0.6rem;
		right: 0.6rem;
		width: auto;
		max-height: calc(100dvh - var(--mwp-nav-bottom, 3.5rem) - 1.1rem);
		display: flex;
		flex-direction: column;
	}
	.mwp-minicart__items { max-height: none; flex: 1 1 auto; min-height: 0; }
}
