@keyframes cfgGradientShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

@keyframes cfgGlowPulse {
	0%, 100% { box-shadow: 0 0 0 0 rgba(0, 95, 182, 0.45); }
	50% { box-shadow: 0 0 0 8px rgba(0, 95, 182, 0); }
}

.cfg-ai-box {
	max-width: 1200px;
	margin: 20px auto 0;
	background: linear-gradient(120deg, #001F45 0%, #003A82 35%, #005FB6 70%, #003A82 100%);
	background-size: 300% 300%;
	animation: cfgGradientShift 10s ease infinite;
	border-radius: 14px;
	padding: 28px 30px;
	color: #fff;
	box-shadow: 0 12px 40px rgba(0, 58, 130, 0.35);
	position: relative;
	overflow: hidden;
}

.cfg-ai-box::before {
	content: '';
	position: absolute;
	top: -50%;
	right: -10%;
	width: 300px;
	height: 300px;
	background: radial-gradient(circle, rgba(0, 200, 255, 0.18) 0%, transparent 70%);
	pointer-events: none;
}

@keyframes cfgPulseDot {
	0%, 100% { box-shadow: 0 0 0 0 rgba(46, 213, 115, 0.7); }
	70% { box-shadow: 0 0 0 6px rgba(46, 213, 115, 0); }
}

.cfg-ai-live {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	background: rgba(255, 255, 255, 0.12);
	border: 1px solid rgba(255, 255, 255, 0.25);
	padding: 4px 12px;
	border-radius: 20px;
	font-size: 10.5px;
	font-weight: 800;
	letter-spacing: 0.8px;
	margin-bottom: 12px;
	position: relative;
	z-index: 1;
}

.cfg-pulse-dot {
	width: 7px;
	height: 7px;
	background: #2ed573;
	border-radius: 50%;
	display: inline-block;
	animation: cfgPulseDot 2s infinite;
}

.cfg-ai-box h3 {
	margin: 0 0 6px;
	font-size: 20px;
}

.cfg-ai-sub {
	margin: 0 0 18px;
	opacity: 0.9;
	font-size: 13.5px;
}

.cfg-ai-form {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.cfg-ai-input {
	border: none;
	border-radius: 24px;
	padding: 12px 18px;
	font-size: 14px;
	flex: 1;
	min-width: 160px;
}

.cfg-ai-input-wide {
	flex: 2;
	min-width: 220px;
}

.cfg-ai-btn {
	background: #fff;
	color: #003A82;
	border: none;
	border-radius: 24px;
	padding: 12px 26px;
	font-weight: 700;
	font-size: 14px;
	cursor: pointer;
	white-space: nowrap;
}

.cfg-ai-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

#cfg-ai-result {
	margin-top: 16px;
}

.cfg-ai-loading,
.cfg-ai-error {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	padding: 12px 16px;
	font-size: 13.5px;
}

.cfg-ai-explanation {
	background: rgba(255, 255, 255, 0.15);
	border-radius: 8px;
	padding: 14px 18px;
	font-size: 14px;
	line-height: 1.6;
}

.cfg-ai-applied {
	margin: 10px 0 0;
	font-size: 13px;
	font-weight: 600;
}

#camarade-configurator-root {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px 0 60px;
	font-family: inherit;
}

.cfg-layout {
	display: flex;
	gap: 30px;
	align-items: flex-start;
}

.cfg-steps {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.cfg-step {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	padding: 18px 20px;
	transition: border-color 0.25s, box-shadow 0.25s;
}

.cfg-step-done {
	border-color: #005FB6;
	box-shadow: 0 4px 16px rgba(0, 58, 130, 0.1);
}

.cfg-step-blocked {
	opacity: 0.55;
}

.cfg-step-header {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 12px;
}

.cfg-step-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: linear-gradient(135deg, #003A82, #005FB6);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	flex-shrink: 0;
}

.cfg-step-done .cfg-step-num {
	animation: cfgGlowPulse 2.2s ease-out 1;
}

.cfg-step-title {
	font-size: 16px;
	font-weight: 700;
	flex: 1;
}

.cfg-step-title em {
	font-weight: 400;
	color: #888;
	font-style: normal;
	font-size: 13px;
}

.cfg-change-btn {
	background: none;
	border: 1px solid #003A82;
	color: #003A82;
	border-radius: 20px;
	padding: 5px 14px;
	font-size: 12px;
	cursor: pointer;
}

.cfg-change-btn:hover {
	background: #003A82;
	color: #fff;
}

.cfg-blocked-msg {
	color: #888;
	font-size: 13px;
}

.cfg-step-flex {
	display: flex;
	gap: 18px;
	align-items: flex-start;
}

.cfg-filters-sidebar {
	width: 190px;
	flex-shrink: 0;
}

.cfg-cpu-filters {
	margin-bottom: 14px;
}

.cfg-filter-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-bottom: 8px;
}

.cfg-filter-btn {
	background: #F4F4F4;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	padding: 8px 16px 8px 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	color: #333;
	display: flex;
	align-items: center;
	gap: 7px;
	width: 100%;
	text-align: left;
	box-sizing: border-box;
}

.cfg-brand-icon {
	width: 16px;
	height: 16px;
	object-fit: contain;
	flex-shrink: 0;
}

.cfg-brand-icon-letter {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #003A82;
	color: #fff;
	font-size: 10px;
	font-weight: 800;
}

.cfg-filter-active .cfg-brand-icon-letter {
	background: #fff;
	color: #003A82;
}

.cfg-filter-btn:hover {
	border-color: #003A82;
}

