/*
 * Homeward & Kin: the bag (Gallery, design/gallery-build/SPEC.md §5.1).
 *
 * Salient's slide-in cart ("Click Extended Functionality") restyled as the
 * "Your bag" drawer, the block Cart page (/cart/) in the same parts, the
 * product-page edit note and WooCommerce's "added" notice.
 * Loaded by mu-plugins/hk-design-cart.php. Tokens and shared classes
 * (.hk-btn, .hk-panel, .hk-ph, .hk-link) come from css/hk-base.css.
 *
 * White ground, ink type, Mist panels, hairlines, one black button, text links,
 * no icons. Motion: the drawer slides in over .28s (instant with reduced motion);
 * controls only change colour.
 */

/* ------------------------------------------------------------- the shell */

body .nectar-slide-in-cart.hk-drawer {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: auto;
	z-index: 100000;
	width: 420px;
	max-width: 100%;
	height: 100%;
	overflow: hidden;
	background: var(--hk-paper);
	color: var(--hk-ink-2);
	box-shadow: var(--hk-shadow-drawer);
	font-family: var(--hk-font-sans);
	font-size: 15px;
	line-height: 1.45;
	-webkit-font-smoothing: antialiased;
	opacity: 1 !important;
	transform: translate3d(100%, 0, 0) !important;
	-webkit-transform: translate3d(100%, 0, 0) !important;
	visibility: hidden;
	pointer-events: none;
	transition: transform 0.28s var(--hk-ease-out), visibility 0s linear 0.28s !important;
}

body .nectar-slide-in-cart.hk-drawer.open {
	transform: none !important;
	-webkit-transform: none !important;
	visibility: visible;
	pointer-events: auto;
	transition: transform 0.28s var(--hk-ease-out) !important;
}

@media (max-width: 479px) {
	body .nectar-slide-in-cart.hk-drawer {
		width: 100%;
	}
}

body .nectar-slide-in-cart.hk-drawer > .inner {
	display: flex;
	flex-direction: column;
	height: 100%;
	padding: 0;
	transform: none !important;
	-webkit-transform: none !important;
	transition: none !important;
}

body .nectar-slide-in-cart-bg.hk-drawer-bg {
	background-color: var(--hk-scrim);
	transition: opacity 0.28s var(--hk-ease-out) !important;
}

/* Logged-in staff: keep the drawer below the WordPress toolbar. */
body.admin-bar .nectar-slide-in-cart.hk-drawer {
	top: 32px;
	height: auto;
}

@media screen and (max-width: 782px) {
	body.admin-bar .nectar-slide-in-cart.hk-drawer {
		top: 46px;
	}
}

/* Head: "Your bag (2)" + close */
body .nectar-slide-in-cart.hk-drawer .inner > .header {
	position: static;
	top: auto;
	left: auto;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	width: auto;
	height: auto;
	min-height: 68px;
	margin: 0;
	padding: 12px 24px;
	border-bottom: 1px solid var(--hk-line);
	background: var(--hk-paper);
	box-sizing: border-box;
}

body .nectar-slide-in-cart.hk-drawer .hk-drawer__title {
	margin: 0;
	padding: 0;
	font-family: var(--hk-font-sans);
	font-size: 20px;
	font-style: normal;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--hk-ink);
	text-transform: none;
}

/* The title only takes focus so screen readers announce the dialog. */
.hk-drawer .hk-drawer__title:focus,
.hk-drawer .hk-drawer__title:focus-visible {
	outline: none;
}

body .nectar-slide-in-cart.hk-drawer .hk-cart-count {
	margin-left: 2px;
	font-size: 15px;
	font-weight: 400;
	color: var(--hk-stone);
	font-variant-numeric: tabular-nums;
	letter-spacing: 0;
}

body .nectar-slide-in-cart.hk-drawer .inner > .header a.hk-drawer__close {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 44px;
	height: 44px;
	margin: 0 -12px 0 0;
	padding: 0;
	line-height: 1;
	color: var(--hk-ink);
	opacity: 1;
	border-radius: 0;
	background: none;
	transition: color var(--hk-dur-control) ease;
}

