/* quick-order-front.css — v0.0.3 */

/* ── Wrappers ──────────────────────────────────────────────── */
.qo-catalog,
.qo-product {
	width: 100%;
}

/* ── Category filter ───────────────────────────────────────── */
.qo-cat-filter {
	display: flex;
	align-items: stretch;
	margin-bottom: 24px;
	background: #f8f8f8;
	border: 1px solid #e5e5e5;
	border-radius: 3px;
	overflow: hidden;
}

.qo-cat-filter-left {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 16px;
	background: #eaeaea;
	border-right: 1px solid #d8d8d8;
	flex-shrink: 0;
}

.qo-cat-filter-label {
	font-size: 11px;
	font-weight: 700;
	color: #2b3840;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
}

.qo-cat-filter-actions {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.qo-cat-toggle-btn {
	background: #2b3840;
	border: none;
	color: #fff;
	font-size: 12px;
	font-weight: 600;
	padding: 4px 0;
	cursor: pointer;
	border-radius: 2px;
	line-height: 1.6;
	width: 52px;
	text-align: center;
}

.qo-cat-toggle-btn:hover {
	background: #c31f27;
}

.qo-cat-filter-checks {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 20px;
	padding: 12px 16px;
}

.qo-cat-check {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	font-size: 13px;
	color: #444;
	cursor: pointer;
	white-space: nowrap;
}

.qo-cat-check input[type="checkbox"] {
	cursor: pointer;
	accent-color: #c31f27;
	width: 14px;
	height: 14px;
	flex-shrink: 0;
}

/* ── Category heading ──────────────────────────────────────── */
.qo-category-title {
	margin: 28px 0 12px;
	font-size: 20px;
	font-weight: 700;
	color: #2b3840;
	border-bottom: 2px solid #e0e0e0;
	padding-bottom: 6px;
}

.qo-category-title:first-child {
	margin-top: 0;
}

/* ── Group (parent SKU block) ──────────────────────────────── */
.qo-group {
	margin-bottom: 20px;
}

.qo-group-header {
	display: flex;
	align-items: baseline;
	gap: 8px;
	margin-bottom: 6px;
	font-size: 15px;
	line-height: 1.3;
}

.qo-group-sku {
	font-weight: 700;
	color: #2b3840;
}

.qo-group-sep {
	color: #999;
}

.qo-group-title {
	color: #444;
}

/* ── Table ─────────────────────────────────────────────────── */
.qo-table {
	width: 100%;
	border-collapse: collapse;
	border: none;
	margin-bottom: 8px;
}

.qo-table th,
.qo-table td {
	padding: 8px 10px;
	vertical-align: middle;
	font-size: 14px;
	line-height: 1.2;
	border-left: none !important;
	border-right: none !important;
	border-top: none !important;
}

.qo-table thead th {
	color: #426a84;
	font-weight: 600;
}

.qo-table tbody tr:not(:last-child) td {
	border-bottom: 1px solid #dddddd !important;
}

.qo-table tbody tr:last-child td {
	border-bottom: none !important;
}

/* ── Column alignment ──────────────────────────────────────── */
.qo-col-sku {
	text-align: center;
	white-space: nowrap;
}

.qo-col-title {
	text-align: left;
}

.qo-col-attr {
	text-align: center;
}

.qo-col-price {
	text-align: right;
	white-space: nowrap;
	position: relative;
}

.qo-col-qty {
	text-align: center;
	white-space: nowrap;
}

.qo-col-subtotal {
	text-align: right;
	white-space: nowrap;
	min-width: 72px;
}

/* ── Qty controls ──────────────────────────────────────────── */
.qo-qty-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.qo-qty-input {
	width: 72px;
	min-width: 72px;
	max-width: 72px;
	box-sizing: border-box;
	text-align: center;
	flex: 0 0 auto;
	margin: 0;
	font-size: 14px;
	background-color: #f7f6fb;
}

.qo-qty-btn {
	background-color: #c31f27;
	color: #fff;
	border: none;
	cursor: pointer;
	padding: 4px 10px;
	font-size: 16px;
	line-height: 1.4;
	border-radius: 2px;
}

.qo-qty-btn:hover {
	background-color: #2b3840;
}

.qo-qty-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ── PBQ tooltip icon ──────────────────────────────────────── */
.qo-pbq-icon {
	display: inline-block;
	margin-left: 5px;
	color: #426a84;
	cursor: help;
	font-size: 13px;
	vertical-align: middle;
	position: relative;
}

.qo-pbq-tooltip {
	display: none;
	position: absolute;
	right: 0;
	top: calc(100% + 4px);
	z-index: 200;
	background: #fff;
	border: 1px solid #ddd;
	box-shadow: 0 2px 8px rgba(0,0,0,0.15);
	padding: 10px 12px;
	min-width: 180px;
	text-align: left;
	font-size: 13px;
	white-space: nowrap;
}

.qo-pbq-icon.qo-pbq-open + .qo-pbq-tooltip,
.qo-pbq-tooltip:hover {
	display: block;
}

.qo-pbq-tooltip table {
	width: 100%;
	border-collapse: collapse;
}

.qo-pbq-tooltip th,
.qo-pbq-tooltip td {
	padding: 3px 6px;
	border-bottom: 1px solid #eee;
	font-size: 12px;
}

.qo-pbq-tooltip thead th {
	color: #426a84;
	font-weight: 600;
}

/* ── Summary bar ───────────────────────────────────────────── */
.qo-summary {
	margin-top: 16px;
}

.qo-grand-total {
	display: flex;
	justify-content: flex-end;
	align-items: baseline;
	gap: 8px;
	font-size: 16px;
	line-height: 1.2;
	margin-bottom: 12px;
	padding-right: 10px;
}

.qo-grand-label {
	font-weight: 700;
}

/* ── Submit button ─────────────────────────────────────────── */
.qo-submit-wrap {
	text-align: center;
}

.qo-submit.single_add_to_cart_button.button.alt {
	font-size: 32px;
	font-weight: 600;
	text-transform: uppercase;
	line-height: 47px;
	padding: 12px 62px 13px;
	width: 100%;
	max-width: 900px;
	display: block;
	margin: 0 auto;
}

/* ── Overlay ───────────────────────────────────────────────── */
.qo-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 9999;
}

