/* IWC Cabinet Configurator — front end styles
   All colors reference CSS custom properties so the palette can be changed
   from wp-admin → Cabinet Configurator → Settings without touching CSS. */

.iwc-cc-root {
	--iwc-primary: #1f2a24;
	--iwc-accent: #c9a15a;
	--iwc-text: #222222;
	--iwc-bg: #f5f4f2;
	--iwc-panel: #ffffff;
	--iwc-muted: #8a8f8c;

	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--iwc-text);
	background: var(--iwc-bg);
	max-width: 1400px;
	margin: 0 auto;
	box-shadow: 0 0 0 1px rgba(0,0,0,0.06);
	overflow: hidden;
}

.iwc-cc-root * { box-sizing: border-box; }

.iwc-cc-loading { padding: 60px; text-align: center; color: var(--iwc-muted); }

/* ---------- Top Nav ---------- */
.iwc-cc-topnav {
	display: flex;
	align-items: stretch;
	background: var(--iwc-panel);
	border-bottom: 1px solid rgba(0,0,0,0.08);
	flex-wrap: wrap;
}

.iwc-cc-brand-btn,
.iwc-cc-guest-btn {
	background: var(--iwc-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0 22px;
	font-weight: 700;
	letter-spacing: 0.04em;
	font-size: 13px;
	text-transform: uppercase;
	cursor: pointer;
	border: none;
	white-space: nowrap;
}

.iwc-cc-guest-btn { flex-direction: column; gap: 2px; padding: 10px 22px; margin-left: auto; }
.iwc-cc-guest-btn svg { width: 18px; height: 18px; }

.iwc-cc-back-btn {
	background: var(--iwc-primary);
	color: #fff;
	border: none;
	width: 56px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 18px;
}

.iwc-cc-crumbs {
	display: flex;
	align-items: center;
	flex: 1;
	overflow-x: auto;
}

.iwc-cc-crumb {
	padding: 12px 20px;
	text-align: left;
	cursor: default;
	line-height: 1.3;
}

.iwc-cc-crumb.is-clickable { cursor: pointer; }

.iwc-cc-crumb-label {
	font-size: 12px;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--iwc-muted);
	font-weight: 600;
}

.iwc-cc-crumb.is-active .iwc-cc-crumb-label,
.iwc-cc-crumb.is-active .iwc-cc-crumb-value { color: var(--iwc-accent); }

.iwc-cc-crumb-value {
	font-size: 13px;
	color: #444;
	margin-top: 2px;
	white-space: nowrap;
}