/* Salient's material skin draws a grey disc behind the close icon. */
body .nectar-slide-in-cart.hk-drawer .close-cart::before,
body .nectar-slide-in-cart.hk-drawer .close-cart::after {
	content: none !important;
	display: none !important;
}

body .nectar-slide-in-cart.hk-drawer .close-cart:hover {
	opacity: 1;
	color: #000;
}

.hk-drawer .hk-mc-close {
	display: block;
	width: 20px;
	height: 20px;
}

/* The widget fills the rest: a scrolling body and a pinned foot. */
body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart,
body.admin-bar .nectar-slide-in-cart.hk-drawer .widget_shopping_cart {
	position: relative;
	top: auto;
	left: auto;
	display: flex !important;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 0;
}

body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart_content {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	width: auto;
	height: 100%;
	padding: 0;
}

.hk-drawer .nectar-inactive,
.hk-drawer .widgettitle {
	display: none !important;
}

.hk-mc {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	height: 100%;
}

.hk-mc__body {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 0 24px 24px;
}

.hk-mc__foot {
	flex: none;
	padding: 16px 24px calc(20px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--hk-line);
	background: var(--hk-paper);
}

.hk-drawer .hk-mc :where(p),
.hk-cart-extras :where(p) {
	margin: 0;
	padding: 0;
}

/* Notices Salient prints into the drawer (e.g. "already in your bag"). */
body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .nectar-notice {
	flex: none;
	margin: 16px 24px 0;
	padding: 12px 14px;
	border: 0;
	border-radius: 0;
	background: var(--hk-mist);
	color: var(--hk-ink-2);
	font: 400 14px/1.45 var(--hk-font-sans);
}

/* ------------------------------------------------------------ the lines */

body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .cart_list.hk-mc__items {
	display: block !important;
	width: auto;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	overflow: visible;
	list-style: none;
}

body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .cart_list li.hk-mc-item {
	position: relative;
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	column-gap: 14px;
	align-items: start;
	min-height: 0;
	margin: 0;
	padding: 18px 0;
	border: 0;
	border-bottom: 1px solid var(--hk-line);
	list-style: none;
}

.hk-drawer .cart_list li.hk-mc-item::before,
.hk-drawer .cart_list li.hk-mc-item::after {
	content: none !important;
	display: none !important;
}

/* WooCommerce sets every span in .product_list_widget to 12px: reset. */
.hk-drawer .product_list_widget span {
	font-size: inherit;
	line-height: inherit;
}

.hk-mc-item__thumb {
	width: 72px;
	height: 90px;
}

body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .cart_list li .hk-mc-item__thumb img,
body .nectar-slide-in-cart.hk-drawer ul.product_list_widget li .hk-mc-item__thumb img {
	display: block;
	float: none;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	margin: 0 !important;
	object-fit: cover;
	border-radius: 0;
	box-shadow: none;
}

.hk-mc-item__info {
	min-width: 0;
}

.hk-drawer .hk-mc .hk-mc-item__title {
	margin: 0 0 4px;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.005em;
	color: var(--hk-ink);
}

.hk-drawer .hk-mc .hk-mc-item__line {
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--hk-stone);
}

.hk-drawer .hk-mc .hk-mc-item__line--name {
	color: var(--hk-ink-2);
}

.hk-drawer .hk-mc .hk-mc-item__price,
.hk-drawer .hk-mc .hk-mc-item__price .amount {
	font-size: 15px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--hk-ink);
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
}

/* Non-personalized products: WooCommerce's variation list. */
.hk-drawer .hk-mc .hk-mc-item__info dl.variation {
	margin: 0;
	padding: 0;
	border: 0;
	font: 400 13.5px/1.45 var(--hk-font-sans);
	color: var(--hk-stone);
}

.hk-drawer .hk-mc .hk-mc-item__actions {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 8px;
	margin-top: 6px;
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--hk-stone);
}

.hk-drawer .hk-mc-item__dot {
	color: var(--hk-line-strong);
}

