/* SonWeb Quick Buy - giao diện popup mua nhanh */

:root {
	--swqb-primary: #185FA5;
	--swqb-primary-dark: #0C447C;
	--swqb-primary-light: #E6F1FB;
	--swqb-border: #e3e6ea;
	--swqb-text: #2b2f33;
	--swqb-muted: #6b7177;
	--swqb-radius: 8px;
}

/* ===== Nút Mua ngay ===== */
.swqb-buy-now {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 12px 0;
	padding: 12px 18px;
	background: var(--swqb-primary);
	color: #fff;
	border: none;
	border-radius: var(--swqb-radius);
	cursor: pointer;
	text-align: center;
	line-height: 1.3;
	transition: background .15s ease, transform .05s ease;
}
.swqb-buy-now:hover { background: var(--swqb-primary-dark); }
.swqb-buy-now:active { transform: scale(.99); }
.swqb-buy-now__main {
	display: block;
	font-size: 17px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: .3px;
}
.swqb-buy-now__sub {
	display: block;
	font-size: 12px;
	font-weight: 400;
	opacity: .9;
	margin-top: 2px;
}

/* ===== Overlay & Popup ===== */
.swqb-overlay {
	position: fixed;
	inset: 0;
	background: rgba(18, 30, 45, .55);
	z-index: 999999;
	display: none;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	overflow-y: auto;
}
.swqb-overlay.swqb-open { display: flex; }
body.swqb-no-scroll { overflow: hidden; }

.swqb-popup {
	background: #fff;
	width: 100%;
	max-width: 750px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
	margin: auto;
	animation: swqb-pop .22s ease;
}
@keyframes swqb-pop {
	from { opacity: 0; transform: translateY(-12px); }
	to   { opacity: 1; transform: translateY(0); }
}

.swqb-popup__header {
	background: var(--swqb-primary);
	color: #fff;
	padding: 13px 18px;
	display: flex;
	align-items: center;
	justify-content: space-between;
}
.swqb-popup__title { font-size: 15px; font-weight: 600; }
.swqb-popup__close {
	min-height: 28px !important;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	background: #fff;
	border: none;
	border-radius: 50%;
	color: var(--swqb-primary);
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
	transition: background .15s ease, color .15s ease;
}
.swqb-popup__close:hover { background: var(--swqb-primary-light); color: var(--swqb-primary-dark); }

.swqb-popup__body { display: flex; flex-wrap: wrap; }

.swqb-col { box-sizing: border-box; padding: 16px 18px; }
.swqb-col--left {
	flex: 1 1 240px;
	background: #f7f9fb;
	border-right: 1px solid var(--swqb-border);
}
.swqb-col--right { flex: 1.1 1 250px; }

/* ===== Sản phẩm ===== */
.swqb-prod { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.swqb-prod__img img {
	width: 100px; height: 100px;
	object-fit: cover;
	border-radius: var(--swqb-radius);
	border: 1px solid var(--swqb-border);
}
.swqb-prod__name { display: block; font-size: 14px; font-weight: 600; color: var(--swqb-text); }
.swqb-prod__price { display: block; font-size: 15px; font-weight: 600; color: var(--swqb-primary); margin-top: 2px; }
.swqb-prod__price del { color: var(--swqb-muted); font-weight: 400; font-size: 13px; }
.swqb-prod__price ins { text-decoration: none; }

/* ===== Biến thể ===== */
.swqb-variations {
	background: #fff;
	border: 1px solid var(--swqb-border);
	border-radius: var(--swqb-radius);
	padding: 12px;
	margin-bottom: 12px;
}
.swqb-variation-row { margin-bottom: 8px; }
.swqb-variation-row:last-child { margin-bottom: 0; }
.swqb-variation-label {
	display: block;
	font-size: 12px;
	color: var(--swqb-muted);
	margin-bottom: 4px;
}
.swqb-variation-select {
	width: 100%;
	box-sizing: border-box;
	height: 40px;
	margin: 0;
	padding: 8px 10px;
	border: 1px solid var(--swqb-border);
	border-radius: var(--swqb-radius);
	font-size: 14px;
	line-height: 1.4;
	background-color: #fff;
	text-overflow: ellipsis;
	color: var(--swqb-text);
}

/* ===== Số lượng ===== */
.swqb-qty-row { margin-bottom: 12px; }
.swqb-qty {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--swqb-border);
	border-radius: var(--swqb-radius);
	overflow: hidden;
	background: #fff;
	height: 38px;
}
.swqb-qty__btn {
	width: 38px;
	min-width: 38px;
	height: 100%;
	margin: 0;
	border: none;
	background: #f4f6f8;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	color: var(--swqb-text);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .15s ease, color .15s ease;
	box-shadow: none;
}
.swqb-qty__btn:first-child { border-right: 1px solid var(--swqb-border); }
.swqb-qty__btn:last-child { border-left: 1px solid var(--swqb-border); }
.swqb-qty__btn:hover { background: var(--swqb-primary); color: #fff; }
.swqb-qty__input {
	width: 54px !important;
	min-width: 54px;
	height: 100%;
	margin: 0;
	text-align: center;
	border: none;
	border-radius: 0;
	font-size: 15px;
	font-weight: 600;
	color: var(--swqb-text);
	background: #fff;
	box-sizing: border-box;
	-moz-appearance: textfield;
	appearance: textfield;
}
.swqb-qty__input::-webkit-outer-spin-button,
.swqb-qty__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.swqb-qty__input:focus { outline: none; }

/* ===== Ghi chú ===== */
.swqb-note-box {
	background: var(--swqb-primary-light);
	color: var(--swqb-primary-dark);
	font-size: 12.5px;
	line-height: 1.55;
	padding: 9px 11px;
	border-radius: var(--swqb-radius);
	margin-bottom: 12px;
}
.swqb-note-box p { margin: 0; }

/* ===== Summary ===== */
.swqb-summary-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 13px;
	padding: 8px 11px;
	background: #fff;
	border: 1px solid var(--swqb-border);
	border-radius: var(--swqb-radius);
	margin-bottom: 8px;
	color: var(--swqb-muted);
}
.swqb-summary-row--total {
	background: var(--swqb-primary);
	border-color: var(--swqb-primary);
	color: #fff;
	margin-bottom: 0;
}
.swqb-summary-row--total .swqb-total-amount { font-size: 17px; font-weight: 700; }

