/* pages/custom-design-experience-builder (MM): the 2D Custom Design Experience, scoped to #cde-builder.
   Ported from legacy www.music-man.com /assets/css/cde-builder.css (JO 2026-10-16); its dark stage and
   gold are the builder's own, as sales approved them, not the site's brand tokens. */
#cde-builder {
    --cdeb-bg: #111111;
    --cdeb-panel: #1b1b1b;
    --cdeb-line: #3a3a3a;
    --cdeb-text: #f4f4f4;
    --cdeb-muted: #b9b9b9;
    --cdeb-gold: #bb9d60;
    --cdeb-gold-hi: #d4b878;
    background: var(--cdeb-bg);
    color: var(--cdeb-text);
    padding-bottom: 96px;
}
#cde-builder .container { max-width: 1400px; width: auto; padding-left: 16px; padding-right: 16px; }
#cde-builder a { color: var(--cdeb-gold-hi); }
#cde-builder button { font: inherit; }
#cde-builder :focus-visible { outline: 3px solid var(--cdeb-gold-hi); outline-offset: 2px; }

/* Header */
.cdeb-head { padding: 28px 0 8px; }
.cdeb-crumb { margin: 0 0 4px; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.cdeb-crumb a { color: var(--cdeb-muted) !important; text-decoration: none; }
.cdeb-crumb a:hover { color: var(--cdeb-text) !important; text-decoration: underline; }
.cdeb-title-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.cdeb-title { margin: 0; font-size: 32px; line-height: 1.15; color: var(--cdeb-text); text-transform: uppercase; letter-spacing: .04em; }
.cdeb-models { display: flex; border: 1px solid var(--cdeb-line); border-radius: 8px; overflow: hidden; }
.cdeb-model { padding: 8px 16px; color: var(--cdeb-text) !important; text-decoration: none !important; font-size: 15px; }
.cdeb-model + .cdeb-model { border-left: 1px solid var(--cdeb-line); }
.cdeb-model.is-current { background: var(--cdeb-text); color: #111 !important; }
.cdeb-model:not(.is-current):hover { background: #262626; }

/* Stage */
.cdeb-stage {
    position: sticky; top: 0; z-index: 5;
    background: radial-gradient(ellipse at 50% 55%, #4a3b25 0%, #1d1812 45%, #0b0b0b 80%);
    padding: 8px 0 4px;
}
.cdeb-stage-scroll { max-width: 1500px; margin: 0 auto; padding: 0 16px; overflow: hidden; }
.cdeb-frame { position: relative; width: 100%; max-width: calc(34vh * var(--cdeb-aspect, 3.2)); height: auto; margin: 0 auto; }
.cdeb-layer { position: absolute; display: block; max-width: none; pointer-events: none; user-select: none; }
.cdeb-stage.is-zoomed .cdeb-stage-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cdeb-stage.is-zoomed .cdeb-frame { width: 220%; max-width: none; }
.cdeb-stage-foot { max-width: 1500px; margin: 0 auto; padding: 2px 16px 0; display: flex; align-items: center; justify-content: center; gap: 16px; position: relative; }
.cdeb-zoom {
    background: rgba(17, 17, 17, .75); color: var(--cdeb-text); border: 1px solid var(--cdeb-line);
    border-radius: 6px; padding: 6px 12px; font-size: 14px; cursor: pointer;
}
.cdeb-zoom:hover { border-color: var(--cdeb-gold); }
.cdeb-note { margin: 0; text-align: center; font-size: 13px; color: var(--cdeb-muted); }
.cdeb-stage-foot .cdeb-zoom { position: absolute; right: 16px; bottom: 0; }
.cdeb-loading { position: absolute; left: 50%; top: 12px; transform: translateX(-50%); display: none; gap: 5px; }
.cdeb-stage.is-loading .cdeb-loading { display: flex; }
.cdeb-loading span { width: 4px; height: 18px; background: var(--cdeb-gold); animation: cdeb-pulse 0.9s ease-in-out infinite; }
.cdeb-loading span:nth-child(2) { animation-delay: .15s; }
.cdeb-loading span:nth-child(3) { animation-delay: .3s; }
@keyframes cdeb-pulse { 0%, 100% { transform: scaleY(.4); opacity: .5; } 50% { transform: scaleY(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .cdeb-loading span { animation: none; } }

/* Steps */
.cdeb-steps-wrap { border-bottom: 1px solid var(--cdeb-line); background: var(--cdeb-bg); }
.cdeb-steps { list-style: none; margin: 0; padding: 12px 0; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: thin; }
.cdeb-steps li { flex: 0 0 auto; }
.cdeb-steps button {
    background: none; border: 1px solid transparent; color: var(--cdeb-muted); padding: 8px 14px; border-radius: 8px;
    font-size: 15px; letter-spacing: .05em; text-transform: uppercase; cursor: pointer; white-space: nowrap;
}
.cdeb-steps button:hover { color: var(--cdeb-text); border-color: var(--cdeb-line); }
.cdeb-steps button.is-current { background: var(--cdeb-text); color: #111; }
.cdeb-step-n { margin-right: 6px; }

/* Panel */
.cdeb-panel { padding: 20px 0 8px; }
#cde-builder .cdeb-panel-body:focus, #cde-builder .cdeb-panel-body:focus-visible { outline: none; }
.cdeb-group { border: 0; margin: 0 0 22px; padding: 0; min-width: 0; }
.cdeb-legend {
    border: 0; margin: 0 0 10px; padding: 0; width: 100%; color: var(--cdeb-text); font-size: 18px;
    letter-spacing: .05em; text-transform: uppercase; display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
}
.cdeb-legend-value { font-size: 15px; letter-spacing: 0; text-transform: none; color: var(--cdeb-gold-hi); }
.cdeb-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.cdeb-group.is-swatches .cdeb-options { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); }
.cdeb-option {
    position: relative; display: flex; align-items: center; gap: 12px; margin: 0; padding: 10px 12px;
    background: var(--cdeb-panel); border: 2px solid var(--cdeb-line); border-radius: 8px; cursor: pointer;
    font-weight: normal; color: var(--cdeb-text); transition: border-color .12s;
}
.cdeb-option:hover { border-color: #6b6b6b; }
.cdeb-option.is-checked { border-color: var(--cdeb-gold); background: #241f16; }
.cdeb-option input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.cdeb-option:focus-within { outline: 3px solid var(--cdeb-gold-hi); outline-offset: 2px; }
.cdeb-group.is-swatches .cdeb-option { flex-direction: column; align-items: stretch; gap: 6px; padding: 6px 6px 8px; text-align: center; }
.cdeb-swatch { display: block; width: 100%; aspect-ratio: 408 / 144; object-fit: cover; border-radius: 4px; background: #333; }
.cdeb-icon { flex: 0 0 auto; width: 56px; height: 50px; object-fit: contain; }
.cdeb-option-text { display: flex; flex-direction: column; min-width: 0; }
.cdeb-option-name { font-size: 15px; line-height: 1.25; }
.cdeb-group.is-swatches .cdeb-option-name { font-size: 13px; }
.cdeb-option-desc { font-size: 13px; color: var(--cdeb-muted); line-height: 1.3; }
.cdeb-option-delta { font-size: 13px; color: var(--cdeb-gold-hi); }
.cdeb-hint { margin: 8px 0 0; font-size: 14px; color: var(--cdeb-muted); }

.cdeb-panel-nav { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0 12px; }
.cdeb-btn {
    display: inline-block; background: var(--cdeb-gold); color: #111 !important; border: 2px solid var(--cdeb-gold);
    border-radius: 8px; padding: 10px 22px; font-size: 16px; letter-spacing: .05em; text-transform: uppercase;
    text-decoration: none !important; cursor: pointer; text-align: center;
}
.cdeb-btn:hover { background: var(--cdeb-gold-hi); border-color: var(--cdeb-gold-hi); }
.cdeb-btn-ghost { background: transparent; color: var(--cdeb-text) !important; border-color: var(--cdeb-line); }
.cdeb-btn-ghost:hover { background: #262626; border-color: #6b6b6b; }
.cdeb-link { background: none; border: 0; padding: 0; color: var(--cdeb-gold-hi); text-decoration: underline; cursor: pointer; font-size: 14px; letter-spacing: 0; text-transform: none; }

/* Bottom bar */
.cdeb-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; background: rgba(12, 12, 12, .96); border-top: 1px solid var(--cdeb-line); }
.cdeb-bar-inner { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; padding-bottom: 10px; }
.cdeb-bar-price { display: flex; flex-direction: column; }
.cdeb-bar-label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cdeb-muted); }
.cdeb-price { font-size: 24px; color: var(--cdeb-text); }
#cde-builder.is-review .cdeb-review-btn { visibility: hidden; }

/* Review */
.cdeb-review-title { margin: 0 0 16px; font-size: 26px; text-transform: uppercase; letter-spacing: .04em; color: var(--cdeb-text); }
.cdeb-review { display: grid; grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
.cdeb-review-specs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 16px; }
.cdeb-review-group { background: var(--cdeb-panel); border: 1px solid var(--cdeb-line); border-radius: 8px; padding: 14px 16px; }
.cdeb-review-group h3 { margin: 0 0 8px; font-size: 16px; letter-spacing: .06em; text-transform: uppercase; color: var(--cdeb-text); display: flex; justify-content: space-between; align-items: baseline; }
.cdeb-review-group dl, .cdeb-specs dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; font-size: 14px; }
.cdeb-review-group dt, .cdeb-specs dt { color: var(--cdeb-muted); font-weight: normal; }
.cdeb-review-group dd, .cdeb-specs dd { margin: 0; }
.cdeb-review-buy { background: var(--cdeb-panel); border: 1px solid var(--cdeb-line); border-radius: 8px; padding: 18px; position: sticky; top: 96px; }
.cdeb-review-price { font-size: 34px; margin: 0 0 10px; color: var(--cdeb-text); }
.cdeb-buy { display: block; width: 100%; font-size: 18px; padding: 14px; }
.cdeb-small { font-size: 13px; color: var(--cdeb-muted); margin: 10px 0 14px; }
.cdeb-error { color: #ffb4a8; }
.cdeb-code { border-top: 1px solid var(--cdeb-line); padding-top: 12px; margin-bottom: 14px; }
.cdeb-code-label { display: block; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--cdeb-muted); }
.cdeb-code code { background: none; color: var(--cdeb-gold-hi); font-size: 15px; padding: 0; word-break: break-all; }
/* "Send me my build" sits under the review, outside the panel the script re-renders, so its
   Turnstile widget survives; on a wide screen it lines up with the Buy column. */
.cdeb-email {
    background: var(--cdeb-panel); border: 1px solid var(--cdeb-line); border-radius: 8px; padding: 14px 18px;
    margin: 18px 0 0 auto; max-width: 420px;
}
.cdeb-email[hidden] { display: none; }
.cdeb-email .cf-turnstile { margin: 0 0 10px; }
.cdeb-honeypot { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.cdeb-email h3 { margin: 0 0 8px; font-size: 16px; text-transform: uppercase; letter-spacing: .06em; color: var(--cdeb-gold-hi); }
.cdeb-email label { display: block; font-weight: normal; font-size: 14px; margin: 0 0 4px; color: var(--cdeb-text); }
.cdeb-email input[type=email] { width: 100%; padding: 9px 10px; margin-bottom: 8px; border-radius: 6px; border: 1px solid #6b6b6b; background: #0d0d0d; color: var(--cdeb-text); }
.cdeb-email .cdeb-check { display: flex; gap: 8px; align-items: center; margin: 0 0 10px; color: var(--cdeb-muted); }
.cdeb-email .cdeb-btn { width: 100%; }
.cdeb-email-status { min-height: 1.4em; margin: 8px 0 0; font-size: 14px; }
.cdeb-specs { margin-top: 22px; background: var(--cdeb-panel); border: 1px solid var(--cdeb-line); border-radius: 8px; padding: 12px 16px; }
.cdeb-specs summary { cursor: pointer; font-size: 16px; text-transform: uppercase; letter-spacing: .06em; }
.cdeb-specs[open] summary { margin-bottom: 10px; }
.cdeb-noscript { padding: 24px 0; }

@media (max-width: 991px) {
    .cdeb-review { grid-template-columns: 1fr; }
    .cdeb-review-buy { position: static; }
}
@media (max-width: 767px) {
    .cdeb-head { padding-top: 16px; }
    .cdeb-title { font-size: 22px; }
    .cdeb-stage-scroll { padding: 0 8px; }
    .cdeb-frame { max-width: none; }
    .cdeb-stage.is-zoomed .cdeb-frame { width: 300%; }
    .cdeb-stage-foot { justify-content: space-between; padding: 2px 8px 0; gap: 8px; }
    .cdeb-stage-foot .cdeb-zoom { position: static; flex: 0 0 auto; padding: 4px 10px; font-size: 13px; }
    .cdeb-note { font-size: 11px; text-align: left; }
    .cdeb-options { grid-template-columns: 1fr; }
    .cdeb-group.is-swatches .cdeb-options { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
    .cdeb-steps button { font-size: 13px; padding: 7px 10px; }
    .cdeb-price { font-size: 20px; }
    .cdeb-btn { padding: 9px 14px; font-size: 14px; }
}

/* On Review the build is final, so the preview scrolls away and the Buy box gets the room. */
#cde-builder.is-review .cdeb-stage { position: relative; top: auto !important; }

/* The journey: sub-tabs, check marks, and Buy locked until every choice is made */
.cdeb-tick { width: 1em; height: 1em; vertical-align: -0.12em; }
.cdeb-steps button.is-done:not(.is-current) { color: var(--cdeb-text); }
.cdeb-steps button.is-done .cdeb-step-n { color: var(--cdeb-gold-hi); }
.cdeb-steps button.is-current.is-done .cdeb-step-n { color: #6b5428; }
.cdeb-subtabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; padding: 4px; border: 1px solid var(--cdeb-line); border-radius: 10px; background: #161616; width: fit-content; max-width: 100%; }
.cdeb-subtabs button {
    display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-radius: 7px;
    color: var(--cdeb-muted); padding: 7px 12px; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; cursor: pointer;
}
.cdeb-subtabs button:hover { color: var(--cdeb-text); background: #262626; }
.cdeb-subtabs button.is-current { background: var(--cdeb-text); color: #111; }
.cdeb-sub-mark { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 50%; font-size: 11px; }
.cdeb-subtabs button.is-done .cdeb-sub-mark { border-color: var(--cdeb-gold); background: var(--cdeb-gold); color: #111; }
.cdeb-legend-value .cdeb-tick { margin-right: 4px; }
.cdeb-legend-todo { font-size: 14px; letter-spacing: 0; text-transform: none; color: #111; background: var(--cdeb-gold); border-radius: 4px; padding: 1px 8px; }
.cdeb-option.is-shown { border-style: dashed; border-color: #8a8a8a; }
.cdeb-option-shown { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--cdeb-muted); }
.cdeb-progress { font-size: 13px; color: var(--cdeb-muted); }
#cde-builder.is-complete .cdeb-progress { color: var(--cdeb-gold-hi); }
.cdeb-left { border: 1px solid var(--cdeb-gold); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; font-size: 14px; }
.cdeb-left p { margin: 0 0 6px; }
.cdeb-left ul { margin: 0; padding-left: 18px; }
.cdeb-left li { margin: 2px 0; }
.cdeb-buy[disabled] { background: #3a3a3a; border-color: #3a3a3a; color: #c8c8c8 !important; cursor: not-allowed; }
@media (max-width: 767px) {
    .cdeb-subtabs { width: auto; }
    .cdeb-subtabs button { font-size: 12px; padding: 6px 9px; }
}

/* This app: the zoom button renders hidden until the script runs, and the email box goes full width with the review. */
.cdeb-zoom[hidden] { display: none; }
@media (max-width: 991px) {
    .cdeb-email { max-width: none; margin-left: 0; }
}