body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .cart_list.woocommerce-mini-cart .mini_cart_item a.hk-mc-item__edit,
body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .cart_list.woocommerce-mini-cart .mini_cart_item a.hk-mc-item__remove,
body .nectar-slide-in-cart.hk-drawer .woocommerce.widget_shopping_cart .cart_list li a.remove.hk-mc-item__remove {
	position: static;
	display: inline-flex;
	align-items: center;
	float: none;
	width: auto;
	height: auto;
	min-height: 44px; /* touch target; the negative margins keep the rows' look */
	margin: -6px 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent !important;
	color: var(--hk-ink-2) !important;
	font-family: var(--hk-font-sans);
	font-size: 13.5px;
	font-weight: 400;
	line-height: 1.4;
	letter-spacing: 0;
	text-align: left;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--hk-line-strong);
	text-underline-offset: 4px;
	opacity: 1;
	transition: color var(--hk-dur-control) ease, text-decoration-color var(--hk-dur-control) ease;
}

body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .cart_list.woocommerce-mini-cart .mini_cart_item a.hk-mc-item__edit:hover,
body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .cart_list.woocommerce-mini-cart .mini_cart_item a.hk-mc-item__remove:hover,
body .nectar-slide-in-cart.hk-drawer .woocommerce.widget_shopping_cart .cart_list li a.remove.hk-mc-item__remove:hover {
	color: var(--hk-ink) !important;
	text-decoration-color: var(--hk-ink);
	background: transparent !important;
}

/* ----------------------------------------- "Check her name one more time" */

.hk-mc-check.hk-panel {
	margin: 16px 0 0;
	padding: 16px 18px 18px;
}

.hk-mc-check .hk-mc-check__title {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--hk-ink);
}

.hk-mc-check__entry {
	margin-top: 12px;
}

.hk-mc-check__entry + .hk-mc-check__entry {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px solid var(--hk-line-strong);
}

.hk-mc-check .hk-mc-check__who {
	margin-bottom: 2px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--hk-stone);
}

.hk-mc-check__row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
}

/* Plain type, never script: this is the spelling check. */
.hk-mc-check__name {
	min-width: 0;
	overflow-wrap: anywhere;
	font-family: var(--hk-font-sans);
	font-size: 22px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.02em;
	color: var(--hk-ink);
}

body .hk-drawer a.hk-mc-check__fix,
body .hk-cart-extras a.hk-mc-check__fix {
	flex: none;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	margin: -6px 0;
	font-size: 13.5px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--hk-ink-2);
}

.hk-mc-check .hk-mc-check__count {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--hk-stone);
}

/* ------------------------------------------------ One for Mom (a text link) */

.hk-mc-upsell {
	display: grid;
	grid-template-columns: 64px minmax(0, 1fr);
	column-gap: 14px;
	align-items: start;
	margin: 16px 0 0;
	padding: 16px 0 0;
	border-top: 1px solid var(--hk-line);
}

.hk-mc-upsell--text {
	grid-template-columns: minmax(0, 1fr);
}

.hk-mc-upsell__thumb {
	width: 64px;
	height: 64px;
}

.hk-mc-upsell .hk-mc-upsell__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 10px;
}

.hk-mc-upsell__title {
	font-size: 15px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--hk-ink);
}

.hk-mc-upsell__note {
	font-size: 13px;
	color: var(--hk-stone);
}

.hk-mc-upsell .hk-mc-upsell__text {
	margin-top: 2px;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--hk-stone);
}

.hk-mc-upsell .hk-mc-upsell__price {
	margin-top: 6px;
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--hk-stone);
}

.hk-mc-upsell__price b {
	font-size: 15px;
	font-weight: 500;
	color: var(--hk-ink);
	font-variant-numeric: tabular-nums;
}

body .hk-drawer a.hk-mc-upsell__link,
body .hk-cart-extras a.hk-mc-upsell__link {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	margin-top: 2px;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	color: var(--hk-ink);
}

/* ------------------------------------------------------------ the foot */

body .nectar-slide-in-cart.hk-drawer .woocommerce.widget_shopping_cart .total.hk-mc__subtotal,
body .nectar-slide-in-cart.hk-drawer .total.hk-mc__subtotal {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 12px;
	margin: 0;
	padding: 0;
	border: 0;
	color: var(--hk-ink);
	letter-spacing: 0;
}

.hk-drawer .hk-mc__subtotal-label,
.hk-drawer .hk-mc__subtotal-value,
.hk-drawer .hk-mc__subtotal-value .amount {
	font-family: var(--hk-font-sans);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	color: var(--hk-ink);
	font-variant-numeric: tabular-nums;
}