.swqb-shipping-methods-box { margin-bottom: 8px; }
.swqb-shipping-methods { list-style: none; margin: 0 0 0; padding: 6px 0 0; }
.swqb-shipping-methods li { font-size: 13px; margin-bottom: 4px; }
.swqb-no-ship { font-size: 12.5px; color: var(--swqb-muted); }

/* ===== Form thông tin ===== */
.swqb-section-label {
	font-size: 13px;
	font-weight: 600;
	color: var(--swqb-muted);
	margin: 0 0 12px;
}
.swqb-field-row { display: flex; gap: 8px; margin-bottom: 10px; }
.swqb-input {
	flex: 1 1 0;
	min-width: 0;
	box-sizing: border-box;
	width: 100%;
	height: auto;
	min-height: 42px;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid var(--swqb-border);
	border-radius: var(--swqb-radius);
	font-size: 14px;
	line-height: 1.4;
	background: #fff;
	color: var(--swqb-text);
	vertical-align: middle;
}
select.swqb-input {
	height: 42px;
	padding-right: 28px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7177' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 11px center;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	text-overflow: ellipsis;
}
.swqb-input:focus {
	outline: none;
	border-color: var(--swqb-primary);
	box-shadow: 0 0 0 3px rgba(24, 95, 165, .12);
}
.swqb-input.swqb-invalid { border-color: #e24b4a; }
.swqb-variation-select.swqb-invalid {
	border-color: #e24b4a;
	color: #e02020;
	background-color: #fff5f5;
	box-shadow: 0 0 0 3px rgba(224, 32, 32, .12);
}
.swqb-textarea { min-height: 60px; height: auto; resize: vertical; line-height: 1.5; }

.swqb-message {
	font-size: 13px;
	margin-bottom: 10px;
	min-height: 0;
}
.swqb-message--error { color: #e02020; font-weight: 700; }

.swqb-submit {
	width: 100%;
	box-sizing: border-box;
	background: var(--swqb-primary);
	color: #fff;
	border: none;
	border-radius: var(--swqb-radius);
	padding: 13px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease;
}
.swqb-submit:hover { background: var(--swqb-primary-dark); }
.swqb-submit:disabled { opacity: .6; cursor: not-allowed; }
.swqb-submit.swqb-loading { opacity: .8; }

/* ===== Thành công ===== */
.swqb-success {
	padding: 28px 24px;
	text-align: center;
	font-size: 15px;
	line-height: 1.6;
	color: var(--swqb-text);
}

/* ===== Responsive ===== */
@media (max-width: 540px) {
	.swqb-col--left { border-right: none; border-bottom: 1px solid var(--swqb-border); }
	.swqb-overlay { padding: 0; align-items: stretch; }
	.swqb-popup { max-width: 100%; border-radius: 0; min-height: 100%; }
	.swqb-field-row { flex-wrap: wrap; }
}
