/* Mua Hàng Nhanh */

/* ---------- Nút ---------- */
.mhn-wrap {
	clear: both;
	margin: 0 0 1em;
}
.mhn-wrap .mhn-buy-btn {
	display: block;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	min-height: 0;
	margin: 0;
	padding: 10px 15px;
	border: 0;
	border-radius: 4px;
	background: var(--mhn-btn, #2394e8);
	box-shadow: none;
	color: #fff;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.3;
	text-align: center;
	text-transform: none;
	cursor: pointer;
	transition: filter .15s ease;
}
.mhn-wrap .mhn-buy-btn:hover,
.mhn-wrap .mhn-buy-btn:focus {
	color: #fff;
	filter: brightness(1.08);
}
.mhn-buy-btn strong {
	display: block;
	font-size: 18px;
	font-weight: 700;
	text-transform: uppercase;
}
.mhn-buy-btn span {
	display: block;
	margin-top: 2px;
	font-size: 13px;
}
.mhn-wrap .mhn-buy-btn.mhn-disabled {
	background: #9e9e9e;
	cursor: not-allowed;
	filter: none;
}
.mhn-loop .mhn-buy-btn {
	padding: 7px 10px;
}
.mhn-loop .mhn-buy-btn strong {
	font-size: 13px;
}
.mhn-loop .mhn-buy-btn span {
	display: none;
}

/* ---------- Popup ---------- */
html.mhn-lock,
html.mhn-lock body {
	overflow: hidden;
}
.mhn-popup {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	box-sizing: border-box;
}
.mhn-popup[hidden] {
	display: none;
}
.mhn-popup *,
.mhn-popup *::before,
.mhn-popup *::after {
	box-sizing: border-box;
}
.mhn-overlay {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: rgba(0, 0, 0, .6);
}
.mhn-dialog {
	position: relative;
	width: 100%;
	max-width: 760px;
	max-height: calc(100vh - 32px);
	overflow: auto;
	border-radius: 6px;
	background: #fff;
	box-shadow: 0 10px 40px rgba(0, 0, 0, .3);
	color: #333;
	font-size: 14px;
	line-height: 1.45;
	text-align: left;
	outline: none;
}
.mhn-header {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	background: var(--mhn-main, #fea600);
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
}
.mhn-popup .mhn-close {
	flex: none;
	width: 28px;
	height: 28px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 2px solid #fff;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 20px;
	line-height: 22px;
	cursor: pointer;
}
.mhn-body {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	padding: 16px;
}

/* Cột sản phẩm */
.mhn-product {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 8px;
}
.mhn-product img {
	flex: none;
	width: 80px;
	height: 80px;
	margin: 0;
	border-radius: 4px;
	object-fit: cover;
}
.mhn-product-name {
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}
.mhn-product-price {
	margin-top: 4px;
	color: #d0021b;
	font-weight: 600;
}
.mhn-product-price del {
	color: #999;
	font-weight: 400;
}
.mhn-attr {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid #eee;
}
.mhn-attr label {
	flex: 0 0 40%;
	margin: 0;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
}
.mhn-attr-select {
	flex: 1;
	min-width: 0;
}
.mhn-qty {
	display: inline-flex;
	align-items: stretch;
	margin: 12px 0 0;
	border: 1px solid #ccc;
	border-radius: 3px;
	overflow: hidden;
}
.mhn-popup .mhn-qty button {
	width: 34px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: #f3f3f3;
	color: #333;
	font-size: 16px;
	line-height: 34px;
	cursor: pointer;
}
.mhn-popup .mhn-qty input {
	width: 52px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-align: center;
	-moz-appearance: textfield;
}
.mhn-qty input::-webkit-outer-spin-button,
.mhn-qty input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}
.mhn-stock {
	margin: 8px 0 0;
	color: #c62828;
	font-size: 13px;
}
.mhn-intro {
	margin: 12px 0 0;
	color: #555;
	font-size: 13px;
}

/* Cột thông tin khách */
.mhn-heading {
	margin-bottom: 8px;
	font-size: 16px;
	font-weight: 700;
}
.mhn-gender {
	display: flex;
	gap: 24px;
	margin-bottom: 8px;
}
.mhn-gender label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}
.mhn-gender input {
	margin: 0;
}
.mhn-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 8px;
}
.mhn-field {
	margin-bottom: 8px;
}
.mhn-popup select,
.mhn-popup input[type="text"],
.mhn-popup input[type="tel"],
.mhn-popup input[type="email"],
.mhn-popup textarea {
	display: block;
	width: 100%;
	height: 38px;
	margin: 0;
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 3px;
	background-color: #fff;
	box-shadow: none;
	color: #333;
	font-family: inherit;
	font-size: 14px;
}
.mhn-popup textarea {
	height: auto;
	min-height: 58px;
	resize: vertical;
}
.mhn-popup .mhn-invalid {
	border-color: #e53935;
	box-shadow: 0 0 0 1px #e53935;
}
.mhn-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}
.mhn-total {
	margin: 4px 0 10px;
	font-size: 15px;
}
.mhn-total strong {
	color: #d0021b;
	font-size: 17px;
}
.mhn-message {
	display: none;
	margin-bottom: 10px;
	padding: 8px 10px;
	border-radius: 3px;
	background: #fdecea;
	color: #b71c1c;
	font-size: 13px;
	white-space: pre-line;
}
.mhn-message.is-visible {
	display: block;
}
.mhn-popup .mhn-submit {
	display: block;
	width: 100%;
	min-height: 0;
	margin: 0;
	padding: 12px;
	border: 0;
	border-radius: 3px;
	background: var(--mhn-main, #fea600);
	color: #fff;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
	cursor: pointer;
}
.mhn-popup .mhn-submit:hover {
	filter: brightness(1.05);
}
.mhn-popup .mhn-submit[disabled] {
	opacity: .65;
	cursor: not-allowed;
}
.mhn-success {
	padding: 24px 20px;
}
/* Theme như Flatsome tô nền cho .success / .error - không áp vào nội dung thông báo. */
.mhn-success .success,
.mhn-success .error,
.mhn-success .alert {
	background-color: transparent;
}

@media (max-width: 640px) {
	.mhn-popup {
		align-items: stretch;
		padding: 0;
	}
	.mhn-dialog {
		max-width: none;
		max-height: none;
		height: 100%;
		border-radius: 0;
	}
	.mhn-header {
		font-size: 14px;
	}
	.mhn-body {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	.mhn-popup select,
	.mhn-popup input[type="text"],
	.mhn-popup input[type="tel"],
	.mhn-popup input[type="email"],
	.mhn-popup textarea {
		font-size: 16px; /* tránh iOS tự phóng to khi gõ */
	}
}
