/* ════════════════════════════════════════════════════════════════════
   Header mini-cart dropdown — field-guide editorial
   Hover (desktop) or click/tap (touch) the navbar cart icon to preview.
   ════════════════════════════════════════════════════════════════════ */

.bc-cart-wrap {
	--g-deep:#154d37; --g:#1d6b4f; --g-soft:#2f8a67;
	--clay:#bd6a36; --clay-dk:#9a5125;
	--ink:#1a1c16; --muted:#6a6f60; --faint:#9a9e8d;
	--paper:#fffdf8; --bone:#f6f2e9; --cream:#f3eee2;
	--line:#e6e0d2; --line-2:#efeadd;
	--ease:cubic-bezier(.22,.61,.36,1);
	position: relative;
}

/* ── Dropdown panel ── */
.bc-minicart {
	position: absolute;
	top: calc(100% + 14px);
	right: 0;
	width: 360px;
	max-width: calc(100vw - 28px);
	z-index: 1200;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-8px);
	transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
	font-family: "Hanken Grotesk", system-ui, sans-serif;
}

/* Reveal on hover (desktop) or when JS adds .is-open (click / touch / focus) */
@media (hover:hover) and (pointer:fine) {
	.bc-cart-wrap:hover .bc-minicart,
	.bc-cart-wrap:focus-within .bc-minicart {
		opacity: 1; visibility: visible; transform: translateY(0);
		transition-delay: 0s;
	}
}
.bc-cart-wrap.is-open .bc-minicart {
	opacity: 1; visibility: visible; transform: translateY(0);
	transition-delay: 0s;
}

/* Hover bridge so the panel doesn't vanish crossing the gap */
.bc-minicart::before {
	content: "";
	position: absolute;
	top: -16px; right: 0; left: 0; height: 18px;
}

.bc-minicart-arrow {
	position: absolute;
	top: -7px; right: 18px;
	width: 14px; height: 14px;
	background: var(--paper);
	border-left: 1px solid var(--line);
	border-top: 1px solid var(--line);
	transform: rotate(45deg);
	border-radius: 3px 0 0 0;
}

.bc-minicart-inner {
	background: var(--paper);
	border: 1px solid var(--line);
	border-radius: 16px;
	box-shadow: 0 22px 60px -18px rgba(21,77,55,.32), 0 6px 18px -10px rgba(26,28,22,.18);
	padding: 18px 18px 16px;
	overflow: hidden;
}

.bc-minicart-head {
	margin: 0 0 12px;
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--g-deep);
	display: flex;
	align-items: center;
	gap: 8px;
}
.bc-minicart-head::before {
	content: "";
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--clay);
	box-shadow: 0 0 0 3px rgba(189,106,54,.16);
}

/* ── Item list ── */
.bc-minicart .woocommerce-mini-cart.cart_list,
.bc-minicart ul.product_list_widget {
	list-style: none;
	margin: 0;
	padding: 0;
	max-height: 320px;
	overflow-y: auto;
}
.bc-minicart .woocommerce-mini-cart.cart_list::-webkit-scrollbar { width: 7px; }
.bc-minicart .woocommerce-mini-cart.cart_list::-webkit-scrollbar-thumb {
	background: var(--line); border-radius: 7px;
}

.bc-minicart li.woocommerce-mini-cart-item {
	position: relative;
	display: grid;
	grid-template-columns: 50px 1fr;
	gap: 12px;
	align-items: center;
	padding: 12px 26px 12px 0;
	margin: 0;
	border-bottom: 1px solid var(--line-2);
}
.bc-minicart li.woocommerce-mini-cart-item:first-child { padding-top: 2px; }
.bc-minicart li.woocommerce-mini-cart-item:last-child { border-bottom: 0; padding-bottom: 4px; }

.bc-minicart li.woocommerce-mini-cart-item a:not(.remove) {
	display: contents;
	color: var(--ink);
	text-decoration: none;
	font-weight: 600;
	font-size: .9rem;
	line-height: 1.3;
}
.bc-minicart li.woocommerce-mini-cart-item img {
	grid-column: 1;
	width: 50px; height: 50px;
	object-fit: cover;
	border-radius: 9px;
	border: 1px solid var(--line);
	margin: 0 !important;
	float: none !important;
}
/* The product name text sits in column 2 (anchor uses display:contents) */
.bc-minicart li.woocommerce-mini-cart-item a:not(.remove) {
	grid-column: 2;
}

.bc-minicart .quantity {
	grid-column: 2;
	display: block;
	margin-top: 2px;
	font-size: .82rem;
	font-weight: 600;
	color: var(--muted);
}
.bc-minicart .quantity .woocommerce-Price-amount,
.bc-minicart .quantity .amount {
	color: var(--g);
	font-weight: 700;
}

