/*
 * Homegrown Builders cart surface.
 *
 * WooCommerce owns the cart form and all purchase actions. This file only
 * replaces the retired Bud Johnson storefront shell with the current,
 * course-first purchase surface and restores readable contrast.
 */

body.hgb-cart-surface {
	background: var(--hgb-checkout-paper-soft) !important;
	color: var(--hgb-checkout-ink) !important;
	font-family: "Source Sans 3", "Segoe UI", system-ui, sans-serif !important;
	font-size: 17px;
	line-height: 1.55;
	text-rendering: optimizeLegibility;
}

/* Do not expose the retired global navigation or footer on a purchase route. */
body.hgb-cart-surface #masthead,
body.hgb-cart-surface #colophon,
body.hgb-cart-surface .site-footer,
body.hgb-cart-surface .ast-breadcrumbs-wrapper,
body.hgb-cart-surface .entry-header {
	display: none !important;
}

body.hgb-cart-surface #page,
body.hgb-cart-surface #content,
body.hgb-cart-surface .site-content,
body.hgb-cart-surface .site-content > .ast-container,
body.hgb-cart-surface #primary,
body.hgb-cart-surface .content-area,
body.hgb-cart-surface .site-main,
body.hgb-cart-surface .ast-article-single,
body.hgb-cart-surface .entry-content {
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

body.hgb-cart-surface #content {
	padding: 0 0 clamp(3rem, 7vw, 6rem) !important;
}

body.hgb-cart-surface .site-content > .ast-container,
body.hgb-cart-surface .ast-page-builder-template .site-content > .ast-container {
	width: min(1180px, calc(100% - 48px)) !important;
	max-width: 1180px !important;
	margin: 0 auto !important;
	padding: 0 !important;
}

body.hgb-cart-surface .entry-content {
	margin: 0 !important;
	padding: 0 !important;
}

body.hgb-cart-surface .woocommerce {
	width: 100% !important;
	max-width: 1180px !important;
	margin: 0 auto !important;
	color: var(--hgb-checkout-ink) !important;
}

.hgb-cart-intro {
	max-width: 820px;
	margin: clamp(2.7rem, 6vw, 5.4rem) 0 clamp(1.7rem, 3vw, 2.7rem);
}

