/*
 * Hound & Kit — WooCommerce Cart & Checkout BLOCK styling.
 * Restyles the stock Cart/Checkout blocks with brand tokens. Enqueued only on
 * cart/checkout pages. Matches design/Cart-*.dc.html and design/Checkout-*.dc.html.
 */

/* ---- Shared scaffolding -------------------------------------------------- */
/* Hide Kadence's default page-title banner ("Cart"/"Checkout") — we render our own. */
.woocommerce-cart .entry-hero,
.woocommerce-checkout .entry-hero { display: none !important; }

.hk .wp-block-woocommerce-cart,
.hk .wp-block-woocommerce-checkout {
	max-width: 1200px;
	margin: 16px auto 72px;
	padding: 0 24px;
	font-size: 17px;
}
.hk.woocommerce-checkout .wp-block-woocommerce-checkout { margin-top: 40px; }

/* Cart page header: "Your cart" + "Continue shopping" */
.hk-cart-head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 12px;
	max-width: 1200px;
	margin: 0 auto 20px;
	padding: 0;
}
.hk-cart-head h1 { margin: 0; font-family: var(--hk-font-head); font-weight: 700; font-size: 40px; color: var(--hk-forest); }
.hk-cart-head a { font-weight: 600; text-decoration: none; }
.hk-cart-head a:hover { text-decoration: underline; }
@media (max-width: 680px) {
	.hk-cart-head { margin: 0 auto 12px; padding: 0; }
	.hk-cart-head h1 { font-size: 28px; }
}
.hk .wc-block-components-title,
.hk .wp-block-woocommerce-cart h1,
.hk .wc-block-checkout__main h2,
.hk .wc-block-components-checkout-step__title {
	font-family: var(--hk-font-head);
	color: var(--hk-forest);
}

/* Panels (order summary, totals, address card) */
.hk .wc-block-cart__sidebar .wc-block-components-sidebar,
.hk .wc-block-checkout__sidebar .wc-block-components-sidebar,
.hk .wc-block-components-order-summary {
	background: var(--hk-white);
	border: 1px solid var(--hk-line);
	border-radius: var(--hk-radius-card);
	padding: 24px;
}

/* Totals rows */
.hk .wc-block-components-totals-item { color: var(--hk-forest); }
.hk .wc-block-components-totals-footer-item,
.hk .wc-block-components-totals-item.wc-block-components-totals-footer-item {
	font-weight: 700;
	font-size: 22px;
}
.hk .wc-block-components-totals-item__value { font-weight: 600; }

/* ---- Primary (buy) buttons: ember only ---------------------------------- */
.hk .wc-block-cart__submit-button,
.hk .wc-block-components-checkout-place-order-button,
.hk .wp-block-woocommerce-checkout .wc-block-components-button.contained,
.hk .wc-block-cart__submit-container .wc-block-components-button.contained {
	background: var(--hk-ember);
	color: #fff;
	border: 0;
	border-radius: var(--hk-radius-btn);
	min-height: 60px;
	font: 600 19px var(--hk-font-body);
	width: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}
.hk .wc-block-cart__submit-button:hover,
.hk .wc-block-components-checkout-place-order-button:hover {
	background: var(--hk-ember-dark);
	color: #fff;
}

