/* ======================================================================
   INNOPHA — Commerce Follow-up v2 — 2026-09-16
   Checkout: Sản phẩm | Số lượng | Đơn giá
   Cart Block: Sản phẩm | Đơn giá | Thành tiền
   ====================================================================== */

/* CHECKOUT ------------------------------------------------------------- */
body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .woocommerce-checkout-review-order-table.hvt-review-order-v2 {
	table-layout: fixed !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 th.product-name,
body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 td.product-name {
	width: auto !important;
	text-align: left !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 th.product-quantity,
body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 td.product-quantity {
	width: 76px !important;
	min-width: 76px !important;
	padding-left: 7px !important;
	padding-right: 7px !important;
	text-align: center !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 th.product-unit-price,
body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 td.product-unit-price {
	width: 112px !important;
	min-width: 112px !important;
	padding-left: 7px !important;
	padding-right: 0 !important;
	text-align: right !important;
	white-space: nowrap !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 .hvt-review-qty {
	min-width: 0 !important;
	font-size: 14px !important;
	text-align: center !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 .hvt-review-unit-price {
	color: var(--hvt-co-ink, #17213a) !important;
	font-size: 14px !important;
	font-weight: 700 !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 tfoot th[colspan="2"] {
	text-align: left !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 tfoot td:last-child {
	width: 112px !important;
	padding-right: 0 !important;
	text-align: right !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 .order-total th,
body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 .order-total td {
	border-top: 1px solid #dfe7dc !important;
}

@media (max-width: 549px) {
	body.woocommerce-checkout:not(.woocommerce-order-received)
	.hvt-checkout-two-column .hvt-review-order-v2 th.product-quantity,
	body.woocommerce-checkout:not(.woocommerce-order-received)
	.hvt-checkout-two-column .hvt-review-order-v2 td.product-quantity {
		width: 54px !important;
		min-width: 54px !important;
	}

	body.woocommerce-checkout:not(.woocommerce-order-received)
	.hvt-checkout-two-column .hvt-review-order-v2 th.product-unit-price,
	body.woocommerce-checkout:not(.woocommerce-order-received)
	.hvt-checkout-two-column .hvt-review-order-v2 td.product-unit-price {
		width: 88px !important;
		min-width: 88px !important;
		font-size: 12px !important;
	}

	body.woocommerce-checkout:not(.woocommerce-order-received)
	.hvt-checkout-two-column .hvt-review-order-v2 .hvt-review-product {
		gap: 9px !important;
	}

	body.woocommerce-checkout:not(.woocommerce-order-received)
	.hvt-checkout-two-column .hvt-review-order-v2 .hvt-review-product__image {
		width: 44px !important;
		min-width: 44px !important;
		height: 44px !important;
	}

	body.woocommerce-checkout:not(.woocommerce-order-received)
	.hvt-checkout-two-column .hvt-review-order-v2 .hvt-review-product__name {
		font-size: 12.5px !important;
	}
}

/* CART BLOCK ----------------------------------------------------------- */
@media (min-width: 850px) {
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.hvt-cart-unit-price-head,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.hvt-cart-unit-price-cell {
		box-sizing: border-box !important;
		width: 170px !important;
		min-width: 170px !important;
		padding-left: 16px !important;
		padding-right: 36px !important;
		text-align: right !important;
	}

	/* Đơn giá phải đứng cùng cao độ với Thành tiền, không căn giữa dọc. */
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.hvt-cart-unit-price-cell {
		vertical-align: top !important;
		padding-top: 22px !important;
		padding-bottom: 22px !important;
	}

	/* Header Đơn giá dùng cùng bề rộng/căn phải với header Thành tiền. */
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.hvt-cart-unit-price-head {
		vertical-align: middle !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.hvt-cart-unit-price-head {
		color: #6f786a !important;
		font-size: 12px !important;
		font-weight: 700 !important;
		letter-spacing: .02em !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.hvt-cart-unit-price-cell {
		border-top: 1px solid #edf0eb !important;
		color: var(--hvt-cart-ink, #17213a) !important;
		font-weight: 700 !important;
		white-space: nowrap !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.wc-block-cart-item__product .hvt-cart-unit-price-source {
		display: none !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.hvt-cart-unit-price-value,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.hvt-cart-unit-price-value .wc-block-components-product-price {
		display: block !important;
		margin: 0 !important;
		color: var(--hvt-cart-ink, #17213a) !important;
		font-size: 14px !important;
		font-weight: 700 !important;
		text-align: right !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.hvt-cart-unit-price-value,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.hvt-cart-unit-price-value .wc-block-components-product-price {
		line-height: 1.4 !important;
		align-items: flex-start !important;
		justify-content: flex-end !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.wc-block-cart-item__total,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.wc-block-cart-items__header-total {
		width: 170px !important;
		min-width: 170px !important;
	}
}

/* Keep native compact mobile presentation; unit price returns below product name. */
@media (max-width: 849px) {
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.hvt-cart-unit-price-head,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.hvt-cart-unit-price-cell {
		display: none !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.wc-block-cart-item__product .hvt-cart-unit-price-source {
		display: flex !important;
	}
}


/* v4: khóa Đơn giá và Thành tiền theo cùng một baseline / box model. */
@media (min-width: 850px) {
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.hvt-cart-unit-price-head,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.wc-block-cart-items__header-total,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.hvt-cart-unit-price-cell,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total {
		box-sizing: border-box !important;
		width: 170px !important;
		min-width: 170px !important;
		padding-left: 16px !important;
		padding-right: 36px !important;
		text-align: right !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.hvt-cart-unit-price-cell,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total {
		vertical-align: top !important;
		padding-top: 24px !important;
		padding-bottom: 22px !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total
	.wc-block-cart-item__total-price-and-sale-badge-wrapper {
		display: flex !important;
		height: auto !important;
		min-height: 0 !important;
		margin: 0 !important;
		padding: 0 !important;
		align-items: flex-start !important;
		justify-content: flex-end !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total .wc-block-components-product-price,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.hvt-cart-unit-price-cell .wc-block-components-product-price {
		margin: 0 !important;
		padding: 0 !important;
		line-height: 1.4 !important;
	}
}


/* ======================================================================
   INNOPHA — v5 alignment normalization
   Đơn giá + Thành tiền: header và số đều căn giữa.
   ====================================================================== */

/* CART --------------------------------------------------------------- */
@media (min-width: 850px) {
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.hvt-cart-unit-price-head,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.wc-block-cart-items__header-total,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.hvt-cart-unit-price-cell,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total {
		text-align: center !important;
		padding-left: 12px !important;
		padding-right: 12px !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.hvt-cart-unit-price-value,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	.hvt-cart-unit-price-value .wc-block-components-product-price,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total .wc-block-components-product-price {
		width: 100% !important;
		text-align: center !important;
		justify-content: center !important;
		align-items: flex-start !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total
	.wc-block-cart-item__total-price-and-sale-badge-wrapper {
		justify-content: center !important;
		align-items: flex-start !important;
		text-align: center !important;
	}
}

/* CHECKOUT ----------------------------------------------------------- */
body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 th.product-unit-price,
body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 td.product-unit-price {
	text-align: center !important;
	padding-left: 7px !important;
	padding-right: 7px !important;
}

body.woocommerce-checkout:not(.woocommerce-order-received)
.hvt-checkout-two-column .hvt-review-order-v2 .hvt-review-unit-price {
	display: block !important;
	width: 100% !important;
	text-align: center !important;
}

/* THANK-YOU PAGE ----------------------------------------------------- */
body.woocommerce-order-received .hvt-order-table th.hvt-col-price,
body.woocommerce-order-received .hvt-order-table td.hvt-col-price,
body.woocommerce-order-received .hvt-order-table th.hvt-col-total,
body.woocommerce-order-received .hvt-order-table td.hvt-col-total,
body.woocommerce-order-received .hvt-order-table tfoot td:last-child {
	text-align: center !important;
}

/* EMPTY CART --------------------------------------------------------- */
body.woocommerce-cart .wp-block-woocommerce-empty-cart-block.hvt-empty-cart-v2 {
	max-width: 1180px;
	margin: 0 auto 24px !important;
	padding: 42px 28px 30px !important;
	border: 1px solid #e3eadc;
	border-radius: 18px;
	background: linear-gradient(125deg, #f8fff3 0%, #ffffff 55%, #fff8fb 100%);
	box-shadow: 0 8px 30px rgba(30, 42, 64, .05);
}

body.woocommerce-cart .hvt-empty-cart-v2 .wc-block-cart__empty-cart__title {
	margin: 0 auto 10px !important;
	color: #17213a;
	font-size: 26px !important;
	line-height: 1.3 !important;
	font-weight: 700 !important;
	text-align: center !important;
}

body.woocommerce-cart .hvt-empty-cart-v2 .hvt-empty-cart-desc {
	max-width: 650px;
	margin: 0 auto 32px !important;
	color: #687184;
	font-size: 15px;
	line-height: 1.65;
	text-align: center;
}

body.woocommerce-cart .hvt-empty-cart-v2 .hvt-empty-cart-related-title {
	margin: 0 0 18px !important;
	color: #17213a;
	font-size: 17px !important;
	line-height: 1.35 !important;
	font-weight: 700 !important;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-align: left !important;
}

body.woocommerce-cart .hvt-empty-cart-v2 hr.is-style-dots {
	display: none !important;
}

@media (max-width: 849px) {
	body.woocommerce-cart .wp-block-woocommerce-empty-cart-block.hvt-empty-cart-v2 {
		padding: 30px 14px 22px !important;
	}
	body.woocommerce-cart .hvt-empty-cart-v2 .wc-block-cart__empty-cart__title {
		font-size: 22px !important;
	}
	body.woocommerce-cart .hvt-empty-cart-v2 .hvt-empty-cart-desc {
		margin-bottom: 24px !important;
		font-size: 14px;
	}
}


/* ======================================================================
   v6 — Cart Thành tiền: center the actual number exactly under the header.
   ====================================================================== */
@media (min-width: 850px) {
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	th.wc-block-cart-items__header-total,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total {
		width: 170px !important;
		min-width: 170px !important;
		padding-left: 12px !important;
		padding-right: 12px !important;
		text-align: center !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total > div,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total
	.wc-block-cart-item__total-price-and-sale-badge-wrapper,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total
	.wc-block-components-product-price {
		box-sizing: border-box !important;
		width: 100% !important;
		max-width: none !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
		text-align: center !important;
		justify-content: center !important;
		align-items: flex-start !important;
	}

	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total
	.wc-block-formatted-money-amount,
	body.woocommerce-cart .wc-block-cart-items.hvt-cart-columns-v2
	td.wc-block-cart-item__total
	.wc-block-components-formatted-money-amount {
		display: block !important;
		width: 100% !important;
		margin: 0 !important;
		text-align: center !important;
	}
}