.hk-drawer .hk-mc .hk-mc__fine {
	margin-top: 2px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--hk-stone);
}

.hk-drawer .hk-mc .hk-mc__arrives {
	margin-top: 8px;
	font-size: 13.5px;
	line-height: 1.4;
	color: var(--hk-ink-2);
}

.hk-mc__arrives time {
	white-space: nowrap;
}

body .nectar-slide-in-cart.hk-drawer .woocommerce-mini-cart__buttons.hk-mc__buttons {
	display: block;
	margin: 14px 0 0;
	padding: 0;
}

/* The one black button (Salient's material skin sizes WooCommerce buttons). */
body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart a.button.hk-mc__checkout,
body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .buttons a.hk-mc__checkout,
body .nectar-slide-in-cart.hk-drawer a.hk-mc__checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	min-height: 52px;
	margin: 0;
	padding: 0 24px;
	border: 1px solid var(--hk-ink);
	border-radius: 2px;
	background: var(--hk-ink) !important;
	color: #fff !important;
	font-family: var(--hk-font-sans);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.005em;
	text-transform: none !important;
	text-decoration: none;
	box-shadow: none;
	opacity: 1;
	transition: background-color var(--hk-dur-control) ease, border-color var(--hk-dur-control) ease;
}

body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart a.button.hk-mc__checkout:hover,
body .nectar-slide-in-cart.hk-drawer a.hk-mc__checkout:hover {
	background: #000 !important;
	border-color: #000;
	color: #fff !important;
}

/* Empty bag */
body .nectar-slide-in-cart.hk-drawer .woocommerce-mini-cart__empty-message.hk-mc__empty {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 20px;
	margin: 0;
	padding: 32px 0 0;
	text-align: left;
}

.hk-drawer .hk-mc .hk-mc__empty-title {
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	color: var(--hk-ink);
}

/* ------------------------------------------------------------- focus */

.hk-drawer a:focus-visible,
.hk-drawer button:focus-visible,
.hk-cart-extras a:focus-visible,
.hk-edit-note a:focus-visible {
	outline: var(--hk-focus);
	outline-offset: var(--hk-focus-offset);
}

/* --------------------------------------------------------------- phones */

@media (max-width: 767px) {
	body .nectar-slide-in-cart.hk-drawer .inner > .header {
		min-height: 58px;
		padding: 8px var(--hk-gutter);
	}

	body .nectar-slide-in-cart.hk-drawer .inner > .header a.hk-drawer__close {
		margin-right: -12px;
	}

	.hk-mc__body {
		padding: 0 var(--hk-gutter) 20px;
	}

	.hk-mc__foot {
		padding: 14px var(--hk-gutter) calc(16px + env(safe-area-inset-bottom));
	}

	body .nectar-slide-in-cart.hk-drawer .widget_shopping_cart .nectar-notice {
		margin: 12px var(--hk-gutter) 0;
	}
}

/* ----------------------------------------------- block Cart page (/cart/)
 * The same parts: title, the name check and One for Mom (printed before the
 * block by hk-design-cart.php, in .hk-cart-page), the lines with crops, and the
 * order summary as a Mist panel with the one black button.
 * At 1024 and up the extras and the block share one grid: 1fr | 400px.
 */

body.woocommerce-cart .hk-cart-page {
	padding: 24px 0 72px;
}

body.woocommerce-cart .hk-cart-page__title.hk-h1 {
	margin: 0 0 24px;
	padding: 0;
	font-size: 32px;
	line-height: 1.08;
}

body.woocommerce-cart .hk-cart-extras {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 0;
	margin: 0 0 8px;
}

body.woocommerce-cart .hk-cart-extras[hidden] {
	display: none;
}

body.woocommerce-cart .hk-cart-extras .hk-mc-check.hk-panel {
	margin: 0;
	padding: 18px 20px 20px;
}

body.woocommerce-cart .hk-cart-extras .hk-mc-upsell {
	margin: 20px 0 0;
	padding: 16px 0 0;
}

/* Phones and tablets: the bag leads with its lines, not with the upsell. The
 * extras wrapper steps aside (display: contents) so the name check stays on
 * top and One for Mom follows the Cart block. The fragment refresh replaces
 * the wrapper, which keeps working. */