/* Any core button inside cart (e.g. empty-cart "Return to shop") → forest solid */
.hk .wp-block-woocommerce-cart .wp-block-button__link {
	background: var(--hk-forest);
	color: #fff;
	border: 0;
	border-radius: var(--hk-radius-btn);
	min-height: 52px;
	padding: 0 24px;
	font: 600 17px var(--hk-font-body);
	box-shadow: none;
}
.hk .wp-block-woocommerce-cart .wp-block-button__link:hover { background: #0f211d; color: #fff; }
/* "Return to shop" (empty cart) — a little breathing room under the heading */
.hk .wp-block-woocommerce-cart .wp-block-button:not(.wp-block-woocommerce-product-button) .wp-block-button__link { margin-top: 10px; }

/* Product-button block (cross-sell / "New in store") — outline. Higher specificity wins. */
.hk .wp-block-woocommerce-cart .wp-block-woocommerce-product-button .wp-block-button__link,
.hk .wc-block-components-product-button .wp-block-button__link,
.hk .wc-block-components-button.outlined {
	background: #fff;
	color: var(--hk-forest);
	border: 2px solid var(--hk-forest);
	border-radius: 12px;
	min-height: 48px;
	font: 600 16px var(--hk-font-body);
	box-shadow: none;
}
.hk .wp-block-woocommerce-cart .wp-block-woocommerce-product-button .wp-block-button__link:hover,
.hk .wc-block-components-product-button .wp-block-button__link:hover {
	background: rgba(22, 48, 43, .05);
	color: var(--hk-forest);
}

/* Empty-cart headings on-brand */
.hk .wp-block-woocommerce-empty-cart-block p,
.hk .wc-block-cart__empty-cart__title,
.hk .wp-block-woocommerce-cart .is-empty h2,
.hk .wp-block-woocommerce-cart .wp-block-heading {
	font-family: var(--hk-font-head);
	color: var(--hk-forest);
}

/* ---- Cart: line items + quantity stepper -------------------------------- */
.hk .wc-block-cart-items {
	background: var(--hk-white);
	border: 1px solid var(--hk-line);
	border-radius: var(--hk-radius-card);
	overflow: hidden;
}
/* Roomier line items — padding must go on the <td>/<th> cells (a <tr> ignores padding). */
.hk table.wc-block-cart-items { border-collapse: collapse; }
.hk .wc-block-cart-items__header th { padding-top: 18px; padding-bottom: 18px; }
.hk .wc-block-cart-items__row td { padding-top: 28px; padding-bottom: 28px; }
.hk .wc-block-cart-items__header th:first-child,
.hk .wc-block-cart-items__row td:first-child { padding-left: 32px; }
.hk .wc-block-cart-items__header th:last-child,
.hk .wc-block-cart-items__row td:last-child { padding-right: 32px; }
.hk .wc-block-cart-items__row td.wc-block-cart-item__image { padding-right: 20px; vertical-align: top; }
.hk .wc-block-cart-item__image img { width: 96px; max-width: 96px; border-radius: 14px; }
.hk .wc-block-cart-item__remove-link { margin-top: 8px; display: inline-block; }
.hk .wc-block-cart-item__product-name,
.hk .wc-block-components-product-name {
	font-family: var(--hk-font-head);
	font-weight: 700;
	font-size: 20px;
	color: var(--hk-forest);
	text-decoration: none;
}
.hk .wc-block-cart-item__product-metadata,
.hk .wc-block-components-product-details { color: var(--hk-moss); font-size: 15px; }
.hk .wc-block-cart-item__total-price-and-sale-badge-wrapper .wc-block-components-formatted-money-amount {
	font-weight: 700;
	font-size: 20px;
}
.hk .wc-block-components-product-metadata__description + *,
.hk .wc-block-cart-item__image img { border-radius: 14px; }

/* Quantity stepper — 44px tap targets */
.hk .wc-block-components-quantity-selector {
	border: 1px solid var(--hk-line);
	border-radius: 10px;
	max-width: 132px;
}
.hk .wc-block-components-quantity-selector__button {
	min-width: 44px;
	height: 44px;
	color: var(--hk-forest);
	font-size: 20px;
}
.hk .wc-block-components-quantity-selector__input { font-weight: 600; min-height: 44px; }

/* Remove link */
.hk .wc-block-cart-item__remove-link {
	color: var(--hk-moss);
	text-decoration: underline;
	font-size: 15px;
}

/* ---- Cart: free-shipping banner + trust list (injected, see cart-checkout.php) */
.hk-cart-banner {
	display: flex;
	gap: 10px;
	align-items: center;
	background: var(--hk-sage);
	color: var(--hk-forest);
	border-radius: 14px;
	padding: 14px 18px;
	font-size: 16px;
	font-weight: 600;
	max-width: 1200px;
	margin: 0 auto 20px;
}
.hk-cart-banner svg { flex: 0 0 auto; }
.hk-trust-list {
	list-style: none;
	margin: 20px auto 0;
	max-width: 1200px;
	background: var(--hk-sage);
	border-radius: var(--hk-radius-card);
	padding: 20px 24px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	font-size: 15px;
	color: var(--hk-forest);
}
.hk-trust-list li { display: flex; gap: 10px; }
.hk-trust-list li::before { content: "✓"; color: var(--hk-ember); font-weight: 700; }

/* ---- Cross-sell card (sage dashed) -------------------------------------- */
.hk .wc-block-cart-cross-sells {
	border: 2px dashed var(--hk-sage);
	border-radius: var(--hk-radius-card);
	padding: 18px 22px;
	margin-top: 20px;
}
.hk .wc-block-cart-cross-sells > h2 { font-family: var(--hk-font-head); font-size: 18px; margin: 0 0 12px; }
.hk .wc-block-cart-cross-sells-product__product-title,
.hk .wc-block-cart-cross-sells-product .wc-block-components-product-name { font-weight: 700; color: var(--hk-forest); }

/* ---- Checkout: inputs (≥ 52 px) ----------------------------------------- */
.hk .wc-block-components-text-input input,
.hk .wc-block-components-text-input textarea,
.hk .wc-block-components-select .wc-block-components-select__container,
.hk .wc-block-components-combobox .components-form-token-field__input-container,
.hk .wc-block-components-combobox-control input {
	min-height: 52px;
	border: 1px solid #B9C7BF;
	border-radius: 10px;
	font: 400 17px var(--hk-font-body);
	color: var(--hk-forest);
	background: #fff;
}
.hk .wc-block-components-text-input input:focus,
.hk .wc-block-components-combobox-control input:focus {
	border-color: var(--hk-forest);
	box-shadow: 0 0 0 1px var(--hk-forest);
	outline: none;
}
.hk .wc-block-components-text-input label,
.hk .wc-block-components-checkout-step__description,
.hk .wc-block-components-form .wc-block-components-text-input label { color: var(--hk-moss); }
.hk .wc-block-components-checkout-step__title {
	font-family: var(--hk-font-head);
	font-weight: 700;
	font-size: 24px;
}
.hk .wc-block-components-checkout-step__title-number {
	background: var(--hk-forest);
	color: #fff;
}

/* Shipping method row (selected) */
.hk .wc-block-components-radio-control__option--checked,
.hk .wc-block-components-shipping-rates-control .wc-block-components-radio-control__option--checked {
	border: 2px solid var(--hk-forest);
	border-radius: 12px;
}

/* "or pay with card" divider + express area already styled by block; tidy spacing */
.hk .wc-block-components-express-payment { margin-bottom: 8px; }

/* Order summary (checkout sidebar) */
.hk .wc-block-checkout__sidebar .wc-block-components-order-summary__content { font-size: 16px; }

/* Mobile collapsible order summary button */
.hk .wc-block-components-order-summary .wc-block-components-panel__button {
	min-height: 56px;
	font: 600 16px var(--hk-font-body);
	color: var(--hk-forest);
}

/* Guarantee box under the checkout summary (injected) */
.hk-guarantee-box {
	background: var(--hk-sage);
	border-radius: var(--hk-radius-card);
	padding: 20px 24px;
	margin-top: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	font-size: 15px;
	color: var(--hk-forest);
}
.hk-guarantee-box strong { font-size: 16px; }

/* Links inside cart/checkout use forest, hover ember (already global, re-assert) */
.hk .wp-block-woocommerce-cart a,
.hk .wp-block-woocommerce-checkout a { color: var(--hk-forest); }
.hk .wp-block-woocommerce-cart a:hover,
.hk .wp-block-woocommerce-checkout a:hover { color: var(--hk-ember); }

/* ---- Mobile tweaks ------------------------------------------------------ */
@media (max-width: 680px) {
	.hk .wp-block-woocommerce-cart,
	.hk .wp-block-woocommerce-checkout { margin-top: 16px; padding: 0 20px; }
	.hk-cart-banner, .hk-trust-list { margin-left: 0; margin-right: 0; }
	.hk .wc-block-components-checkout-step__title { font-size: 22px; }
}
