/**
 * TT4M - Cart & Checkout Styles for Vietnamese E-Commerce
 * Theme: Blocksy Child (Trang Trí 4 Mùa)
 *
 * Brand Palette:
 * --tt4m-primary: #14532D (Evergreen Forest)
 * --tt4m-primary-dark: #0F3F22 (Deep Pine)
 * --tt4m-cta: #C41E2F (Festive Berry Crimson Red)
 * --tt4m-cta-hover: #A01825 (Deep Crimson)
 * --tt4m-gold: #D97706 (Warm Amber Gold)
 * --tt4m-gold-light: #FEF3C7 (Soft Champagne Cream)
 * --tt4m-text: #1F2937 (Slate Charcoal)
 * --tt4m-secondary: #4B5563 (Muted Charcoal / Cool Gray)
 * --tt4m-border: #E5E7EB (Subtle Divider)
 * --tt4m-bg-alt: #F9FAFB (Clean Light Canvas)
 * --tt4m-bg-warm: #FAF8F5 (Soft Ivory Canvas)
 */

/* ==========================================================================
   0. DESIGN SYSTEM TOKENS FALLBACK
   ========================================================================== */
:root {
	--tt4m-primary: #14532D;
	--tt4m-primary-dark: #0F3F22;
	--tt4m-cta: #C41E2F;
	--tt4m-cta-hover: #A01825;
	--tt4m-gold: #D97706;
	--tt4m-gold-light: #FEF3C7;
	--tt4m-text: #1F2937;
	--tt4m-secondary: #4B5563;
	--tt4m-border: #E5E7EB;
	--tt4m-bg-alt: #F9FAFB;
	--tt4m-bg-warm: #FAF8F5;
	--tt4m-font-heading: "Playfair Display", Georgia, "Times New Roman", serif;
	--tt4m-font-body: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	--tt4m-radius-sm: 4px;
	--tt4m-radius-md: 8px;
	--tt4m-radius-lg: 12px;
	--tt4m-shadow-card: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
	--tt4m-shadow-cta: 0 4px 14px rgba(196, 30, 47, 0.25);
}

/* ==========================================================================
   1. DYNAMIC FREESHIP PROGRESS BAR (Cart & Mini-Cart)
   ========================================================================== */
.tt4m-freeship-cart-wrapper {
	margin-bottom: 24px;
}

.tt4m-freeship-minicart-wrapper {
	margin-bottom: 16px;
	padding: 0 16px;
}