@media (max-width: 1023px) {
	body.woocommerce-cart .hk-cart-page {
		display: flex;
		flex-direction: column;
	}

	body.woocommerce-cart .hk-cart-extras:not([hidden]) {
		display: contents;
	}

	body.woocommerce-cart .hk-cart-page > .wp-block-woocommerce-cart,
	body.woocommerce-cart .hk-cart-page > .wc-block-cart {
		order: 2;
	}

	body.woocommerce-cart .hk-cart-extras .hk-mc-check {
		order: 1;
		margin-bottom: 8px !important;
	}

	body.woocommerce-cart .hk-cart-extras .hk-mc-upsell {
		order: 3;
		margin: 32px 0 0;
		padding: 20px 0 0;
		border-top: 1px solid var(--hk-line);
	}
}

body.woocommerce-cart .wp-block-woocommerce-cart {
	margin: 0;
	color: var(--hk-ink-2);
	font-family: var(--hk-font-sans);
}

body.woocommerce-cart .wp-block-woocommerce-cart.alignwide {
	max-width: none;
	width: auto;
	margin: 0;
}

@media (min-width: 1024px) {
	body.woocommerce-cart .hk-cart-page {
		padding: 40px 0 112px;
	}

	body.woocommerce-cart .hk-cart-page__title.hk-h1 {
		margin-bottom: 32px;
		font-size: 40px;
	}

	body.woocommerce-cart .hk-cart-extras,
	body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 400px;
		column-gap: 56px;
		align-items: start;
	}

	body.woocommerce-cart .hk-cart-extras .hk-mc-upsell {
		margin: 0;
		padding: 0;
		border-top: 0;
	}

	body.woocommerce-cart .hk-cart-extras {
		margin-bottom: 32px;
	}
}

@media (min-width: 1200px) {
	body.woocommerce-cart .hk-cart-extras,
	body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
		column-gap: 72px;
	}
}

body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
	margin: 0;
}

body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart > .wc-block-components-main,
body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart > .wc-block-components-sidebar {
	width: auto;
	margin: 0;
	padding: 0;
}

@media (max-width: 1023px) {
	body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart {
		display: flex;
		flex-direction: column;
	}

	body.woocommerce-cart .wc-block-components-sidebar-layout.wc-block-cart > .wc-block-components-sidebar {
		margin-top: 24px;
	}
}

/* Lines */
body.woocommerce-cart table.wc-block-cart-items {
	margin: 0;
	border: 0;
	border-bottom: 1px solid var(--hk-line);
}

body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__header th {
	padding: 12px 0;
	border: 0;
	border-bottom: 1px solid var(--hk-line);
	font-family: var(--hk-font-sans);
	font-size: 13px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: var(--hk-stone);
}

body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row {
	border-top: 1px solid var(--hk-line);
}

body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row:first-child {
	border-top: 0;
}

body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row td {
	padding-top: 18px;
	padding-bottom: 18px;
	border: 0;
	vertical-align: top;
}

body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-item__image {
	width: 72px;
	padding-right: 14px;
}

body.woocommerce-cart .wc-block-cart-item__image a,
body.woocommerce-cart .wc-block-cart-item__image > img {
	display: block;
	width: 72px;
	height: 90px;
	overflow: hidden;
	background: var(--hk-mist);
}

body.woocommerce-cart .wc-block-cart-item__image img {
	display: block;
	width: 72px;
	height: 90px;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
	mix-blend-mode: multiply;
}

body.woocommerce-cart .wc-block-cart-item__wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

body.woocommerce-cart a.wc-block-components-product-name,
body.woocommerce-cart .wc-block-components-product-name,
body.woocommerce-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	margin: 0 0 2px;
	font-family: var(--hk-font-sans);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.005em;
	color: var(--hk-ink);
	text-decoration: none;
	box-shadow: none;
}

/* The personalized necklace goes by "Birth flower name necklace" in the bag
   (its stored name stays Title Case: it is on orders). */
body.woocommerce-cart .wc-block-cart-items__row:has(.wc-block-components-product-details__her-name) .wc-block-components-product-name {
	display: inline-block;
	text-transform: lowercase;
}

