/* =====================================================================
   HANDKRIT – CART LINE ITEMS (readability + spacing)
   Paste into: WP Admin → Appearance → Customize → Additional CSS

   Why the old rules didn't apply:
   1. WooCommerce sets the product name to 14px with a stronger selector
      (table.wc-block-cart-items .wc-block-cart-items__row …), beating
      the theme's 24px rule.
   2. Padding/borders were set on the <tr>. In a desktop table layout
      browsers ignore both, so the lines touched the content.
   ===================================================================== */

/* ---------- Typography (all widths) ---------- */
body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
	font-family: var(--hk-serif);
	font-size: 22px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--hk-ink);
	max-width: 46ch;
	margin: 0;
}

body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices,
body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices .wc-block-components-product-price__value {
	font-size: 15px;
	line-height: 1.4;
}
body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
	margin-top: 8px;
}
body.hk .wc-block-cart-item__prices del,
body.hk .wc-block-cart-item__prices del .wc-block-components-product-price__value {
	color: var(--hk-soft);
}

/* Personalisation (name, colour…) – one grouped block, readable size */
body.hk table.wc-block-cart-items .wc-block-components-product-metadata {
	margin-top: 14px;
	font-size: 15px;
}
body.hk table.wc-block-cart-items .wc-block-components-product-details.wc-block-components-product-details {
	font-size: 15px;
	line-height: 1.5;
	margin: 0;
	padding: 2px 0 2px 14px;
	border-left: 2px solid var(--hk-line-2);
	display: flex;
	flex-direction: column;
	gap: 4px;
}
body.hk table.wc-block-cart-items .wc-block-components-product-details li {
	margin: 0;
	padding: 0;
	border: 0;
}
body.hk .wc-block-components-product-details__name { color: var(--hk-muted); }
body.hk .wc-block-components-product-details__value { color: var(--hk-ink); }

/* Qty stepper + remove */
body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
	margin-top: 20px;
	align-items: center;
	gap: 14px;
}

/* Line total */
body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
	vertical-align: top;
}
body.hk .wc-block-cart-item__total .wc-block-components-product-price__value {
	font-size: 24px;
	line-height: 1.2;
}

/* ---------- Desktop: table layout ---------- */
@container (min-width: 920px) {
	/* Matching top + bottom rule around the list */
	body.hk .wc-block-cart__main table.wc-block-cart-items {
		border-top: 1px dashed var(--hk-dash);
		border-bottom: 1px dashed var(--hk-dash);
	}

	/* Breathing room above and below every item */
	body.hk .wc-block-cart__main table.wc-block-cart-items .wc-block-cart-items__row td {
		padding-top: 32px;
		padding-bottom: 32px;
		vertical-align: top;
		border: 0;
	}

	/* Divider between items (row borders don't render on tables) */
	body.hk .wc-block-cart__main table.wc-block-cart-items .wc-block-cart-items__row + .wc-block-cart-items__row td {
		border-top: 1px dashed var(--hk-dash);
	}

	body.hk .wc-block-cart__main table.wc-block-cart-items .wc-block-cart-item__image {
		width: 140px;
		padding-right: 28px;
	}
	body.hk .wc-block-cart__main table.wc-block-cart-items .wc-block-cart-item__image img {
		width: 140px;
		border-radius: 16px;
	}

	body.hk .wc-block-cart__main table.wc-block-cart-items .wc-block-cart-item__total {
		padding-left: 24px;
	}
}

/* ---------- Tablet / mobile: grid layout ---------- */
@container (max-width: 919px) {
	body.hk table.wc-block-cart-items {
		border-top: 1px dashed var(--hk-dash);
		border-bottom: 1px dashed var(--hk-dash);
	}
	/* Image column sized to the image itself (Woo hard-codes 60px, the theme's
	   image is 88–116px, which made it overlap the title). Title gets the
	   middle column, line total sits top-right. */
	body.hk .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row {
		padding: 24px 0;
		column-gap: 16px;
		grid-template-columns: auto minmax(0, 1fr) auto;
		border-bottom: 1px dashed var(--hk-dash);
	}
	body.hk .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__image {
		grid-column: 1;
		grid-row: 1;
		padding-right: 0;
	}
	body.hk .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__product {
		grid-column: 2;
		grid-row: 1;
		min-width: 0;
	}
	body.hk .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__total {
		grid-column: 3;
		grid-row: 1;
	}
	body.hk .wc-block-cart table.wc-block-cart-items .wc-block-cart-items__row:last-child {
		border-bottom: 0;
	}
}

@media (max-width: 720px) {
	body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-components-product-name {
		font-size: 18px;
		max-width: none;
	}
	body.hk .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image,
	body.hk .wc-block-cart table.wc-block-cart-items .wc-block-cart-item__image img {
		width: 76px;
	}
	body.hk table.wc-block-cart-items .wc-block-components-product-details.wc-block-components-product-details,
	body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__prices {
		font-size: 14px;
	}
	body.hk .wc-block-cart-item__total .wc-block-components-product-price__value {
		font-size: 20px;
	}
	body.hk table.wc-block-cart-items .wc-block-cart-items__row .wc-block-cart-item__quantity {
		margin-top: 14px;
	}
}

/* Space between the list and "Continue shopping" */
body.hk .hk-cart-actions { margin-top: 32px; }