.tt4m-freeship {
	background: #FAF8F5;
	border: 1px solid var(--tt4m-border, #E5E7EB);
	border-radius: var(--tt4m-radius-lg, 12px);
	padding: 14px 18px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
	transition: background-color 0.3s ease, border-color 0.3s ease;
}

.tt4m-freeship.is-completed {
	background: #F4F9F5;
	border-color: #BBF7D0;
}

.tt4m-freeship-header {
	margin-bottom: 10px;
}

.tt4m-freeship-msg {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: var(--tt4m-font-body);
	font-size: 14px;
	font-weight: 500;
	color: var(--tt4m-text, #1F2937);
	line-height: 1.45;
}

.tt4m-freeship-icon {
	flex-shrink: 0;
	color: var(--tt4m-primary, #14532D);
}

.tt4m-freeship-icon.is-done {
	color: #16A34A;
}

.tt4m-freeship-remain {
	color: var(--tt4m-cta, #C41E2F);
	font-weight: 700;
}

/* Track & Smooth Fill */
.tt4m-freeship-track {
	height: 8px;
	background: #E5E7EB;
	border-radius: 999px;
	overflow: hidden;
	position: relative;
	width: 100%;
}

.tt4m-freeship-fill {
	height: 100%;
	background: var(--tt4m-primary, #14532D);
	border-radius: 999px;
	transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.tt4m-freeship.is-completed .tt4m-freeship-fill {
	background: #16A34A;
}

/* Mini-Cart Compact Variant */
.tt4m-freeship.is-mini-cart {
	padding: 10px 14px;
	border-radius: var(--tt4m-radius-md, 8px);
}

.tt4m-freeship.is-mini-cart .tt4m-freeship-msg {
	font-size: 12.5px;
	gap: 8px;
}

.tt4m-freeship.is-mini-cart .tt4m-freeship-icon {
	width: 16px;
	height: 16px;
}

.tt4m-freeship.is-mini-cart .tt4m-freeship-track {
	height: 6px;
}

/* ==========================================================================
   2. CART PAGE STYLING (.woocommerce-cart)
   ========================================================================== */
.woocommerce-cart .woocommerce {
	position: relative;
}

/* Cart Table Container */
.woocommerce-cart table.shop_table.cart {
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border: 1px solid var(--tt4m-border) !important;
	border-radius: var(--tt4m-radius-lg) !important;
	overflow: hidden !important;
	background: #FFFFFF !important;
	box-shadow: var(--tt4m-shadow-card) !important;
	margin-bottom: 24px !important;
}

/* Table Header */
.woocommerce-cart table.shop_table.cart thead th {
	background: #F9FAFB !important;
	color: var(--tt4m-text) !important;
	font-weight: 700 !important;
	font-size: 13.5px !important;
	text-transform: uppercase !important;
	letter-spacing: 0.03em !important;
	padding: 14px 18px !important;
	border-bottom: 1.5px solid var(--tt4m-border) !important;
	border-top: none !important;
}

/* Table Rows */
.woocommerce-cart table.shop_table.cart tbody td {
	padding: 16px 18px !important;
	vertical-align: middle !important;
	border-bottom: 1px solid var(--tt4m-border) !important;
	border-top: none !important;
}

.woocommerce-cart table.shop_table.cart tbody tr:last-child td {
	border-bottom: none !important;
}

/* Product Thumbnail */
.woocommerce-cart table.shop_table.cart .product-thumbnail {
	width: 80px !important;
	padding-right: 0 !important;
}

.woocommerce-cart table.shop_table.cart .product-thumbnail img {
	width: 64px !important;
	height: 64px !important;
	object-fit: cover !important;
	border-radius: var(--tt4m-radius-md) !important;
	border: 1px solid var(--tt4m-border) !important;
	display: block !important;
	transition: transform 0.2s ease !important;
}

.woocommerce-cart table.shop_table.cart .product-thumbnail a:hover img {
	transform: scale(1.04) !important;
}

/* Product Name */
.woocommerce-cart table.shop_table.cart .product-name a {
	font-size: 15px !important;
	font-weight: 600 !important;
	color: var(--tt4m-text) !important;
	line-height: 1.4 !important;
	text-decoration: none !important;
	transition: color 0.2s ease !important;
}

.woocommerce-cart table.shop_table.cart .product-name a:hover {
	color: var(--tt4m-primary) !important;
}

.woocommerce-cart table.shop_table.cart .product-price {
	font-size: 14.5px !important;
	font-weight: 600 !important;
	color: var(--tt4m-secondary) !important;
}

/* Quantity Controls */
.woocommerce-cart .quantity,
.woocommerce-checkout .quantity {
	display: inline-flex !important;
	align-items: center !important;
	border: 1.5px solid var(--tt4m-border) !important;
	border-radius: var(--tt4m-radius-md) !important;
	overflow: hidden !important;
	background: #FFFFFF !important;
	height: 38px !important;
}

.woocommerce-cart .quantity input.qty,
.woocommerce-checkout .quantity input.qty {
	width: 44px !important;
	height: 38px !important;
	border: none !important;
	background: transparent !important;
	text-align: center !important;
	font-size: 14.5px !important;
	font-weight: 700 !important;
	color: var(--tt4m-text) !important;
	padding: 0 !important;
	box-shadow: none !important;
	-moz-appearance: textfield !important;
}

.woocommerce-cart .quantity input.qty::-webkit-outer-spin-button,
.woocommerce-cart .quantity input.qty::-webkit-inner-spin-button {
	-webkit-appearance: none !important;
	margin: 0 !important;
}

.woocommerce-cart .quantity button,
.woocommerce-cart .quantity .ct-quantity-down,
.woocommerce-cart .quantity .ct-quantity-up {
	width: 32px !important;
	height: 38px !important;
	border: none !important;
	background: #F9FAFB !important;
	color: var(--tt4m-text) !important;
	font-size: 15px !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	transition: background-color 0.15s ease !important;
	padding: 0 !important;
}

.woocommerce-cart .quantity button:hover,
.woocommerce-cart .quantity .ct-quantity-down:hover,
.woocommerce-cart .quantity .ct-quantity-up:hover {
	background: #E5E7EB !important;
}

/* Subtotal */
.woocommerce-cart table.shop_table.cart .product-subtotal {
	font-size: 15.5px !important;
	font-weight: 700 !important;
	color: var(--tt4m-cta) !important;
	white-space: nowrap !important;
}

/* Remove Item */
.woocommerce-cart table.shop_table.cart .product-remove a.remove {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 28px !important;
	height: 28px !important;
	border-radius: 50% !important;
	color: #9CA3AF !important;
	background: transparent !important;
	font-size: 18px !important;
	line-height: 1 !important;
	text-decoration: none !important;
	transition: all 0.2s ease !important;
}

.woocommerce-cart table.shop_table.cart .product-remove a.remove:hover {
	color: var(--tt4m-cta) !important;
	background: #FEE2E2 !important;
}

/* Coupon & Update Cart */
.woocommerce-cart table.shop_table.cart td.actions {
	padding: 16px 18px !important;
	background: #FAF8F5 !important;
}

.woocommerce-cart .coupon {
	display: inline-flex !important;
	align-items: center !important;
	gap: 10px !important;
}

.woocommerce-cart .coupon input.input-text {
	height: 42px !important;
	border: 1.5px solid var(--tt4m-border) !important;
	border-radius: var(--tt4m-radius-md) !important;
	padding: 0 14px !important;
	font-size: 14px !important;
	color: var(--tt4m-text) !important;
	background: #FFFFFF !important;
	min-width: 180px !important;
}

.woocommerce-cart .coupon input.input-text:focus {
	border-color: var(--tt4m-primary) !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.12) !important;
}

.woocommerce-cart .coupon button.button,
.woocommerce-cart td.actions > button.button {
	height: 42px !important;
	padding: 0 18px !important;
	border-radius: var(--tt4m-radius-md) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
}

.woocommerce-cart .coupon button.button {
	background: var(--tt4m-primary) !important;
	color: #FFFFFF !important;
	border: none !important;
}

.woocommerce-cart .coupon button.button:hover {
	background: var(--tt4m-primary-dark) !important;
}

.woocommerce-cart td.actions > button.button {
	background: #FFFFFF !important;
	color: var(--tt4m-text) !important;
	border: 1.5px solid var(--tt4m-border) !important;
}

.woocommerce-cart td.actions > button.button:hover {
	background: #E5E7EB !important;
}

/* Cart Totals Box */
.woocommerce-cart .cart-collaterals {
	margin-top: 24px !important;
}

.woocommerce-cart .cart_totals {
	background: #FFFFFF !important;
	border: 1px solid var(--tt4m-border) !important;
	border-radius: var(--tt4m-radius-lg) !important;
	padding: 24px 26px !important;
	box-shadow: var(--tt4m-shadow-card) !important;
}

.woocommerce-cart .cart_totals h2 {
	font-family: var(--tt4m-font-heading) !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--tt4m-primary) !important;
	margin: 0 0 16px 0 !important;
	padding-bottom: 12px !important;
	border-bottom: 1.5px solid var(--tt4m-border) !important;
}

.woocommerce-cart .cart_totals table.shop_table {
	border-collapse: collapse !important;
	width: 100% !important;
	margin-bottom: 20px !important;
}

.woocommerce-cart .cart_totals table.shop_table th {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--tt4m-secondary) !important;
	padding: 12px 0 !important;
	border-bottom: 1px solid var(--tt4m-border) !important;
	border-top: none !important;
}

.woocommerce-cart .cart_totals table.shop_table td {
	font-size: 15px !important;
	text-align: right !important;
	padding: 12px 0 !important;
	border-bottom: 1px solid var(--tt4m-border) !important;
	border-top: none !important;
}

.woocommerce-cart .cart_totals .order-total th {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: var(--tt4m-text) !important;
	padding-top: 16px !important;
	border-bottom: none !important;
}

.woocommerce-cart .cart_totals .order-total td {
	padding-top: 16px !important;
	border-bottom: none !important;
}

.woocommerce-cart .cart_totals .order-total .amount {
	font-size: 22px !important;
	font-weight: 800 !important;
	color: var(--tt4m-cta) !important;
}

/* Proceed to Checkout CTA */
.woocommerce-cart .wc-proceed-to-checkout a.checkout-button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 50px !important;
	background: var(--tt4m-cta) !important;
	color: #FFFFFF !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	border-radius: var(--tt4m-radius-md) !important;
	box-shadow: var(--tt4m-shadow-cta) !important;
	text-decoration: none !important;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
	margin-top: 14px !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:hover {
	background: var(--tt4m-cta-hover) !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 6px 18px rgba(196, 30, 47, 0.35) !important;
}

.woocommerce-cart .wc-proceed-to-checkout a.checkout-button:active {
	transform: translateY(1px) !important;
}

/* ==========================================================================
   3. CHECKOUT PAGE 2-COLUMN LAYOUT & CARDS (.woocommerce-checkout)
   ========================================================================== */
.woocommerce-checkout .woocommerce {
	position: relative;
}

/* Desktop Grid: Billing Details (60%) vs Order Summary & Payment (40%) */
@media (min-width: 992px) {
	.woocommerce-checkout form.woocommerce-checkout {
		display: grid !important;
		grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) !important; /* ~58.5% / 41.5% */
		column-gap: 36px !important;
		row-gap: 0 !important;
		align-items: start !important;
	}

	.woocommerce-checkout form.woocommerce-checkout > .col2-set#customer_details {
		grid-column: 1 !important;
		grid-row: 1 / span 3 !important;
		width: 100% !important;
		float: none !important;
		margin: 0 !important;
	}

	.woocommerce-checkout form.woocommerce-checkout > #order_review_heading {
		grid-column: 2 !important;
		grid-row: 1 !important;
		margin: 0 0 16px 0 !important;
		font-family: var(--tt4m-font-heading) !important;
		font-size: 20px !important;
		font-weight: 700 !important;
		color: var(--tt4m-primary) !important;
		letter-spacing: -0.01em !important;
	}

	.woocommerce-checkout form.woocommerce-checkout > #order_review.woocommerce-checkout-review-order {
		grid-column: 2 !important;
		grid-row: 2 !important;
		width: 100% !important;
		float: none !important;
		position: -webkit-sticky !important;
		position: sticky !important;
		top: 96px !important;
		z-index: 10 !important;
	}
}