body.woocommerce-cart .wc-block-cart-items__row:has(.wc-block-components-product-details__her-name) .wc-block-components-product-name::first-letter {
	text-transform: uppercase;
}

body.woocommerce-cart a.wc-block-components-product-name:hover {
	color: var(--hk-ink);
	text-decoration: underline;
	text-decoration-color: var(--hk-line-strong);
	text-underline-offset: 4px;
}

/* The line total sits on the right; no unit price, no "save" badge, no strikethrough. */
body.woocommerce-cart .wc-block-cart-item__prices,
body.woocommerce-cart .wc-block-components-sale-badge,
body.woocommerce-cart .wc-block-components-product-price__regular,
body.woocommerce-cart .wc-block-components-product-metadata__description {
	display: none !important;
}

body.woocommerce-cart .wc-block-cart-item__total .wc-block-components-product-price,
body.woocommerce-cart .wc-block-cart-item__total .wc-block-components-product-price__value,
body.woocommerce-cart .wc-block-cart-item__total .wc-block-formatted-money-amount {
	font-family: var(--hk-font-sans);
	font-size: 15px;
	font-weight: 400;
	color: var(--hk-ink);
	font-variant-numeric: tabular-nums;
}

body.woocommerce-cart .wc-block-components-product-metadata {
	margin: 0;
	font-family: var(--hk-font-sans);
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--hk-stone);
}

/* One "Label: value" line per choice, in stone; her name in ink-2. */
body.woocommerce-cart .wc-block-components-product-details {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--hk-stone);
}

body.woocommerce-cart .wc-block-components-product-details > span,
body.woocommerce-cart .wc-block-components-product-details > li {
	display: block;
	margin: 0;
}

body.woocommerce-cart .wc-block-components-product-details > span > span[aria-hidden="true"],
body.woocommerce-cart .wc-block-components-product-details > li > span[aria-hidden="true"] {
	display: none;
}

body.woocommerce-cart .wc-block-components-product-details__name {
	font-weight: 400;
	color: var(--hk-stone);
}

body.woocommerce-cart .wc-block-components-product-details__value {
	font-weight: 400;
}

body.woocommerce-cart .wc-block-components-product-details__her-name,
body.woocommerce-cart .wc-block-components-product-details__her-name .wc-block-components-product-details__name,
body.woocommerce-cart .wc-block-components-product-details__her-name .wc-block-components-product-details__value {
	color: var(--hk-ink-2);
}

/* Quantity is always 1 on a personalized line (the plugin holds it). */
body.woocommerce-cart .wc-block-cart-item__quantity {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
}

body.woocommerce-cart .wc-block-cart-item__remove-link,
body.woocommerce-cart button.wc-block-cart-item__remove-link {
	display: inline-flex;
	align-items: center;
	min-height: 32px;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--hk-font-sans);
	font-size: 13.5px !important;
	font-weight: 400;
	line-height: 1.4;
	color: var(--hk-ink-2) !important;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--hk-line-strong);
	text-underline-offset: 4px;
	text-transform: none;
	cursor: pointer;
}

/* WooCommerce draws a bin icon; the bag says "Remove" (the button keeps its label). */
body.woocommerce-cart .wc-block-cart-item__remove-link svg {
	display: none;
}

body.woocommerce-cart .wc-block-cart-item__remove-link::before {
	content: "Remove";
}

body.woocommerce-cart .wc-block-cart-item__remove-link:hover {
	color: var(--hk-ink) !important;
	text-decoration-color: var(--hk-ink);
}

/* Order summary: a Mist panel with the one black button. */
body.woocommerce-cart .wc-block-cart__sidebar {
	padding: 24px !important;
	background: var(--hk-mist);
}

body.woocommerce-cart .wc-block-cart__sidebar .wp-block-woocommerce-cart-order-summary-block,
body.woocommerce-cart .wc-block-cart__sidebar > .wp-block-woocommerce-cart-order-summary-block {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
}

body.woocommerce-cart .wc-block-cart__totals-title,
body.woocommerce-cart .wp-block-woocommerce-cart-order-summary-heading-block {
	display: block !important;
	margin: 0 0 8px;
	padding: 0;
	font-family: var(--hk-font-sans);
	font-size: 20px !important;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-align: left;
	text-transform: none !important;
	color: var(--hk-ink);
}

