/*
 * Nguyễn Tài CID – giao diện WooCommerce đồng bộ theme (cửa hàng, sản phẩm,
 * giỏ hàng, thanh toán, tài khoản, đăng nhập). Dùng biến màu trong style.css.
 */

/* ==========================================================================
   Khung chung cho trang WooCommerce
   ========================================================================== */
.woocommerce, .woocommerce-page { color: var(--nt-ink); }

.nt-page .woocommerce a.button,
.nt-page .woocommerce button.button,
.nt-page .woocommerce input.button,
.nt-page .woocommerce a.button.alt,
.nt-page .woocommerce button.button.alt {
	background: var(--nt-primary);
	color: #fff;
	border: 0;
	border-radius: 10px;
	padding: 11px 20px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color .15s;
	text-shadow: none;
	box-shadow: none;
}
.nt-page .woocommerce a.button:hover,
.nt-page .woocommerce button.button:hover,
.nt-page .woocommerce input.button:hover,
.nt-page .woocommerce a.button.alt:hover,
.nt-page .woocommerce button.button.alt:hover {
	background: var(--nt-primary-dark);
	color: #fff;
}
.nt-page .woocommerce .button.wc-backward,
.nt-page .woocommerce a.added_to_cart {
	background: #fff;
	color: var(--nt-primary);
	border: 1.5px solid var(--nt-line);
}