/* Mobile & Tablet: Clean Single Column */
@media (max-width: 991.98px) {
	.woocommerce-checkout form.woocommerce-checkout {
		display: flex !important;
		flex-direction: column !important;
		gap: 24px !important;
	}

	.woocommerce-checkout form.woocommerce-checkout > .col2-set#customer_details,
	.woocommerce-checkout form.woocommerce-checkout > #order_review.woocommerce-checkout-review-order {
		width: 100% !important;
		float: none !important;
		margin: 0 !important;
	}

	.woocommerce-checkout form.woocommerce-checkout > #order_review_heading {
		font-family: var(--tt4m-font-heading) !important;
		font-size: 19px !important;
		font-weight: 700 !important;
		color: var(--tt4m-primary) !important;
		margin: 8px 0 4px 0 !important;
	}
}

/* Customer Details Card (Billing Section) */
.woocommerce-checkout #customer_details {
	background: #FFFFFF !important;
	border: 1px solid var(--tt4m-border) !important;
	border-radius: var(--tt4m-radius-lg) !important;
	padding: 26px 28px !important;
	box-shadow: var(--tt4m-shadow-card) !important;
}

@media (max-width: 689.98px) {
	.woocommerce-checkout #customer_details {
		padding: 18px 16px !important;
	}
}

