/*
 * PC Builder - Frontend
 * Reuses WoodMart --wd- tokens with safe fallbacks so the plugin renders well
 * on any theme. Token-first; no !important; no new breakpoints (only 1200/1024/768/576).
 */

.pcb-app {
	--pcb-bg:            var(--wd-bg-color, #f7f8fa);
	--pcb-surface:       var(--wd-entry-color, #ffffff);
	--pcb-surface-alt:   var(--wd-bg-color-alt, #f1f3f6);
	--pcb-border:        var(--wd-brd-color, #e4e7ec);
	--pcb-text:          var(--wd-text-color, #1f2430);
	--pcb-text-soft:     var(--wd-text-color-light, #6b7280);
	--pcb-title:         var(--wd-title-color, #0c111d);
	--pcb-primary:       var(--wd-primary-color, #0a84ff);
	--pcb-primary-ink:   #ffffff;
	--pcb-accent:        var(--wd-alternative-color, #ff5e3a);
	--pcb-success:       #10b981;
	--pcb-warn:          #d97706;
	--pcb-danger:        #dc2626;
	--pcb-radius:        var(--wd-brd-radius, 14px);
	--pcb-radius-sm:     8px;
	--pcb-shadow:        0 1px 2px rgba(15, 23, 42, .04), 0 4px 12px rgba(15, 23, 42, .04);
	--pcb-shadow-lift:   0 6px 24px rgba(15, 23, 42, .10);
	--pcb-gap:           20px;
	--pcb-gap-sm:        12px;
	--pcb-font:          inherit;

	color: var(--pcb-text);
	font-family: var(--pcb-font);
	line-height: 1.55;
}

.pcb-app * { box-sizing: border-box; }

/* ---------------- Hero ---------------- */

.pcb-app__hero {
	background: linear-gradient(160deg, var(--pcb-primary), color-mix(in srgb, var(--pcb-primary) 70%, #000 30%));
	color: var(--pcb-primary-ink);
	border-radius: var(--pcb-radius);
	padding: 40px clamp(20px, 4vw, 56px);
	margin-bottom: 28px;
	position: relative;
	overflow: hidden;
}
.pcb-app__hero::after {
	content: "";
	position: absolute;
	inset: auto -10% -50% auto;
	width: 360px;
	height: 360px;
	background: radial-gradient(circle, rgba(255,255,255,.12), transparent 60%);
	pointer-events: none;
}
.pcb-app__hero-inner { position: relative; max-width: 720px; }
.pcb-app__eyebrow {
	font-size: 13px;
	letter-spacing: .14em;
	text-transform: uppercase;
	opacity: .85;
	margin: 0 0 8px;
	font-weight: 600;
}
.pcb-app__title {
	font-size: clamp(28px, 4vw, 46px);
	line-height: 1.1;
	margin: 0 0 10px;
	color: inherit;
	letter-spacing: -0.01em;
	font-weight: 700;
}
.pcb-app__lede { font-size: clamp(16px, 1.4vw, 18px); margin: 0; opacity: .9; }

/* ---------------- Stepper (grid of icon tiles) ---------------- */

.pcb-stepper {
	background: var(--pcb-surface);
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius);
	padding: 18px;
	margin-bottom: 24px;
	box-shadow: var(--pcb-shadow);
}
.pcb-stepper__progress {
	height: 4px;
	background: var(--pcb-surface-alt);
	border-radius: 999px;
	overflow: hidden;
	margin-bottom: 16px;
}
.pcb-stepper__bar {
	height: 100%;
	width: calc(var(--pcb-progress, 0) * 1%);
	background: linear-gradient(90deg, var(--pcb-primary), var(--pcb-accent));
	transition: width .35s ease;
}
.pcb-stepper__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(6, minmax(0, 1fr));
	gap: 10px;
}
@media (max-width: 1200px) {
	.pcb-stepper__grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}
@media (max-width: 1024px) {
	.pcb-stepper__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
	.pcb-stepper__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
}
@media (max-width: 576px) {
	.pcb-stepper__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.pcb-stepper__item { margin: 0; padding: 0; }
.pcb-stepper__tile {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	width: 100%;
	min-height: 104px;
	padding: 14px 10px 12px;
	background: var(--pcb-surface-alt);
	border: 1.5px solid transparent;
	border-radius: var(--pcb-radius-sm);
	color: var(--pcb-text-soft);
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
	text-align: center;
}
.pcb-stepper__tile:hover {
	background: color-mix(in srgb, var(--pcb-primary) 6%, var(--pcb-surface));
	color: var(--pcb-title);
	transform: translateY(-1px);
}
.pcb-stepper__tile:focus-visible {
	outline: 2px solid var(--pcb-primary);
	outline-offset: 2px;
}
.pcb-stepper__index {
	position: absolute;
	top: 8px;
	left: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: var(--pcb-surface);
	border: 1px solid var(--pcb-border);
	border-radius: 50%;
	font-size: 11px;
	font-weight: 700;
	color: var(--pcb-text-soft);
	line-height: 1;
}
.pcb-stepper__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin-top: 6px;
	color: currentColor;
	opacity: .9;
}
.pcb-stepper__icon svg { width: 100%; height: 100%; }
.pcb-stepper__label {
	font-size: 12px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: .01em;
	color: inherit;
	max-width: 100%;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.pcb-stepper__chip {
	font-size: 9px;
	font-weight: 700;
	background: var(--pcb-surface);
	color: var(--pcb-text-soft);
	border: 1px solid var(--pcb-border);
	padding: 1px 5px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: .06em;
}
.pcb-stepper__pick {
	display: none;
	font-size: 11px;
	font-weight: 600;
	color: var(--pcb-primary);
	white-space: nowrap;
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 2px 6px;
	background: var(--pcb-surface);
	border-radius: 4px;
	border: 1px solid color-mix(in srgb, var(--pcb-primary) 30%, var(--pcb-border));
}
.pcb-stepper__item.is-complete .pcb-stepper__pick:not(:empty) { display: inline-block; }

/* Active state */
.pcb-stepper__item.is-active .pcb-stepper__tile {
	background: var(--pcb-primary);
	border-color: var(--pcb-primary);
	color: var(--pcb-primary-ink);
}
.pcb-stepper__item.is-active .pcb-stepper__index {
	background: rgba(255,255,255,.22);
	border-color: rgba(255,255,255,.4);
	color: var(--pcb-primary-ink);
}
.pcb-stepper__item.is-active .pcb-stepper__chip {
	background: rgba(255,255,255,.22);
	color: var(--pcb-primary-ink);
	border-color: rgba(255,255,255,.35);
}
.pcb-stepper__item.is-active .pcb-stepper__icon { opacity: 1; }

/* Complete state */
.pcb-stepper__item.is-complete .pcb-stepper__tile {
	background: color-mix(in srgb, var(--pcb-primary) 8%, var(--pcb-surface));
	border-color: color-mix(in srgb, var(--pcb-primary) 30%, transparent);
	color: var(--pcb-title);
}
.pcb-stepper__item.is-complete .pcb-stepper__index {
	background: var(--pcb-primary);
	border-color: var(--pcb-primary);
	color: var(--pcb-primary-ink);
	font-size: 0;
}
.pcb-stepper__item.is-complete .pcb-stepper__index::after {
	content: "✓";
	font-size: 13px;
	font-weight: 700;
}
.pcb-stepper__item.is-complete .pcb-stepper__icon { color: var(--pcb-primary); }

/* Active + complete (just landed via "Change") shows active styling. */
.pcb-stepper__item.is-active.is-complete .pcb-stepper__tile {
	background: var(--pcb-primary);
	color: var(--pcb-primary-ink);
}
.pcb-stepper__item.is-active.is-complete .pcb-stepper__icon { color: var(--pcb-primary-ink); }

/* ---------------- Layout ---------------- */

.pcb-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 340px;
	gap: 24px;
	align-items: start;
}

@media (max-width: 1024px) {
	.pcb-layout { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- Step section ---------------- */

.pcb-step {
	background: var(--pcb-surface);
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius);
	padding: clamp(18px, 2.4vw, 28px);
	box-shadow: var(--pcb-shadow);
}
/* High-specificity hidden rules — some themes (WoodMart) override [hidden] with display:block. */
.pcb-app .pcb-step[hidden],
.pcb-app .pcb-modal[hidden],
.pcb-app .pcb-toast[hidden],
.pcb-app .pcb-load-more[hidden],
.pcb-app [hidden] {
	display: none;
}
.pcb-step__header {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 16px;
	margin-bottom: 20px;
	flex-wrap: wrap;
}
.pcb-step__title {
	margin: 0 0 4px;
	font-size: clamp(20px, 2vw, 26px);
	line-height: 1.2;
	color: var(--pcb-title);
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}
.pcb-step__index {
	font-size: 12px;
	font-weight: 600;
	color: var(--pcb-primary);
	background: color-mix(in srgb, var(--pcb-primary) 10%, transparent);
	padding: 4px 10px;
	border-radius: 999px;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.pcb-step__optional {
	font-size: 12px;
	background: var(--pcb-surface-alt);
	color: var(--pcb-text-soft);
	padding: 3px 8px;
	border-radius: 4px;
	text-transform: uppercase;
	letter-spacing: .04em;
	font-weight: 600;
}
.pcb-step__help { margin: 0; color: var(--pcb-text-soft); }

.pcb-step__toolbar { display: flex; gap: 10px; }

.pcb-search { position: relative; display: inline-flex; }
.pcb-search__input {
	min-height: 44px;
	padding: 10px 12px 10px 38px;
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius-sm);
	font-size: 15px;
	width: 220px;
	max-width: 100%;
	background: var(--pcb-surface);
	color: var(--pcb-text);
}
.pcb-search__input:focus-visible {
	outline: 2px solid var(--pcb-primary);
	outline-offset: 1px;
	border-color: var(--pcb-primary);
}
.pcb-search__icon {
	position: absolute;
	left: 12px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--pcb-text-soft);
}

/* ---------------- Product grid ---------------- */

.pcb-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--pcb-gap);
}
@media (max-width: 768px) {
	.pcb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pcb-gap-sm); }
}
@media (max-width: 576px) {
	.pcb-grid { grid-template-columns: 1fr; }
}

.pcb-card {
	display: flex;
	flex-direction: column;
	background: var(--pcb-surface);
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius);
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
	position: relative;
}
.pcb-card:hover:not(.is-incompatible) { transform: translateY(-2px); box-shadow: var(--pcb-shadow-lift); }
.pcb-card.is-selected {
	border-color: var(--pcb-primary);
	box-shadow: 0 0 0 2px color-mix(in srgb, var(--pcb-primary) 30%, transparent), var(--pcb-shadow-lift);
}
.pcb-card.is-incompatible { opacity: .65; }
.pcb-card.is-incompatible .pcb-card__media {
	filter: grayscale( 1 );
}
.pcb-card__incompat-note {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--pcb-danger);
	line-height: 1.3;
}

.pcb-card__media {
	position: relative;
	aspect-ratio: 1 / 1;
	background: var(--pcb-surface-alt);
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}
.pcb-card__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* No-image placeholder: short, themed, obviously a design choice — not a loader. */
.pcb-card__media--placeholder {
	aspect-ratio: auto;
	min-height: 110px;
	padding: 18px;
	background:
		linear-gradient( 135deg,
			color-mix(in srgb, var(--pcb-primary) 10%, var(--pcb-surface)) 0%,
			color-mix(in srgb, var(--pcb-accent)  8%, var(--pcb-surface-alt)) 100%
		);
	border-bottom: 1px solid var(--pcb-border);
}
.pcb-card__placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	color: var(--pcb-primary);
	opacity: 0.7;
}
.pcb-card__placeholder svg {
	width: 100%;
	height: 100%;
}
.pcb-card__badge {
	position: absolute;
	top: 10px;
	left: 10px;
	background: var(--pcb-success);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	padding: 4px 8px;
	border-radius: 4px;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.pcb-card__body {
	display: flex;
	flex-direction: column;
	padding: 14px 14px 16px;
	gap: 6px;
	flex: 1;
}
.pcb-card__title {
	font-size: 15px;
	font-weight: 600;
	color: var(--pcb-title);
	line-height: 1.35;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.pcb-card__price {
	font-size: 16px;
	font-weight: 700;
	color: var(--pcb-primary);
}
.pcb-card__short {
	color: var(--pcb-text-soft);
	font-size: 13px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.pcb-card__action {
	margin-top: auto;
}
.pcb-card__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	min-height: 44px;
	background: var(--pcb-primary);
	color: var(--pcb-primary-ink);
	border: 1px solid var(--pcb-primary);
	border-radius: var(--pcb-radius-sm);
	padding: 10px 14px;
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background .18s ease, transform .12s ease;
}
.pcb-card__btn:hover { background: color-mix(in srgb, var(--pcb-primary) 88%, #000 12%); }
.pcb-card__btn:focus-visible { outline: 2px solid var(--pcb-primary); outline-offset: 2px; }
.pcb-card.is-selected .pcb-card__btn { background: var(--pcb-success); border-color: var(--pcb-success); }
.pcb-card.is-incompatible .pcb-card__btn { pointer-events: none; background: var(--pcb-text-soft); border-color: var(--pcb-text-soft); }

/* Skeletons */
.pcb-skeleton-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: var(--pcb-gap);
	grid-column: 1 / -1;
}
@media (max-width: 768px) {
	.pcb-skeleton-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--pcb-gap-sm); }
}
.pcb-skeleton-card {
	height: 280px;
	background: linear-gradient(90deg, var(--pcb-surface-alt), color-mix(in srgb, var(--pcb-surface-alt) 60%, #fff 40%), var(--pcb-surface-alt));
	background-size: 200% 100%;
	border-radius: var(--pcb-radius);
	animation: pcb-shimmer 1.4s ease-in-out infinite;
}
@keyframes pcb-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}

/* Empty state */
.pcb-empty {
	grid-column: 1 / -1;
	text-align: center;
	padding: 40px 24px;
	color: var(--pcb-text-soft);
	background: var(--pcb-surface-alt);
	border-radius: var(--pcb-radius);
}
.pcb-empty strong { color: var(--pcb-title); display: block; margin-bottom: 6px; }

/* Pager + footer */
.pcb-step__pager {
	display: flex;
	justify-content: center;
	margin-top: 18px;
}
.pcb-load-more {
	min-height: 44px;
	padding: 0 18px;
	border-radius: var(--pcb-radius-sm);
	border: 1px solid var(--pcb-border);
	background: var(--pcb-surface);
	cursor: pointer;
	font-weight: 600;
}
.pcb-load-more:hover { background: var(--pcb-surface-alt); }

.pcb-step__footer {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 26px;
	padding-top: 20px;
	border-top: 1px solid var(--pcb-border);
}
.pcb-step__footer-right { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Buttons ---------------- */

.pcb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	font-size: 15px;
	font-weight: 600;
	border-radius: var(--pcb-radius-sm);
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background .18s ease, color .18s ease, transform .12s ease;
}
.pcb-btn:focus-visible { outline: 2px solid var(--pcb-primary); outline-offset: 2px; }

.pcb-btn--primary {
	background: var(--pcb-primary);
	color: var(--pcb-primary-ink);
	border-color: var(--pcb-primary);
}
.pcb-btn--primary:hover { background: color-mix(in srgb, var(--pcb-primary) 88%, #000 12%); }

.pcb-btn--secondary {
	background: var(--pcb-surface);
	color: var(--pcb-title);
	border-color: var(--pcb-border);
}
.pcb-btn--secondary:hover { background: var(--pcb-surface-alt); }

.pcb-btn--ghost {
	background: transparent;
	color: var(--pcb-text);
	border-color: transparent;
}
.pcb-btn--ghost:hover { background: var(--pcb-surface-alt); }

.pcb-btn--link {
	background: transparent;
	color: var(--pcb-primary);
	padding: 0 8px;
	min-height: 36px;
	border: 0;
	text-decoration: underline;
	text-underline-offset: 4px;
}

.pcb-btn--whatsapp {
	background: #25D366;
	color: #fff;
	border-color: #25D366;
}
.pcb-btn--whatsapp:hover { background: #1ebe5b; }

.pcb-btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ---------------- Sidebar / Summary ---------------- */

.pcb-sidebar {
	position: sticky;
	top: 100px;
	align-self: start;
}
@media (max-width: 1024px) {
	.pcb-sidebar { position: static; }
}
.pcb-sidebar__inner {
	background: var(--pcb-surface);
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius);
	padding: 18px;
	box-shadow: var(--pcb-shadow);
}
.pcb-sidebar__header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 12px;
}
.pcb-sidebar__title { margin: 0; font-size: 16px; color: var(--pcb-title); font-weight: 700; }
.pcb-sidebar__counter {
	background: var(--pcb-primary);
	color: var(--pcb-primary-ink);
	font-size: 12px;
	font-weight: 700;
	padding: 2px 8px;
	border-radius: 999px;
}

.pcb-summary {
	list-style: none;
	padding: 0;
	margin: 0 0 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}
.pcb-summary__item {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 4px 8px;
	padding: 10px 12px;
	background: var(--pcb-surface-alt);
	border-radius: var(--pcb-radius-sm);
	font-size: 14px;
	border-left: 3px solid var(--pcb-primary);
}
.pcb-summary__item--empty {
	color: var(--pcb-text-soft);
	background: transparent;
	border-left-color: var(--pcb-border);
	font-style: italic;
}
.pcb-summary__label { color: var(--pcb-text-soft); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.pcb-summary__name { color: var(--pcb-title); font-weight: 600; grid-column: 1 / 2; }
.pcb-summary__price { color: var(--pcb-primary); font-weight: 700; grid-column: 2 / 3; align-self: center; }
.pcb-summary__remove {
	grid-column: 1 / -1;
	justify-self: end;
	background: transparent;
	border: 0;
	color: var(--pcb-danger);
	font-size: 12px;
	cursor: pointer;
	padding: 0;
	text-decoration: underline;
}

.pcb-sidebar__total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	padding-top: 14px;
	border-top: 1px dashed var(--pcb-border);
	margin-bottom: 14px;
}
.pcb-sidebar__total-label { font-size: 13px; color: var(--pcb-text-soft); text-transform: uppercase; letter-spacing: .04em; }
.pcb-sidebar__total-value { font-size: 22px; color: var(--pcb-title); font-weight: 800; }
.pcb-sidebar__actions { display: flex; flex-direction: column; gap: 8px; }
.pcb-sidebar__cta { width: 100%; }
.pcb-sidebar__enquiry { align-self: center; }

/* ---------------- Review screen ---------------- */

.pcb-review {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 14px;
	margin-bottom: 20px;
}
.pcb-review__card {
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius);
	padding: 16px;
	background: var(--pcb-surface);
	display: flex;
	gap: 12px;
	align-items: center;
}
.pcb-review__media {
	width: 64px;
	height: 64px;
	border-radius: 10px;
	background: var(--pcb-surface-alt);
	overflow: hidden;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}
.pcb-review__media img { width: 100%; height: 100%; object-fit: cover; }

.pcb-review__media--placeholder {
	background: linear-gradient( 135deg,
		color-mix(in srgb, var(--pcb-primary) 12%, var(--pcb-surface)) 0%,
		color-mix(in srgb, var(--pcb-accent)  10%, var(--pcb-surface-alt)) 100%
	);
}
.pcb-review__media--missing {
	background: var(--pcb-surface-alt);
	border: 1px dashed var(--pcb-border);
}
.pcb-review__placeholder {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: var(--pcb-primary);
	opacity: .75;
}
.pcb-review__media--missing .pcb-review__placeholder { color: var(--pcb-text-soft); opacity: .5; }
.pcb-review__placeholder svg { width: 100%; height: 100%; }
.pcb-review__meta { flex: 1; min-width: 0; }
.pcb-review__label { font-size: 12px; color: var(--pcb-text-soft); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.pcb-review__name { font-weight: 600; color: var(--pcb-title); margin: 0; }
.pcb-review__price { color: var(--pcb-primary); font-weight: 700; margin-top: 2px; }
.pcb-review__change {
	background: transparent;
	border: 0;
	color: var(--pcb-primary);
	cursor: pointer;
	font-weight: 600;
	font-size: 13px;
	padding: 0;
}
.pcb-review__missing {
	border: 1px dashed var(--pcb-border);
	background: var(--pcb-surface-alt);
	color: var(--pcb-text-soft);
}
.pcb-review-warnings {
	background: color-mix(in srgb, var(--pcb-warn) 12%, var(--pcb-surface));
	border: 1px solid color-mix(in srgb, var(--pcb-warn) 60%, var(--pcb-border));
	color: color-mix(in srgb, var(--pcb-warn) 80%, #000);
	border-radius: var(--pcb-radius);
	padding: 14px 18px;
	margin-bottom: 20px;
	font-size: 14px;
}
.pcb-review-warnings ul { margin: 8px 0 0; padding-left: 20px; }

/* ---------------- Mobile summary toggle ---------------- */

.pcb-mobile-summary-toggle {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100%;
	background: var(--pcb-primary);
	color: var(--pcb-primary-ink);
	border: 0;
	padding: 14px 20px;
	font-size: 16px;
	font-weight: 700;
	z-index: 70;
	min-height: 56px;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	box-shadow: 0 -6px 18px rgba(15, 23, 42, .12);
}
@media (max-width: 1024px) {
	.pcb-mobile-summary-toggle { display: flex; }
	.pcb-sidebar { display: none; }
	.pcb-sidebar.is-open {
		display: block;
		position: fixed;
		inset: 0;
		z-index: 80;
		background: rgba(15, 23, 42, .45);
		padding: 16px;
		overflow: auto;
	}
	.pcb-sidebar.is-open .pcb-sidebar__inner {
		margin-top: auto;
		max-width: 540px;
		margin-left: auto;
		margin-right: auto;
	}
	.pcb-app { padding-bottom: 80px; }
}

/* ---------------- Modal ---------------- */

.pcb-modal {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.pcb-modal[hidden] { display: none; }
.pcb-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, .55);
	backdrop-filter: blur(4px);
}
.pcb-modal__panel {
	position: relative;
	background: var(--pcb-surface);
	border-radius: var(--pcb-radius);
	max-width: 560px;
	width: 100%;
	max-height: 90vh;
	overflow: auto;
	padding: 28px clamp(20px, 4vw, 32px);
	box-shadow: 0 24px 60px rgba(15, 23, 42, .25);
}
.pcb-modal__close {
	position: absolute;
	top: 10px;
	right: 14px;
	background: transparent;
	border: 0;
	font-size: 32px;
	line-height: 1;
	cursor: pointer;
	color: var(--pcb-text-soft);
	width: 44px;
	height: 44px;
	border-radius: 50%;
}
.pcb-modal__close:hover { background: var(--pcb-surface-alt); color: var(--pcb-title); }
.pcb-modal__title { margin: 0 0 6px; color: var(--pcb-title); font-size: 22px; font-weight: 700; }
.pcb-modal__lede { margin: 0 0 18px; color: var(--pcb-text-soft); }

.pcb-field { margin-bottom: 14px; }
.pcb-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--pcb-title);
}
.pcb-field input,
.pcb-field textarea {
	width: 100%;
	min-height: 44px;
	padding: 10px 12px;
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius-sm);
	font-size: 16px;
	background: var(--pcb-surface);
	color: var(--pcb-text);
	font-family: inherit;
}
.pcb-field textarea { min-height: 90px; resize: vertical; }
.pcb-field input:focus-visible,
.pcb-field textarea:focus-visible {
	outline: 2px solid var(--pcb-primary);
	outline-offset: 1px;
	border-color: var(--pcb-primary);
}
.pcb-enquiry-summary {
	background: var(--pcb-surface-alt);
	border-radius: var(--pcb-radius-sm);
	padding: 12px 14px;
	margin: 8px 0 16px;
	font-size: 13px;
	max-height: 200px;
	overflow: auto;
}
.pcb-enquiry-summary ul { list-style: none; padding: 0; margin: 0; }
.pcb-enquiry-summary li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.pcb-enquiry-summary li + li { border-top: 1px dashed var(--pcb-border); }
.pcb-enquiry-summary .pcb-enquiry-total { font-weight: 700; color: var(--pcb-title); padding-top: 8px; margin-top: 6px; border-top: 1px solid var(--pcb-border); }

.pcb-enquiry-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pcb-enquiry-actions .pcb-btn--primary { flex: 1; min-width: 160px; }
.pcb-enquiry-feedback { margin-top: 12px; font-size: 14px; min-height: 1em; }
.pcb-enquiry-feedback.is-error   { color: var(--pcb-danger); }
.pcb-enquiry-feedback.is-success { color: var(--pcb-success); }

/* ---------------- Toast ---------------- */

.pcb-toast {
	position: fixed;
	right: 16px;
	bottom: 80px;
	z-index: 90;
	background: var(--pcb-title);
	color: #fff;
	padding: 12px 16px;
	border-radius: var(--pcb-radius-sm);
	box-shadow: var(--pcb-shadow-lift);
	max-width: 320px;
	font-size: 14px;
	transform: translateY(20px);
	opacity: 0;
	transition: opacity .18s ease, transform .18s ease;
}
.pcb-toast.is-visible { transform: translateY(0); opacity: 1; }
.pcb-toast.is-error   { background: var(--pcb-danger); }
.pcb-toast.is-success { background: var(--pcb-success); }

/* ---------------- Quantity stepper ---------------- */

.pcb-qty-stepper {
	display: inline-flex;
	align-items: stretch;
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius-sm);
	overflow: hidden;
	background: var(--pcb-surface);
	height: 36px;
	width: max-content;
}
.pcb-qty-stepper__btn {
	background: transparent;
	border: 0;
	width: 32px;
	min-width: 32px;
	font-size: 18px;
	font-weight: 700;
	color: var(--pcb-text);
	cursor: pointer;
	padding: 0;
	transition: background .15s ease, color .15s ease;
}
.pcb-qty-stepper__btn:hover { background: var(--pcb-surface-alt); color: var(--pcb-primary); }
.pcb-qty-stepper__btn:focus-visible {
	outline: 2px solid var(--pcb-primary);
	outline-offset: -2px;
}
.pcb-qty-stepper__input {
	width: 48px;
	border: 0;
	border-left: 1px solid var(--pcb-border);
	border-right: 1px solid var(--pcb-border);
	text-align: center;
	font-weight: 700;
	font-size: 14px;
	color: var(--pcb-title);
	background: var(--pcb-surface);
	padding: 0;
	-moz-appearance: textfield;
}
.pcb-qty-stepper__input::-webkit-outer-spin-button,
.pcb-qty-stepper__input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}
.pcb-qty-stepper__input:focus-visible {
	outline: 2px solid var(--pcb-primary);
	outline-offset: -1px;
}

