.ws-wpc-configurator {
	--ws-wpc-bg: #f8f5f1;
	--ws-wpc-surface: #ffffff;
	--ws-wpc-border: #e4ddd4;
	--ws-wpc-accent: #8b5e3c;
	--ws-wpc-accent-soft: #d4b896;
	--ws-wpc-text: #2c241c;
	--ws-wpc-muted: #6f655c;
	--ws-wpc-board: #c9a87c;
	--ws-wpc-board-partial: #e8d4b8;
	--ws-wpc-shadow: 0 12px 40px rgba(44, 36, 28, 0.08);
	--ws-wpc-board-duration: 0.35s;
	box-sizing: border-box;
	width: 100%;
	margin: 1.5rem 0 0;
	padding: 1.5rem;
	border: 1px solid var(--ws-wpc-border);
	border-radius: 16px;
	background: linear-gradient(145deg, var(--ws-wpc-surface) 0%, var(--ws-wpc-bg) 100%);
	box-shadow: var(--ws-wpc-shadow);
	color: var(--ws-wpc-text);
}

.ws-wpc-configurator *,
.ws-wpc-configurator *::before,
.ws-wpc-configurator *::after {
	box-sizing: border-box;
}

.ws-wpc-configurator__title {
	margin: 0 0 0.35rem;
	font-size: 1.35rem;
	font-weight: 700;
	line-height: 1.2;
}

.ws-wpc-configurator__subtitle {
	margin: 0;
	color: var(--ws-wpc-muted);
	font-size: 0.95rem;
}

.ws-wpc-configurator__specs {
	margin: 0.5rem 0 0;
	padding: 0.65rem 0.85rem;
	border-radius: 10px;
	background: rgba(139, 94, 60, 0.08);
	border: 1px solid rgba(139, 94, 60, 0.15);
	color: var(--ws-wpc-text);
	font-size: 0.88rem;
	line-height: 1.45;
}

.ws-wpc-configurator__body {
	display: grid;
	grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
	gap: 1.5rem;
	margin-top: 1.25rem;
	width: 100%;
}

.ws-wpc-configurator__summary-section {
	grid-column: 1 / -1;
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
	padding-top: 1.25rem;
	margin-top: 0.25rem;
	border-top: 1px solid var(--ws-wpc-border);
}

.ws-wpc-preview__frame {
	position: relative;
	padding: 1rem;
	border-radius: 14px;
	background: var(--ws-wpc-surface);
	border: 1px solid var(--ws-wpc-border);
}

.ws-wpc-preview__svg {
	display: block;
	width: 100%;
	height: auto;
}

.ws-wpc-preview__wall {
	fill: #efe8df;
	stroke: var(--ws-wpc-accent-soft);
	stroke-width: 2;
}

.ws-wpc-configurator--no-board-animation .ws-wpc-preview__board,
.ws-wpc-configurator--no-board-animation .ws-wpc-preview__board-group {
	opacity: 1;
	animation: none;
}

.ws-wpc-preview__board {
	stroke: rgba(255, 255, 255, 0.65);
	stroke-width: 0.75;
	opacity: 0;
	transform-origin: center;
	animation: wsWpcBoardIn var(--ws-wpc-board-duration) ease forwards;
}

.ws-wpc-preview__board--partial {
	filter: brightness(1.08);
}

.ws-wpc-preview__board-group {
	opacity: 0;
	transform-origin: center;
	animation: wsWpcBoardIn var(--ws-wpc-board-duration) ease forwards;
}

.ws-wpc-preview__board-textured {
	stroke: rgba(255, 255, 255, 0.82);
	stroke-width: 1;
}

.ws-wpc-preview__board-overlay {
	fill: rgba(255, 255, 255, 0.28);
	pointer-events: none;
}

.ws-wpc-preview__board-group--partial .ws-wpc-preview__board-textured {
	stroke-dasharray: 4 3;
	stroke: rgba(255, 255, 255, 0.95);
}

.ws-wpc-preview__note,
.ws-wpc-preview__texture-note {
	margin: 0.75rem 0 0;
	font-size: 0.8rem;
	color: var(--ws-wpc-muted);
	text-align: center;
	line-height: 1.35;
}

.ws-wpc-preview__texture-note {
	margin-top: 0.35rem;
}