.woocommerce-checkout #customer_details .col-1,
.woocommerce-checkout #customer_details .col-2 {
	float: none !important;
	width: 100% !important;
	padding: 0 !important;
}

/* Checkout Section Headings: Clean Luxury Editorial (NO EMOJIS) */
.woocommerce-checkout .woocommerce-billing-fields h3,
.woocommerce-checkout .woocommerce-shipping-fields h3,
.woocommerce-checkout .woocommerce-additional-fields h3 {
	font-family: var(--tt4m-font-heading) !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--tt4m-primary) !important;
	margin: 0 0 20px 0 !important;
	padding-bottom: 12px !important;
	border-bottom: 1.5px solid var(--tt4m-border) !important;
	letter-spacing: -0.01em !important;
}

.woocommerce-checkout .woocommerce-billing-fields h3::before,
.woocommerce-checkout .woocommerce-shipping-fields h3::before,
.woocommerce-checkout .woocommerce-additional-fields h3::before,
.woocommerce-checkout form.woocommerce-checkout > #order_review_heading::before {
	content: none !important;
	display: none !important;
}

/* ==========================================================================
   4. FORM FIELDS (48px Height, 8px Radius, Soft Focus, Crisp Labels)
   ========================================================================== */
.woocommerce-checkout form .form-row,
.woocommerce-cart form .form-row {
	margin-bottom: 18px !important;
	padding: 0 !important;
}

