/* Black Badge Doors — Door & Window Designer
   Every rule is scoped to .bbd so it will not affect the rest of your site.
   Brand values are the variables right below. */
.bbd {
  --bbd-ink: #1B1B1B;
  --bbd-ink-2: #3A3A3A;
  --bbd-mute: #6B6B6B;
  --bbd-line: #E6E6E6;
  --bbd-line-2: #E3E3E3;
  --bbd-field: #BDBDBD;
  --bbd-paper: #FFFFFF;
  --bbd-wash: #F7F7F5;
  --bbd-thumb: #FAFAF8;
  --bbd-danger: #8A2B22;
  --bbd-head: 'Montserrat', system-ui, sans-serif;
  --bbd-body: 'Nunito Sans', system-ui, sans-serif;
  color: var(--bbd-ink); background: var(--bbd-paper);
  font-family: var(--bbd-body); font-size: 17px; line-height: 1.6;
}
.bbd *, .bbd *::before, .bbd *::after { box-sizing: border-box; }
.bbd :where(p, h1, h2, ul) { margin: 0; }
.bbd :where(button, input, textarea) { font: inherit; color: inherit; }
.bbd :where(a) { color: var(--bbd-ink); }
.bbd [hidden] { display: none !important; }
.bbd :focus-visible { outline: 2px solid var(--bbd-ink); outline-offset: 2px; }

/* Type */
.bbd-eyebrow { font-family: var(--bbd-head); font-weight: 500; font-size: 12px; letter-spacing: .28em; color: var(--bbd-mute); text-transform: uppercase; }
.bbd-h1 { font-family: var(--bbd-head); font-weight: 300; font-size: clamp(30px, 5vw, 60px); line-height: 1.12; letter-spacing: .08em; text-transform: uppercase; }
.bbd-h2 { font-family: var(--bbd-head); font-weight: 300; font-size: clamp(26px, 3.4vw, 40px); line-height: 1.2; letter-spacing: .08em; text-transform: uppercase; }
.bbd-label { font-family: var(--bbd-head); font-weight: 500; font-size: 12px; letter-spacing: .22em; margin-bottom: 14px; text-transform: uppercase; }
.bbd-sublabel { font-size: 12px; font-weight: 700; color: var(--bbd-mute); letter-spacing: .14em; margin: 0 0 8px; text-transform: uppercase; }
.bbd-lede { color: var(--bbd-ink-2); }
.bbd-small { font-size: 13px; color: var(--bbd-mute); }