.cfg-filter-active {
	background: linear-gradient(120deg, #003A82, #005FB6);
	border-color: #003A82;
	color: #fff;
	box-shadow: 0 3px 10px rgba(0, 58, 130, 0.35);
}

.cfg-brand-scroll {
	max-height: 220px;
	overflow-y: auto;
	padding-right: 4px;
}

.cfg-sort-row {
	margin-bottom: 10px;
}

.cfg-sort-select {
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	padding: 8px 14px;
	font-size: 13px;
	font-weight: 600;
	color: #333;
	background: #F4F4F4;
	cursor: pointer;
	width: 100%;
	box-sizing: border-box;
}

.cfg-options-grid,
.cfg-options-grid-inner {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
	max-height: 420px;
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 4px;
	flex: 1;
	min-width: 0;
}

.cfg-search-row {
	margin-bottom: 10px;
}

.cfg-search-input {
	width: 100%;
	border: 1px solid #e0e0e0;
	border-radius: 20px;
	padding: 9px 16px;
	font-size: 13px;
	box-sizing: border-box;
}

.cfg-search-input:focus {
	outline: none;
	border-color: #003A82;
}

.cfg-loading,
.cfg-empty {
	color: #888;
	font-size: 13px;
	padding: 10px 0;
}

.cfg-option-card {
	border: 1px solid #eee;
	border-radius: 8px;
	padding: 10px;
	cursor: pointer;
	text-align: center;
	background: #F4F4F4;
	transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
	min-width: 0;
	max-width: 100%;
	overflow: hidden;
	box-sizing: border-box;
}

.cfg-option-card:hover {
	border-color: #005FB6;
	transform: translateY(-3px);
	box-shadow: 0 8px 20px rgba(0, 58, 130, 0.18);
}

.cfg-option-card img {
	width: 100%;
	height: 90px;
	object-fit: contain;
	margin-bottom: 8px;
}

.cfg-option-name {
	font-size: 12.5px;
	line-height: 1.3;
	margin-bottom: 6px;
	min-height: 32px;
	text-align: left;
	overflow-wrap: break-word;
	word-break: break-word;
}

.cfg-option-brand {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 700;
	color: #003A82;
	text-transform: uppercase;
	margin-bottom: 3px;
}

.cfg-option-price {
	font-weight: 700;
	color: #003A82;
	font-size: 13px;
}

.cfg-out-stock {
	color: #c0392b;
	font-size: 11px;
	margin-top: 4px;
}

.cfg-selected-card {
	display: flex;
	align-items: center;
	gap: 14px;
	background: #F4F4F4;
	border-radius: 8px;
	padding: 10px 14px;
	flex-wrap: wrap;
}

.cfg-qty-note {
	font-weight: 400;
	color: #888;
	font-size: 12px;
}

.cfg-qty-stepper {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-left: auto;
}

.cfg-qty-btn {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	border: 1px solid #003A82;
	background: #fff;
	color: #003A82;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	line-height: 1;
}

.cfg-qty-btn:hover {
	background: #003A82;
	color: #fff;
}

.cfg-qty-value {
	min-width: 20px;
	text-align: center;
	font-weight: 700;
}

.cfg-selected-card img {
	width: 60px;
	height: 60px;
	object-fit: contain;
	flex-shrink: 0;
}

.cfg-selected-name {
	font-size: 14px;
	font-weight: 600;
}

.cfg-selected-price {
	color: #003A82;
	font-weight: 700;
	font-size: 14px;
}

.cfg-summary {
	width: 300px;
	flex-shrink: 0;
	position: sticky;
	top: 100px;
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 6px 24px rgba(0, 58, 130, 0.08);
}

.cfg-summary h3 {
	margin: 0 0 14px;
	font-size: 17px;
}

.cfg-progress-track {
	height: 8px;
	background: #eef1f6;
	border-radius: 6px;
	overflow: hidden;
	margin-bottom: 16px;
}

.cfg-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #003A82, #005FB6);
	border-radius: 6px;
	transition: width 0.4s ease;
}

.cfg-progress-label {
	font-size: 11.5px;
	color: #888;
	margin: -10px 0 14px;
	text-align: right;
}

.cfg-summary-row {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	padding: 7px 0;
	border-bottom: 1px solid #f0f0f0;
}

.cfg-summary-label {
	color: #666;
}

.cfg-summary-value {
	font-weight: 600;
}

.cfg-summary-total {
	display: flex;
	justify-content: space-between;
	font-size: 17px;
	font-weight: 800;
	margin: 16px 0;
	color: #003A82;
}

.cfg-add-cart-btn {
	width: 100%;
	background: linear-gradient(120deg, #003A82, #005FB6);
	background-size: 200% auto;
	color: #fff;
	border: none;
	border-radius: 24px;
	padding: 14px;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-position 0.4s, box-shadow 0.25s, transform 0.15s;
	box-shadow: 0 6px 18px rgba(0, 58, 130, 0.3);
}

.cfg-add-cart-btn:not(:disabled):hover {
	background-position: right center;
	box-shadow: 0 8px 22px rgba(0, 58, 130, 0.4);
	transform: translateY(-1px);
}

.cfg-add-cart-btn:disabled {
	background: #ccc;
	cursor: not-allowed;
	box-shadow: none;
}

.cfg-summary-hint {
	font-size: 12px;
	color: #888;
	text-align: center;
	margin-top: 8px;
}

@media (max-width: 900px) {
	.cfg-layout {
		flex-direction: column;
	}
	.cfg-summary {
		width: 100%;
		position: static;
	}
	.cfg-options-grid,
	.cfg-options-grid-inner {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 560px) {
	.cfg-options-grid,
	.cfg-options-grid-inner {
		grid-template-columns: 1fr;
	}
	.cfg-step-flex {
		flex-direction: column;
	}
	.cfg-filters-sidebar {
		width: 100%;
	}
	.cfg-filter-row {
		flex-direction: row;
		flex-wrap: wrap;
	}
}
