/* ─── Quote Builder Frontend ─────────────────────────── */

.qb-builder {
	max-width: 900px;
	margin: 0 auto;
	font-family: 'Roboto', -apple-system, BlinkMacSystemFont, sans-serif;
	color: #333;
}

/* Loading */
.qb-loading {
	text-align: center;
	padding: 60px 20px;
	color: #999;
}

.qb-spinner {
	width: 40px;
	height: 40px;
	border: 4px solid #eee;
	border-top-color: #D80621;
	border-radius: 50%;
	margin: 0 auto 15px;
	animation: qbSpin 0.8s linear infinite;
}

.qb-spinner-small {
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 3px solid rgba(255,255,255,0.3);
	border-top-color: #fff;
	border-radius: 50%;
	animation: qbSpin 0.8s linear infinite;
	vertical-align: middle;
}

@keyframes qbSpin {
	to { transform: rotate(360deg); }
}

/* ─── Step Indicator ─────────────────────────────────── */

.qb-steps {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 30px;
	gap: 0;
}

.qb-step {
	display: flex;
	align-items: center;
	gap: 8px;
	opacity: 0.4;
	transition: opacity 0.3s;
}

.qb-step.active,
.qb-step.completed {
	opacity: 1;
}

.qb-step-number {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #ddd;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
	transition: background 0.3s;
}

.qb-step.active .qb-step-number {
	background: #D80621;
}

.qb-step.completed .qb-step-number {
	background: #28a745;
}

.qb-step-label {
	font-weight: 600;
	font-size: 14px;
	color: #555;
}

.qb-step-line {
	width: 40px;
	height: 2px;
	background: #ddd;
	margin: 0 10px;
}

/* ─── Panels ─────────────────────────────────────────── */

.qb-panel {
	background: rgba(255,255,255,0.95);
	backdrop-filter: blur(4px);
	border-radius: 12px;
	padding: 30px;
	box-shadow: 0 2px 20px rgba(0,0,0,0.08);
	border: 1px solid rgba(0,0,0,0.04);
	margin-bottom: 20px;
	animation: qbFadeIn 0.3s ease;
}

@keyframes qbFadeIn {
	from { opacity: 0; transform: translateY(10px); }
	to { opacity: 1; transform: translateY(0); }
}

.qb-panel-title {
	font-family: 'Oswald', sans-serif;
	font-size: 28px;
	color: #1a1a1a;
	margin: 0 0 5px;
	text-transform: uppercase;
}

.qb-panel-subtitle {
	color: #888;
	margin: 0 0 25px;
	font-size: 15px;
}

.qb-section {
	margin-bottom: 25px;
}

.qb-section h3 {
	font-family: 'Oswald', sans-serif;
	font-size: 18px;
	text-transform: uppercase;
	color: #333;
	margin-bottom: 12px;
	padding-bottom: 8px;
	border-bottom: 2px solid #f0f0f0;
}

/* ─── Style Option Cards ─────────────────────────────── */

.qb-option-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 12px;
}

.qb-option-card {
	border: 2px solid #e8e8e8;
	border-radius: 10px;
	padding: 20px 15px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s;
	background: #fafafa;
	position: relative;
}

.qb-option-card:hover {
	border-color: #D80621;
	background: #fff;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(216,6,33,0.15);
}

.qb-option-card.selected {
	border-color: #D80621;
	background: #fff5f6;
	box-shadow: 0 0 0 1px #D80621;
}

.qb-option-card.selected::after {
	content: "\2713";
	position: absolute;
	top: 8px;
	right: 10px;
	background: #D80621;
	color: white;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	font-weight: bold;
}

.qb-option-card .card-icon {
	font-size: 32px;
	margin-bottom: 8px;
}

.qb-option-card .card-name {
	font-weight: 700;
	font-size: 15px;
	color: #333;
}

/* ─── Size Grid ──────────────────────────────────────── */

.qb-size-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
	gap: 10px;
}

.qb-size-card {
	border: 2px solid #e8e8e8;
	border-radius: 8px;
	padding: 12px 8px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s;
	background: #fafafa;
}

.qb-size-card:hover {
	border-color: #D80621;
	background: #fff;
}