/* Labels */
.woocommerce-checkout form .form-row label,
.woocommerce-cart form .form-row label {
	font-family: var(--tt4m-font-body) !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--tt4m-text) !important;
	margin-bottom: 6px !important;
	display: block !important;
	line-height: 1.35 !important;
}

.woocommerce-checkout form .form-row label .required {
	color: var(--tt4m-cta) !important;
	text-decoration: none !important;
	font-weight: 700 !important;
	margin-left: 3px !important;
}

.woocommerce-checkout form .form-row label .optional {
	color: var(--tt4m-secondary) !important;
	font-weight: 400 !important;
	font-size: 12.5px !important;
	margin-left: 4px !important;
}

/* Inputs & Selects: 48px Height & 8px Radius */
.woocommerce-checkout form .form-row input.input-text,
.woocommerce-checkout form .form-row select,
.woocommerce-checkout form .form-row .select2-container .select2-selection--single,
.woocommerce-cart form input.input-text {
	height: 48px !important;
	min-height: 48px !important;
	line-height: 48px !important;
	border-radius: var(--tt4m-radius-md) !important;
	border: 1.5px solid var(--tt4m-border) !important;
	padding: 0 16px !important;
	font-family: var(--tt4m-font-body) !important;
	font-size: 15px !important;
	color: var(--tt4m-text) !important;
	background-color: #FFFFFF !important;
	box-shadow: none !important;
	box-sizing: border-box !important;
	width: 100% !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Soft Focus Ring (Evergreen #14532D) */
.woocommerce-checkout form .form-row input.input-text:focus,
.woocommerce-checkout form .form-row select:focus,
.woocommerce-checkout form .form-row textarea:focus,
.woocommerce-checkout form .form-row .select2-container--focus .select2-selection,
.woocommerce-cart form input.input-text:focus {
	border-color: var(--tt4m-primary) !important;
	outline: none !important;
	box-shadow: 0 0 0 3px rgba(20, 83, 45, 0.12) !important;
}

/* Textarea (Order Comments) */
.woocommerce-checkout form .form-row textarea {
	min-height: 96px !important;
	border-radius: var(--tt4m-radius-md) !important;
	border: 1.5px solid var(--tt4m-border) !important;
	padding: 12px 16px !important;
	font-family: var(--tt4m-font-body) !important;
	font-size: 14.5px !important;
	color: var(--tt4m-text) !important;
	background-color: #FFFFFF !important;
	width: 100% !important;
	line-height: 1.5 !important;
	box-sizing: border-box !important;
	transition: border-color 0.2s ease, box-shadow 0.2s ease !important;
}

/* Placeholder styling */
.woocommerce-checkout form .form-row input.input-text::placeholder,
.woocommerce-checkout form .form-row textarea::placeholder {
	color: #9CA3AF !important;
	font-size: 14px !important;
}

/* Two-column layout for City / Ward on tablet & desktop */
@media (min-width: 600px) {
	.woocommerce-checkout form .form-row-first {
		width: 48.5% !important;
		float: left !important;
		clear: none !important;
		margin-right: 3% !important;
	}
	.woocommerce-checkout form .form-row-last {
		width: 48.5% !important;
		float: right !important;
		clear: none !important;
		margin-right: 0 !important;
	}
}

/* Always ensure state field is visible */
#billing_state_field,
#shipping_state_field {
	display: block !important;
}

/* Clean up floats */
.woocommerce-checkout form .form-row-wide {
	clear: both !important;
	width: 100% !important;
	float: none !important;
}

/* ==========================================================================
   5. ORDER REVIEW SUMMARY CARD & PRODUCT THUMBNAILS
   ========================================================================== */
.woocommerce-checkout #order_review.woocommerce-checkout-review-order {
	background: #FFFFFF !important;
	border: 1px solid var(--tt4m-border) !important;
	border-radius: var(--tt4m-radius-lg) !important;
	padding: 24px 26px !important;
	box-shadow: var(--tt4m-shadow-card) !important;
}