.hgb-cart-intro__eyebrow {
	margin: 0 0 .75rem;
	color: #9b6332;
	font: 700 .78rem/1.2 "DM Mono", monospace;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.hgb-cart-intro h1 {
	max-width: 15ch;
	margin: 0;
	color: var(--hgb-checkout-ink) !important;
	font: 400 clamp(2.7rem, 5.5vw, 5rem)/.96 "DM Serif Display", Georgia, serif !important;
	letter-spacing: -.045em;
}

.hgb-cart-intro__lead {
	max-width: 650px;
	margin: 1.15rem 0 0;
	color: var(--hgb-checkout-muted) !important;
	font-size: clamp(1.05rem, 1.8vw, 1.22rem);
	font-weight: 600;
	line-height: 1.5;
}

.hgb-cart-intro__proof {
	display: flex;
	flex-wrap: wrap;
	gap: .55rem 1.4rem;
	margin-top: 1.45rem;
	color: var(--hgb-checkout-forest);
	font-size: .92rem;
	font-weight: 700;
}

.hgb-cart-intro__proof span {
	display: inline-flex;
	align-items: center;
	gap: .45rem;
}

.hgb-cart-intro__proof b {
	color: #a86f34;
	font: 700 .72rem/1 "DM Mono", monospace;
}

/* The item list is a calm paper card, with explicit dark text on every cell. */
body.hgb-cart-surface .woocommerce-cart-form {
	float: none !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--hgb-checkout-line) !important;
	background: var(--hgb-checkout-paper) !important;
	box-shadow: 0 16px 38px rgba(42, 31, 19, .07) !important;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table {
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse !important;
	background: transparent !important;
	color: var(--hgb-checkout-ink) !important;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table th,
body.hgb-cart-surface .woocommerce-cart-form table.shop_table td {
	padding: 1rem 1.25rem !important;
	border: 0 !important;
	border-bottom: 1px solid var(--hgb-checkout-line) !important;
	background: transparent !important;
	color: var(--hgb-checkout-ink) !important;
	font-size: .98rem !important;
	font-weight: 600 !important;
	vertical-align: middle;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table thead th {
	padding-top: 1.15rem !important;
	padding-bottom: .8rem !important;
	color: var(--hgb-checkout-muted) !important;
	font: 700 .73rem/1.2 "DM Mono", monospace !important;
	letter-spacing: .08em;
	text-transform: uppercase;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-name a {
	color: var(--hgb-checkout-forest) !important;
	font-weight: 800 !important;
	text-decoration: none;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-name a:hover,
body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-name a:focus-visible {
	color: #8b5427 !important;
	text-decoration: underline;
	text-underline-offset: .16em;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-thumbnail img {
	width: 92px !important;
	height: 92px !important;
	object-fit: cover;
	border: 1px solid var(--hgb-checkout-line);
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-remove a.remove {
	display: inline-grid;
	width: 2rem;
	height: 2rem;
	place-items: center;
	border: 1px solid var(--hgb-checkout-line);
	border-radius: 50%;
	color: var(--hgb-checkout-danger) !important;
	font-size: 1.15rem;
	line-height: 1;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-remove a.remove:hover,
body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-remove a.remove:focus-visible {
	background: var(--hgb-checkout-danger) !important;
	color: var(--hgb-checkout-paper) !important;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-price,
body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-subtotal,
body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-quantity {
	color: var(--hgb-checkout-ink) !important;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table .product-quantity {
	font-weight: 700 !important;
}

body.hgb-cart-surface .woocommerce-cart-form table.shop_table td.actions {
	padding: 1.15rem 1.25rem !important;
	background: var(--hgb-checkout-paper-soft) !important;
}

body.hgb-cart-surface .woocommerce-cart-form .coupon {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: .65rem;
}

body.hgb-cart-surface .woocommerce-cart-form .coupon .input-text {
	min-height: 2.8rem;
	margin: 0 !important;
	padding: .65rem .8rem !important;
	border: 1px solid var(--hgb-checkout-line) !important;
	background: var(--hgb-checkout-paper) !important;
	color: var(--hgb-checkout-ink) !important;
}

body.hgb-cart-surface .woocommerce-cart-form .button,
body.hgb-cart-surface .woocommerce-cart-form .coupon button {
	min-height: 2.8rem;
	margin: 0 !important;
	padding: .65rem 1rem !important;
	border: 1px solid var(--hgb-checkout-forest) !important;
	border-radius: 999px !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--hgb-checkout-forest) !important;
	font-size: .9rem !important;
	font-weight: 800 !important;
}

body.hgb-cart-surface .woocommerce-cart-form .button:hover,
body.hgb-cart-surface .woocommerce-cart-form .button:focus-visible,
body.hgb-cart-surface .woocommerce-cart-form .coupon button:hover,
body.hgb-cart-surface .woocommerce-cart-form .coupon button:focus-visible {
	background: var(--hgb-checkout-forest) !important;
	color: var(--hgb-checkout-paper) !important;
}

body.hgb-cart-surface .woocommerce-cart-form button[name="update_cart"] {
	float: right;
}

/* Totals are a separate decision card, not a pale box with pale text. */
body.hgb-cart-surface .cart-collaterals {
	float: none !important;
	width: min(480px, 100%) !important;
	margin: 1.5rem 0 0 auto !important;
}

body.hgb-cart-surface .cart_totals {
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--hgb-checkout-line) !important;
	background: var(--hgb-checkout-paper) !important;
	box-shadow: 0 16px 38px rgba(42, 31, 19, .07) !important;
}

body.hgb-cart-surface .cart_totals h2 {
	margin: 0 !important;
	padding: 1.35rem 1.45rem !important;
	background: var(--hgb-checkout-forest) !important;
	color: var(--hgb-checkout-paper) !important;
	font: 400 clamp(1.75rem, 3vw, 2.35rem)/1 "DM Serif Display", Georgia, serif !important;
	letter-spacing: -.02em;
}

body.hgb-cart-surface .cart_totals table.shop_table {
	width: 100% !important;
	margin: 0 !important;
	border: 0 !important;
	border-collapse: collapse !important;
	background: transparent !important;
}

body.hgb-cart-surface .cart_totals table.shop_table th,
body.hgb-cart-surface .cart_totals table.shop_table td {
	padding: 1rem 1.25rem !important;
	border: 0 !important;
	border-bottom: 1px solid var(--hgb-checkout-line) !important;
	background: transparent !important;
	color: var(--hgb-checkout-ink) !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
}

body.hgb-cart-surface .cart_totals table.shop_table tr.order-total th,
body.hgb-cart-surface .cart_totals table.shop_table tr.order-total td {
	border-bottom: 0 !important;
	color: var(--hgb-checkout-forest) !important;
	font-size: 1.16rem !important;
}

body.hgb-cart-surface .cart_totals table.shop_table tr.order-total strong,
body.hgb-cart-surface .cart_totals table.shop_table tr.order-total .amount,
body.hgb-cart-surface .cart_totals table.shop_table tr.order-total .woocommerce-Price-currencySymbol {
	color: var(--hgb-checkout-forest) !important;
}

body.hgb-cart-surface .wc-proceed-to-checkout {
	padding: 1.15rem 1.25rem 1.3rem !important;
}

body.hgb-cart-surface .wc-proceed-to-checkout a.checkout-button {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 100% !important;
	min-height: 3.4rem !important;
	margin: 0 !important;
	padding: .85rem 1rem !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: var(--hgb-checkout-brass) !important;
	box-shadow: none !important;
	color: var(--hgb-checkout-ink) !important;
	font: 800 1.02rem/1 "Source Sans 3", sans-serif !important;
	letter-spacing: .01em;
	text-align: center;
	text-shadow: none !important;
}

body.hgb-cart-surface .wc-proceed-to-checkout a.checkout-button:hover,
body.hgb-cart-surface .wc-proceed-to-checkout a.checkout-button:focus-visible {
	background: var(--hgb-checkout-brass-light) !important;
	color: var(--hgb-checkout-ink) !important;
}

/* Keep accelerated payment choices recognizable, but give them the same
 * deliberate frame as the rest of the current purchase surface. */
body.hgb-cart-surface .wcpay-express-checkout-wrapper {
	clear: both;
	margin: 1.6rem 0 0 !important;
	padding: 1.15rem !important;
	border: 1px solid var(--hgb-checkout-line) !important;
	background: var(--hgb-checkout-paper) !important;
	box-shadow: none !important;
}

body.hgb-cart-surface .wcpay-express-checkout-wrapper::before {
	content: "Pay quickly with";
	display: block;
	margin: 0 0 .8rem;
	color: var(--hgb-checkout-forest);
	font: 800 .82rem/1.2 "DM Mono", monospace;
	letter-spacing: .08em;
	text-transform: uppercase;
}

body.hgb-cart-surface #wcpay-express-checkout-element {
	width: 100% !important;
	min-height: 48px;
}

body.hgb-cart-surface #payment-method-message {
	color: var(--hgb-checkout-muted) !important;
	font-size: .86rem;
}

body.hgb-cart-surface .woocommerce::after {
	display: table;
	clear: both;
	content: "";
}

@media (max-width: 720px) {
	body.hgb-cart-surface .site-content > .ast-container,
	body.hgb-cart-surface .ast-page-builder-template .site-content > .ast-container,
	body.hgb-cart-surface .hgb-checkout-bar__inner {
		width: min(100% - 32px, 720px) !important;
	}

	.hgb-cart-intro {
		margin-top: 2.4rem;
	}

	body.hgb-cart-surface .woocommerce-cart-form table.shop_table thead {
		display: none;
	}

	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item {
		display: grid;
		grid-template-columns: 2.5rem 76px minmax(0, 1fr);
		gap: .65rem;
		align-items: center;
		padding: 1rem;
	}

	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item td {
		display: block;
		padding: .3rem !important;
		border: 0 !important;
	}

	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-thumbnail img {
		width: 76px !important;
		height: 76px !important;
	}

	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-price,
	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-quantity,
	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-subtotal {
		grid-column: 3;
		padding-left: .3rem !important;
		text-align: left !important;
	}

	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-price::before,
	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-quantity::before,
	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-subtotal::before {
		margin-right: .35rem;
		color: var(--hgb-checkout-muted);
		font: 700 .7rem/1.2 "DM Mono", monospace;
		letter-spacing: .06em;
		text-transform: uppercase;
	}

	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-price::before { content: "Price"; }
	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-quantity::before { content: "Qty"; }
	body.hgb-cart-surface .woocommerce-cart-form table.shop_table tr.cart_item .product-subtotal::before { content: "Subtotal"; }

	body.hgb-cart-surface .woocommerce-cart-form table.shop_table td.actions {
		display: block;
		padding: 1rem !important;
	}

	body.hgb-cart-surface .woocommerce-cart-form .coupon,
	body.hgb-cart-surface .woocommerce-cart-form .coupon .input-text,
	body.hgb-cart-surface .woocommerce-cart-form .coupon button {
		width: 100%;
	}

	body.hgb-cart-surface .woocommerce-cart-form button[name="update_cart"] {
		float: none;
		width: 100%;
		margin-top: .7rem !important;
	}

	body.hgb-cart-surface .cart-collaterals {
		width: 100% !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	body.hgb-cart-surface * {
		transition: none !important;
		scroll-behavior: auto !important;
	}
}