/* No public coupon codes exist. */
body.woocommerce-cart .wp-block-woocommerce-cart-order-summary-coupon-form-block {
	display: none;
}

body.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper {
	padding: 12px 0;
	border-top: 1px solid var(--hk-line-strong);
}

body.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper:empty {
	display: none;
}

body.woocommerce-cart .wc-block-cart__sidebar .wc-block-components-totals-wrapper::after {
	display: none;
}

body.woocommerce-cart .wc-block-components-totals-item {
	padding: 0;
}

body.woocommerce-cart .wc-block-components-totals-item__label,
body.woocommerce-cart .wc-block-components-totals-item__value {
	font-family: var(--hk-font-sans);
	font-size: 15px;
	font-weight: 400;
	color: var(--hk-ink-2);
	font-variant-numeric: tabular-nums;
}

body.woocommerce-cart .wc-block-components-totals-item__description,
body.woocommerce-cart .wc-block-components-totals-shipping__via,
body.woocommerce-cart .wc-block-components-shipping-address {
	font-family: var(--hk-font-sans);
	font-size: 13px;
	line-height: 1.45;
	color: var(--hk-stone);
}

body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__label,
body.woocommerce-cart .wc-block-components-totals-footer-item .wc-block-components-totals-item__value,
body.woocommerce-cart .wc-block-components-totals-footer-item-tax-value {
	font-family: var(--hk-font-sans);
	font-size: 18px;
	font-weight: 500;
	color: var(--hk-ink);
}

body.woocommerce-cart .wc-block-cart.is-mobile .wc-block-cart__sidebar .wc-block-cart__submit {
	margin: 0;
}

body.woocommerce-cart .wc-block-cart__sidebar .wc-block-cart__submit {
	margin: 12px 0 0;
	padding: 0;
	border: 0;
	background: none;
}

body.woocommerce-cart a.wc-block-cart__submit-button,
body.woocommerce-cart .wc-block-cart__submit-button.wc-block-components-button:not(.is-link) {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 0 24px;
	border: 1px solid var(--hk-ink);
	border-radius: 2px;
	background: var(--hk-ink) !important;
	color: #fff !important;
	font-family: var(--hk-font-sans);
	font-size: 15px;
	font-weight: 500;
	line-height: 1;
	letter-spacing: 0.005em;
	text-transform: none !important;
	text-decoration: none;
	box-shadow: none;
	transition: background-color var(--hk-dur-control) ease;
}

body.woocommerce-cart a.wc-block-cart__submit-button:hover {
	background: #000 !important;
	border-color: #000;
}

/* WooCommerce's block button focus style (0,4,1) would win otherwise. */
body.woocommerce-cart .wc-block-cart__submit-button.wc-block-components-button:focus-visible,
body.woocommerce-cart .wc-block-cart-item__remove-link:focus-visible,
body.woocommerce-cart a.wc-block-components-product-name:focus-visible {
	outline: var(--hk-focus) !important;
	outline-offset: var(--hk-focus-offset) !important;
	box-shadow: none !important;
}

body.woocommerce-cart .wc-block-cart__submit-button.wc-block-components-button:focus:not(:focus-visible) {
	outline: none !important;
	box-shadow: none !important;
}

/* Phones: WooCommerce pins the button to the bottom of the screen. */
body.woocommerce-cart .wc-block-cart__submit-container--sticky {
	padding: 10px var(--hk-gutter) calc(10px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--hk-line);
	background: rgba(255, 255, 255, 0.97);
	box-shadow: none;
}

body.woocommerce-cart .wc-block-cart__submit-container--sticky::before {
	display: none;
}

/* Payment marks WooCommerce may print under the button. */
body.woocommerce-cart .wc-block-cart__payment-options {
	display: none;
}