.qo-overlay-inner {
	background: #ffffff;
	padding: 20px 24px;
	border-top: 8px solid #c31e2c;
	border-radius: 0;
	text-align: center;
	min-width: 320px;
	max-width: 820px;
	width: calc(100% - 40px);
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.qo-overlay-spinner {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 3px solid #cccccc;
	border-top-color: #333333;
	animation: qo-spin 0.8s linear infinite;
	margin: 0 auto 10px;
}

@keyframes qo-spin {
	to { transform: rotate(360deg); }
}

.qo-overlay-heading {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 12px;
}

.qo-overlay-items {
	text-align: left;
}

.qo-overlay-table {
	width: 100%;
	border-collapse: collapse;
	border: none;
	font-size: 13px;
}

.qo-overlay-table th,
.qo-overlay-table td {
	padding: 6px 8px;
	border-left: none !important;
	border-right: none !important;
	border-top: none !important;
	vertical-align: middle;
}

.qo-overlay-table thead th {
	color: #426a84;
}

.qo-overlay-table tbody tr:not(:last-child) td {
	border-bottom: 1px solid #eeeeee !important;
}

.qo-overlay-note {
	margin-top: 12px;
	font-size: 12px;
	color: #555555;
	text-align: center;
}

/* ── Mobile ────────────────────────────────────────────────── */
@media only screen and (max-width: 767px) {
	.qo-col-subtotal,
	.qo-table thead th:last-child {
		display: none !important;
		width: 0 !important;
		padding: 0 !important;
	}

	.qo-submit.single_add_to_cart_button.button.alt {
		font-size: 22px;
		line-height: 30px;
		padding: 14px 20px;
	}
}