/* Thông báo */
.woocommerce-message, .woocommerce-info, .woocommerce-error, .woocommerce-noreviews {
	list-style: none;
	margin: 0 0 20px;
	padding: 14px 18px;
	border-radius: 12px;
	background: var(--nt-primary-soft);
	border: 0;
	border-left: 4px solid var(--nt-primary);
	color: var(--nt-ink);
}
.woocommerce-error { background: #fdecec; border-left-color: var(--nt-danger); }
.woocommerce-message { background: #e9f7ef; border-left-color: var(--nt-ok); }
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { display: none; }
.woocommerce-message .button, .woocommerce-info .button { float: right; padding: 6px 14px; font-size: 14px; }

/* ==========================================================================
   Trang cửa hàng – các gói CID xếp như bảng giá
   ========================================================================== */
.nt-shop-page .woocommerce-products-header__title,
.nt-shop-page .page-title { margin: 0 0 6px; font-size: 28px; line-height: 1.3; }
.nt-shop-page .woocommerce-products-header { margin-bottom: 8px; }
.nt-shop-page .woocommerce-result-count { margin: 6px 0 20px; }
.nt-shop-page .woocommerce-ordering { margin: 0 0 20px; }

.woocommerce ul.products {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	margin: 0;
	padding: 0;
	clear: both;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { display: none; }
.woocommerce ul.products li.product {
	width: auto !important;
	margin: 0 !important;
	float: none !important;
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-radius: var(--nt-radius);
	box-shadow: var(--nt-shadow);
	padding: 0 0 20px;
	overflow: hidden;
	text-align: center;
	display: flex;
	flex-direction: column;
	transition: border-color .15s, box-shadow .15s, transform .15s;
}
.woocommerce ul.products li.product:hover {
	border-color: var(--nt-primary);
	box-shadow: 0 10px 32px rgba(29, 95, 214, .16);
	transform: translateY(-3px);
}
.woocommerce ul.products li.product a.woocommerce-LoopProduct-link { display: block; text-decoration: none; }
/* Ảnh tràn full chiều ngang thẻ, tỉ lệ vuông */
.woocommerce ul.products li.product a img {
	display: block;
	width: 100%;
	max-width: none;
	aspect-ratio: 1 / 1;
	object-fit: cover;
	margin: 0 0 18px;
	border-radius: 0;
	background: var(--nt-bg);
	transition: transform .3s;
}
.woocommerce ul.products li.product:hover a img { transform: scale(1.03); }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.4;
	padding: 0 20px 6px;
	color: var(--nt-ink);
}
.woocommerce ul.products li.product .price {
	display: block;
	color: var(--nt-primary-dark);
	font-weight: 700;
	font-size: 22px;
	margin: 0 0 16px;
	padding: 0 20px;
}
.woocommerce ul.products li.product .price del { color: var(--nt-muted); font-weight: 400; font-size: 15px; margin-right: 6px; }
.woocommerce ul.products li.product .price ins { text-decoration: none; }
.woocommerce ul.products li.product .button,
.woocommerce ul.products li.product .added_to_cart {
	display: block;
	margin: auto 20px 0 !important;
	padding: 12px 18px;
	border-radius: 10px;
	background: var(--nt-primary);
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	line-height: 1.3;
}
.woocommerce ul.products li.product .button:hover { background: var(--nt-primary-dark); color: #fff; }
.woocommerce ul.products li.product .added_to_cart {
	margin-top: 8px !important;
	background: #fff;
	color: var(--nt-primary);
	border: 1.5px solid var(--nt-line);
	text-decoration: none;
}
.woocommerce ul.products li.product .button.loading { opacity: .7; }

@media (max-width: 900px) {
	.woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
}
@media (max-width: 540px) {
	.woocommerce ul.products { grid-template-columns: 1fr; }
}
/* Badge % giảm (tự tính) góc trên ảnh */
/* Badge % giảm (tự tính) góc trên phải ảnh */
.woocommerce ul.products li.product { position: relative; }
.woocommerce ul.products li.product .nt-discount {
	position: absolute;
	z-index: 3;
	top: 12px;
	right: 12px;
	padding: 6px 12px;
	border-radius: 999px;
	background: linear-gradient(135deg, #ff5a4e, #e3262f 55%, #b8121d);
	border: 2px solid rgba(255, 255, 255, .9);
	box-shadow: 0 6px 16px rgba(184, 18, 29, .5);
	color: #fff;
	font-size: 17px;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -.01em;
	text-shadow: 0 1px 2px rgba(0, 0, 0, .25);
	white-space: nowrap;
	transform-origin: top right;
	animation: nt-discount-pulse 2.4s ease-in-out infinite;
	pointer-events: none;
}
@keyframes nt-discount-pulse {
	0%, 100% { transform: scale(1); }
	50% { transform: scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
	.nt-discount { animation: none; }
}

/* Tiêu đề + sắp xếp trên cửa hàng */
.woocommerce .woocommerce-result-count { color: var(--nt-muted); font-size: 14px; }
.woocommerce .woocommerce-ordering select {
	padding: 8px 12px;
	border: 1.5px solid var(--nt-line);
	border-radius: 10px;
	background: #fff;
	font: inherit;
}

/* ==========================================================================
   Trang chi tiết sản phẩm
   ========================================================================== */
.nt-product-page .woocommerce-breadcrumb {
	margin: 0 0 18px;
	font-size: 14px;
	color: var(--nt-muted);
}
.nt-product-page .woocommerce-breadcrumb a { color: var(--nt-muted); text-decoration: none; }
.nt-product-page .woocommerce-breadcrumb a:hover { color: var(--nt-primary); }

/* Bố cục: ảnh | khung mua – mô tả và gói khác nằm dưới, full chiều ngang */
.single-product.woocommerce div.product {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	gap: 28px;
	align-items: start;
	position: relative;
}
.single-product.woocommerce div.product::before,
.single-product.woocommerce div.product::after { display: none; }
.single-product.woocommerce div.product > .woocommerce-tabs,
.single-product.woocommerce div.product > .related,
.single-product.woocommerce div.product > .upsells { grid-column: 1 / -1; }

.single-product.woocommerce div.product div.images,
.single-product.woocommerce div.product div.summary {
	float: none;
	width: auto;
	margin: 0;
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-radius: var(--nt-radius);
	box-shadow: var(--nt-shadow);
}
.single-product.woocommerce div.product div.images { padding: 14px; }
.single-product.woocommerce div.product div.images img { border-radius: 10px; }
.single-product.woocommerce div.product div.images .flex-control-thumbs {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
	margin: 10px 0 0;
}
.single-product.woocommerce div.product div.images .flex-control-thumbs li { width: auto; float: none; }
.single-product.woocommerce div.product div.images .flex-control-thumbs img { border-radius: 8px; }

.single-product.woocommerce div.product div.summary { padding: 28px 30px; }
.woocommerce div.product .product_title {
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 14px;
}
.woocommerce div.product .woocommerce-product-rating { margin-bottom: 12px; }

/* Giá */
.woocommerce div.product .summary p.price {
	display: inline-flex;
	align-items: baseline;
	gap: 10px;
	margin: 0 0 20px;
	padding: 10px 18px;
	border-radius: 12px;
	background: var(--nt-primary-soft);
}
.woocommerce div.product p.price, .woocommerce div.product span.price {
	color: var(--nt-primary-dark);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
}
.woocommerce div.product p.price del { color: var(--nt-muted); font-size: 18px; font-weight: 400; opacity: 1; }
.woocommerce div.product p.price ins { text-decoration: none; }

/* Mô tả ngắn – danh sách tính năng dạng dấu tích */
.woocommerce div.product .woocommerce-product-details__short-description {
	color: var(--nt-ink);
	margin: 0 0 22px;
	padding: 0 0 20px;
	border-bottom: 1px solid var(--nt-line);
}
.woocommerce div.product .woocommerce-product-details__short-description p { margin: 0 0 10px; color: var(--nt-muted); }
.woocommerce div.product .woocommerce-product-details__short-description ul {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 10px;
}
.woocommerce div.product .woocommerce-product-details__short-description li {
	position: relative;
	padding-left: 30px;
}
.woocommerce div.product .woocommerce-product-details__short-description li::before {
	content: "";
	position: absolute;
	left: 0;
	top: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #e9f7ef url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23138a4c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12 5 5 9-10'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* Số lượng + nút mua */
.woocommerce .quantity input.qty {
	width: 72px;
	padding: 10px;
	border: 1.5px solid var(--nt-line);
	border-radius: 10px;
	text-align: center;
	font: inherit;
}
.woocommerce div.product form.cart { margin: 0 0 22px; display: flex; gap: 12px; align-items: stretch; flex-wrap: wrap; }
.woocommerce div.product form.cart::before, .woocommerce div.product form.cart::after { display: none; }
.woocommerce div.product form.cart div.quantity { float: none; margin: 0; }
.woocommerce div.product form.cart .quantity input.qty { height: 52px; width: 80px; font-size: 17px; font-weight: 600; }
.nt-page .woocommerce div.product form.cart .button,
.single-product div.product form.cart .single_add_to_cart_button {
	flex: 1 1 200px;
	float: none;
	min-height: 52px;
	padding: 14px 26px;
	font-size: 17px;
	border-radius: 12px;
	background: var(--nt-primary);
	box-shadow: 0 6px 18px rgba(29, 95, 214, .25);
}
.single-product div.product form.cart .single_add_to_cart_button:hover { background: var(--nt-primary-dark); }

/* Khối cam kết */
.nt-product-badges {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 10px;
}
.nt-product-badges li {
	display: flex;
	flex-direction: column;
	gap: 8px;
	align-items: center;
	text-align: center;
	padding: 14px 10px;
	border-radius: 12px;
	background: var(--nt-bg);
	line-height: 1.35;
}
.nt-product-badges__icon {
	flex: 0 0 34px;
	height: 34px;
	display: grid;
	place-items: center;
	border-radius: 10px;
	background: #fff;
	color: var(--nt-primary);
	box-shadow: 0 1px 2px rgba(15, 27, 45, .08);
}
.nt-product-badges__icon svg { width: 18px; height: 18px; }
.nt-product-badges strong { display: block; font-size: 14px; }
.nt-product-badges small { display: block; font-size: 12.5px; color: var(--nt-muted); }

/* Gói khác */
.single-product .products li.product .button {
	background: var(--nt-primary);
	color: #fff;
	border-radius: 10px;
	padding: 11px 20px;
	font-weight: 600;
}
.single-product .products li.product .button:hover { background: var(--nt-primary-dark); color: #fff; }
.single-product .related.products > h2,
.single-product .upsells.products > h2 { font-size: 22px; margin: 8px 0 16px; }

@media (max-width: 900px) {
	.single-product.woocommerce div.product { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 480px) {
	.nt-product-badges { grid-template-columns: 1fr; }
	.nt-product-badges li { flex-direction: row; text-align: left; }
}
@media (max-width: 600px) {
	.single-product.woocommerce div.product div.summary { padding: 20px; }
	.woocommerce div.product .product_title { font-size: 23px; }
	.woocommerce div.product p.price, .woocommerce div.product span.price { font-size: 26px; }
}

/* Tabs mô tả */
.woocommerce div.product .woocommerce-tabs ul.tabs {
	padding: 0;
	margin: 12px 0 0;
	display: flex;
	gap: 6px;
	flex-wrap: wrap;
}
.woocommerce div.product .woocommerce-tabs ul.tabs::before { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li {
	background: var(--nt-bg);
	border: 1px solid var(--nt-line);
	border-radius: 10px 10px 0 0;
	margin: 0;
	padding: 0;
}
.woocommerce div.product .woocommerce-tabs ul.tabs li::before,
.woocommerce div.product .woocommerce-tabs ul.tabs li::after { display: none; }
.woocommerce div.product .woocommerce-tabs ul.tabs li a { color: var(--nt-muted); font-weight: 600; padding: 10px 18px; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active { background: #fff; border-bottom-color: #fff; }
.woocommerce div.product .woocommerce-tabs ul.tabs li.active a { color: var(--nt-primary); }
.woocommerce div.product .woocommerce-tabs .panel {
	border: 1px solid var(--nt-line);
	border-radius: 0 12px 12px 12px;
	padding: 24px;
	margin-top: -1px;
	background: var(--nt-card);
	box-shadow: var(--nt-shadow);
}
.woocommerce div.product .woocommerce-tabs .panel > h2:first-child { font-size: 20px; margin-top: 0; }

/* ==========================================================================
   Giỏ hàng
   ========================================================================== */
.woocommerce table.shop_table {
	border: 1px solid var(--nt-line);
	border-radius: 12px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
}
.woocommerce table.shop_table th { background: var(--nt-bg); font-weight: 600; padding: 14px; }
.woocommerce table.shop_table td { padding: 14px; border-top: 1px solid var(--nt-line); }
.woocommerce table.cart img { width: 56px; border-radius: 8px; }
.woocommerce a.remove {
	color: var(--nt-danger) !important;
	border-radius: 50%;
	font-weight: 700;
}
.woocommerce a.remove:hover { background: var(--nt-danger) !important; color: #fff !important; }

.woocommerce .cart-collaterals .cart_totals,
.woocommerce-cart .cart-collaterals .cart_totals {
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-radius: 12px;
	box-shadow: var(--nt-shadow);
	padding: 20px;
}
.woocommerce .cart_totals h2 { font-size: 18px; margin-top: 0; }
.woocommerce .cart-collaterals .cart_totals table { border: 0; }
.woocommerce .cart-collaterals .cart_totals .order-total .amount { color: var(--nt-primary-dark); font-size: 20px; }

.woocommerce .coupon input.input-text {
	padding: 10px 12px;
	border: 1.5px solid var(--nt-line);
	border-radius: 10px;
	font: inherit;
}

/* ==========================================================================
   Thanh toán
   ========================================================================== */
.woocommerce form .form-row label { font-weight: 600; margin-bottom: 4px; }
.woocommerce form .form-row input.input-text,
.woocommerce form .form-row textarea,
.woocommerce .select2-container--default .select2-selection--single {
	padding: 11px 12px;
	border: 1.5px solid var(--nt-line);
	border-radius: 10px;
	font: inherit;
	min-height: 44px;
	box-shadow: none;
}
.woocommerce form .form-row input.input-text:focus,
.woocommerce form .form-row textarea:focus { outline: none; border-color: var(--nt-primary); }
.woocommerce .select2-container--default .select2-selection--single .select2-selection__rendered { line-height: 22px; padding-left: 0; }

#order_review, .woocommerce-checkout #payment {
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-radius: 12px;
	box-shadow: var(--nt-shadow);
}
.woocommerce-checkout #payment { background: var(--nt-bg); }
.woocommerce-checkout #payment ul.payment_methods { border-bottom: 1px solid var(--nt-line); padding: 16px; }
.woocommerce-checkout #payment div.payment_box { background: #fff; border-radius: 10px; }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: #fff; }
.woocommerce #payment #place_order, .woocommerce-checkout #payment #place_order { width: 100%; padding: 14px; font-size: 16px; margin-top: 8px; }
.woocommerce-checkout .col2-set .col-1,
.woocommerce-checkout .col2-set .col-2 { float: none; width: 100%; }

/* ==========================================================================
   Giỏ hàng + Thanh toán – bố cục 2 cột (nội dung | tóm tắt)
   ========================================================================== */
.nt-flow__title { margin: 0 0 20px; font-size: 28px; line-height: 1.3; }

/* Thanh bước */
.nt-steps-bar {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px 28px;
	font-size: 14px;
	color: var(--nt-muted);
}
.nt-steps-bar li { display: flex; align-items: center; gap: 8px; font-weight: 500; position: relative; }
.nt-steps-bar li + li::before {
	content: "";
	position: absolute;
	left: -22px;
	width: 16px;
	height: 2px;
	background: var(--nt-line);
}
.nt-steps-bar span {
	width: 26px;
	height: 26px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	font-size: 13px;
	font-weight: 700;
	background: #fff;
	border: 1.5px solid var(--nt-line);
}
.nt-steps-bar .is-current { color: var(--nt-ink); font-weight: 600; }
.nt-steps-bar .is-current span { background: var(--nt-primary); border-color: var(--nt-primary); color: #fff; }
.nt-steps-bar .is-done span { background: var(--nt-ok); border-color: var(--nt-ok); color: #fff; }

.nt-flow .woocommerce > .woocommerce-notices-wrapper:empty { display: none; }

/* Khung thẻ dùng chung */
.nt-flow .woocommerce-cart-form,
.nt-flow .cart-collaterals .cart_totals,
.nt-flow #customer_details,
.nt-flow .nt-order-card {
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-radius: var(--nt-radius);
	box-shadow: var(--nt-shadow);
}

/* ---------- Giỏ hàng ---------- */
.woocommerce-cart .nt-flow .woocommerce {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 360px;
	gap: 24px;
	align-items: start;
}
.woocommerce-cart .nt-flow .woocommerce > * { grid-column: 1 / -1; }
.woocommerce-cart .nt-flow .woocommerce > .woocommerce-cart-form { grid-column: 1; }
.woocommerce-cart .nt-flow .woocommerce > .cart-collaterals { grid-column: 2; position: sticky; top: 90px; }
.woocommerce-cart .nt-flow .woocommerce-notices-wrapper .woocommerce-message .button { display: none; }

.nt-flow .woocommerce-cart-form { padding: 6px 22px; overflow: hidden; }
.nt-flow table.shop_table.cart { border: 0; border-radius: 0; margin: 0; }
.nt-flow table.shop_table.cart thead th {
	background: none;
	padding: 16px 8px 12px;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--nt-muted);
}
.nt-flow table.shop_table.cart td { padding: 18px 8px; border-top: 1px solid var(--nt-line); vertical-align: middle; }
.nt-flow table.cart td.product-thumbnail { width: 76px; }
.nt-flow table.cart img { width: 64px; border-radius: 10px; border: 1px solid var(--nt-line); }
.nt-flow table.cart td.product-name a { color: var(--nt-ink); font-weight: 600; text-decoration: none; }
.nt-flow table.cart td.product-name a:hover { color: var(--nt-primary); }
.nt-flow table.cart td.product-price { color: var(--nt-muted); }
.nt-flow table.cart td.product-subtotal { font-weight: 700; color: var(--nt-ink); }
.nt-flow table.cart td.product-remove { width: 36px; }
.nt-flow .woocommerce a.remove {
	width: 28px;
	height: 28px;
	line-height: 26px;
	font-size: 20px;
	background: #fdecec;
}
.nt-flow table.cart .quantity input.qty { width: 70px; padding: 8px; }

/* Hàng mã giảm giá + cập nhật */
.nt-flow table.cart td.actions { padding: 16px 0 14px; }
.nt-flow table.cart td.actions .coupon { display: flex; gap: 8px; align-items: center; float: left; }
.nt-flow table.cart td.actions .coupon label { display: none; }
.nt-flow .woocommerce .coupon input.input-text { width: 180px !important; min-height: 42px; margin: 0; }
.nt-page.nt-flow .woocommerce table.cart td.actions .button { padding: 10px 18px; min-height: 42px; }
.nt-page.nt-flow .woocommerce table.cart button[name="update_cart"] {
	float: right;
	background: #fff;
	color: var(--nt-primary);
	border: 1.5px solid var(--nt-line);
}
.nt-page.nt-flow .woocommerce table.cart button[name="update_cart"]:disabled { opacity: .5; cursor: default; }

/* Tổng giỏ hàng */
.nt-flow .cart-collaterals { width: auto; }
.nt-flow .cart-collaterals .cart_totals { float: none; width: auto; padding: 22px; }
.nt-flow .cart-collaterals .cross-sells { display: none; }
.nt-flow .cart_totals h2 { font-size: 18px; margin: 0 0 12px; }
.nt-flow .cart_totals table.shop_table { border: 0; border-radius: 0; margin: 0 0 16px; }
.nt-flow .cart_totals table.shop_table th,
.nt-flow .cart_totals table.shop_table td {
	background: none;
	padding: 12px 0;
	border-top: 1px solid var(--nt-line);
	font-weight: 500;
}
.nt-flow .cart_totals table.shop_table tr:first-child th,
.nt-flow .cart_totals table.shop_table tr:first-child td { border-top: 0; }
.nt-flow .cart_totals table.shop_table td { text-align: right; }
.nt-flow .cart_totals .order-total th { font-weight: 700; font-size: 16px; }
.nt-flow .cart_totals .order-total .amount { color: var(--nt-primary-dark); font-size: 22px; }
.nt-flow .wc-proceed-to-checkout { padding: 0; }
.nt-page.nt-flow .woocommerce .wc-proceed-to-checkout a.checkout-button {
	display: block;
	width: 100%;
	margin: 0;
	padding: 15px;
	font-size: 17px;
	text-align: center;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(29, 95, 214, .25);
}

/* Giỏ trống */
.nt-flow .cart-empty.woocommerce-info { text-align: center; padding: 28px; font-size: 17px; }
.nt-flow .return-to-shop { text-align: center; }

/* ---------- Thanh toán ---------- */
.nt-flow .woocommerce-form-coupon-toggle .woocommerce-info { margin-bottom: 14px; }
.nt-flow form.checkout_coupon {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	align-items: center;
	margin: 0 0 20px;
	padding: 16px 18px;
	border: 1px dashed var(--nt-line);
	border-radius: 12px;
	background: var(--nt-card);
}
.nt-flow form.checkout_coupon > p:first-child { flex-basis: 100%; margin: 0; color: var(--nt-muted); font-size: 14px; }
.nt-flow form.checkout_coupon .form-row { float: none; width: auto; margin: 0; padding: 0; }
.nt-flow form.checkout_coupon .form-row-first { flex: 1 1 200px; }
.nt-flow form.checkout_coupon .clear { display: none; }

.woocommerce-checkout .nt-flow form.checkout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 400px;
	gap: 0 24px;
	align-items: start;
}
.woocommerce-checkout .nt-flow form.checkout > * { grid-column: 1 / -1; }
.woocommerce-checkout .nt-flow form.checkout > #customer_details { grid-column: 1; grid-row: 2 / span 2; }
.woocommerce-checkout .nt-flow form.checkout > #order_review_heading { grid-column: 2; grid-row: 2; }
.woocommerce-checkout .nt-flow form.checkout > #order_review { grid-column: 2; grid-row: 3; }

/* Thông tin người mua */
.nt-flow #customer_details { padding: 24px 26px 10px; }
.nt-flow #customer_details .col-1,
.nt-flow #customer_details .col-2 { float: none; width: 100%; padding: 0; margin: 0; }
.nt-flow #customer_details .col-2:not(:has(input, select, textarea)) { display: none; }
.nt-flow #customer_details h3 { font-size: 18px; margin: 0 0 16px; }
.nt-flow .woocommerce-billing-fields__field-wrapper { display: grid; gap: 2px; }
.nt-flow form .form-row { padding: 0; margin: 0 0 16px; }
.nt-flow form .form-row label { font-size: 14px; }
.nt-flow form .form-row .required { color: var(--nt-danger); text-decoration: none; }
.nt-flow form .form-row input.input-text { min-height: 48px; background: #fff; }
.nt-flow form .form-row input.input-text:focus { box-shadow: 0 0 0 3px var(--nt-primary-soft); }
.nt-flow form .form-row.woocommerce-invalid input.input-text { border-color: var(--nt-danger); }
.nt-flow .woocommerce-account-fields { margin-top: 4px; }

/* Đơn hàng của bạn = 1 thẻ: tiêu đề + bảng + thanh toán */
.woocommerce-checkout .nt-flow #order_review_heading {
	margin: 0;
	padding: 22px 22px 0;
	font-size: 18px;
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-bottom: 0;
	border-radius: var(--nt-radius) var(--nt-radius) 0 0;
}
.woocommerce-checkout .nt-flow #order_review {
	padding: 10px 22px 22px;
	border-top: 0;
	border-radius: 0 0 var(--nt-radius) var(--nt-radius);
	position: static;
}
.nt-flow #order_review table.shop_table { border: 0; border-radius: 0; margin: 0 0 16px; }
.nt-flow #order_review table.shop_table th,
.nt-flow #order_review table.shop_table td { background: none; padding: 12px 0; border-top: 1px solid var(--nt-line); }
.nt-flow #order_review table.shop_table thead th {
	border-top: 0;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: var(--nt-muted);
}
.nt-flow #order_review table.shop_table td.product-total,
.nt-flow #order_review table.shop_table tfoot td,
.nt-flow #order_review table.shop_table thead th.product-total { text-align: right; }
.nt-flow #order_review .product-quantity { color: var(--nt-muted); font-weight: 500; }
.nt-flow #order_review .order-total th { font-size: 16px; }
.nt-flow #order_review .order-total .amount { color: var(--nt-primary-dark); font-size: 22px; }

.nt-flow .woocommerce-checkout #payment,
.woocommerce-checkout .nt-flow #payment {
	background: var(--nt-bg);
	border: 0;
	border-radius: 12px;
	box-shadow: none;
}
.woocommerce-checkout .nt-flow #payment ul.payment_methods { padding: 14px 16px; }
.woocommerce-checkout .nt-flow #payment ul.payment_methods li { line-height: 1.5; }
.woocommerce-checkout .nt-flow #payment ul.payment_methods li label { font-weight: 600; }
.woocommerce-checkout .nt-flow #payment div.form-row { padding: 14px 16px; margin: 0; }
.woocommerce-checkout .nt-flow .woocommerce-privacy-policy-text { font-size: 13px; color: var(--nt-muted); }
.woocommerce-checkout .nt-flow .woocommerce-privacy-policy-text p { margin: 0 0 12px; }
.nt-page.nt-flow .woocommerce #payment #place_order {
	float: none;
	width: 100%;
	padding: 15px;
	font-size: 17px;
	border-radius: 12px;
	box-shadow: 0 6px 18px rgba(29, 95, 214, .25);
}

@media (max-width: 900px) {
	.woocommerce-cart .nt-flow .woocommerce,
	.woocommerce-checkout .nt-flow form.checkout { grid-template-columns: 1fr; }
	.woocommerce-cart .nt-flow .woocommerce > .woocommerce-cart-form,
	.woocommerce-cart .nt-flow .woocommerce > .cart-collaterals,
	.woocommerce-checkout .nt-flow form.checkout > #customer_details,
	.woocommerce-checkout .nt-flow form.checkout > #order_review_heading,
	.woocommerce-checkout .nt-flow form.checkout > #order_review { grid-column: 1; grid-row: auto; position: static; }
	.woocommerce-checkout .nt-flow form.checkout > #customer_details { margin-bottom: 20px; }
}
@media (max-width: 768px) {
	/* WooCommerce chuyển bảng giỏ thành dạng thẻ trên màn nhỏ */
	.nt-flow .woocommerce-cart-form { padding: 4px 16px; }
	.nt-flow table.shop_table_responsive.cart tr td { padding: 10px 0; border-top: 0; }
	.nt-flow table.shop_table_responsive.cart tr { display: block; border-top: 1px solid var(--nt-line); padding: 8px 0; }
	.nt-flow table.shop_table_responsive.cart tr:first-child { border-top: 0; }
	.nt-flow table.shop_table_responsive tr:nth-child(2n) td,
	.nt-flow .cart_totals table.shop_table tr:nth-child(2n) td { background: none; }
	.nt-flow table.cart td.actions .coupon { float: none; width: 100%; }
	.nt-page.nt-flow .woocommerce table.cart td.actions .coupon .button { flex: 0 0 auto; width: auto; white-space: nowrap; }
	.nt-flow .woocommerce .coupon input.input-text { flex: 1 1 auto; width: 0 !important; min-width: 0; }
	.nt-page.nt-flow .woocommerce table.cart button[name="update_cart"] { float: none; width: 100%; margin-top: 10px; }
	.nt-flow #customer_details { padding: 20px 18px 6px; }
	.nt-flow__title { font-size: 24px; }
	.nt-steps-bar { gap: 8px 14px; font-size: 13px; }
	.nt-steps-bar li + li::before { display: none; }
	.nt-steps-bar span { width: 22px; height: 22px; font-size: 12px; }
}

/* Trang cảm ơn */
.woocommerce ul.order_details {
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-radius: 12px;
	box-shadow: var(--nt-shadow);
	padding: 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 18px;
	margin: 0 0 24px;
}
.woocommerce ul.order_details li { border: 0; padding: 0; text-transform: none; }
.woocommerce ul.order_details li strong { color: var(--nt-primary-dark); font-size: 16px; }
.gcid-thankyou-credits { font-size: 16px; }

/* ==========================================================================
   Trang Tài khoản
   ========================================================================== */
/* Bố cục 2 cột (menu + nội dung) CHỈ khi đã đăng nhập, để không ảnh hưởng trang đăng nhập */
.woocommerce-account.logged-in .woocommerce { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.woocommerce-account.logged-in .woocommerce-MyAccount-navigation { flex: 0 0 220px; }
.woocommerce-account.logged-in .woocommerce-MyAccount-content { flex: 1; min-width: 260px; }

.woocommerce-MyAccount-navigation ul {
	list-style: none;
	margin: 0;
	padding: 0;
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-radius: 12px;
	box-shadow: var(--nt-shadow);
	overflow: hidden;
}
.woocommerce-MyAccount-navigation li { border-bottom: 1px solid var(--nt-line); }
.woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }
.woocommerce-MyAccount-navigation li a {
	display: block;
	padding: 12px 16px;
	color: var(--nt-muted);
	text-decoration: none;
	font-weight: 500;
}
.woocommerce-MyAccount-navigation li a:hover { background: var(--nt-bg); color: var(--nt-primary); }
.woocommerce-MyAccount-navigation li.is-active a { background: var(--nt-primary); color: #fff; }

@media (max-width: 640px) {
	.woocommerce-account.logged-in .woocommerce-MyAccount-navigation { flex-basis: 100%; }
	.woocommerce-MyAccount-navigation li { border-bottom: 0; }
}

/* ==========================================================================
   Đăng nhập / Đăng ký — ép 2 cột bằng flex, chống mọi quy tắc float/flex khác
   ========================================================================== */
.woocommerce #customer_login,
.woocommerce .u-columns.col2-set,
.woocommerce-account:not(.logged-in) .woocommerce > .col2-set {
	display: flex !important;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 24px;
	width: 100%;
}
.woocommerce #customer_login > .col-1,
.woocommerce #customer_login > .col-2,
.woocommerce #customer_login > .u-column1,
.woocommerce #customer_login > .u-column2,
.woocommerce .col2-set > .col-1,
.woocommerce .col2-set > .col-2 {
	flex: 1 1 320px !important;
	float: none !important;
	width: auto !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}
.woocommerce form.login, .woocommerce form.register {
	background: var(--nt-card);
	border: 1px solid var(--nt-line);
	border-radius: 12px;
	box-shadow: var(--nt-shadow);
	padding: 24px;
	margin: 12px 0 0;
}
.woocommerce h2 { font-size: 20px; }
.woocommerce form.login .button, .woocommerce form.register .button { width: 100%; padding: 12px; font-size: 16px; }
.woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 6px; }

@media (max-width: 640px) {
	.woocommerce #customer_login > .col-1,
	.woocommerce #customer_login > .col-2,
	.woocommerce #customer_login > .u-column1,
	.woocommerce #customer_login > .u-column2,
	.woocommerce .col2-set > .col-1,
	.woocommerce .col2-set > .col-2 { flex-basis: 100% !important; }
}

/* Số dư lượt CID (do plugin in ra trong tab Credit Balance) */
.gcid_credit_score {
	background: var(--nt-primary-soft);
	color: var(--nt-primary-dark);
	border-radius: 12px;
	padding: 18px 20px;
	font-size: 18px;
	font-weight: 600;
}

/* ==========================================================================
   Ghi đè dứt điểm menu tài khoản (tránh trùng style cũ) + bảng CID Requests
   ========================================================================== */
.woocommerce-MyAccount-navigation ul { display: block !important; }
.woocommerce-MyAccount-navigation li { display: block; }
.woocommerce-MyAccount-navigation li a { background: none; border-radius: 0; font-size: 15px; }
.woocommerce-MyAccount-navigation li.is-active a { background: var(--nt-primary); color: #fff; border-radius: 0; }

/* Bảng "CID Requests" của plugin (DataTables) */
.woocommerce-MyAccount-content #gcid_user_cid_request_table_wrapper { width: 100%; overflow-x: auto; }
.woocommerce-MyAccount-content table#gcid_user_cid_request_table,
.woocommerce-MyAccount-content table.dataTable {
	width: 100% !important;
	border: 1px solid var(--nt-line);
	border-radius: 12px;
	border-collapse: separate;
	border-spacing: 0;
	overflow: hidden;
	table-layout: fixed;
}
.woocommerce-MyAccount-content table#gcid_user_cid_request_table th,
.woocommerce-MyAccount-content table.dataTable thead th {
	background: var(--nt-bg);
	text-align: left;
	font-weight: 600;
	padding: 12px 14px;
	border-bottom: 1px solid var(--nt-line);
}
.woocommerce-MyAccount-content table#gcid_user_cid_request_table td,
.woocommerce-MyAccount-content table.dataTable td {
	padding: 12px 14px;
	border-top: 1px solid var(--nt-line);
	vertical-align: middle;
	word-break: break-all;      /* IID/CID dài xuống dòng gọn trong ô */
	font-variant-numeric: tabular-nums;
}
/* Chia tỉ lệ cột: IID rộng, CID vừa, Copy/Status hẹp */
.woocommerce-MyAccount-content table#gcid_user_cid_request_table th:nth-child(1) { width: 38%; }
.woocommerce-MyAccount-content table#gcid_user_cid_request_table th:nth-child(2) { width: 30%; }
.woocommerce-MyAccount-content table#gcid_user_cid_request_table th:nth-child(3) { width: 15%; }
.woocommerce-MyAccount-content table#gcid_user_cid_request_table th:nth-child(4) { width: 17%; }
/* Cột Copy + Status không xuống dòng */
.woocommerce-MyAccount-content table#gcid_user_cid_request_table td:nth-child(3),
.woocommerce-MyAccount-content table#gcid_user_cid_request_table td:nth-child(4),
.woocommerce-MyAccount-content table#gcid_user_cid_request_table th:nth-child(3),
.woocommerce-MyAccount-content table#gcid_user_cid_request_table th:nth-child(4) { word-break: normal; white-space: nowrap; }
.woocommerce-MyAccount-content table#gcid_user_cid_request_table .button {
	padding: 6px 16px;
	font-size: 13px;
	border-radius: 8px;
	white-space: nowrap;
	width: auto;
	display: inline-block;
}
/* Ô tìm kiếm của DataTables */
.woocommerce-MyAccount-content .dt-search input,
.woocommerce-MyAccount-content #gcid_user_cid_request_table_filter input {
	padding: 8px 12px;
	border: 1.5px solid var(--nt-line);
	border-radius: 10px;
	font: inherit;
	margin-left: 6px;
}

@media (max-width: 560px) {
	.woocommerce-MyAccount-content table#gcid_user_cid_request_table th:nth-child(1),
	.woocommerce-MyAccount-content table#gcid_user_cid_request_table th:nth-child(2) { width: auto; }
	.woocommerce-MyAccount-content table#gcid_user_cid_request_table,
	.woocommerce-MyAccount-content table.dataTable { table-layout: auto; }
}