@media (max-width: 689.98px) {
	.woocommerce-checkout #order_review.woocommerce-checkout-review-order {
		padding: 18px 16px !important;
	}
}

/* Review Table */
.woocommerce-checkout table.woocommerce-checkout-review-order-table {
	border-collapse: separate !important;
	border-spacing: 0 !important;
	border: none !important;
	margin-bottom: 20px !important;
	width: 100% !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th {
	font-size: 13.5px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	letter-spacing: 0.03em !important;
	color: var(--tt4m-secondary) !important;
	padding: 0 0 12px 0 !important;
	border-bottom: 1.5px solid var(--tt4m-border) !important;
	border-top: none !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table thead th.product-total {
	text-align: right !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tbody td {
	padding: 14px 0 !important;
	border-bottom: 1px solid var(--tt4m-border) !important;
	border-top: none !important;
	vertical-align: middle !important;
}

/* Product Thumbnail Preview Cell */
.woocommerce-checkout .tt4m-checkout-item-preview {
	display: flex !important;
	align-items: center !important;
	gap: 12px !important;
}

.woocommerce-checkout .tt4m-checkout-thumb-box {
	flex-shrink: 0 !important;
	width: 54px !important;
	height: 54px !important;
	border-radius: var(--tt4m-radius-md) !important;
	overflow: hidden !important;
	border: 1px solid var(--tt4m-border) !important;
	background: #FFFFFF !important;
}

.woocommerce-checkout .tt4m-checkout-thumb-box img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	display: block !important;
}

.woocommerce-checkout .tt4m-checkout-title-wrap {
	flex-grow: 1 !important;
}

.woocommerce-checkout .tt4m-checkout-title {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--tt4m-text) !important;
	line-height: 1.35 !important;
	display: block !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table strong.product-quantity {
	display: inline-block !important;
	font-size: 12px !important;
	font-weight: 700 !important;
	color: var(--tt4m-secondary) !important;
	background: var(--tt4m-bg-alt) !important;
	border: 1px solid var(--tt4m-border) !important;
	padding: 1px 7px !important;
	border-radius: 999px !important;
	margin-top: 4px !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table td.product-total {
	text-align: right !important;
	font-size: 14.5px !important;
	font-weight: 600 !important;
	color: var(--tt4m-text) !important;
	white-space: nowrap !important;
}

/* Footer Totals */
.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot th {
	font-size: 14px !important;
	font-weight: 600 !important;
	color: var(--tt4m-secondary) !important;
	padding: 10px 0 !important;
	border-bottom: 1px dashed var(--tt4m-border) !important;
	border-top: none !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot td {
	font-size: 14.5px !important;
	text-align: right !important;
	padding: 10px 0 !important;
	border-bottom: 1px dashed var(--tt4m-border) !important;
	border-top: none !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .order-total th {
	font-size: 16px !important;
	font-weight: 700 !important;
	color: var(--tt4m-text) !important;
	padding-top: 14px !important;
	border-bottom: none !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .order-total td {
	padding-top: 14px !important;
	border-bottom: none !important;
}

.woocommerce-checkout table.woocommerce-checkout-review-order-table tfoot .order-total .amount {
	font-size: 22px !important;
	font-weight: 800 !important;
	color: var(--tt4m-cta) !important;
}

/* ==========================================================================
   6. PAYMENT METHOD CARDS (COD & VietQR / BACS)
   ========================================================================== */
.woocommerce-checkout #payment {
	background: transparent !important;
	border: none !important;
	padding: 0 !important;
	margin-top: 20px !important;
}

.woocommerce-checkout #payment ul.payment_methods {
	list-style: none !important;
	padding: 0 !important;
	margin: 0 0 18px 0 !important;
	border-bottom: none !important;
}

/* Card Container for Each Payment Option */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method {
	border: 1.5px solid var(--tt4m-border) !important;
	border-radius: var(--tt4m-radius-md) !important;
	background: #FFFFFF !important;
	margin-bottom: 12px !important;
	padding: 14px 16px !important;
	transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease !important;
	cursor: pointer !important;
}

.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:hover {
	border-color: #9CA3AF !important;
	background: #FAF8F5 !important;
}

/* Selected Payment Method Active State */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method:has(input:checked),
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method.is-selected {
	border-color: var(--tt4m-primary) !important;
	background: #F4F8F5 !important;
	box-shadow: 0 0 0 1px var(--tt4m-primary) !important;
}

/* Payment Radio & Label */
.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method label {
	display: inline-flex !important;
	align-items: center !important;
	gap: 10px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	color: var(--tt4m-text) !important;
	cursor: pointer !important;
	margin: 0 !important;
	width: calc(100% - 32px) !important;
}

.woocommerce-checkout #payment ul.payment_methods li.wc_payment_method input[type="radio"] {
	margin-right: 8px !important;
	accent-color: var(--tt4m-primary) !important;
	width: 20px !important;
	height: 20px !important;
	cursor: pointer !important;
	vertical-align: middle !important;
	flex-shrink: 0 !important;
}

/* Payment Label Wrap & SVGs */
.tt4m-payment-label-wrap {
	display: inline-flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
}

.tt4m-payment-svg {
	flex-shrink: 0;
	color: var(--tt4m-primary);
}

.tt4m-payment-name {
	font-weight: 600;
	color: var(--tt4m-text);
}

/* Badges */
.tt4m-payment-badge {
	display: inline-flex;
	align-items: center;
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 11.5px;
	font-weight: 600;
	line-height: 1.3;
}

.tt4m-payment-badge.is-cod {
	background: #FEF3C7;
	color: #92400E;
	border: 1px solid #FCD34D;
}

.tt4m-payment-badge.is-vietqr {
	background: #EFF6FF;
	color: #1D4ED8;
	border: 1px solid #BFDBFE;
}

/* Payment Instruction Box (.payment_box) */
.woocommerce-checkout #payment div.payment_box {
	background: #FFFFFF !important;
	border: 1px solid var(--tt4m-border) !important;
	border-radius: var(--tt4m-radius-md) !important;
	padding: 14px 16px !important;
	margin: 12px 0 4px 0 !important;
	font-size: 13.5px !important;
	line-height: 1.55 !important;
	color: var(--tt4m-text) !important;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04) !important;
}

.woocommerce-checkout #payment div.payment_box::before {
	display: none !important;
}

