/* ==========================================================================
   WC Modern Checkout – giỏ hàng & thanh toán kiểu sàn TMĐT
   Màu, phông chữ, bố cục chỉnh tại WooCommerce → Giao diện thanh toán
   (được in ra dưới dạng biến CSS trên body.wcmc-on).
   ========================================================================== */
body.wcmc-on {
	--wcmc-accent: #0e5a98;
	--wcmc-price: #e53935;
	--wcmc-text: #222222;
	--wcmc-bg: #f5f5f5;
	--wcmc-card: #ffffff;
	--wcmc-line: #efefef;
	--wcmc-radius: 6px;
	--wcmc-max: 1000px;
	--wcmc-fs: 14px;
	--wcmc-fs-title: 16px;
	--wcmc-fw-title: 600;
	--wcmc-fs-price: 20px;
	--wcmc-fw-price: 700;
	/* Màu suy ra (trình duyệt cũ dùng giá trị dự phòng) */
	--wcmc-muted: #757575;
	--wcmc-accent-soft: rgba(14, 90, 152, .07);
	--wcmc-field: #dcdcdc;
	background: var(--wcmc-bg) !important;
}
@supports (color: color-mix(in srgb, red 50%, white)) {
	body.wcmc-on {
		--wcmc-muted: color-mix(in srgb, var(--wcmc-text) 58%, var(--wcmc-card));
		--wcmc-accent-soft: color-mix(in srgb, var(--wcmc-accent) 7%, var(--wcmc-card));
		--wcmc-field: color-mix(in srgb, var(--wcmc-line) 55%, #9e9e9e);
	}
}

/* Nền xám xuyên suốt (Flatsome & theme phổ biến) */
.wcmc-on #main,
.wcmc-on #wrapper,
.wcmc-on .page-wrapper,
.wcmc-on .content-area,
.wcmc-on .site-content,
.wcmc-on .site-main { background: var(--wcmc-bg) !important; }

/* Phông chữ (chỉ khi đã chọn trong cài đặt) */
.wcmc-font-custom .woocommerce,
.wcmc-font-custom .woocommerce :is(input, button, select, textarea, label, a, h1, h2, h3, h4),
.wcmc-font-custom .wcmc-bar,
.wcmc-font-custom .wcmc-bar :is(a, button),
.wcmc-font-custom .wcmc-toast { font-family: var(--wcmc-font) !important; }

.wcmc-on .woocommerce { color: var(--wcmc-text); font-size: var(--wcmc-fs); }
.wcmc-on .woocommerce .amount { color: inherit; }

.wcmc-on .woocommerce-form-coupon-toggle,
.wcmc-on form.checkout_coupon,
.wcmc-on #order_review_heading { display: none !important; }

.wcmc-no-thumbs .wcmc-thumb { display: none !important; }
.wcmc-no-save .wcmc-trow-save,
.wcmc-no-save .wcmc-bar-save,
.wcmc-no-save .wcmc-place-total small { display: none !important; }

/* ---------- Thẻ chung ---------- */
.wcmc-card,
.wcmc-on .woocommerce-billing-fields,
.wcmc-on .woocommerce-shipping-fields:not(:empty),
.wcmc-on .woocommerce-additional-fields:not(:empty),
.wcmc-on .woocommerce-account-fields:not(:empty) {
	position: relative;
	background: var(--wcmc-card);
	border-radius: var(--wcmc-radius);
	box-shadow: 0 1px 2px rgba(0, 0, 0, .06);
	padding: 16px;
	margin: 0 0 12px;
}
.wcmc-on .woocommerce-shipping-fields:not(:has(*)),
.wcmc-on .woocommerce-additional-fields:not(:has(input, textarea, select)) { display: none; }

.wcmc-card-head,
.wcmc-on .woocommerce-billing-fields > h3,
.wcmc-on .woocommerce-shipping-fields > h3,
.wcmc-on .woocommerce-additional-fields > h3 {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 12px !important;
	padding: 0 !important;
	font-size: var(--wcmc-fs-title) !important;
	font-weight: var(--wcmc-fw-title) !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	color: var(--wcmc-text) !important;
}
.wcmc-ico { width: 20px; height: 20px; flex: 0 0 auto; color: var(--wcmc-accent); }

/* Thẻ địa chỉ: viền "phong bì" ở cạnh trên */
.wcmc-on .woocommerce-billing-fields { padding-top: 20px; overflow: hidden; }
.wcmc-on .woocommerce-billing-fields::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: repeating-linear-gradient(45deg, var(--wcmc-accent) 0 30px, transparent 30px 40px, #f2a33a 40px 70px, transparent 70px 80px);
}
.wcmc-on .woocommerce-billing-fields > h3::before {
	content: "";
	width: 20px;
	height: 20px;
	flex: 0 0 auto;
	background: var(--wcmc-accent);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2a7 7 0 0 0-7 7c0 5.25 7 13 7 13s7-7.75 7-13a7 7 0 0 0-7-7zm0 9.5A2.5 2.5 0 1 1 12 6.5a2.5 2.5 0 0 1 0 5z'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Ô nhập */
.wcmc-on form.checkout .form-row { margin-bottom: 12px; }
.wcmc-on form.checkout .form-row label { font-size: calc(var(--wcmc-fs) - 1px); font-weight: 500; color: var(--wcmc-muted); margin-bottom: 4px; }
.wcmc-on form.checkout .input-text,
.wcmc-on form.checkout select,
.wcmc-on form.checkout textarea {
	border: 1px solid var(--wcmc-field);
	border-radius: 4px;
	box-shadow: none;
	min-height: 42px;
	font-size: calc(var(--wcmc-fs) + 1px);
	background: #fff;
	color: var(--wcmc-text);
}
.wcmc-on form.checkout .input-text:focus,
.wcmc-on form.checkout textarea:focus { border-color: var(--wcmc-accent); box-shadow: 0 0 0 3px var(--wcmc-accent-soft); }

/* Tóm tắt địa chỉ (khi đã điền đủ) */
.wcmc-addr-summary { display: flex; align-items: flex-start; gap: 12px; }
.wcmc-addr-text { flex: 1 1 auto; line-height: 1.5; font-size: var(--wcmc-fs); }
.wcmc-addr-text strong { font-weight: 600; }
.wcmc-addr-text .wcmc-addr-phone,
.wcmc-addr-text .wcmc-addr-line { color: var(--wcmc-muted); }
.wcmc-addr-change {
	flex: 0 0 auto;
	border: 0 !important;
	background: none !important;
	color: var(--wcmc-accent) !important;
	font-size: var(--wcmc-fs);
	font-weight: 500;
	cursor: pointer;
	padding: 0 !important;
	margin: 0 !important;
	min-height: 0 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
}
.woocommerce-billing-fields.wcmc-addr-collapsed .woocommerce-billing-fields__field-wrapper { display: none !important; }

/* ---------- Sản phẩm (thanh toán) ---------- */
.wcmc-review { margin: 0; border: 0; }
.wcmc-items-head { display: none; }
.wcmc-item {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr) auto;
	grid-template-areas:
		"thumb main main"
		"thumb unit qty";
	column-gap: 12px;
	row-gap: 6px;
	padding: 12px 0;
	border-top: 1px solid var(--wcmc-line);
}
.wcmc-no-thumbs .wcmc-item { grid-template-columns: 0 minmax(0, 1fr) auto; column-gap: 0; }
.wcmc-item:first-of-type { border-top: 0; }
.wcmc-thumb { grid-area: thumb; }
.wcmc-thumb img {
	display: block;
	width: 72px;
	height: 72px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid var(--wcmc-line);
	margin: 0;
}
.wcmc-item-main { grid-area: main; min-width: 0; }
.wcmc-item-name {
	font-size: var(--wcmc-fs);
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.wcmc-item-name a { color: inherit !important; text-decoration: none !important; }
.wcmc-item-name a:hover { color: var(--wcmc-accent) !important; }
.wcmc-item-meta { margin-top: 4px; }
.wcmc-item-meta:empty { display: none; }
.wcmc-item-meta dl.variation {
	display: inline-flex;
	flex-wrap: wrap;
	gap: 2px 6px;
	margin: 0;
	padding: 2px 8px;
	border-radius: 3px;
	background: var(--wcmc-bg);
	font-size: calc(var(--wcmc-fs) - 2px);
	color: var(--wcmc-muted);
}
.wcmc-item-meta dl.variation dt,
.wcmc-item-meta dl.variation dd,
.wcmc-item-meta dl.variation p { margin: 0; padding: 0; font-weight: 400; float: none; display: inline; }
.wcmc-item-unit { grid-area: unit; align-self: end; display: flex; align-items: baseline; gap: 6px; font-size: var(--wcmc-fs); }
.wcmc-item-unit del { color: #a0a0a0; font-size: calc(var(--wcmc-fs) - 2px); }
.wcmc-item-qty { grid-area: qty; align-self: end; color: var(--wcmc-muted); font-size: var(--wcmc-fs); }
.wcmc-item-subtotal { display: none; }

/* Vận chuyển */
.wcmc-shipping { border-top: 1px dashed var(--wcmc-line); padding-top: 12px; margin-top: 4px; }
.wcmc-row-title { display: flex; align-items: center; gap: 8px; font-size: var(--wcmc-fs); font-weight: 500; }
.wcmc-row-title .wcmc-ico { width: 18px; height: 18px; }
.wcmc-ship-table { width: 100%; margin: 6px 0 0; border: 0; }
.wcmc-ship-table tr { border: 0; }
.wcmc-ship-table th { padding: 0 0 4px !important; border: 0 !important; text-align: left; font-weight: 500; font-size: var(--wcmc-fs); color: var(--wcmc-muted); text-transform: none; letter-spacing: 0; }
.wcmc-ship-table td { padding: 0 !important; border: 0 !important; text-align: left !important; font-size: var(--wcmc-fs); }
.wcmc-ship-table ul#shipping_method { margin: 0; padding: 0; list-style: none; }
.wcmc-ship-table ul#shipping_method li { margin: 4px 0; padding: 0; }
.wcmc-checkout-page .wcmc-ship-table th { display: none; }

/* Voucher */
.wcmc-voucher,
.wcmc-cart-coupon { border-top: 1px dashed var(--wcmc-line); padding-top: 12px; margin-top: 12px; }
.wcmc-voucher-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wcmc-voucher-toggle {
	display: inline-flex;
	align-items: center;
	gap: 2px;
	border: 0 !important;
	background: none !important;
	color: var(--wcmc-accent) !important;
	font-size: var(--wcmc-fs);
	font-weight: 500;
	padding: 0 !important;
	margin: 0 !important;
	min-height: 0 !important;
	line-height: 1.4 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	box-shadow: none !important;
	cursor: pointer;
}
.wcmc-voucher-toggle .wcmc-ico { width: 16px; height: 16px; transition: transform .2s; }
.wcmc-voucher-toggle[aria-expanded="true"] .wcmc-ico { transform: rotate(90deg); }
.wcmc-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.wcmc-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 4px 3px 10px;
	border: 1px dashed var(--wcmc-accent);
	border-radius: 3px;
	background: var(--wcmc-accent-soft);
	color: var(--wcmc-accent);
	font-size: calc(var(--wcmc-fs) - 2px);
	font-weight: 600;
}
.wcmc-chip em { font-style: normal; font-weight: 500; }
.wcmc-chip a { color: var(--wcmc-muted); font-size: 16px; line-height: 1; padding: 0 4px; text-decoration: none; }
.wcmc-voucher-form,
.wcmc-coupon-field { display: flex; gap: 8px; margin-top: 10px; }
.wcmc-voucher-form[hidden] { display: none; }
.wcmc-on .wcmc-coupon-input {
	flex: 1 1 auto;
	width: auto !important;
	min-width: 0;
	height: 40px !important;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 0 12px !important;
	border: 1px solid var(--wcmc-field) !important;
	border-radius: 4px !important;
	text-transform: uppercase;
	font-size: var(--wcmc-fs) !important;
	box-shadow: none !important;
	background: #fff !important;
}
.wcmc-on .wcmc-coupon-apply {
	flex: 0 0 auto;
	height: 40px;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 0 16px !important;
	border: 0 !important;
	border-radius: 4px !important;
	background: var(--wcmc-accent) !important;
	color: #fff !important;
	font-size: var(--wcmc-fs) !important;
	font-weight: 600;
	text-transform: none !important;
	letter-spacing: 0 !important;
	line-height: 40px !important;
	cursor: pointer;
}
.wcmc-coupon-apply.is-loading { opacity: .6; pointer-events: none; }

/* ---------- Phương thức thanh toán ---------- */
.wcmc-on #payment.wcmc-payment { background: transparent !important; border: 0 !important; padding: 0 !important; border-radius: 0; }
.wcmc-on #payment ul.payment_methods {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.wcmc-on #payment ul.payment_methods > li {
	position: relative;
	margin: 0 !important;
	padding: 0 !important;
	border: 1px solid var(--wcmc-line);
	border-radius: 4px;
	background: var(--wcmc-card);
	list-style: none;
	transition: border-color .15s, background .15s;
}
.wcmc-on #payment ul.payment_methods > li:has(> input:checked) {
	border-color: var(--wcmc-accent);
	background: var(--wcmc-accent-soft);
}
.wcmc-on #payment ul.payment_methods > li > input.input-radio {
	position: absolute;
	top: 15px;
	left: 14px;
	width: 18px;
	height: 18px;
	margin: 0 !important;
	accent-color: var(--wcmc-accent);
	z-index: 1;
}
.wcmc-on #payment ul.payment_methods > li > label {
	display: flex !important;
	align-items: center;
	gap: 8px;
	margin: 0 !important;
	padding: 12px 14px 12px 42px !important;
	font-size: var(--wcmc-fs);
	font-weight: 500;
	color: var(--wcmc-text);
	cursor: pointer;
	min-height: 48px;
}
.wcmc-on #payment ul.payment_methods > li > label img { max-height: 24px; width: auto; margin: 0 0 0 auto !important; float: none; }
.wcmc-on #payment .payment_box {
	margin: 0 12px 12px 42px !important;
	padding: 10px 12px !important;
	border-radius: 4px;
	background: var(--wcmc-bg) !important;
	color: var(--wcmc-muted) !important;
	font-size: calc(var(--wcmc-fs) - 1px);
}
.wcmc-on #payment .payment_box::before { display: none !important; }
.wcmc-on #payment .payment_box p:last-child { margin-bottom: 0; }