/* Empty bag (block content in seed/gallery/cart-6.txt). */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 20px;
	max-width: 420px;
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .hk-cart-empty__title,
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block h2 {
	margin: 0;
	padding: 0;
	font-family: var(--hk-font-sans);
	font-size: 20px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-align: left;
	color: var(--hk-ink);
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wc-block-cart__empty-cart__title.with-empty-cart-icon::before {
	display: none;
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-buttons {
	width: 100%;
	margin: 0;
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-button {
	width: 100%;
	margin: 0;
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-button__link {
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100%;
	min-height: 52px;
	padding: 0 28px;
	border: 1px solid var(--hk-ink);
	border-radius: 2px;
	background: var(--hk-ink);
	color: #fff;
	font: 500 15px/1 var(--hk-font-sans);
	letter-spacing: 0.005em;
	text-decoration: none;
}

body.woocommerce-cart .wp-block-woocommerce-empty-cart-block .wp-block-button__link:hover {
	background: #000;
	border-color: #000;
}

/* Block Cart, empty: WooCommerce's loading skeleton is shorter than the
   loaded view; reserve its height so the footer does not jump (CLS). */
body.woocommerce-cart.hk-cart-is-empty .wp-block-woocommerce-cart {
	min-height: 140px;
}

/* With lines: the loaded Cart is at least one line plus the summary tall. */
body.woocommerce-cart.hk-cart-has-items .wp-block-woocommerce-cart {
	min-height: 520px;
}

@media (min-width: 1024px) {
	body.woocommerce-cart.hk-cart-has-items .wp-block-woocommerce-cart {
		min-height: 260px;
	}
}

/* ------------------------------------------------- product page: edit note */

body .hk-edit-note.hk-panel {
	margin: 16px 0 20px;
	padding: 12px 16px;
	color: var(--hk-ink-2);
	font-family: var(--hk-font-sans);
	font-size: 14.5px;
	font-weight: 400;
	line-height: 1.45;
}

.hk-edit-note p,
form.cart .hk-edit-note p {
	margin: 0;
	padding: 0;
	font: inherit;
	color: inherit;
}

/* ------------------------------------ "…has been added to your cart." notice
 * The drawer opening after a form add is the confirmation, so WooCommerce's
 * notice is hidden on that load (body.hk-cart-autoopen, set by
 * hk-design-cart.php; body.woocommerce-js = JavaScript runs, so the drawer
 * opens). Anywhere else it shows as a Mist panel (no border, no icon). */

body.woocommerce-js.hk-cart-autoopen .woocommerce-notices-wrapper .woocommerce-message {
	display: none !important;
}

body .woocommerce-notices-wrapper .woocommerce-message {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 6px 20px;
	box-sizing: border-box;
	width: min(calc(var(--hk-max) + 2 * var(--hk-gutter)), 100%);
	margin: 16px auto;
	padding: 14px var(--hk-gutter);
	border: 0;
	border-radius: 0;
	background-color: var(--hk-mist) !important;
	background-image: none;
	box-shadow: none;
	color: var(--hk-ink-2);
	font-family: var(--hk-font-sans);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.45;
	text-shadow: none;
}

/* WooCommerce focuses the notice for screen readers; it is not in the tab order. */
body .woocommerce-notices-wrapper:focus,
body .woocommerce-notices-wrapper .woocommerce-message:focus {
	outline: none;
}

body .woocommerce-notices-wrapper .woocommerce-message::before,
body .woocommerce-notices-wrapper .woocommerce-message::after {
	display: none;
	content: none;
}

body .woocommerce-notices-wrapper .woocommerce-message a,
body.woocommerce-page .container .woocommerce-notices-wrapper .woocommerce-message a.button {
	order: 2;
	float: none;
	min-height: 0;
	height: auto;
	margin: 0;
	padding: 0;
	border: 0;
	background: none !important;
	color: var(--hk-ink) !important;
	font: inherit;
	line-height: inherit;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-decoration-color: var(--hk-line-strong);
	text-underline-offset: 4px;
	text-transform: none;
	letter-spacing: 0;
	white-space: nowrap;
}

body .woocommerce-notices-wrapper .woocommerce-message a:hover {
	text-decoration-color: var(--hk-ink);
}

/* ----------------------------------------------------------- reduced motion */

@media (prefers-reduced-motion: reduce) {
	body .nectar-slide-in-cart.hk-drawer,
	body .nectar-slide-in-cart.hk-drawer.open,
	body .nectar-slide-in-cart-bg.hk-drawer-bg,
	.hk-drawer *,
	.hk-cart-extras *,
	body.woocommerce-cart .wp-block-woocommerce-cart * {
		transition: none !important;
		animation: none !important;
	}
}