/* Layout */
.bbd-wrap { max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.bbd-section { padding: 72px 0; }
.bbd-section--wash { background: var(--bbd-wash); }
.bbd-section--rule { border-top: 1px solid var(--bbd-line); }
.bbd-center { text-align: center; }
.bbd-hero { max-width: 920px; margin: 0 auto; padding: 64px 20px 40px; text-align: center; }
.bbd-hero .bbd-eyebrow { margin-bottom: 16px; }
.bbd-hero .bbd-lede { margin: 22px auto 0; max-width: 620px; }
.bbd-builder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-bottom: 72px; }
.bbd-controls { display: flex; flex-direction: column; gap: 34px; min-width: 0; }
.bbd-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.bbd-grid--wide { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.bbd-grid--fields { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }

/* Preview */
.bbd-preview { min-width: 0; display: flex; flex-direction: column; }
.bbd-scene { position: relative; height: 400px; background: var(--bbd-paper); display: flex; align-items: center; justify-content: center; overflow: hidden; transition: background .25s; }
.bbd-scene::after { content: ""; position: absolute; left: 50%; bottom: 7%; width: 70%; height: 26px; transform: translateX(-50%); background: radial-gradient(ellipse at center, rgba(0,0,0,.16) 0%, rgba(0,0,0,0) 70%); pointer-events: none; }
.bbd-scene--dark { background: #141414; }
.bbd-scene--dark::after { background: radial-gradient(ellipse at center, rgba(255,255,255,.07) 0%, rgba(255,255,255,0) 70%); }
.bbd-art { position: relative; z-index: 1; max-width: 94%; max-height: 88%; display: flex; justify-content: center; }
.bbd-art svg { display: block; max-width: 100%; max-height: 100%; height: auto; overflow: visible; }
.bbd-dimtext { font-family: var(--bbd-head); letter-spacing: .12em; }
.bbd-pricebox { border-bottom: 1px solid var(--bbd-line); padding: 26px 4px; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.bbd-pricebox__label { font-family: var(--bbd-head); font-size: 11px; letter-spacing: .24em; color: var(--bbd-mute); }
.bbd-price { font-family: var(--bbd-head); font-weight: 300; font-size: clamp(30px, 3.4vw, 42px); line-height: 1.2; letter-spacing: .02em; transition: opacity .2s; }
.bbd-is-pricing .bbd-price, .bbd-is-pricing .bbd-bar__price { opacity: .55; }
.bbd-summary { margin: 12px auto 0; max-width: 460px; color: var(--bbd-ink-2); font-size: 14px; }
.bbd-flash { min-height: 1.4em; font-size: 14px; color: var(--bbd-ink-2); }

/* Buttons */
.bbd-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 22px; border: 1px solid var(--bbd-ink); border-radius: 0; background: var(--bbd-ink); color: #FFFFFF; font-family: var(--bbd-head); font-weight: 500; font-size: 12px; letter-spacing: .2em; text-decoration: none; cursor: pointer; text-transform: uppercase; }
.bbd-btn:hover { background: #000000; color: #FFFFFF; }
.bbd-btn--ghost { background: var(--bbd-paper); color: var(--bbd-ink); }
.bbd-btn--ghost:hover { background: var(--bbd-wash); color: var(--bbd-ink); }
.bbd-btn--block { width: 100%; }
.bbd-btn:disabled { opacity: .5; cursor: default; }
.bbd-add { margin: 16px auto 0; width: 100%; max-width: 420px; }
.bbd-opt { min-height: 56px; display: flex; align-items: center; gap: 10px; text-align: left; padding: 10px 14px; border: 1px solid var(--bbd-line-2); border-radius: 0; background: var(--bbd-paper); cursor: pointer; line-height: 1.3; }
.bbd-opt:hover { border-color: #9A9A9A; }
.bbd-opt[aria-pressed="true"] { border-color: var(--bbd-ink); box-shadow: inset 0 0 0 .5px var(--bbd-ink); }
.bbd-opt__text { display: flex; flex-direction: column; }
.bbd-opt__t { font-weight: 700; font-size: 15px; }
.bbd-opt__s { font-size: 13px; color: var(--bbd-mute); }
.bbd-swatch { width: 24px; height: 24px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.bbd-stepper { display: flex; gap: 6px; }
.bbd-step { width: 48px; min-height: 48px; flex: none; border: 1px solid var(--bbd-ink); border-radius: 0; background: var(--bbd-paper); font-size: 22px; line-height: 1; cursor: pointer; }
.bbd-step:hover { background: var(--bbd-wash); }
.bbd-num { flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--bbd-field); font-size: 18px; font-weight: 700; }
.bbd-field-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.bbd-input { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid var(--bbd-field); border-radius: 0; background: var(--bbd-paper); }
.bbd-input--num { flex: 1; min-width: 0; text-align: center; font-size: 18px; font-weight: 700; padding: 0 8px; }
textarea.bbd-input { padding: 10px 12px; resize: vertical; min-height: 72px; }
input[type="color"].bbd-input { padding: 2px; cursor: pointer; }
.bbd-form-label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }

/* Custom RAL */
.bbd-custom { margin-top: 14px; border: 1px solid var(--bbd-line-2); padding: 18px; }
.bbd-ralgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 8px; }
.bbd-ral { min-height: 64px; padding: 0 0 6px; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--bbd-line-2); border-radius: 0; background: var(--bbd-paper); font-size: 11px; color: var(--bbd-ink-2); cursor: pointer; }
.bbd-ral span { display: block; height: 38px; }
.bbd-ral[aria-pressed="true"] { border: 2px solid var(--bbd-ink); }

/* Sticky price bar (phones/tablets) */
.bbd-bar { position: sticky; bottom: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 -20px; padding: 12px 20px; background: var(--bbd-paper); border-top: 1px solid #E0E0E0; }
.bbd-bar__info { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.bbd-bar__dims { font-family: var(--bbd-head); font-size: 11px; letter-spacing: .14em; color: var(--bbd-mute); }
.bbd-bar__price { font-family: var(--bbd-head); font-size: 18px; white-space: nowrap; }
.bbd-bar__actions { display: flex; gap: 8px; flex: none; }
.bbd-bar .bbd-btn { min-height: 44px; padding: 0 12px; letter-spacing: .1em; }

/* Project */
.bbd-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 20px; }
.bbd-tab { min-height: 44px; padding: 0 16px; border: 1px solid var(--bbd-line-2); border-radius: 0; background: var(--bbd-paper); font-size: 14px; font-weight: 600; cursor: pointer; }
.bbd-tab[aria-pressed="true"] { border-color: var(--bbd-ink); box-shadow: inset 0 0 0 .5px var(--bbd-ink); }
.bbd-tab--new { border-style: dashed; border-color: #8A8A8A; }
.bbd-projname { max-width: 420px; margin: 0 auto 28px; }
.bbd-empty { border: 1px dashed #CFCFCF; padding: 32px 20px; text-align: center; color: var(--bbd-ink-2); }
.bbd-empty p { margin-bottom: 14px; }
.bbd-items { list-style: none; padding: 0; border-top: 1px solid var(--bbd-line); }
.bbd-item { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--bbd-line); }
.bbd-item__art { width: 88px; height: 110px; background: var(--bbd-thumb); display: flex; align-items: center; justify-content: center; padding: 8px; }
.bbd-item__art svg { display: block; max-width: 100%; max-height: 100%; }
.bbd-item__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.bbd-item__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.bbd-item__title { font-family: var(--bbd-head); font-weight: 500; font-size: 13px; letter-spacing: .16em; }
.bbd-item__price { font-weight: 700; }
.bbd-item__spec { font-size: 14px; color: var(--bbd-ink-2); }
.bbd-item__each { font-size: 13px; color: var(--bbd-mute); }
.bbd-item__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 6px; }
.bbd-item__actions .bbd-step { width: 44px; min-height: 44px; font-size: 20px; }
.bbd-item__qlabel { font-size: 13px; font-weight: 700; }
.bbd-item__qty { min-width: 32px; text-align: center; font-weight: 700; }
.bbd-link { min-height: 44px; border: 0; background: none; padding: 0 4px; font-size: 14px; font-weight: 700; text-decoration: underline; cursor: pointer; }
.bbd-link--danger { color: var(--bbd-danger); }
.bbd-total { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; padding: 22px 0; }
.bbd-total__label { font-family: var(--bbd-head); font-size: 12px; letter-spacing: .24em; color: var(--bbd-mute); }
.bbd-total__price { font-family: var(--bbd-head); font-weight: 300; font-size: clamp(26px, 3vw, 36px); }
.bbd-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }

/* Quote form */
.bbd-quote { border: 1px solid var(--bbd-ink); padding: 28px 22px; margin-top: 40px; }
.bbd-quote__title { font-family: var(--bbd-head); font-weight: 500; font-size: 18px; letter-spacing: .12em; }
.bbd-notice { margin: 18px 0 20px; background: var(--bbd-wash); padding: 16px 18px; }
.bbd-notice__title { font-family: var(--bbd-head); font-weight: 600; font-size: 12px; letter-spacing: .2em; margin-bottom: 6px; }
.bbd-notice p:last-child { color: var(--bbd-ink-2); font-size: 15px; }
.bbd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.bbd-status { margin-top: 10px; font-size: 14px; color: var(--bbd-danger); text-align: center; min-height: 1.2em; }

/* Styles gallery */
.bbd-styles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; margin-top: 36px; }
.bbd-style { display: flex; flex-direction: column; padding: 0; border: 1px solid var(--bbd-line); border-radius: 0; background: var(--bbd-paper); text-align: left; cursor: pointer; transition: border-color .2s; }
.bbd-style:hover { border-color: var(--bbd-ink); }
.bbd-style__art { display: flex; align-items: center; justify-content: center; height: 280px; background: var(--bbd-thumb); padding: 24px; }
.bbd-style__art svg { display: block; height: 100%; width: auto; max-width: 100%; }
.bbd-style__body { padding: 18px 16px 20px; display: flex; flex-direction: column; gap: 4px; }
.bbd-style__name { font-family: var(--bbd-head); font-weight: 500; font-size: 13px; letter-spacing: .18em; }
.bbd-style__sub { font-size: 14px; color: var(--bbd-mute); }
.bbd-style__cta { margin-top: 8px; font-family: var(--bbd-head); font-size: 11px; letter-spacing: .2em; text-decoration: underline; }

/* Feature photo */
.bbd-split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; align-items: center; }
.bbd-split img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.bbd-split .bbd-eyebrow { margin-bottom: 12px; }
.bbd-split .bbd-h2 { margin-bottom: 18px; }
.bbd-split .bbd-lede { margin-bottom: 20px; }

