.nwfm-b3d-builder {
    --nwfm-accent: #d89500;
    --nwfm-accent-dark: #b77a00;
    --nwfm-text: #111;
    --nwfm-muted: #777;
    --nwfm-border: #e8e8e8;
    --nwfm-soft: #fbfaf7;
    --nwfm-white: #fff;
    --nwfm-green: #17603a;
    color: var(--nwfm-text);
    background: linear-gradient(180deg, #fff, #fbfaf7);
    border: 1px solid var(--nwfm-border);
    border-radius: 24px;
    padding: 34px;
    box-shadow: 0 24px 70px rgba(20,20,20,.08);
}
.nwfm-b3d-builder * { box-sizing: border-box; }
.nwfm-b3d-head { max-width: 880px; margin-bottom: 30px; }
.nwfm-b3d-head p { margin: 0 0 10px; color: var(--nwfm-accent); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: 0; }
.nwfm-b3d-head h2 { margin: 0 0 14px; font-size: clamp(34px, 5vw, 62px); line-height: 1.02; letter-spacing: 0; }
.nwfm-b3d-head span { color: var(--nwfm-muted); font-size: 17px; line-height: 1.7; display: block; }
.nwfm-b3d-layout { display: grid; grid-template-columns: minmax(560px, 1fr) minmax(420px, 520px); gap: 32px; align-items: start; }
.nwfm-b3d-preview-wrap { align-self: start; }
.has-sticky-preview .nwfm-b3d-preview-wrap { position: sticky; top: 110px; }
.nwfm-b3d-toolbar, .nwfm-b3d-colour-groups { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.nwfm-b3d-chip, .nwfm-b3d-option, .nwfm-b3d-extra, .nwfm-b3d-swatch, .nwfm-b3d-primary, .nwfm-b3d-secondary {
    border: 1px solid var(--nwfm-border);
    background: #fff;
    color: var(--nwfm-text);
    border-radius: 999px;
    cursor: pointer;
    font: inherit;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.nwfm-b3d-chip { padding: 9px 15px; font-size: 13px; font-weight: 750; }
.nwfm-b3d-chip:hover, .nwfm-b3d-option:hover, .nwfm-b3d-extra:hover, .nwfm-b3d-swatch:hover { transform: translateY(-1px); border-color: rgba(216,149,0,.55); }
.nwfm-b3d-chip.is-active, .nwfm-b3d-option.is-active, .nwfm-b3d-extra.is-active, .nwfm-b3d-swatch.is-active { border-color: var(--nwfm-accent); box-shadow: 0 0 0 3px rgba(216,149,0,.14); }
.nwfm-b3d-canvas-shell { height: min(68vh, 680px); min-height: 540px; background: #f6f0e7; border: 1px solid var(--nwfm-border); border-radius: 22px; overflow: hidden; position: relative; }
.nwfm-b3d-canvas { position: absolute; inset: 0; }
.nwfm-b3d-canvas canvas { width: 100% !important; height: 100% !important; display: block; }
.nwfm-b3d-error { position: absolute; inset: 18px; display: none; align-items: center; justify-content: center; text-align: center; border-radius: 16px; background: #fff8e8; color: #6b4700; padding: 20px; z-index: 3; }
.nwfm-b3d-error.is-visible { display: flex; }
.nwfm-b3d-info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.nwfm-b3d-info-grid > div { background: #fff; border: 1px solid var(--nwfm-border); border-radius: 16px; padding: 15px; min-height: 82px; }
.nwfm-b3d-info-grid strong { display: block; font-size: 16px; margin-bottom: 5px; }
.nwfm-b3d-info-grid span { color: var(--nwfm-muted); font-size: 13px; line-height: 1.45; }
.nwfm-b3d-controls { background: #fff; border: 1px solid var(--nwfm-border); border-radius: 22px; padding: 22px; box-shadow: 0 18px 45px rgba(0,0,0,.05); }
.nwfm-b3d-section { padding: 20px 0; border-bottom: 1px solid var(--nwfm-border); }
.nwfm-b3d-section:first-child { padding-top: 0; }
.nwfm-b3d-section h3 { margin: 0 0 12px; font-size: 18px; letter-spacing: 0; }
.nwfm-b3d-choice-grid, .nwfm-b3d-style-grid, .nwfm-b3d-size-grid, .nwfm-b3d-material-grid, .nwfm-b3d-leg-grid, .nwfm-b3d-extra-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.nwfm-b3d-choice-grid.compact, .nwfm-b3d-size-grid.compact, .nwfm-b3d-leg-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.nwfm-b3d-option { min-height: 62px; padding: 12px 14px; border-radius: 16px; text-align: left; display: grid; gap: 4px; }
.nwfm-b3d-option strong, .nwfm-b3d-extra strong { font-weight: 800; }
.nwfm-b3d-option span, .nwfm-b3d-extra span, .nwfm-b3d-extra em { color: var(--nwfm-muted); font-size: 12px; line-height: 1.35; font-style: normal; }
.nwfm-b3d-extra { min-height: 86px; padding: 13px 14px; border-radius: 16px; text-align: left; display: grid; gap: 4px; }
.nwfm-b3d-colour-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.nwfm-b3d-swatch { min-height: 78px; padding: 9px; border-radius: 16px; text-align: left; display: grid; gap: 7px; font-size: 12px; font-weight: 750; }
.nwfm-b3d-swatch i { display: block; min-height: 32px; border-radius: 11px; border: 1px solid rgba(0,0,0,.08); }
.nwfm-b3d-range { display: grid; grid-template-columns: 1fr auto; gap: 8px 12px; margin-top: 12px; font-weight: 750; }
.nwfm-b3d-range input { grid-column: 1 / -1; }
.nwfm-b3d-field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.nwfm-b3d-controls label { display: grid; gap: 7px; color: #2d2d2d; font-weight: 750; font-size: 13px; }
.nwfm-b3d-controls input, .nwfm-b3d-controls textarea { width: 100%; border: 1px solid var(--nwfm-border); border-radius: 14px; padding: 13px 14px; font: inherit; background: #fff; color: var(--nwfm-text); }
.nwfm-b3d-controls input:focus, .nwfm-b3d-controls textarea:focus, .nwfm-b3d-builder button:focus-visible { outline: 3px solid rgba(216,149,0,.24); outline-offset: 2px; border-color: var(--nwfm-accent); }
.nwfm-b3d-summary { background: #111; color: #fff; border-radius: 20px; padding: 20px; margin-top: 20px; border: 0; }
.nwfm-b3d-summary h3 { color: #fff; }
.nwfm-b3d-summary pre { margin: 0; white-space: pre-wrap; font: inherit; color: rgba(255,255,255,.86); line-height: 1.55; }
.nwfm-b3d-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.nwfm-b3d-primary { grid-column: 1 / -1; background: var(--nwfm-accent); border-color: var(--nwfm-accent); min-height: 54px; color: #111; font-weight: 850; }
.nwfm-b3d-primary:hover { background: var(--nwfm-accent-dark); color: #fff; }
.nwfm-b3d-secondary { min-height: 48px; font-weight: 750; }
.nwfm-b3d-notice { margin: 0 0 16px; border-radius: 14px; padding: 13px 15px; border: 1px solid var(--nwfm-border); background: #fff8e8; color: #4c3100; }
.nwfm-b3d-notice.is-error { background: #fff1f1; color: #8a1f1f; border-color: #f2c1c1; }
.nwfm-b3d-notice.is-success { background: #f0fff6; color: var(--nwfm-green); border-color: #bfe8ce; }
.nwfm-b3d-notice.is-warning { background: #fff8e8; color: #6b4700; border-color: #ecd39a; }
.nwfm-b3d-empty { margin: 0; color: var(--nwfm-muted); font-size: 13px; }
@media (max-width: 1024px) {
    .nwfm-b3d-layout { grid-template-columns: 1fr; }
    .has-sticky-preview .nwfm-b3d-preview-wrap { position: relative; top: auto; }
    .nwfm-b3d-canvas-shell { min-height: 430px; height: 58vh; }
}
@media (max-width: 640px) {
    .nwfm-b3d-builder { padding: 20px; border-radius: 18px; }
    .nwfm-b3d-head h2 { font-size: 36px; }
    .nwfm-b3d-info-grid, .nwfm-b3d-choice-grid, .nwfm-b3d-choice-grid.compact, .nwfm-b3d-extra-grid, .nwfm-b3d-field-grid { grid-template-columns: 1fr; }
    .nwfm-b3d-colour-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .nwfm-b3d-actions { grid-template-columns: 1fr; }
    .nwfm-b3d-canvas-shell { min-height: 330px; height: 46vh; }
}