.qb-size-card.selected {
	border-color: #D80621;
	background: #fff5f6;
	box-shadow: 0 0 0 1px #D80621;
}

.qb-size-card .size-label {
	font-weight: 700;
	font-size: 16px;
	color: #333;
}

/* ─── Addon Cards ────────────────────────────────────── */

.qb-addon-category {
	margin-bottom: 25px;
}

.qb-addon-category h3 {
	font-family: 'Oswald', sans-serif;
	font-size: 18px;
	text-transform: uppercase;
	color: #333;
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 2px solid #f0f0f0;
}

.qb-addon-category .cat-description {
	color: #888;
	font-size: 13px;
	margin-bottom: 12px;
}

.qb-addon-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px;
}

.qb-addon-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border: 2px solid #e8e8e8;
	border-radius: 8px;
	padding: 14px 16px;
	cursor: pointer;
	transition: all 0.2s;
	background: #fafafa;
	gap: 12px;
}

.qb-addon-item:hover {
	border-color: #D80621;
	background: #fff;
}

.qb-addon-item.selected {
	border-color: #D80621;
	background: #fff5f6;
}

.qb-addon-item .addon-left {
	display: flex;
	align-items: center;
	gap: 12px;
	flex: 1;
}

.qb-addon-item .addon-check {
	width: 22px;
	height: 22px;
	border: 2px solid #ccc;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	transition: all 0.2s;
}

.qb-addon-item.selected .addon-check {
	background: #D80621;
	border-color: #D80621;
	color: white;
}

.qb-addon-item.selected .addon-check::after {
	content: "\2713";
	font-size: 13px;
	font-weight: bold;
	color: white;
}

.qb-addon-item .addon-info {
	flex: 1;
}

.qb-addon-item .addon-name {
	font-weight: 600;
	font-size: 15px;
	color: #333;
}

.qb-addon-item .addon-desc {
	font-size: 13px;
	color: #999;
	margin-top: 2px;
}

.qb-addon-item .addon-price-tag {
	font-weight: 700;
	font-size: 15px;
	color: #D80621;
	white-space: nowrap;
}

.qb-addon-item .addon-price-tag.free {
	color: #28a745;
}

.qb-addon-item .addon-label {
	font-size: 11px;
	color: #888;
	text-transform: uppercase;
}

.qb-popular-badge {
	display: inline-block;
	background: #fff3cd;
	color: #856404;
	font-size: 10px;
	font-weight: 700;
	padding: 2px 6px;
	border-radius: 4px;
	text-transform: uppercase;
	margin-left: 6px;
}

/* Quantity selector for multi-select categories */
.qb-addon-qty {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-left: 10px;
}

.qb-addon-qty button {
	width: 28px;
	height: 28px;
	border: 1px solid #ddd;
	border-radius: 4px;
	background: #fff;
	cursor: pointer;
	font-size: 16px;
	font-weight: bold;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #333;
}

.qb-addon-qty button:hover {
	background: #f0f0f0;
}

.qb-addon-qty .qty-value {
	font-weight: 700;
	min-width: 24px;
	text-align: center;
}

/* ─── Navigation Buttons ─────────────────────────────── */

.qb-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 25px;
	padding-top: 20px;
	border-top: 1px solid #f0f0f0;
}