.pcb-qty-stepper--lg { height: 44px; }
.pcb-qty-stepper--lg .pcb-qty-stepper__btn { width: 44px; min-width: 44px; font-size: 20px; }
.pcb-qty-stepper--lg .pcb-qty-stepper__input { width: 60px; font-size: 16px; }

.pcb-qty-static {
	display: inline-block;
	color: var(--pcb-text-soft);
	font-size: 12px;
	font-weight: 600;
	margin-top: 4px;
	letter-spacing: .04em;
}

/* ---------------- Build name input on review screen ---------------- */

.pcb-build-name {
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: var(--pcb-surface);
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius);
	padding: 14px 18px;
	margin-bottom: 12px;
}
.pcb-build-name__label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	cursor: text;
}
.pcb-build-name__label strong {
	color: var(--pcb-title);
	font-size: 14px;
}
.pcb-build-name__hint {
	font-size: 12px;
	color: var(--pcb-text-soft);
}
.pcb-build-name__input {
	width: 100%;
	min-height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--pcb-border);
	border-radius: var(--pcb-radius-sm);
	font-size: 15px;
	background: var(--pcb-surface);
	color: var(--pcb-text);
	font-family: inherit;
}
.pcb-build-name__input:focus-visible {
	outline: 2px solid var(--pcb-primary);
	outline-offset: 1px;
	border-color: var(--pcb-primary);
}

