.bcc {
  --bcc-ink: #333;
  --bcc-muted: #777;
  --bcc-line: #ddd;
  --bcc-line-dark: #c8c8c8;
  --bcc-soft: #f5f5f5;
  --bcc-canvas: #ededec;
  --bcc-brand: #f02020;
  --bcc-brand-dark: #cc1717;
  --bcc-success: #28743f;
  --bcc-warning: #d39a12;
  max-width: 1170px;
  margin: 0 auto;
  padding: 30px 15px 64px;
  color: var(--bcc-ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 14px;
}

.bcc *, .bcc *::before, .bcc *::after { box-sizing: border-box; }

.bcc__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 48px;
  align-items: end;
  padding: 3px 0 27px;
  border-bottom: 1px solid var(--bcc-line);
}

.bcc__eyebrow,
.bcc-summary__eyebrow {
  margin: 0 0 8px;
  color: var(--bcc-brand);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.bcc__title {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -.025em;
}

.bcc__intro {
  max-width: 690px;
  margin: 13px 0 0;
  color: var(--bcc-muted);
  font-size: 15px;
  line-height: 1.5;
}

.bcc__lead-time {
  position: relative;
  padding: 14px 16px 14px 20px;
  border: 1px solid var(--bcc-line);
  border-left: 4px solid var(--bcc-brand);
  background: var(--bcc-soft);
}

.bcc__lead-time span,
.bcc__lead-time small {
  display: block;
  color: var(--bcc-muted);
  font-size: 12px;
}

.bcc__lead-time strong {
  display: block;
  margin: 2px 0;
  color: var(--bcc-ink);
  font-size: 20px;
  font-weight: 600;
}

.bcc__workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(270px, 300px);
  gap: 26px;
  align-items: start;
  margin-top: 30px;
}

.bcc__builder { min-width: 0; }