/* ---------- Chi tiết thanh toán ---------- */
.wcmc-total-rows { display: flex; flex-direction: column; gap: 8px; font-size: var(--wcmc-fs); }
.wcmc-trow { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; color: var(--wcmc-muted); }
.wcmc-trow > span:last-child { color: var(--wcmc-text); text-align: right; }
.wcmc-trow-discount > span:last-child,
.wcmc-trow-save > span:last-child { color: var(--wcmc-price) !important; }
.wcmc-trow-discount a { color: var(--wcmc-muted); font-size: calc(var(--wcmc-fs) - 2px); margin-left: 6px; }
.wcmc-trow-total {
	padding-top: 10px;
	margin-top: 2px;
	border-top: 1px solid var(--wcmc-line);
	color: var(--wcmc-text);
	font-size: calc(var(--wcmc-fs) + 2px);
	font-weight: 600;
}
.wcmc-trow-total > span:last-child,
.wcmc-trow-total .amount,
.wcmc-trow-total bdi { color: var(--wcmc-price) !important; font-size: calc(var(--wcmc-fs-price) - 2px); font-weight: var(--wcmc-fw-price); }
.wcmc-trow-total small { display: none; }

/* ---------- Điều khoản + Đặt hàng ---------- */
.wcmc-on #payment .place-order.wcmc-place { padding: 16px !important; margin: 0 0 12px !important; float: none; width: auto; }
.wcmc-on .woocommerce-terms-and-conditions-wrapper { font-size: calc(var(--wcmc-fs) - 1px); color: var(--wcmc-muted); }
.wcmc-on .woocommerce-terms-and-conditions-wrapper p { margin-bottom: 8px; }
.wcmc-on .woocommerce-terms-and-conditions-wrapper a { color: var(--wcmc-accent); }
.wcmc-on .woocommerce-terms-and-conditions-wrapper .form-row { margin: 0 0 4px; }