/* ---------------- Build qty header on review screen ---------------- */

.pcb-build-qty {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	flex-wrap: wrap;
	background: linear-gradient( 135deg,
		color-mix(in srgb, var(--pcb-primary) 8%, var(--pcb-surface)),
		color-mix(in srgb, var(--pcb-accent)  6%, var(--pcb-surface-alt))
	);
	border: 1px solid color-mix(in srgb, var(--pcb-primary) 25%, var(--pcb-border));
	border-radius: var(--pcb-radius);
	padding: 14px 18px;
	margin-bottom: 18px;
}
.pcb-build-qty__label {
	display: flex;
	flex-direction: column;
	gap: 2px;
}
.pcb-build-qty__label strong {
	color: var(--pcb-title);
	font-size: 15px;
}
.pcb-build-qty__hint {
	font-size: 12px;
	color: var(--pcb-text-soft);
}

/* ---------------- Review line-sub annotation ---------------- */

.pcb-review__line-sub {
	color: var(--pcb-primary);
	font-weight: 700;
	font-size: 13px;
	margin-left: 4px;
}

/* ---------------- Sidebar qty chip + total multiplier ---------------- */

.pcb-summary__qty {
	display: inline-block;
	background: var(--pcb-primary);
	color: var(--pcb-primary-ink);
	font-size: 11px;
	font-weight: 700;
	padding: 1px 6px;
	border-radius: 4px;
	margin-left: 4px;
	letter-spacing: 0;
	text-transform: none;
}
.pcb-sidebar__total-mult {
	font-size: 12px;
	color: var(--pcb-text-soft);
	font-weight: 600;
	margin-left: 4px;
}