.bcc-diagram {
  position: relative;
  display: grid;
  grid-template-columns: 155px minmax(54px, 1fr) 155px;
  align-items: start;
  min-height: 264px;
  margin-bottom: 0;
  padding: 30px 12px 14px;
  border: 1px solid var(--bcc-line);
  background-color: #fafafa;
  background-image:
    linear-gradient(rgba(51, 51, 51, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(51, 51, 51, .035) 1px, transparent 1px);
  background-size: 16px 16px;
  overflow: hidden;
}

.bcc-diagram::before {
  content: attr(data-title);
  position: absolute;
  top: 9px;
  left: 12px;
  color: #999;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .12em;
}

.bcc-diagram__end {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: start stretch;
  min-width: 0;
  height: 116px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--bcc-ink);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.bcc-diagram__end-inner {
  display: grid;
  grid-template-rows: 90px auto;
  place-items: center;
  width: 100%;
  height: 100%;
  animation: bcc-drawing-in .22s ease both;
}

.bcc-diagram__technical {
  display: flex;
  align-items: center;
  width: 100%;
  height: 90px;
  min-width: 0;
}

/* Keep inline connector drawings inside their grid cell in Safari/iOS.
 * Without explicit dimensions Safari uses the SVG default 300x150 canvas;
 * the diagram's overflow then clips the connector while leaving the cable visible. */
.bcc-diagram__technical .bcc-end-svg {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  max-width: 100%;
  height: 100%;
}

.bcc-diagram__document {
  display: grid;
  grid-row: 2;
  place-items: start center;
  min-width: 0;
  min-height: 108px;
  padding: 4px 6px 0;
}

.bcc-diagram__document--a { grid-column: 1; }
.bcc-diagram__document--b { grid-column: 3; }

.bcc-diagram__document figure {
  display: grid;
  place-items: center;
  width: 100%;
  min-width: 0;
  margin: 0;
}

.bcc-diagram__document img {
  display: block;
  width: auto;
  max-width: 100%;
  height: 104px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.bcc-diagram__end-inner small {
  padding: 3px 6px;
  background: rgba(250, 250, 250, .92);
  color: #555;
  font-size: 9px;
  line-height: 1.15;
}

.bcc-diagram__line {
  position: relative;
  z-index: 1;
  height: 8px;
  margin: 41px -1px 0;
  border-radius: 1px;
  background: #42474a;
  box-shadow: inset 0 1px rgba(255, 255, 255, .35), inset 0 -1px rgba(0, 0, 0, .18);
}

.bcc-diagram__line::before {
  content: "";
  position: absolute;
  z-index: 2;
  top: -3px;
  left: 50%;
  width: 30px;
  height: 14px;
  transform: translateX(-50%);
  background: #fafafa;
}

.bcc-diagram__line::after {
  content: "";
  position: absolute;
  z-index: 3;
  top: -5px;
  left: 50%;
  width: 8px;
  height: 18px;
  border-right: 2px solid #42474a;
  border-left: 2px solid #42474a;
  transform: translateX(-50%) skewX(-23deg);
}

.bcc-diagram__line span {
  position: absolute;
  left: 50%;
  top: 25px;
  transform: translateX(-50%);
  padding: 2px 7px;
  border-left: 1px solid #aaa;
  border-right: 1px solid #aaa;
  background: #fafafa;
  color: #555;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.bcc-stock {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 11px;
  align-items: start;
  min-height: 50px;
  margin: 0 0 24px;
  padding: 10px 13px;
  border: 1px solid var(--bcc-line);
  border-top: 0;
  background: #fff;
}

.bcc-stock__lamp {
  width: 9px;
  height: 9px;
  margin-top: 3px;
  border-radius: 50%;
  background: #a9a9a9;
  box-shadow: 0 0 0 3px rgba(169, 169, 169, .13);
}

.bcc-stock strong,
.bcc-stock small { display: block; }
.bcc-stock strong { font-size: 12px; line-height: 1.25; }
.bcc-stock small { margin-top: 2px; color: var(--bcc-muted); font-size: 11px; line-height: 1.35; }
.bcc-stock.is-available .bcc-stock__lamp { background: var(--bcc-success); box-shadow: 0 0 0 3px rgba(40, 116, 63, .14); }
.bcc-stock.is-partial .bcc-stock__lamp { background: var(--bcc-warning); box-shadow: 0 0 0 3px rgba(211, 154, 18, .16); }

.bcc-step {
  margin-bottom: 22px;
  border: 1px solid var(--bcc-line);
  background: #fff;
}

.bcc-step__heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 14px;
  background: var(--bcc-ink);
  color: #fff;
}

.bcc-step h2 {
  flex: 0 0 auto;
  margin: 0;
  color: #fff;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
  text-transform: uppercase;
}

.bcc-step p {
  margin: 0;
  color: #cfcfcf;
  font-size: 12px;
  line-height: 1.35;
  text-align: right;
}

.bcc-pair-note {
  margin-left: 7px;
  color: #e8e8e8;
  font-weight: 500;
  white-space: nowrap;
}

.bcc-pair-note[hidden] { display: none; }

.bcc-pair-note:not([hidden])::before {
  margin-right: 7px;
  color: #7d7d7d;
  content: "·";
}

.bcc-options {
  display: block;
  padding: 0 14px;
}

.bcc-option {
  position: relative;
  display: grid;
  grid-template-columns: 19px 66px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  min-height: 82px;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--bcc-line);
  background: #fff;
  color: var(--bcc-ink);
  text-align: left;
  cursor: pointer;
}

.bcc-option:last-child { border-bottom: 0; }
.bcc-option:hover:not(.is-disabled) { background: #fafafa; }

.bcc-option.is-selected {
  margin-right: -14px;
  margin-left: -14px;
  padding-right: 14px;
  padding-left: 14px;
  background: var(--bcc-soft);
  box-shadow: inset 4px 0 0 var(--bcc-brand);
}

.bcc-option.is-disabled {
  color: #aaa;
  cursor: not-allowed;
  opacity: .58;
}

.bcc-option input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--bcc-brand);
  cursor: inherit;
}

.bcc-option__thumb {
  display: grid;
  place-items: center;
  width: 66px;
  height: 66px;
  overflow: hidden;
  background: #fff;
}

.bcc-option__thumb svg {
  display: block;
  width: 100%;
  height: 100%;
  transition: transform .18s ease;
}

.bcc-option__thumb img {
  display: block;
  width: 100%;
  height: 100%;
  padding: 5px;
  object-fit: contain;
  mix-blend-mode: multiply;
  transition: transform .18s ease;
}

.bcc-option:hover:not(.is-disabled) .bcc-option__thumb svg,
.bcc-option:hover:not(.is-disabled) .bcc-option__thumb img { transform: scale(1.04); }

.bcc-end-svg,
.bcc-cable-svg { overflow: visible; }