/* ---------- Body layout ---------- */
.iwc-cc-body {
	display: flex;
	gap: 24px;
	padding: 28px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.iwc-cc-main { flex: 1 1 620px; min-width: 0; }
.iwc-cc-side { flex: 0 0 320px; }

.iwc-cc-step-head {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	margin-bottom: 26px;
	gap: 16px;
	flex-wrap: wrap;
}

.iwc-cc-step-title { font-size: 22px; font-weight: 700; margin: 0 0 6px; }
.iwc-cc-step-sub { color: var(--iwc-muted); margin: 0; font-size: 14px; }

.iwc-cc-continue {
	background: var(--iwc-accent);
	color: #fff;
	border: none;
	padding: 12px 26px;
	font-weight: 700;
	font-size: 13px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	line-height: 1.35;
	cursor: pointer;
	white-space: nowrap;
}
.iwc-cc-continue small { display: block; font-weight: 400; text-transform: none; opacity: 0.92; font-size: 12px; }
.iwc-cc-continue:hover { filter: brightness(1.08); }
.iwc-cc-continue:disabled { opacity: 0.4; cursor: not-allowed; }

/* ---------- Carousel (Designs / Species) ---------- */
.iwc-cc-carousel { display: flex; align-items: center; gap: 8px; }

.iwc-cc-arrow {
	background: var(--iwc-accent);
	color: #fff;
	border: none;
	width: 44px;
	align-self: stretch;
	min-height: 220px;
	cursor: pointer;
	font-size: 20px;
	flex: 0 0 auto;
}
.iwc-cc-arrow:hover { filter: brightness(1.08); }

.iwc-cc-carousel-track {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: -20px;
	flex: 1;
	overflow: hidden;
	padding: 10px 0;
}

.iwc-cc-card {
	background: #fff;
	border: 1px solid #ddd;
	width: 150px;
	height: 210px;
	flex: 0 0 auto;
	margin: 0 -18px;
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0.55;
	transform: scale(0.86);
	transition: transform .15s ease, opacity .15s ease, box-shadow .15s ease;
	cursor: pointer;
	position: relative;
	overflow: hidden;
}
.iwc-cc-card img { width: 88%; height: 88%; object-fit: contain; }
.iwc-cc-card.is-active {
	width: 210px;
	height: 260px;
	opacity: 1;
	transform: scale(1);
	z-index: 3;
	border-color: var(--iwc-accent);
	box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}
.iwc-cc-card.is-adjacent { opacity: 0.85; transform: scale(0.94); z-index: 2; }

.iwc-cc-card-caption {
	text-align: center;
	margin-top: 14px;
	font-weight: 700;
	font-size: 16px;
	letter-spacing: 0.02em;
}

.iwc-cc-carousel-wrap { text-align: center; }

.iwc-cc-info-dot {
	display: inline-flex;
	width: 22px; height: 22px;
	border: 1.5px solid var(--iwc-accent);
	border-radius: 50%;
	color: var(--iwc-accent);
	align-items: center;
	justify-content: center;
	font-size: 12px;
	font-style: italic;
	font-weight: 700;
	margin-top: 10px;
}

/* ---------- Grid (Stains / Paints) ---------- */
.iwc-cc-search-row {
	display: flex;
	border: 1px solid #ccc;
	background: #fff;
	max-width: 420px;
	margin-left: auto;
}
.iwc-cc-search-row label {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 8px 14px;
	flex: 1;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: #555;
	font-weight: 700;
}
.iwc-cc-search-row input {
	border: none;
	font-size: 14px;
	padding: 2px 0 0;
	outline: none;
	color: #333;
}
.iwc-cc-search-row .iwc-cc-continue { flex: 0 0 auto; }

.iwc-cc-grid-scroll { max-height: 480px; overflow-y: auto; padding-right: 6px; }

.iwc-cc-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px 20px;
}

.iwc-cc-swatch {
	cursor: pointer;
	text-align: center;
}
.iwc-cc-swatch-box {
	width: 100%;
	aspect-ratio: 1 / 1;
	border: 2px solid #ccc;
	overflow: hidden;
	background: #eee;
	display: flex;
	align-items: center;
	justify-content: center;
}
.iwc-cc-swatch-box img { width: 100%; height: 100%; object-fit: cover; }
.iwc-cc-swatch.is-selected .iwc-cc-swatch-box { border-color: var(--iwc-accent); box-shadow: 0 0 0 1px var(--iwc-accent); }
.iwc-cc-swatch-label { margin-top: 8px; font-size: 14px; }