/* Điều khoản tự động đồng ý */
.wcmc-terms-note {
	display: flex;
	align-items: flex-start;
	gap: 6px;
	margin: 0 !important;
	font-size: calc(var(--wcmc-fs) - 1px);
	line-height: 1.5;
	color: var(--wcmc-muted);
}
.wcmc-terms-note .wcmc-ico { width: 16px; height: 16px; margin-top: 2px; }
.wcmc-terms-note a { color: var(--wcmc-accent) !important; font-weight: 500; text-decoration: none; }
.wcmc-terms-note a:hover { text-decoration: underline; }
.wcmc-terms-auto .woocommerce-terms-and-conditions-wrapper .form-row:has(input#terms),
.wcmc-terms-auto .woocommerce-terms-and-conditions-wrapper .validate-required:has(input[name="terms"]) { display: none !important; }
.wcmc-terms-checkbox .wcmc-terms-note { display: none; }

.wcmc-place-row {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 16px;
	margin-top: 12px;
}
.wcmc-place-total { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.3; }
.wcmc-place-total > span { font-size: calc(var(--wcmc-fs) - 1px); color: var(--wcmc-muted); }
.wcmc-place-total strong,
.wcmc-place-total strong .amount,
.wcmc-place-total strong bdi { color: var(--wcmc-price) !important; font-size: calc(var(--wcmc-fs-price) + 2px); font-weight: var(--wcmc-fw-price); }
.wcmc-place-total small,
.wcmc-place-total small .amount { color: var(--wcmc-price) !important; font-size: calc(var(--wcmc-fs) - 2px); }

.wcmc-on #place_order,
.wcmc-on .wcmc-proceed a.checkout-button {
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	float: none !important;
	width: auto;
	min-width: 200px;
	height: 46px;
	margin: 0 !important;
	padding: 0 28px !important;
	border: 0 !important;
	border-radius: 4px !important;
	background: var(--wcmc-accent) !important;
	color: #fff !important;
	font-size: calc(var(--wcmc-fs) + 2px) !important;
	font-weight: 600 !important;
	text-transform: none !important;
	text-decoration: none !important;
	letter-spacing: 0 !important;
	line-height: 1 !important;
	box-shadow: 0 2px 6px rgba(0, 0, 0, .12);
	cursor: pointer;
}
.wcmc-on #place_order:hover,
.wcmc-on .wcmc-proceed a.checkout-button:hover { filter: brightness(1.07); }
.wcmc-on form.checkout.processing #place_order { opacity: .6; }

/* ==========================================================================
   GIỎ HÀNG
   ========================================================================== */
.wcmc-cart-page .woocommerce { max-width: var(--wcmc-max); margin-left: auto; margin-right: auto; }
.wcmc-cart-form { margin: 0 0 12px; }
.wcmc-cart-head { display: none; }

.wcmc-citem {
	display: grid;
	grid-template-columns: 80px minmax(0, 1fr) auto;
	grid-template-areas:
		"thumb main  remove"
		"thumb price price"
		"thumb qty   qty";
	column-gap: 12px;
	row-gap: 6px;
	padding: 14px 0;
	border-top: 1px solid var(--wcmc-line);
}
.wcmc-no-thumbs .wcmc-citem { grid-template-columns: 0 minmax(0, 1fr) auto; column-gap: 0; }
.wcmc-cart-head + .wcmc-citem,
.wcmc-card-head + .wcmc-cart-head + .wcmc-citem { border-top: 0; }
.wcmc-citem .wcmc-thumb img { width: 80px; height: 80px; }
.wcmc-citem-main { grid-area: main; min-width: 0; }
.wcmc-citem-main .backorder_notification { margin: 4px 0 0; font-size: calc(var(--wcmc-fs) - 2px); color: var(--wcmc-muted); }

.wcmc-citem-price { grid-area: price; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.wcmc-citem-price del,
.wcmc-citem-price del .amount { color: #a0a0a0 !important; font-size: calc(var(--wcmc-fs) - 2px); font-weight: 400; }
.wcmc-citem-now,
.wcmc-citem-now .amount,
.wcmc-citem-now bdi { color: var(--wcmc-price) !important; font-weight: var(--wcmc-fw-price); font-size: calc(var(--wcmc-fs) + 1px); }

.wcmc-citem-qty { grid-area: qty; display: flex; justify-content: flex-end; align-items: center; font-size: var(--wcmc-fs); }
.wcmc-citem-subtotal { display: none; }
.wcmc-citem-remove { grid-area: remove; text-align: right; }
.wcmc-citem-remove a.remove {
	display: inline !important;
	width: auto !important;
	height: auto !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	color: var(--wcmc-muted) !important;
	font-size: calc(var(--wcmc-fs) - 1px) !important;
	font-weight: 400 !important;
	line-height: 1.4 !important;
	text-decoration: none;
	opacity: 1 !important;
}
.wcmc-citem-remove a.remove:hover { color: var(--wcmc-price) !important; }

/* Ô số lượng dạng [ − 1 + ] */
.wcmc-cart-form .quantity {
	display: inline-flex !important;
	align-items: stretch;
	height: 32px;
	margin: 0 !important;
	border: 1px solid var(--wcmc-field);
	border-radius: 3px;
	overflow: hidden;
	background: #fff;
	opacity: 1 !important;
}
.wcmc-cart-form .quantity input.qty {
	width: 46px !important;
	height: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-left: 1px solid var(--wcmc-field) !important;
	border-right: 1px solid var(--wcmc-field) !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: #fff !important;
	color: var(--wcmc-text) !important;
	text-align: center;
	font-size: var(--wcmc-fs) !important;
	-moz-appearance: textfield;
}
.wcmc-cart-form .quantity input.qty::-webkit-outer-spin-button,
.wcmc-cart-form .quantity input.qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.wcmc-cart-form .quantity :is(.wcmc-step, .minus, .plus, .ux-quantity__button) {
	width: 32px !important;
	height: 100% !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: #fff !important;
	color: var(--wcmc-text) !important;
	font-size: 18px !important;
	line-height: 1 !important;
	box-shadow: none !important;
	cursor: pointer;
}
.wcmc-cart-form .quantity :is(.wcmc-step, .minus, .plus, .ux-quantity__button):hover { background: var(--wcmc-bg) !important; }
.wcmc-cart-form .quantity .screen-reader-text { position: absolute !important; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }
.wcmc-cart-items.is-updating { opacity: .6; pointer-events: none; transition: opacity .2s; }

/* Voucher + nút cập nhật (ẩn – tự cập nhật khi đổi số lượng) */
.wcmc-cart-actions { padding: 0 !important; border: 0 !important; }
.wcmc-cart-coupon { float: none !important; width: auto !important; }
.wcmc-cart-actions .wcmc-update-cart {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	border: 0 !important;
	white-space: nowrap;
}

/* Tổng giỏ hàng */
.wcmc-cart-page .cart-collaterals { width: 100% !important; float: none !important; margin: 0; }
.wcmc-cart-page .cart_totals { width: 100% !important; float: none !important; margin: 0; }
.wcmc-cart-page .cart_totals > h2 { display: none; }
.wcmc-proceed { margin-top: 14px; padding: 0 !important; text-align: right; }
.wcmc-on .wcmc-proceed a.checkout-button { width: 100%; }
.wcmc-cart-page .cross-sells { background: var(--wcmc-card); border-radius: var(--wcmc-radius); padding: 16px; margin-bottom: 12px; }

/* ---------- Thanh dưới cùng + thông báo ---------- */
.wcmc-bar { display: none; }
.wcmc-toast {
	position: fixed;
	left: 50%;
	bottom: 90px;
	z-index: 100000;
	max-width: min(90vw, 420px);
	padding: 10px 16px;
	border-radius: 6px;
	background: rgba(0, 0, 0, .82);
	color: #fff;
	font-size: var(--wcmc-fs);
	text-align: center;
	opacity: 0;
	pointer-events: none;
	transform: translate(-50%, 10px);
	transition: opacity .2s, transform .2s;
}
.wcmc-toast.is-show { opacity: 1; transform: translate(-50%, 0); }
.wcmc-toast.is-error { background: rgba(198, 40, 40, .95); }

/* ==========================================================================
   MÁY TÍNH
   ========================================================================== */
@media (min-width: 850px) {
	/* ----- Thanh toán: một cột ở giữa ----- */
	.wcmc-layout-single form.checkout { max-width: var(--wcmc-max); margin-left: auto; margin-right: auto; }
	.wcmc-layout-single form.checkout > .row,
	.wcmc-layout-single form.checkout .row.pt-0 { display: block !important; margin: 0 !important; }
	.wcmc-layout-single form.checkout .large-7,
	.wcmc-layout-single form.checkout .large-5,
	.wcmc-layout-single form.checkout .col2-set,
	.wcmc-layout-single form.checkout .col2-set .col-1,
	.wcmc-layout-single form.checkout .col2-set .col-2,
	.wcmc-layout-single #customer_details,
	.wcmc-layout-single #order_review {
		float: none !important;
		width: 100% !important;
		max-width: 100% !important;
		flex-basis: 100% !important;
		padding-left: 0 !important;
		padding-right: 0 !important;
	}
	.wcmc-layout-single.wcmc-checkout-page .woocommerce-notices-wrapper,
	.wcmc-layout-single.wcmc-checkout-page .woocommerce-NoticeGroup { max-width: var(--wcmc-max); margin-left: auto; margin-right: auto; }
	.wcmc-layout-two form.checkout { max-width: calc(var(--wcmc-max) + 200px); margin-left: auto; margin-right: auto; }

	/* Bỏ khung viền sidebar của Flatsome */
	.wcmc-on form.checkout .col-inner.has-border { border: 0 !important; padding: 0 !important; background: transparent !important; }
	.wcmc-on .checkout-sidebar { position: static !important; }

	.wcmc-card,
	.wcmc-on .woocommerce-billing-fields,
	.wcmc-on .woocommerce-shipping-fields:not(:empty),
	.wcmc-on .woocommerce-additional-fields:not(:empty) { padding: 20px 24px; }

	/* Địa chỉ: 2 cột ô nhập */
	.wcmc-layout-single .woocommerce-billing-fields__field-wrapper {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: 16px;
	}
	.wcmc-layout-single .woocommerce-billing-fields__field-wrapper > .form-row { width: auto !important; float: none !important; margin-right: 0 !important; }
	.wcmc-layout-single .woocommerce-billing-fields__field-wrapper > #billing_address_1_field,
	.wcmc-layout-single .woocommerce-billing-fields__field-wrapper > #billing_address_2_field { grid-column: 1 / -1; }

	/* Sản phẩm dạng bảng */
	.wcmc-layout-single .wcmc-items-head,
	.wcmc-layout-single .wcmc-item {
		display: grid;
		grid-template-columns: 64px minmax(0, 1fr) 150px 90px 150px;
		grid-template-areas: "thumb main unit qty sub";
		align-items: center;
		column-gap: 16px;
	}
	.wcmc-layout-single.wcmc-no-thumbs .wcmc-items-head,
	.wcmc-layout-single.wcmc-no-thumbs .wcmc-item { grid-template-columns: 0 minmax(0, 1fr) 150px 90px 150px; }
	.wcmc-layout-single .wcmc-items-head {
		padding: 0 0 10px;
		border-bottom: 1px solid var(--wcmc-line);
		font-size: calc(var(--wcmc-fs) - 1px);
		color: var(--wcmc-muted);
	}
	.wcmc-layout-single .wcmc-items-head span:first-child { grid-column: 1 / 3; }
	.wcmc-layout-single .wcmc-items-head span:not(:first-child) { text-align: right; }
	.wcmc-layout-single .wcmc-item:first-of-type { border-top: 0; }
	.wcmc-layout-single .wcmc-item .wcmc-thumb img { width: 64px; height: 64px; }
	.wcmc-layout-single .wcmc-item-unit { align-self: center; justify-content: flex-end; }
	.wcmc-layout-single .wcmc-item-qty { align-self: center; text-align: right; }
	.wcmc-layout-single .wcmc-item-subtotal { display: block; grid-area: sub; text-align: right; font-weight: 600; font-size: calc(var(--wcmc-fs) + 1px); }

	.wcmc-layout-single .wcmc-total-rows { width: 380px; max-width: 100%; margin-left: auto; }

	.wcmc-layout-single #payment .place-order.wcmc-place {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 24px;
		padding: 20px 24px !important;
	}
	.wcmc-layout-single .wcmc-place .woocommerce-terms-and-conditions-wrapper { flex: 1 1 auto; }
	.wcmc-layout-single .wcmc-place-row { margin-top: 0; flex: 0 0 auto; }

	.wcmc-layout-two .wcmc-place-row { flex-direction: column; align-items: stretch; }
	.wcmc-layout-two .wcmc-place-total { flex-direction: row; justify-content: space-between; align-items: baseline; }
	.wcmc-layout-two #place_order { width: 100%; }
	.wcmc-layout-two .wcmc-item { grid-template-columns: 56px minmax(0, 1fr) auto; }
	.wcmc-layout-two .wcmc-item .wcmc-thumb img { width: 56px; height: 56px; }

	/* ----- Giỏ hàng: bảng Sản phẩm | Đơn giá | Số lượng | Số tiền | Thao tác ----- */
	.wcmc-cart-head,
	.wcmc-citem {
		display: grid;
		grid-template-columns: 80px minmax(0, 1fr) 150px 140px 150px 80px;
		grid-template-areas: "thumb main price qty sub remove";
		align-items: center;
		column-gap: 16px;
	}
	.wcmc-no-thumbs .wcmc-cart-head,
	.wcmc-no-thumbs .wcmc-citem { grid-template-columns: 0 minmax(0, 1fr) 150px 140px 150px 80px; }
	.wcmc-cart-head {
		padding: 0 0 10px;
		border-bottom: 1px solid var(--wcmc-line);
		font-size: calc(var(--wcmc-fs) - 1px);
		color: var(--wcmc-muted);
	}
	.wcmc-cart-head span:first-child { grid-column: 1 / 3; }
	.wcmc-cart-head span:not(:first-child) { text-align: center; }
	.wcmc-cart-head span:nth-child(4) { text-align: right; }
	.wcmc-citem-price { justify-content: center; flex-direction: column; align-items: center; gap: 0; }
	.wcmc-citem-qty { justify-content: center; }
	.wcmc-citem-subtotal { display: block; grid-area: sub; text-align: right; }
	.wcmc-citem-subtotal,
	.wcmc-citem-subtotal .amount,
	.wcmc-citem-subtotal bdi { color: var(--wcmc-price) !important; font-weight: var(--wcmc-fw-price); font-size: calc(var(--wcmc-fs) + 1px); }
	.wcmc-citem-remove { text-align: center; }

	.wcmc-cart-coupon { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
	.wcmc-cart-coupon .wcmc-coupon-field { margin-top: 0; width: 360px; max-width: 100%; }

	/* Tổng tiền dồn phải, nút Mua hàng bên dưới */
	.wcmc-cart-page .wcmc-total-rows { width: 380px; max-width: 100%; margin-left: auto; }
	.wcmc-on .wcmc-proceed a.checkout-button { width: auto; min-width: 240px; }
	.wcmc-cart-page .wcmc-trow-total > span:last-child,
	.wcmc-cart-page .wcmc-trow-total .amount,
	.wcmc-cart-page .wcmc-trow-total bdi { font-size: var(--wcmc-fs-price); }
}

/* ==========================================================================
   ĐIỆN THOẠI
   ========================================================================== */
@media (max-width: 849px) {
	.wcmc-on form.checkout .large-7,
	.wcmc-on form.checkout .large-5 { padding-left: 0 !important; padding-right: 0 !important; }
	.wcmc-on form.checkout .col-inner.has-border { border: 0 !important; padding: 0 !important; background: transparent !important; }
	.wcmc-card,
	.wcmc-on .woocommerce-billing-fields,
	.wcmc-on .woocommerce-shipping-fields:not(:empty),
	.wcmc-on .woocommerce-additional-fields:not(:empty) { margin-bottom: 8px; box-shadow: none; }

	/* Thanh toán: thanh "Đặt hàng" cố định → ẩn nút gốc (vẫn giữ để gửi form) */
	.wcmc-checkout-page.wcmc-has-bar .wcmc-place-row { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.wcmc-checkout-page.wcmc-has-bar .wcmc-place { padding-bottom: 8px !important; }
	.wcmc-checkout-page.wcmc-has-bar,
	.wcmc-cart-page.wcmc-cbar-mobile { padding-bottom: 72px; }

	/* Giỏ hàng: nút "Mua ngay" cố định trên điện thoại → ẩn nút trong khối Chi tiết thanh toán */
	.wcmc-cart-page.wcmc-cbar-mobile .wcmc-proceed a.checkout-button { display: none !important; }
	.wcmc-cart-page.wcmc-cbar-mobile .wcmc-proceed:not(:has(> :not(a.checkout-button))) { display: none; }

	.wcmc-checkout-page.wcmc-has-bar .wcmc-bar,
	.wcmc-cart-page.wcmc-cbar-mobile .wcmc-cbar {
		position: fixed;
		left: 0;
		right: 0;
		bottom: 0;
		z-index: 99999;
		display: flex;
		align-items: stretch;
		min-height: 60px;
		background: var(--wcmc-card);
		box-shadow: 0 -2px 10px rgba(0, 0, 0, .08);
		padding-bottom: env(safe-area-inset-bottom);
	}
}

/* ---------- Thanh cố định: chữ & nút (dùng chung) ---------- */
.wcmc-bar-info {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	justify-content: center;
	padding: 6px 12px;
	line-height: 1.3;
	min-width: 0;
}
.wcmc-bar-line { font-size: calc(var(--wcmc-fs) - 1px); color: var(--wcmc-text); white-space: nowrap; }
.wcmc-bar-total,
.wcmc-bar-total .amount,
.wcmc-bar-total bdi { color: var(--wcmc-price) !important; font-size: var(--wcmc-fs-price); font-weight: var(--wcmc-fw-price); }
.wcmc-bar-save,
.wcmc-bar-save .amount { color: var(--wcmc-price) !important; font-size: calc(var(--wcmc-fs) - 2px); }
.wcmc-bar-save:empty { display: none; }
.wcmc-bar .wcmc-bar-btn {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 130px;
	margin: 0 !important;
	padding: 0 20px !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: var(--wcmc-accent) !important;
	color: #fff !important;
	font-size: calc(var(--wcmc-fs) + 2px) !important;
	font-weight: 600 !important;
	text-transform: none !important;
	letter-spacing: 0 !important;
	text-decoration: none !important;
	cursor: pointer;
}
.wcmc-bar .wcmc-bar-btn:hover { filter: brightness(1.07); }
.wcmc-bar-btn.is-loading { opacity: .65; pointer-events: none; }

/* ---------- Giỏ hàng: nút "Mua ngay" cố định trên mọi màn hình ---------- */
.wcmc-cart-page.wcmc-cbar-all { padding-bottom: 72px; }
.wcmc-cart-page.wcmc-cbar-all .wcmc-proceed a.checkout-button { display: none !important; }
.wcmc-cart-page.wcmc-cbar-all .wcmc-proceed:not(:has(> :not(a.checkout-button))) { display: none; }
.wcmc-cart-page.wcmc-cbar-all .wcmc-cbar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99999;
	display: flex;
	align-items: stretch;
	min-height: 60px;
	background: var(--wcmc-card);
	box-shadow: 0 -2px 10px rgba(0, 0, 0, .08);
	padding-bottom: env(safe-area-inset-bottom);
}
@media (min-width: 850px) {
	.wcmc-cart-page.wcmc-cbar-all { padding-bottom: 84px; }
	.wcmc-cart-page.wcmc-cbar-all .wcmc-cbar {
		align-items: center;
		min-height: 68px;
		padding-left: max(16px, calc((100vw - var(--wcmc-max)) / 2));
		padding-right: max(16px, calc((100vw - var(--wcmc-max)) / 2));
	}
	.wcmc-cart-page.wcmc-cbar-all .wcmc-bar-info {
		flex-direction: row;
		align-items: baseline;
		justify-content: flex-end;
		gap: 16px;
		padding: 0 20px;
	}
	.wcmc-cart-page.wcmc-cbar-all .wcmc-bar-line { font-size: var(--wcmc-fs); }
	.wcmc-cart-page.wcmc-cbar-all .wcmc-bar-save,
	.wcmc-cart-page.wcmc-cbar-all .wcmc-bar-save .amount { font-size: calc(var(--wcmc-fs) - 1px); }
	.wcmc-cart-page.wcmc-cbar-all .wcmc-cbar .wcmc-bar-btn {
		height: 46px;
		min-width: 220px;
		border-radius: 4px !important;
	}
}
