/* Nattoint QR Blog — Front-end styles */

/* -------------------- Blog / product grid -------------------- */
.nqb-blog-grid {
	display: grid;
	grid-template-columns: repeat(var(--nqb-columns, 3), 1fr);
	gap: 24px;
	margin: 24px 0;
}
@media (max-width: 900px) {
	.nqb-blog-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}
@media (max-width: 600px) {
	.nqb-blog-grid {
		grid-template-columns: 1fr;
	}
}

.nqb-card-item {
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.nqb-card-item:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
	transform: translateY(-2px);
}

.nqb-card-thumb {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f2f2f2;
}
.nqb-card-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}
.nqb-card-thumb-placeholder {
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #eee, #f7f7f7);
}
.nqb-product-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: #111;
	color: #fff;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 3px 8px;
	border-radius: 4px;
}

.nqb-card-body {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	flex: 1;
}
.nqb-card-title {
	margin: 0;
	font-size: 18px;
	line-height: 1.3;
}
.nqb-card-title a {
	text-decoration: none;
	color: inherit;
}
.nqb-card-excerpt {
	font-size: 14px;
	color: #555;
	flex: 1;
}
.nqb-card-price {
	font-weight: 700;
	font-size: 16px;
	color: #111;
}
.nqb-card-actions {
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.nqb-btn {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	border: 1px solid transparent;
}
.nqb-btn-primary {
	background: #111;
	color: #fff;
}
.nqb-btn-primary:hover {
	background: #333;
	color: #fff;
}
.nqb-btn-outline {
	background: transparent;
	border-color: #111;
	color: #111;
}
.nqb-btn-outline:hover {
	background: #111;
	color: #fff;
}

.nqb-card-qr-toggle {
	margin-top: 6px;
	font-size: 13px;
}
.nqb-card-qr-toggle img {
	margin-top: 8px;
	width: 120px;
	height: 120px;
}

/* -------------------- Single product box -------------------- */
.nqb-single-product-box {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 16px 20px;
	margin-bottom: 24px;
	display: flex;
	align-items: center;
	gap: 16px;
	background: #fafafa;
}
.nqb-single-price {
	font-size: 22px;
	font-weight: 700;
}

/* -------------------- Scanner section -------------------- */
.nqb-scanner-section {
	max-width: 480px;
	margin: 24px auto;
	text-align: center;
}
.nqb-scanner-help {
	color: #555;
	font-size: 14px;
}
.nqb-reader {
	margin: 16px auto;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #ddd;
}
.nqb-reader-status {
	min-height: 20px;
	font-size: 13px;
	color: #555;
}

/* -------------------- Floating scan button -------------------- */
.nqb-floating-btn {
	position: fixed;
	top: 16px;
	z-index: 9999;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 999px;
	padding: 10px 16px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}
.nqb-floating-btn:hover {
	background: #333;
}
.nqb-pos-top-right {
	right: 16px;
}
.nqb-pos-top-left {
	left: 16px;
}
.nqb-floating-icon svg {
	display: block;
}

/* -------------------- Widget trigger button -------------------- */
.nqb-widget-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #111;
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.nqb-widget-btn:hover {
	background: #333;
}

/* -------------------- Shared modal -------------------- */
.nqb-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 10000;
	background: rgba(0, 0, 0, 0.6);
	align-items: center;
	justify-content: center;
	padding: 20px;
}
.nqb-modal.nqb-modal-open {
	display: flex;
}
.nqb-modal-inner {
	background: #fff;
	border-radius: 10px;
	padding: 20px;
	max-width: 420px;
	width: 100%;
	position: relative;
	text-align: center;
}
.nqb-modal-inner h3 {
	margin-top: 0;
}
.nqb-modal-close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: none;
	border: none;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	color: #555;
}