/* Remove (×) button */
.bc-minicart a.remove,
.bc-minicart li.woocommerce-mini-cart-item a.remove {
	position: absolute;
	top: 50%; right: 0;
	transform: translateY(-50%);
	width: 22px; height: 22px;
	display: flex; align-items: center; justify-content: center;
	border-radius: 50%;
	font-size: 0;
	color: var(--faint) !important;
	background: var(--bone);
	border: 1px solid var(--line);
	transition: all .2s var(--ease);
}
.bc-minicart a.remove::before {
	content: "×";
	font-size: 16px;
	line-height: 1;
	color: inherit;
}
.bc-minicart a.remove:hover {
	color: #fff !important;
	background: var(--clay);
	border-color: var(--clay);
	transform: translateY(-50%) rotate(90deg);
}

/* ── Total ── */
.bc-minicart .woocommerce-mini-cart__total {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	margin: 14px 0 0;
	padding: 14px 0 0;
	border-top: 1px dashed var(--line);
	font-size: .82rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--muted);
}
.bc-minicart .woocommerce-mini-cart__total strong { font-weight: 700; }
.bc-minicart .woocommerce-mini-cart__total .woocommerce-Price-amount,
.bc-minicart .woocommerce-mini-cart__total .amount {
	font-family: "Newsreader", Georgia, serif;
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	color: var(--g-deep);
}

/* ── Buttons ── */
.bc-minicart .woocommerce-mini-cart__buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin: 16px 0 0;
	padding: 0;
}
.bc-minicart .woocommerce-mini-cart__buttons .button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 14px;
	border-radius: 11px;
	font-family: "Hanken Grotesk", system-ui, sans-serif;
	font-size: .9rem;
	font-weight: 700;
	letter-spacing: .01em;
	text-decoration: none;
	text-align: center;
	transition: all .22s var(--ease);
	box-shadow: none;
}
/* View cart — outline clay */
.bc-minicart .woocommerce-mini-cart__buttons .button:not(.checkout) {
	background: var(--paper);
	color: var(--g-deep);
	border: 1.5px solid var(--line);
}
.bc-minicart .woocommerce-mini-cart__buttons .button:not(.checkout):hover {
	border-color: var(--g);
	color: var(--g);
	background: #fff;
}
/* Checkout — solid green */
.bc-minicart .woocommerce-mini-cart__buttons .button.checkout {
	background: var(--g-deep);
	color: #fff;
	border: 1.5px solid var(--g-deep);
}
.bc-minicart .woocommerce-mini-cart__buttons .button.checkout:hover {
	background: var(--g);
	border-color: var(--g);
	transform: translateY(-1px);
	box-shadow: 0 10px 22px -10px rgba(21,77,55,.55);
}

/* ── Empty state (modern WooCommerce .wc-empty-mini-cart) ── */
.bc-minicart .wc-empty-mini-cart {
	text-align: center;
	padding: 14px 6px 6px;
}
.bc-minicart .wc-empty-mini-cart svg {
	width: 46px; height: 46px;
	margin: 4px auto 10px;
	opacity: .8;
}
.bc-minicart .wc-empty-mini-cart svg path { fill: var(--g-soft); }
.bc-minicart .wc-empty-message,
.bc-minicart .wc-empty-mini-cart .wc-empty-message {
	margin: 0 0 16px;
	color: var(--muted);
	font-size: .95rem;
	font-weight: 600;
}
.bc-minicart .wc-empty-mini-cart .bdt-button,
.bc-minicart .wc-empty-mini-cart a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px;
	padding: 0 22px;
	border-radius: 11px;
	background: var(--g-deep);
	color: #fff !important;
	border: 1.5px solid var(--g-deep);
	font-family: "Hanken Grotesk", system-ui, sans-serif;
	font-size: .9rem;
	font-weight: 700;
	text-decoration: none;
	transition: all .22s var(--ease);
}
.bc-minicart .wc-empty-mini-cart .bdt-button:hover,
.bc-minicart .wc-empty-mini-cart a:hover {
	background: var(--g);
	border-color: var(--g);
	transform: translateY(-1px);
	box-shadow: 0 10px 22px -10px rgba(21,77,55,.55);
}

/* ── Empty state (classic WooCommerce) ── */
.bc-minicart .woocommerce-mini-cart__empty-message {
	margin: 4px 0 10px;
	padding: 22px 8px;
	text-align: center;
	color: var(--muted);
	font-size: .92rem;
	font-weight: 500;
}
.bc-minicart .woocommerce-mini-cart__empty-message::before {
	content: "";
	display: block;
	width: 34px; height: 34px;
	margin: 0 auto 12px;
	background: var(--bone);
	border: 1px solid var(--line);
	border-radius: 50%;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%236a6f60' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='9' cy='21' r='1'/%3E%3Ccircle cx='20' cy='21' r='1'/%3E%3Cpath d='M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
}

/* When empty, show a single full-width "Browse courses" feel via the buttons row hidden */
.bc-minicart .woocommerce-mini-cart__empty-message + .woocommerce-mini-cart__buttons { display: none; }

/* ── Mobile ── */
@media (max-width: 600px) {
	.bc-minicart { width: 300px; right: -8px; }
	.bc-minicart-arrow { right: 26px; }
}