/* Process + FAQ */
.bbd-steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); text-align: left; border-top: 1px solid var(--bbd-line); margin-top: 36px; }
.bbd-steps > div { padding: 26px 20px 26px 0; }
.bbd-steps__n { font-family: var(--bbd-head); font-weight: 300; font-size: 28px; }
.bbd-steps__t { margin: 8px 0 4px !important; font-weight: 700; }
.bbd-steps__d { color: var(--bbd-ink-2); font-size: 15px; }
.bbd-faq { max-width: 860px; margin: 28px auto 0; display: flex; flex-direction: column; gap: 10px; }
.bbd-faq details { background: var(--bbd-paper); padding: 18px 22px; }
.bbd-faq summary { cursor: pointer; font-weight: 700; }
.bbd-faq details p { margin-top: 10px; color: var(--bbd-ink-2); }

/* Print-only */
.bbd-printonly { display: none; }
.bbd-print-head { margin-bottom: 24px; }
.bbd-print-head__brand { font-family: var(--bbd-head); font-size: 22px; }
.bbd-print-head p { font-size: 13px; color: var(--bbd-ink-2); margin-top: 4px; }

/* Desktop */
@media (min-width: 1024px) {
  .bbd-builder { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 64px; }
  .bbd-preview { position: sticky; top: 24px; align-self: start; }
  .bbd-scene { height: 540px; }
  .bbd-bar { display: none; }
  .bbd-split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
}

/* Print / Save as PDF: only the project prints, even inside your site's page */
@media print {
  body * { visibility: hidden !important; }
  #bbd-project, #bbd-project * { visibility: visible !important; }
  #bbd-project { position: absolute; left: 0; top: 0; width: 100%; padding: 0 !important; border: 0 !important; }
  .bbd .bbd-noprint { display: none !important; }
  .bbd .bbd-printonly { display: block !important; }
  .bbd-item { break-inside: avoid; }
}