.iwc-cc-swatch-box.iwc-cc-notpainted { background: #fff; }
.iwc-cc-swatch-box.iwc-cc-notpainted svg { width: 46%; height: 46%; opacity: 0.35; }

/* ---------- Right side preview panel ---------- */
.iwc-cc-preview-panel {
	background: var(--iwc-panel);
	border: 1px solid var(--iwc-accent);
	position: sticky;
	top: 20px;
}
.iwc-cc-preview-image {
	aspect-ratio: 3 / 4;
	background: #ddd repeating-conic-gradient(#e5e5e5 0% 25%, #d8d8d8 0% 50%) 0 0/24px 24px;
	overflow: hidden;
	position: relative;
}
.iwc-cc-preview-image img,
.iwc-cc-preview-image .iwc-cc-paint-fill {
	position: absolute;
	inset: 10%;
}
.iwc-cc-preview-image img { width: 80%; height: 80%; object-fit: cover; }
.iwc-cc-preview-image .iwc-cc-paint-fill { border: 10px solid rgba(0,0,0,0.08); }

.iwc-cc-preview-actions { display: flex; }
.iwc-cc-preview-actions button {
	flex: 1;
	background: var(--iwc-accent);
	border: none;
	color: #fff;
	padding: 14px 4px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	font-weight: 700;
	cursor: pointer;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 4px;
	border-right: 1px solid rgba(255,255,255,0.25);
}
.iwc-cc-preview-actions button:last-child { border-right: none; }
.iwc-cc-preview-actions button:hover { filter: brightness(1.08); }
.iwc-cc-preview-actions svg { width: 16px; height: 16px; }

.iwc-cc-toast {
	margin-top: 10px;
	font-size: 12px;
	background: #eef3ee;
	border: 1px solid #cfe0cf;
	color: #33513a;
	padding: 8px 10px;
	display: none;
}
.iwc-cc-toast.is-visible { display: block; }

/* ---------- Preview / Kitchen step ---------- */
.iwc-cc-kitchen-wrap { display: flex; gap: 20px; flex-wrap: wrap; }
.iwc-cc-kitchen-main {
	flex: 1 1 480px;
	min-height: 320px;
	background: #111 center/cover no-repeat;
	position: relative;
	display: flex;
	align-items: flex-end;
}
.iwc-cc-kitchen-back {
	position: absolute;
	top: 12px; left: 12px;
	background: var(--iwc-accent);
	border: none;
	color: #fff;
	width: 40px; height: 40px;
	cursor: pointer;
	font-size: 16px;
}
.iwc-cc-kitchen-side { flex: 0 0 260px; }
.iwc-cc-kitchen-tabs { display: flex; border-bottom: 2px solid #eee; margin-bottom: 16px; gap: 18px; }
.iwc-cc-kitchen-tab {
	padding: 6px 0 10px;
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	font-weight: 700;
	color: var(--iwc-muted);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
}
.iwc-cc-kitchen-tab.is-active { color: var(--iwc-accent); border-color: var(--iwc-accent); }
.iwc-cc-kitchen-thumb {
	border: 2px solid #ddd;
	margin-bottom: 12px;
	cursor: pointer;
	overflow: hidden;
}
.iwc-cc-kitchen-thumb.is-selected { border-color: var(--iwc-accent); }
.iwc-cc-kitchen-thumb img { width: 100%; display: block; aspect-ratio: 16/10; object-fit: cover; }

.iwc-cc-scene {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: flex-end;
	justify-content: center;
	overflow: hidden;
}
.iwc-cc-scene-floor { position: absolute; left: 0; right: 0; bottom: 0; height: 30%; }
.iwc-cc-scene-cab {
	position: absolute;
	bottom: 30%;
	left: 6%;
	right: 6%;
	height: 42%;
	display: flex;
	gap: 2%;
}
.iwc-cc-scene-cab-run { flex: 1; position: relative; border-radius: 2px; box-shadow: inset 0 0 0 3px rgba(0,0,0,0.15); }
.iwc-cc-scene-cab-run::before {
	content: "";
	position: absolute; inset: 10%;
	border: 2px solid rgba(0,0,0,0.18);
}
.iwc-cc-scene-counter {
	position: absolute;
	bottom: 72%;
	left: 4%;
	right: 4%;
	height: 4%;
	border-radius: 1px;
}
.iwc-cc-scene-wall { position: absolute; top: 0; left: 0; right: 0; bottom: 34%; background: #ece9e3; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
	.iwc-cc-body { padding: 16px; }
	.iwc-cc-side { flex-basis: 100%; }
	.iwc-cc-preview-panel { position: static; }
	.iwc-cc-grid { grid-template-columns: repeat(2, 1fr); }
	.iwc-cc-card.is-active { width: 150px; height: 200px; }
	.iwc-cc-arrow { min-height: 180px; }
}