.tt4m-payment-desc-content p {
	margin: 0 0 6px 0 !important;
}

.tt4m-payment-desc-content p:last-child {
	margin-bottom: 0 !important;
}

.tt4m-payment-desc-main {
	font-weight: 500;
	color: var(--tt4m-text);
}

.tt4m-payment-desc-sub {
	font-size: 12.5px !important;
	color: var(--tt4m-secondary) !important;
}

/* Privacy policy text */
.woocommerce-checkout .woocommerce-privacy-policy-text {
	font-size: 13px !important;
	line-height: 1.5 !important;
	color: var(--tt4m-secondary) !important;
	margin: 14px 0 !important;
}

.woocommerce-checkout .woocommerce-privacy-policy-text a {
	color: var(--tt4m-primary) !important;
	text-decoration: underline !important;
}

/* ==========================================================================
   7. PLACE ORDER BUTTON (High Conversion CTA - Calm & Reassuring)
   ========================================================================== */
.woocommerce-checkout #payment #place_order {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 100% !important;
	min-height: 52px !important;
	background: var(--tt4m-cta) !important;
	color: #FFFFFF !important;
	font-family: var(--tt4m-font-body) !important;
	font-size: 16px !important;
	font-weight: 700 !important;
	text-transform: none !important;
	letter-spacing: 0.01em !important;
	border-radius: var(--tt4m-radius-md) !important;
	border: none !important;
	box-shadow: var(--tt4m-shadow-cta) !important;
	cursor: pointer !important;
	transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
	margin-top: 10px !important;
	padding: 12px 24px !important;
}