.bcc-svg-cable { fill: #444a4e; }
.bcc-svg-cable-highlight { fill: none; stroke: rgba(255, 255, 255, .34); stroke-width: 1.2; stroke-linecap: round; }
.bcc-svg-body { fill: #dfe3e5; stroke: #343a3e; stroke-width: 1.5; }
.bcc-svg-face { fill: #eef0f1; stroke: #343a3e; stroke-width: 1.5; }
.bcc-svg-elbow { fill: #c9ced1; stroke: #343a3e; stroke-width: 1.5; }
.bcc-svg-accent { fill: #838b90; stroke: #343a3e; stroke-width: 1.2; }
.bcc-svg-thread { fill: none; stroke: #343a3e; stroke-width: 1.3; stroke-linecap: square; }
.bcc-svg-cut { fill: #272c2f; stroke: #555c60; stroke-width: 1.2; }
.bcc-svg-cut-line { fill: none; stroke: #1e2224; stroke-width: 2; stroke-dasharray: 2 2; }
.bcc-svg-wire { fill: none; stroke: #677178; stroke-width: 2.2; stroke-linecap: round; }
.bcc-svg-ferrule { fill: #e8ecee; stroke: #343a3e; stroke-width: 1; }
.bcc-svg-ferrule-neck { fill: #9aa3a8; stroke: #343a3e; stroke-width: .8; }
.bcc-option.is-selected .bcc-svg-accent,
.bcc-option.is-selected .bcc-svg-ferrule-neck { fill: var(--bcc-brand); }

.bcc-option__thumb--empty {
  background:
    linear-gradient(135deg, transparent 46%, #ddd 47%, #ddd 53%, transparent 54%),
    #f4f4f4;
}

.bcc-option__content,
.bcc-option strong,
.bcc-option small { display: block; }

.bcc-option strong {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.bcc-option small {
  margin-top: 3px;
  color: var(--bcc-muted);
  font-size: 12px;
  line-height: 1.3;
}

.bcc-option > b {
  flex: 0 0 auto;
  color: var(--bcc-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.bcc-option.is-selected > b { color: var(--bcc-brand-dark); }

.bcc-cable-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.bcc-cable-row .bcc-options { min-width: 0; }

.bcc-length {
  display: grid;
  grid-template-columns: 72px minmax(100px, 128px) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--bcc-line);
  border-left: 0;
  background: var(--bcc-soft);
}

.bcc-length span {
  margin: 0;
  color: var(--bcc-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.bcc-length input {
  width: 100%;
  height: 46px;
  padding: 7px 10px;
  border: 1px solid var(--bcc-line-dark);
  border-radius: 0;
  background: #fff;
  color: var(--bcc-ink);
  font-size: 24px;
  font-weight: 600;
  outline: none;
}

.bcc-length input:focus {
  border-color: #777;
  box-shadow: inset 3px 0 0 var(--bcc-brand);
}

.bcc-length small {
  display: block;
  margin: 0;
  color: var(--bcc-muted);
  font-size: 10px;
  line-height: 1.35;
}

.bcc-summary {
  position: sticky;
  top: 20px;
  padding: 0 20px 20px;
  border: 1px solid var(--bcc-line-dark);
  border-radius: 0;
  background: #f6f6f6;
  box-shadow: none;
}

.bcc-summary__eyebrow {
  margin: 0 -20px 18px;
  padding: 12px 20px;
  background: var(--bcc-ink);
  color: #fff;
  font-size: 12px;
  letter-spacing: .06em;
}

.bcc-summary h2 {
  overflow-wrap: anywhere;
  margin: 0;
  color: var(--bcc-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
}

.bcc-summary__lines { margin: 19px 0; }

.bcc-summary__lines > div {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px solid var(--bcc-line);
}

.bcc-summary dt {
  color: var(--bcc-muted);
  font-size: 11px;
  text-transform: uppercase;
}

.bcc-summary dd {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.bcc-pinout { padding: 3px 0 16px; }
.bcc-pinout span, .bcc-pinout strong { display: block; }
.bcc-pinout span { color: var(--bcc-muted); font-size: 11px; text-transform: uppercase; }

.bcc-pinout strong {
  margin-top: 5px;
  color: #444;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
}

.bcc-price {
  padding-top: 15px;
  border-top: 1px solid var(--bcc-line-dark);
}

.bcc-price > span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 0;
  color: var(--bcc-muted);
  font-size: 12px;
}

.bcc-price > span b { color: var(--bcc-ink); }
.bcc-price > span.bcc-price__discount,
.bcc-price > span.bcc-price__discount b { color: var(--bcc-success); }

.bcc-price > strong {
  display: block;
  margin-top: 17px;
  color: var(--bcc-ink);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: -.025em;
}

.bcc-price > strong small {
  color: var(--bcc-muted);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

.bcc-price p { margin: 3px 0 17px; color: var(--bcc-muted); }

.bcc-price p b { color: var(--bcc-ink); font-weight: 600; }

.bcc-quantity {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 84px;
  gap: 14px;
  align-items: center;
  margin: 0 0 12px;
  padding: 12px 0;
  border-top: 1px solid var(--bcc-line-dark);
  color: var(--bcc-ink);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.bcc-quantity input {
  width: 84px;
  height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--bcc-line-dark);
  border-radius: 0;
  background: #fff;
  color: var(--bcc-ink);
  font-size: 19px;
  font-weight: 600;
  text-align: center;
  outline: none;
}

.bcc-quantity input:focus {
  border-color: #777;
  box-shadow: inset 3px 0 0 var(--bcc-brand);
}

.bcc-button {
  width: 100%;
  min-height: 46px;
  padding: 11px 15px;
  border: 1px solid #222;
  border-radius: 0;
  background: var(--bcc-ink);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  cursor: pointer;
}

.bcc-button:hover:not(:disabled),
.bcc-button:focus-visible:not(:disabled) {
  border-color: var(--bcc-brand-dark);
  background: var(--bcc-brand);
}

.bcc-button:focus-visible,
.bcc-option:focus-within { outline: 2px solid var(--bcc-brand); outline-offset: 2px; }
.bcc-button:disabled { opacity: .48; cursor: wait; }

.bcc-button--secondary {
  margin-top: 8px;
  border-color: #777;
  background: transparent;
  color: var(--bcc-ink);
}

.bcc-button--secondary:hover:not(:disabled),
.bcc-button--secondary:focus-visible:not(:disabled) { color: #fff; }

.bcc-summary__note {
  margin: 13px 0 0;
  color: var(--bcc-muted);
  font-size: 11px;
  line-height: 1.45;
}

.bcc-message {
  margin-top: 16px;
  padding: 12px 14px;
  border: 1px solid var(--bcc-line);
  border-left: 4px solid var(--bcc-brand);
  background: var(--bcc-soft);
}

.bcc-message--success { border-left-color: var(--bcc-success); color: var(--bcc-success); }
.bcc-message--error { border-left-color: #b92727; color: #922020; }

[data-bcc-ready="true"] .bcc-diagram { animation: bcc-enter .28s ease both; }

@keyframes bcc-enter {
  from { opacity: .3; }
  to { opacity: 1; }
}

@keyframes bcc-drawing-in {
  from { opacity: .2; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 980px) {
  .bcc__workspace { grid-template-columns: 1fr; }
  .bcc-summary { position: static; }
}

@media (max-width: 680px) {
  .bcc { padding: 20px 10px 44px; }
  .bcc__header { grid-template-columns: 1fr; gap: 20px; }
  .bcc__title { font-size: 30px; }
  .bcc__lead-time { max-width: 260px; }
  .bcc__workspace { margin-top: 20px; }
  .bcc-diagram { grid-template-columns: 112px minmax(30px, 1fr) 112px; min-height: 0; padding: 25px 7px 12px; }
  .bcc-diagram__end { height: 96px; font-size: 8px; }
  .bcc-diagram__end-inner { grid-template-rows: 72px auto; }
  .bcc-diagram__technical { height: 72px; }
  .bcc-diagram__line { margin-top: 32px; }
  .bcc-diagram__end-inner small { font-size: 7px; }
  .bcc-diagram__line span { top: 20px; font-size: 10px; }
  .bcc-diagram__document { min-height: 92px; padding: 3px 4px 0; }
  .bcc-diagram__document img { height: 88px; }
  .bcc-step__heading { display: block; }
  .bcc-step p { margin-top: 4px; text-align: left; }
  .bcc-option { grid-template-columns: 17px 56px minmax(0, 1fr) auto; gap: 9px; min-height: 74px; }
  .bcc-option__thumb { width: 56px; height: 56px; }
  .bcc-cable-row { grid-template-columns: 1fr; }
  .bcc-length { grid-template-columns: 1fr; gap: 8px; border-top: 1px solid var(--bcc-line); border-left: 0; }
  .bcc-length input { max-width: 160px; }
}

@media (prefers-reduced-motion: reduce) {
  .bcc *, .bcc *::before, .bcc *::after { animation: none !important; transition: none !important; }
}