@keyframes wsWpcBoardIn {
	from {
		opacity: 0;
		transform: scale(0.92);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.ws-wpc-configurator__controls {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	min-width: 0;
}

.ws-wpc-field__label {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.45rem;
	font-weight: 600;
	font-size: 0.95rem;
}

.ws-wpc-field__unit {
	color: var(--ws-wpc-muted);
	font-weight: 500;
	font-size: 0.85rem;
}

.ws-wpc-field__row {
	display: grid;
	grid-template-columns: 1fr 88px;
	gap: 0.75rem;
	align-items: center;
}

.ws-wpc-field__range {
	width: 100%;
	accent-color: var(--ws-wpc-accent);
}

.ws-wpc-field__number {
	width: 100%;
	padding: 0.55rem 0.65rem;
	border: 1px solid var(--ws-wpc-border);
	border-radius: 10px;
	background: var(--ws-wpc-surface);
	font-size: 1rem;
	font-weight: 600;
	color: var(--ws-wpc-text);
}

.ws-wpc-field__number:focus,
.ws-wpc-field__range:focus {
	outline: 2px solid var(--ws-wpc-accent-soft);
	outline-offset: 2px;
}

.ws-wpc-summary {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.75rem 1.5rem;
	width: 100%;
	padding: 1.15rem 1.25rem;
	border-radius: 12px;
	background: var(--ws-wpc-surface);
	border: 1px solid var(--ws-wpc-border);
}

.ws-wpc-summary__row {
	display: flex !important;
	flex-direction: row !important;
	justify-content: space-between !important;
	align-items: center !important;
	gap: 1rem;
	width: 100%;
	min-height: auto;
	position: static !important;
	float: none !important;
	font-size: 0.95rem;
	line-height: 1.4;
}

.ws-wpc-summary__row[hidden] {
	display: none !important;
}

.ws-wpc-summary__row span,
.ws-wpc-summary__row [data-ws-wpc-unit-label] {
	flex: 1 1 auto;
	color: var(--ws-wpc-muted);
	font-size: 0.9rem;
}

.ws-wpc-summary__row strong {
	flex: 0 0 auto;
	font-size: 1rem;
	font-weight: 700;
	text-align: right;
	white-space: nowrap;
}

.ws-wpc-summary__row strong .woocommerce-Price-amount {
	color: inherit;
}

.ws-wpc-summary__row--total {
	grid-column: 1 / -1;
	padding-top: 0.85rem;
	margin-top: 0.15rem;
	border-top: 1px dashed var(--ws-wpc-border);
	font-size: 1.05rem;
}

.ws-wpc-summary__row--total span {
	color: var(--ws-wpc-text);
	font-weight: 600;
	font-size: 1rem;
}

.ws-wpc-summary__row--total strong {
	font-size: 1.5rem;
	color: var(--ws-wpc-accent);
}

.ws-wpc-configurator__actions {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 0.75rem;
	width: 100%;
}

.woocommerce div.product form.cart .ws-wpc-add-to-cart,
.ws-wpc-add-to-cart {
	position: static !important;
	float: none !important;
	display: block !important;
	width: 100%;
	margin: 0 !important;
	padding: 0.95rem 1.25rem !important;
	border-radius: 12px !important;
	font-size: 1rem !important;
	font-weight: 700 !important;
	max-width: 100% !important;
	background: var(--ws-wpc-accent) !important;
	border-color: var(--ws-wpc-accent) !important;
	transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.ws-wpc-add-to-cart:not(:disabled):hover {
	transform: translateY(-1px);
	box-shadow: 0 8px 20px rgba(139, 94, 60, 0.25);
}

.ws-wpc-add-to-cart:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.ws-wpc-configurator__help {
	margin: 0;
	font-size: 0.88rem;
	color: var(--ws-wpc-muted);
	line-height: 1.5;
	max-width: 100%;
}

.ws-wpc-configurator__status {
	min-height: 1.25rem;
	margin-top: 0.75rem;
	font-size: 0.9rem;
	color: var(--ws-wpc-muted);
}

.ws-wpc-configurator__status.is-error {
	color: #b42318;
}

.ws-wpc-configurator.is-loading .ws-wpc-add-to-cart {
	opacity: 0.7;
}

.ws-wpc-price-from {
	font-weight: 600;
	color: var(--ws-wpc-accent, #8b5e3c);
}

@media (max-width: 900px) {
	.ws-wpc-configurator__body {
		grid-template-columns: 1fr;
	}

	.ws-wpc-preview__frame {
		min-height: 260px;
	}

	.ws-wpc-configurator__actions {
		max-width: none;
	}
}

@media (max-width: 600px) {
	.ws-wpc-summary {
		grid-template-columns: 1fr;
	}

	.ws-wpc-field__row {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.ws-wpc-configurator {
		padding: 1rem;
	}
}