.qb-btn-next,
.qb-btn-submit {
	background: #D80621;
	color: #fff;
	border: none;
	padding: 14px 28px;
	border-radius: 6px;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.qb-btn-next:hover,
.qb-btn-submit:hover {
	background: #B00518;
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(216,6,33,0.3);
}

.qb-btn-next:disabled,
.qb-btn-submit:disabled {
	background: #ccc;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.qb-btn-prev {
	background: transparent;
	border: 2px solid #ddd;
	padding: 12px 24px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	color: #666;
	transition: all 0.2s;
}

.qb-btn-prev:hover {
	border-color: #999;
	color: #333;
}

.qb-btn-submit {
	width: 100%;
	padding: 16px;
	font-size: 18px;
}

/* ─── Contact Form ───────────────────────────────────── */

.qb-summary-preview {
	background: #f8f9fa;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 25px;
}

.qb-summary-preview h3 {
	font-family: 'Oswald', sans-serif;
	font-size: 18px;
	margin: 0 0 12px;
	text-transform: uppercase;
}

.qb-summary-item {
	display: flex;
	justify-content: space-between;
	padding: 6px 0;
	border-bottom: 1px solid #eee;
	font-size: 14px;
}

.qb-summary-item .item-name {
	color: #555;
}

.qb-summary-item .item-category {
	color: #999;
	font-size: 12px;
}

.qb-summary-item .item-price-hidden {
	color: #D80621;
	font-weight: 600;
	font-style: italic;
}

.qb-contact-gate {
	background: linear-gradient(135deg, #f8f9fa 0%, #fff 100%);
	border: 2px solid #e8e8e8;
	border-radius: 12px;
	padding: 25px;
}

.qb-contact-form {
	max-width: 100%;
}

.qb-form-row {
	display: flex;
	gap: 15px;
	margin-bottom: 15px;
}

.qb-form-row-2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.qb-form-field {
	flex: 1;
}

.qb-form-field label {
	display: block;
	font-weight: 600;
	margin-bottom: 5px;
	font-size: 14px;
	color: #444;
}

.qb-form-field input {
	width: 100%;
	padding: 12px 14px;
	border: 2px solid #e0e0e0;
	border-radius: 6px;
	font-size: 15px;
	transition: border-color 0.2s;
	box-sizing: border-box;
}

.qb-form-field input:focus {
	outline: none;
	border-color: #D80621;
}

.qb-form-field input.error {
	border-color: #dc3545;
}

.qb-terms-box {
	margin: 20px 0 10px;
	padding: 15px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 6px;
}

.qb-checkbox-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	font-size: 13px;
	color: #555;
	line-height: 1.5;
}

.qb-checkbox-label input[type="checkbox"] {
	margin-top: 3px;
	width: 18px;
	height: 18px;
	flex-shrink: 0;
	accent-color: #D80621;
}

.qb-privacy-note {
	text-align: center;
	color: #aaa;
	font-size: 12px;
	margin: 10px 0 20px;
}

/* ─── Result ─────────────────────────────────────────── */

.qb-result-header {
	text-align: center;
	margin-bottom: 25px;
}

.qb-result-header .check-icon {
	width: 64px;
	height: 64px;
	background: #28a745;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto 15px;
	font-size: 32px;
	color: white;
}

.qb-price-reveal {
	background: #fff;
	border: 2px solid #D80621;
	border-radius: 12px;
	overflow: hidden;
	margin-top: 20px;
}

.qb-price-reveal-header {
	background: #D80621;
	color: white;
	padding: 15px 20px;
	font-family: 'Oswald', sans-serif;
	font-size: 20px;
	text-transform: uppercase;
}

.qb-price-reveal-body {
	padding: 20px;
}

.qb-price-line {
	display: flex;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
	font-size: 14px;
}

.qb-price-line .line-name { color: #333; }
.qb-price-line .line-cat { color: #999; font-size: 12px; margin-left: 8px; }
.qb-price-line .line-price { font-weight: 600; color: #333; }
.qb-price-line.free .line-price { color: #28a745; }

.qb-price-totals {
	margin-top: 15px;
	padding-top: 15px;
	border-top: 2px solid #D80621;
}

.qb-price-total-line {
	display: flex;
	justify-content: space-between;
	padding: 4px 0;
	font-size: 15px;
}

.qb-price-total-line.grand-total {
	font-size: 24px;
	color: #D80621;
	font-weight: 800;
	padding: 10px 0;
}

/* ─── Responsive ─────────────────────────────────────── */

@media (max-width: 640px) {
	.qb-panel {
		padding: 20px 15px;
		border-radius: 8px;
	}

	.qb-panel-title {
		font-size: 22px;
	}

	.qb-steps {
		flex-wrap: wrap;
		gap: 5px;
	}

	.qb-step-label {
		display: none;
	}

	.qb-step-line {
		width: 20px;
	}

	.qb-option-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.qb-size-grid {
		grid-template-columns: repeat(3, 1fr);
	}

	.qb-form-row-2 {
		grid-template-columns: 1fr;
	}

	.qb-addon-item {
		flex-wrap: wrap;
	}

	.qb-nav {
		flex-direction: column;
		gap: 10px;
	}

	.qb-btn-prev {
		order: 2;
	}
}