/* ---------------- Product page enquiry button ---------------- */

.pcb-product-enquire-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 12px;
	min-height: 48px;
	padding: 0 22px;
	border-radius: var(--wd-brd-radius, 10px);
	background: transparent;
	border: 1.5px solid var(--wd-primary-color, #0a84ff);
	color: var(--wd-primary-color, #0a84ff);
	font-weight: 600;
	font-size: 14px;
	cursor: pointer;
	transition: background .18s ease, color .18s ease, transform .12s ease;
	width: 100%;
	max-width: 320px;
}
.pcb-product-enquire-btn:hover {
	background: var(--wd-primary-color, #0a84ff);
	color: #fff;
}
.pcb-product-enquire-btn:focus-visible {
	outline: 2px solid var(--wd-primary-color, #0a84ff);
	outline-offset: 2px;
}

.pcb-enquiry-product-row {
	background: var(--wd-bg-color-alt, #f7f8fa);
	border: 1px solid var(--wd-brd-color, #e4e7ec);
	border-radius: 8px;
	padding: 10px 14px;
	margin-bottom: 14px;
	font-size: 13px;
	color: var(--wd-text-color-light, #6b7280);
}
.pcb-enquiry-product-row strong {
	color: var(--wd-title-color, #0c111d);
	display: block;
	margin-top: 2px;
}

/* ---------------- Cart enhancements ---------------- */

/* ---------------- Cart row grouping ---------------- */

.woocommerce-cart-form tr.pcb-cart-group-header td {
	background: linear-gradient( 135deg,
		color-mix(in srgb, var(--wd-primary-color, #0a84ff) 12%, #fff),
		color-mix(in srgb, var(--wd-primary-color, #0a84ff) 5%, #fafbfd)
	);
	border-left: 4px solid var(--wd-primary-color, #0a84ff);
	border-top: 1px solid var(--wd-brd-color, #e4e7ec);
	color: var(--wd-title-color, #0c111d);
	font-size: 14px;
	padding: 12px 16px;
}
.pcb-cart-group-header__badge {
	display: inline-block;
	width: 22px;
	height: 22px;
	line-height: 22px;
	text-align: center;
	background: var(--wd-primary-color, #0a84ff);
	color: #fff;
	border-radius: 50%;
	font-size: 13px;
	margin-right: 6px;
	vertical-align: middle;
}
.pcb-cart-group-header__count {
	color: var(--wd-text-color-light, #6b7280);
	font-weight: 500;
	font-size: 12px;
	margin-left: 4px;
}
.woocommerce-cart-form tr.pcb-cart-row > td {
	border-left: 4px solid var(--wd-primary-color, #0a84ff);
	background: rgba(10, 132, 255, 0.02);
}
.woocommerce-cart-form tr.pcb-cart-row > td:not(:first-child) {
	border-left: 0;
}
.woocommerce-cart-form tr.pcb-cart-row--last > td {
	border-bottom: 2px solid color-mix(in srgb, var(--wd-primary-color, #0a84ff) 30%, var(--wd-brd-color, #e4e7ec));
}

.pcb-cart-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin-bottom: 4px;
}
.pcb-cart-badge {
	display: inline-block;
	background: var(--wd-primary-color, #0a84ff);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 3px 7px;
	border-radius: 4px;
}
.pcb-cart-step {
	display: inline-block;
	color: var(--wd-text-color-light, #6b7280);
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .06em;
	text-transform: uppercase;
}
.pcb-cart-name {
	display: block;
}
.pcb-cart-notice {
	border-left: 4px solid var(--wd-primary-color, #0a84ff);
}
.pcb-cart-build-card {
	background: var(--wd-bg-color-alt, #f7f8fa);
	border: 1px solid var(--wd-brd-color, #e4e7ec);
	border-radius: var(--wd-brd-radius, 12px);
	padding: 18px;
	margin: 20px 0;
}
.pcb-cart-build-card__title {
	margin: 0 0 12px;
	font-size: 18px;
	color: var(--wd-title-color, #0c111d);
}
.pcb-cart-build-card__list { list-style: none; padding: 0; margin: 0; }
.pcb-cart-build-card__row {
	display: grid;
	grid-template-columns: 140px 1fr auto;
	gap: 12px;
	padding: 8px 0;
	border-top: 1px solid var(--wd-brd-color, #e4e7ec);
	font-size: 14px;
}
.pcb-cart-build-card__row:first-child { border-top: 0; }
.pcb-cart-build-card__label { color: var(--wd-text-color-light, #6b7280); }
.pcb-cart-build-card__total {
	display: flex;
	justify-content: space-between;
	margin-top: 14px;
	padding-top: 14px;
	border-top: 2px solid var(--wd-brd-color, #e4e7ec);
	font-size: 16px;
}
@media (max-width: 576px) {
	.pcb-cart-build-card__row { grid-template-columns: 1fr; }
	.pcb-cart-build-card__label { font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.pcb-card, .pcb-stepper__bar, .pcb-toast { transition: none; }
	.pcb-skeleton-card { animation: none; }
}
