/* Hunonic - Mua ngay modal */
.hn-buynow-btn {
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	user-select: none;
	transition: background-color .2s, color .2s, border-color .2s;
	margin: 0;
	box-sizing: border-box;
	max-width: 100%;
	min-width: 0;
	white-space: nowrap;
}
.hn-buynow-btn i { color: #fbbf24; }

/* Biến thể: solid cam (trang chi tiết, thẻ sản phẩm) */
.hn-bn--solid {
	background: #ff6600;
	border: 1px solid #ff6600;
	color: #fff;
	height: 44px;
	padding: 0 20px;
	font-size: 14px;
	text-transform: uppercase;
	letter-spacing: .5px;
	width: 100%;
}
.hn-bn--solid:hover { background: #e65c00; border-color: #e65c00; color: #fff; }

/* Biến thể: viền xanh nhỏ gọn (lưới sản phẩm) */
.hn-bn--outline {
	background: #fff;
	border: 1px solid #00a651;
	color: #00a651;
	height: 34px;
	padding: 0 12px;
	font-size: 12px;
	border-radius: 9999px;
	width: 100%;
}
.hn-bn--outline i { color: #00a651; }
.hn-bn--outline:hover { background: #eafaf1; border-color: #008d44; color: #008d44; }

/* Biến thể: nhỏ (card trong thẻ <a>, widget) */
.hn-bn--small {
	background: #00a651;
	border: 1px solid #00a651;
	color: #fff;
	height: 32px;
	padding: 0 10px;
	font-size: 12px;
	width: 100%;
}
.hn-bn--small:hover { background: #008d44; border-color: #008d44; color: #fff; }

/* Modal */
.hn-bn-modal[hidden] { display: none; }
.hn-bn-modal {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.hn-bn-overlay {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .6);
	animation: hnBnFade .2s ease;
}
.hn-bn-dialog {
	position: relative;
	width: 100%;
	max-width: 480px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	background: #fff;
	box-shadow: 0 20px 50px rgba(0, 0, 0, .3);
	animation: hnBnPop .22s ease;
	outline: none;
}
@keyframes hnBnFade { from { opacity: 0 } to { opacity: 1 } }
@keyframes hnBnPop { from { opacity: 0; transform: translateY(12px) scale(.97) } to { opacity: 1; transform: none } }

.hn-bn-close {
	position: absolute;
	top: 6px;
	right: 8px;
	width: 32px;
	height: 32px;
	border: 0;
	background: transparent;
	font-size: 26px;
	line-height: 1;
	color: #6b7280;
	cursor: pointer;
	z-index: 2;
	margin: 0;
	padding: 0;
}
.hn-bn-close:hover { color: #111827; }

.hn-bn-body { padding: 20px; }
.hn-bn-loading, .hn-bn-error { padding: 40px 10px; text-align: center; color: #6b7280; font-size: 14px; }

.hn-bn-head { display: flex; gap: 14px; padding-right: 24px; padding-bottom: 14px; border-bottom: 1px solid #e5e7eb; }
.hn-bn-thumb { width: 84px; height: 84px; flex: none; border: 1px solid #e5e7eb; background: #f9fafb; }
.hn-bn-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.hn-bn-name { font-size: 15px; font-weight: 700; color: #111827; line-height: 1.35; margin: 0 0 6px; }
.hn-bn-price { font-size: 18px; font-weight: 700; color: #00a651; }
.hn-bn-price del { color: #9ca3af; font-size: 13px; font-weight: 400; margin-right: 4px; }
.hn-bn-price ins { text-decoration: none; }
.hn-bn-stock { font-size: 12px; color: #6b7280; margin-top: 4px; }

.hn-bn-group { margin-top: 16px; }
.hn-bn-label { font-size: 13px; font-weight: 700; color: #374151; margin-bottom: 8px; }
.hn-bn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.hn-bn-chip {
	min-width: 44px;
	padding: 7px 14px;
	border: 1px solid #d1d5db;
	background: #fff;
	color: #374151;
	font-size: 13px;
	line-height: 1.2;
	cursor: pointer;
	margin: 0;
	transition: all .15s;
}
.hn-bn-chip:hover:not(:disabled) { border-color: #00a651; color: #00a651; }
.hn-bn-chip.is-selected { border-color: #00a651; background: #eafaf1; color: #00a651; font-weight: 700; box-shadow: inset 0 0 0 1px #00a651; }
.hn-bn-chip:disabled { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

.hn-bn-qty-row { display: flex; align-items: center; gap: 12px; margin-top: 18px; }
.hn-bn-qty { display: inline-flex; border: 1px solid #d1d5db; }
.hn-bn-qty button {
	width: 36px; height: 38px; border: 0; background: #f3f4f6; font-size: 18px; line-height: 1;
	cursor: pointer; margin: 0; padding: 0; color: #374151;
}
.hn-bn-qty button:hover { background: #e5e7eb; }
.hn-bn-qty input {
	width: 56px; height: 38px; border: 0; border-left: 1px solid #d1d5db; border-right: 1px solid #d1d5db;
	text-align: center; font-size: 14px; font-weight: 600; margin: 0; padding: 0; box-shadow: none; border-radius: 0;
	-moz-appearance: textfield;
}
.hn-bn-qty input::-webkit-outer-spin-button, .hn-bn-qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.hn-bn-msg { margin-top: 12px; font-size: 13px; color: #dc2626; min-height: 0; }
.hn-bn-actions { margin-top: 16px; }
.hn-bn-submit {
	width: 100%; height: 46px; border: 0; background: #ff6600; color: #fff; font-size: 14px; font-weight: 700;
	text-transform: uppercase; letter-spacing: .5px; cursor: pointer; margin: 0;
	display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.hn-bn-submit:hover:not(:disabled) { background: #e65c00; }
.hn-bn-submit:disabled { background: #d1d5db; cursor: not-allowed; }

body.hn-bn-open { overflow: hidden; }

@media (max-width: 480px) {
	.hn-bn-body { padding: 16px; }
	.hn-bn-thumb { width: 68px; height: 68px; }
}

/* Form thông tin nhận hàng */
.hn-bn-fields { margin-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.hn-bn-fields .hn-bn-label { margin-bottom: 0; }
.hn-bn-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.hn-bn-input {
	width: 100%; margin: 0; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 0;
	font-size: 14px; box-shadow: none; background: #fff; height: auto;
}
.hn-bn-input:focus { border-color: #00a651; outline: none; box-shadow: 0 0 0 1px #00a651; }
textarea.hn-bn-input { resize: vertical; min-height: 70px; }
.hn-bn-note { margin-top: 8px; font-size: 12px; color: #6b7280; text-align: center; }
.hn-bn-done { text-align: center; padding: 20px 4px 4px; }
.hn-bn-done h3 { font-size: 18px; margin: 10px 0 8px; color: #111827; }
.hn-bn-done p { font-size: 14px; color: #4b5563; margin: 0 0 8px; }
.hn-bn-done-icon { width: 56px; height: 56px; margin: 0 auto; border-radius: 50%; background: #00a651; color: #fff; font-size: 30px; line-height: 56px; }
.hn-bn-done .hn-bn-submit { margin-top: 14px; background: #00a651; }
@media (max-width: 480px) { .hn-bn-row2 { grid-template-columns: 1fr; } }

/* Gọn: mỗi tùy chọn (thuộc tính / số lượng) một hàng, nhãn trái - giá trị phải */
.hn-bn-opts { margin-top: 14px; display: flex; flex-direction: column; gap: 10px; }
.hn-bn-opt { display: flex; align-items: center; gap: 12px; }
.hn-bn-opt .hn-bn-label { width: 78px; flex: none; margin: 0; }
.hn-bn-opt .hn-bn-chips { gap: 6px; flex: 1; }
.hn-bn-group { margin-top: 0; }
.hn-bn-chip { min-width: 0; padding: 5px 12px; font-size: 13px; }
.hn-bn-qty-row { margin-top: 0; }
.hn-bn-qty button { width: 30px; height: 32px; font-size: 16px; }
.hn-bn-qty input { width: 46px; height: 32px; font-size: 14px; }
.hn-bn-total {
	display: flex; align-items: baseline; justify-content: space-between;
	margin-top: 14px; padding: 10px 14px; background: #eafaf1; border-left: 3px solid #00a651;
	font-size: 13px; color: #374151;
}
.hn-bn-total strong { font-size: 18px; color: #ff6600; font-weight: 700; text-align: right; }
.hn-bn-fields { margin-top: 14px; }

/* Ô số lượng: bỏ viền/đổ bóng do theme gán cho input */
.hn-bn-qty { border: 1px solid #d1d5db; background: #fff; align-items: stretch; }
.hn-bn-qty input.hn-bn-qty-input {
	width: 46px; max-width: none; height: 32px; margin: 0; padding: 0;
	border: 0 !important; box-shadow: none !important; background: transparent !important;
	text-align: center; font-size: 14px; font-weight: 600;
}
.hn-bn-qty button { border: 0; border-radius: 0; box-shadow: none; }

.hn-bn-chip.is-oos { opacity: .55; text-decoration: line-through; }
.hn-bn-oos { color: #dc2626; font-weight: 700; }

.hn-buynow-oos { display: inline-flex; align-items: center; justify-content: center; width: 100%; box-sizing: border-box; padding: 0 12px; height: 34px; line-height: 32px; border: 1px solid #e5e7eb; border-radius: 9999px; background: #f9fafb; color: #ef4444; font-size: 13px; font-weight: 700; text-align: center; cursor: not-allowed; text-transform: uppercase; letter-spacing: .5px; margin: 0; }
.hn-buynow-oos.hn-bn--outline { border-radius: 9999px; height: 34px; }
.hn-buynow-oos.hn-bn--small { padding: 0 8px; font-size: 12px; height: 32px; border-radius: 4px; }
.hn-buynow-oos.hn-bn--solid { height: 44px; font-size: 14px; border-radius: 0; }