.woocommerce-checkout #payment #place_order:hover {
	background: var(--tt4m-cta-hover) !important;
	transform: translateY(-1px) !important;
	box-shadow: 0 6px 18px rgba(196, 30, 47, 0.35) !important;
}

.woocommerce-checkout #payment #place_order:active {
	transform: translateY(1px) scale(0.99) !important;
}

/* ==========================================================================
   8. TRUST NOTICE BELOW CHECKOUT BUTTON
   ========================================================================== */
.tt4m-checkout-trust-box {
	margin-top: 18px;
	padding: 14px 16px;
	background: #FAF8F5;
	border: 1px dashed #D1D5DB;
	border-radius: var(--tt4m-radius-md);
	text-align: center;
}

.tt4m-checkout-trust-main {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--tt4m-text);
	margin-bottom: 12px;
}

.tt4m-checkout-trust-main strong {
	color: var(--tt4m-primary);
}

.tt4m-trust-lock-svg {
	color: var(--tt4m-primary);
	flex-shrink: 0;
}

.tt4m-checkout-trust-badges {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--tt4m-border);
}

.tt4m-trust-badge-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--tt4m-text);
	line-height: 1.3;
}

.tt4m-trust-badge-item svg {
	color: var(--tt4m-primary);
	flex-shrink: 0;
}

@media (max-width: 480px) {
	.tt4m-checkout-trust-badges {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}
	.tt4m-trust-badge-item {
		flex-direction: row;
		justify-content: center;
		gap: 6px;
		font-size: 12px;
	}
}

/* ==========================================================================
   9. MOBILE RESPONSIVE POLISH & TOUCH OPTIMIZATION (375px - 768px)
   ========================================================================== */
@media (max-width: 767.98px) {
	/* Cart table mobile stacking */
	.woocommerce-cart table.shop_table.cart thead {
		display: none !important;
	}

	.woocommerce-cart table.shop_table.cart tbody tr {
		display: block !important;
		padding: 16px 14px !important;
		border-bottom: 1px solid var(--tt4m-border) !important;
		position: relative !important;
	}

	.woocommerce-cart table.shop_table.cart tbody td {
		display: block !important;
		padding: 4px 0 !important;
		border: none !important;
		text-align: left !important;
	}

	.woocommerce-cart table.shop_table.cart .product-thumbnail {
		width: 100% !important;
		margin-bottom: 10px !important;
	}

	.woocommerce-cart table.shop_table.cart .product-thumbnail img {
		width: 72px !important;
		height: 72px !important;
	}

	.woocommerce-cart table.shop_table.cart .product-remove {
		position: absolute !important;
		top: 16px !important;
		right: 14px !important;
	}

	.woocommerce-cart table.shop_table.cart td.actions {
		display: flex !important;
		flex-direction: column !important;
		gap: 12px !important;
		padding: 16px 14px !important;
	}

	.woocommerce-cart .coupon {
		width: 100% !important;
		display: flex !important;
		gap: 8px !important;
	}

	.woocommerce-cart .coupon input.input-text {
		width: 100% !important;
		flex-grow: 1 !important;
		min-width: 0 !important;
	}

	.woocommerce-cart td.actions > button.button {
		width: 100% !important;
	}

	/* Form rows touch targets */
	.woocommerce-checkout form .form-row input.input-text,
	.woocommerce-checkout form .form-row select {
		font-size: 16px !important; /* Prevents auto-zoom on iOS Safari */
	}
}

/* ==========================================================================
   10. WOOCOMMERCE ERROR & NOTICE POLISH
   ========================================================================== */
.woocommerce-NoticeGroup-checkout,
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
	border-radius: var(--tt4m-radius-md) !important;
	margin-bottom: 20px !important;
	padding: 14px 18px !important;
	font-size: 14.5px !important;
	line-height: 1.45 !important;
}

.woocommerce-error {
	background: #FEF2F2 !important;
	border-left: 4px solid var(--tt4m-cta) !important;
	color: #991B1B !important;
}

.woocommerce-message {
	background: #F0FDF4 !important;
	border-left: 4px solid var(--tt4m-primary) !important;
	color: #166534 !important;
}
