.sfmc {
  --sfmc-panel: #191b1f;
  --sfmc-panel-2: #202329;
  --sfmc-line: #343942;
  --sfmc-line-soft: #2a2e35;
  --sfmc-text: #f5f5f5;
  --sfmc-muted: #aeb4bf;
  --sfmc-yellow: #ffc400;
  --sfmc-yellow-soft: rgba(255, 196, 0, .12);
  --sfmc-green: #43d067;
  width: min(1240px, calc(100% - 40px));
  margin: 52px auto 64px;
  color: var(--sfmc-text);
  background: var(--sfmc-panel);
  border: 1px solid var(--sfmc-line);
  border-radius: 8px;
  overflow: hidden;
  font-size: 15px;
  line-height: 1.45;
  letter-spacing: 0;
}
.sfmc, .sfmc * { box-sizing: border-box; }
.sfmc button, .sfmc input { font: inherit; letter-spacing: 0; }
.sfmc__header { padding: 22px 24px 18px; border-bottom: 1px solid var(--sfmc-line); }
.sfmc__header h2 { margin: 0; color: var(--sfmc-yellow); font-size: 24px; line-height: 1.2; }
.sfmc__header p { max-width: 720px; margin: 7px 0 0; color: var(--sfmc-muted); font-size: 15px; font-weight: 400; }
.sfmc__panel-details { max-width: 720px; margin-top: 10px; color: var(--sfmc-muted); font-size: 14px; }
.sfmc__panel-details summary { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 2px 2px 2px 0; color: #d8dbe0; font-weight: 600; list-style: none; cursor: pointer; }
.sfmc__panel-details summary::-webkit-details-marker { display: none; }
.sfmc__panel-details summary::after { color: var(--sfmc-yellow); content: '⌄'; font-size: 15px; line-height: 1; }
.sfmc__panel-details[open] summary::after { content: '⌃'; }
.sfmc__panel-details summary:focus-visible { border-radius: 3px; outline: 2px solid var(--sfmc-yellow); outline-offset: 3px; }
.sfmc__panel-details-content { display: grid; gap: 3px; margin-top: 8px; padding: 9px 12px; border-left: 2px solid var(--sfmc-yellow); background: rgba(255,255,255,.025); }
.sfmc__panel-details-content strong { color: #fff; font-size: 14px; font-weight: 600; }
.sfmc__panel-details-content span { color: var(--sfmc-muted); font-size: 13px; }
.sfmc__warning { display: flex; gap: 12px; margin: 18px 24px 0; padding: 13px 15px; border: 1px solid #9b7212; border-radius: 7px; background: #332a12; }
.sfmc__warning strong { flex: 0 0 auto; color: var(--sfmc-yellow); }
.sfmc__grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, 1fr); }
.sfmc__left, .sfmc__right { min-width: 0; padding: 24px; }
.sfmc__left { border-right: 1px solid var(--sfmc-line); }
.sfmc__control { display: block; margin-bottom: 18px; }
.sfmc__label { display: block; margin-bottom: 8px; color: var(--sfmc-yellow); font-size: 13px; font-weight: 800; }
.sfmc__segments { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sfmc__segments button { min-height: 44px; border: 1px solid var(--sfmc-line); border-radius: 7px; background: var(--sfmc-panel-2); color: #fff; font-weight: 700; cursor: pointer; }
.sfmc .sfmc__segments button:not(.is-active):hover { border-color: #6f7680 !important; background: rgba(255,255,255,.045) !important; color: #fff !important; box-shadow: none !important; }
.sfmc__segments button.is-active { border-color: var(--sfmc-yellow); background: var(--sfmc-yellow-soft); color: var(--sfmc-yellow); }
.sfmc [data-sfmc-control="roof"] button.is-active,
.sfmc [data-sfmc-control="roof"] button.is-active:hover { color: #fff; }
.sfmc [data-sfmc-control="clampColor"] { grid-template-columns: repeat(2, minmax(0, 112px)); justify-content: start; }
.sfmc [data-sfmc-control="clampColor"] button { min-height: 38px; padding: 0 12px; font-size: 13px; font-weight: 600; }
.sfmc__settings-row { display: grid; grid-template-columns: minmax(180px, 220px) minmax(260px, 1fr); gap: 14px; align-items: end; }
.sfmc__field { height: 44px; display: flex; align-items: center; overflow: hidden; border: 1px solid var(--sfmc-line); border-radius: 7px; background: #fff; color: #171717; }
.sfmc__field input { width: 100%; height: 100%; min-width: 0; padding: 0 12px; border: 0; outline: 0; background: #fff; color: #171717; font-weight: 700; }
.sfmc__field span { padding-right: 12px; font-size: 13px; font-weight: 700; }
.sfmc__swatch { display: inline-block; width: 14px; height: 14px; margin-right: 7px; border: 1px solid #fff; border-radius: 50%; vertical-align: -2px; }
.sfmc__swatch--black { background: #171717; }
.sfmc__swatch--silver { background: #c7ccd3; }
.sfmc__rows { display: grid; gap: 0; overflow: hidden; border: 1px solid var(--sfmc-line); border-radius: 7px; background: #1c1f24; }
.sfmc__row { display: grid; grid-template-columns: minmax(132px, 1fr) 156px 140px 32px; gap: 12px; align-items: center; min-height: 66px; padding: 10px 12px 10px 14px; border: 0; border-bottom: 1px solid var(--sfmc-line); background: transparent; }
.sfmc__row:last-child { border-bottom: 0; }
.sfmc__row-title strong, .sfmc__row-title small { display: block; }
.sfmc__row-title strong { color: #fff; font-size: 15px; font-weight: 650; }
.sfmc__row-title small { margin-top: 3px; color: var(--sfmc-muted); font-size: 12px; font-weight: 400; }
.sfmc__orientation { display: grid; grid-template-columns: 1fr 1fr; min-width: 0; height: 42px; padding: 3px; border: 1px solid var(--sfmc-line); border-radius: 7px; background: #14161a; }
.sfmc__orientation button { min-width: 0; display: flex; align-items: center; justify-content: center; gap: 7px; padding: 0 7px; border: 0; border-radius: 5px; background: transparent; color: var(--sfmc-muted); font-size: 12px; font-weight: 550; white-space: nowrap; cursor: pointer; }
.sfmc__orientation button::before { width: 8px; height: 13px; flex: 0 0 auto; border: 1.5px solid currentColor; border-radius: 1px; content: ''; }
.sfmc__orientation button:nth-child(2)::before { width: 13px; height: 8px; }
.sfmc__orientation button.is-active { background: var(--sfmc-yellow); color: #111; font-weight: 650; }
.sfmc__stepper { display: grid; grid-template-columns: 42px minmax(54px, 1fr) 42px; min-width: 0; height: 42px; overflow: hidden; border: 1px solid var(--sfmc-line); border-radius: 7px; background: #14161a; }
.sfmc__stepper button, .sfmc__stepper output { min-width: 0; display: grid; place-items: center; margin: 0; padding: 0; border: 0; border-right: 1px solid var(--sfmc-line); background: transparent; color: #fff; font-weight: 650; }
.sfmc__stepper button { font-size: 18px; font-weight: 500; cursor: pointer; }
.sfmc__stepper output { font-size: 14px; white-space: nowrap; }
.sfmc__stepper button:last-child { border: 0; background: var(--sfmc-yellow); color: #111; }
.sfmc__remove { width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 5px; background: transparent; color: #8f96a2; font-size: 18px; font-weight: 400; cursor: pointer; }
.sfmc__remove:hover { background: rgba(255,255,255,.06); color: #fff; }
.sfmc__add-row { width: 100%; min-height: 42px; margin-top: 10px; border: 1px dashed #555c67; border-radius: 7px; background: transparent; color: #d8dbe0; font-weight: 600; cursor: pointer; }
.sfmc__add-row:hover { border-color: #7a828e; background: rgba(255,255,255,.035); color: #fff; }
.sfmc__add-row:focus { border-color: var(--sfmc-yellow); background: transparent; color: #fff; outline: 2px solid rgba(255,196,0,.22); outline-offset: 2px; }
.sfmc__visual-wrap { margin-top: 22px; }
.sfmc__visual-heading { display: flex; justify-content: space-between; gap: 16px; align-items: end; margin-bottom: 10px; }
.sfmc__visual-heading h3, .sfmc__materials-heading h3 { margin: 0; color: #fff; font-size: 18px; }
.sfmc__visual-heading span { color: var(--sfmc-muted); font-size: 12px; text-align: right; }
.sfmc__visual-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.sfmc__layer-toggles { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 10px; padding: 0; border: 0; }
.sfmc__layer-toggles legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.sfmc__layer-toggles label { min-height: 34px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border: 1px solid #404650; border-radius: 6px; background: #202329; color: #d9dde2; font-size: 12px; font-weight: 550; cursor: pointer; }
.sfmc__layer-toggles label:has(input:checked) { border-color: #8d761d; background: rgba(255,196,0,.09); color: #fff; }
.sfmc__layer-toggles label:has(input:disabled) { cursor: not-allowed; opacity: .42; }
.sfmc__layer-toggles input { width: 15px; height: 15px; margin: 0; accent-color: var(--sfmc-yellow); }
.sfmc__layer-toggles input:focus-visible { outline: 2px solid var(--sfmc-yellow); outline-offset: 2px; }
.sfmc__rail-legend { margin: -2px 0 10px; color: #c6cbd1; font-size: 12px; font-weight: 400; }
.sfmc__roof { min-height: 0; display: flex; flex-direction: column; justify-content: flex-start; gap: 14px; overflow: hidden; padding: 18px 16px 16px; border: 1px solid #4a3e21; border-radius: 8px; background-color: #171512; background-position: center, left top; background-repeat: no-repeat, repeat; }
.sfmc__roof[data-roof-type="tile"] { background-image: linear-gradient(rgba(9,10,12,.66), rgba(9,10,12,.66)), url('images/roof-tile.webp'); background-size: 100% 100%, var(--sfmc-tile-bg-width, 200px) var(--sfmc-tile-bg-height, 72px); background-repeat: no-repeat, repeat; }
.sfmc__roof[data-roof-type="metal"] { border-color: #4b535d; background-image: linear-gradient(rgba(9,10,12,.62), rgba(9,10,12,.62)), url('images/roof-trapezoid.webp'); background-size: 100% 100%, var(--sfmc-metal-bg-width, 96px) 100%; background-repeat: no-repeat, repeat-x; }
.sfmc__roof-product { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; padding-bottom: 11px; border-bottom: 1px solid rgba(255, 196, 0, .28); }
.sfmc__roof-product > div { min-width: 0; }
.sfmc__roof-label { display: block; color: var(--sfmc-yellow); font-size: 10px; font-weight: 850; text-transform: uppercase; }
.sfmc__roof-product strong { display: block; margin-top: 3px; color: #fff; font-size: 13px; overflow-wrap: anywhere; }
.sfmc__roof-size { color: #d1d5dc; font-size: 12px; font-weight: 700; white-space: nowrap; }
.sfmc__layout-viewport { position: relative; width: 100%; min-height: 1px; overflow: hidden; }
.sfmc__layout-stage { position: absolute; inset: 0 auto auto 0; transform-origin: left top; }
.sfmc__array-row { position: absolute; left: 0; }
.sfmc__row-tag { position: absolute; top: 50%; left: 0; width: 68px; color: #fff; font-size: 12px; font-weight: 700; line-height: 1.25; transform: translateY(-65%); }
.sfmc__row-tag span { display: block; margin-top: 2px; color: var(--sfmc-yellow); font-size: 11px; }
.sfmc__assembly { position: absolute; top: 0; min-width: 0; overflow: visible; }
.sfmc__assembly-stage { position: absolute; inset: 0 auto auto 0; transform-origin: left top; }
.sfmc__module-group { position: absolute; z-index: 3; display: flex; align-items: center; }
.sfmc__module-slot { position: relative; flex: 0 0 auto; }
.sfmc__module { position: absolute; top: 50%; left: 50%; border: 2px solid #e2e6eb; background-color: #0c2741; background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.2) 1px, transparent 1px), linear-gradient(145deg, #234d75, #071728); background-size: 100% calc(100% / 12), calc(100% / 6) 100%, 100% 100%; box-shadow: 0 3px 8px rgba(0,0,0,.52); transform: translate(-50%, -50%); transform-origin: center; }
.sfmc__module.is-landscape { transform: translate(-50%, -50%) rotate(90deg); }
.sfmc__rafter, .sfmc__rail, .sfmc__mini-rail, .sfmc__hook, .sfmc__joiner, .sfmc__clamp { position: absolute; display: block; transform: translate(-50%, -50%); pointer-events: auto; }
.sfmc__rafter { z-index: 1; width: 2px; border-left: 1px solid rgba(190,154,112,.72); border-right: 1px solid rgba(55,37,24,.58); background: rgba(119,76,43,.35); box-shadow: 0 0 2px rgba(0,0,0,.32); }
.sfmc__rail { z-index: 4; height: 3px; transform: translateY(-50%); border-radius: 1px; opacity: .9; }
.sfmc__rail--visible { border-top: 1px solid rgba(241,244,246,.88); border-bottom: 1px solid rgba(48,54,60,.92); background: rgba(146,155,163,.82); box-shadow: 0 1px 1px rgba(0,0,0,.45); }
.sfmc__rail--covered { height: 1.5px; border: 0; border-radius: 0; background: repeating-linear-gradient(90deg, rgba(210,215,220,.9) 0 6px, transparent 6px 10px); box-shadow: none; }
.sfmc__mini-rail { z-index: 2; height: 7px; border: 1px solid #555f68; border-radius: 1px; background: linear-gradient(to bottom, #e8ecef 0 24%, #7c8791 25% 45%, #d6dbdf 46% 65%, #65717b 66% 82%, #b6bec5 83%); box-shadow: 0 1px 2px rgba(0,0,0,.48), inset 0 1px rgba(255,255,255,.55); }
.sfmc__mini-rail::before { position: absolute; inset: 2px 3px; border-top: 1px solid rgba(37,42,48,.68); border-bottom: 1px solid rgba(255,255,255,.38); content: ''; }
.sfmc__roof[data-roof-type="metal"] .sfmc__mini-rail { z-index: 4; height: 6px; border-color: #737e88; opacity: .92; box-shadow: 0 0 0 1px rgba(12,15,18,.5), 0 1px 2px rgba(0,0,0,.58), inset 0 1px rgba(255,255,255,.65); }
.sfmc__hook { z-index: 5; width: 16px; height: 20px; margin-top: 7px; border: 0; background: linear-gradient(90deg, transparent 0 5px, #525b63 5px 6px, #d7dbde 6px 8px, #78828a 8px 10px, transparent 10px); filter: drop-shadow(0 1px 1px rgba(0,0,0,.7)); opacity: .96; }
.sfmc__hook::before { position: absolute; left: 1px; bottom: 0; width: 14px; height: 5px; border: 1px solid #535c64; border-radius: 1px; background: radial-gradient(circle at 3px 50%, #30363b 0 1px, #aeb5bb 1.2px 1.8px, transparent 2px), radial-gradient(circle at 10px 50%, #30363b 0 1px, #aeb5bb 1.2px 1.8px, transparent 2px), linear-gradient(#dce0e3, #77818a); box-shadow: inset 0 1px rgba(255,255,255,.38); content: ''; }
.sfmc__hook::after { position: absolute; top: 0; left: 7px; width: 8px; height: 6px; border-top: 3px solid #d8dde0; border-right: 3px solid #737d85; border-radius: 1px 2px 0 0; box-shadow: 0 -1px rgba(48,54,60,.72); content: ''; }
.sfmc__joiner { z-index: 5; width: 2px; height: 11px; border: 0; border-radius: 1px; background: #dce1e5; box-shadow: -1px 0 rgba(45,51,57,.9), 1px 0 rgba(255,255,255,.28), 0 1px 2px rgba(0,0,0,.45); }
.sfmc__clamp { z-index: 6; width: 9px; height: 9px; border: 1px solid #e0e4e8; border-radius: 2px; box-shadow: 0 1px 2px rgba(0,0,0,.58); }
.sfmc__clamp::after { position: absolute; top: 50%; left: 50%; width: 3px; height: 3px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; background: #555d65; content: ''; transform: translate(-50%, -50%); }
.sfmc__clamp.is-black { border-color: #747b83; background: #16191d; }
.sfmc__clamp.is-silver { border-color: #f2f4f6; background: linear-gradient(145deg, #eef1f3, #9da6ae); }
.sfmc__clamp.is-middle { width: 7px; }
.sfmc__dimension { position: absolute; height: 10px; border-top: 1px solid rgba(236,240,244,.7); color: #e7eaee; text-align: center; }
.sfmc__dimension::before, .sfmc__dimension::after { position: absolute; top: -4px; width: 1px; height: 7px; background: rgba(236,240,244,.82); content: ''; }
.sfmc__dimension::before { left: 0; }
.sfmc__dimension::after { right: 0; }
.sfmc__dimension span { position: relative; top: -7px; display: inline-block; padding: 0 6px; background: rgba(15,17,20,.9); color: #f3f4f6; font-size: 9px; font-weight: 600; line-height: 14px; }
.sfmc__metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.sfmc__metrics > div { padding: 10px 12px; border: 1px solid var(--sfmc-line); border-radius: 7px; background: var(--sfmc-panel-2); }
.sfmc__metrics strong, .sfmc__metrics span { display: block; }
.sfmc__metrics strong { color: #fff; font-size: 17px; }
.sfmc__metrics span { color: var(--sfmc-muted); font-size: 11px; }
.sfmc__materials-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.sfmc__materials-heading span { color: var(--sfmc-green); font-size: 12px; font-weight: 800; }
.sfmc__materials { border-top: 1px solid var(--sfmc-line); }
.sfmc__material { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--sfmc-line-soft); }
.sfmc__material-name strong, .sfmc__material-name small, .sfmc__material-price strong, .sfmc__material-price small { display: block; }
.sfmc__material-name strong, .sfmc__material-price strong { color: #fff; }
.sfmc__material-name small, .sfmc__material-price small { margin-top: 3px; color: var(--sfmc-muted); font-size: 12px; font-weight: 400; }
.sfmc__material-price { text-align: right; white-space: nowrap; }
.sfmc__total { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding: 15px; border: 1px solid #826b13; border-radius: 7px; background: var(--sfmc-yellow-soft); }
.sfmc__total span, .sfmc__total strong { color: #fff; font-weight: 800; }
.sfmc__total strong { font-size: 24px; }
.sfmc__cart { width: 100%; min-height: 50px; margin-top: 12px; border: 0; border-radius: 7px; background: var(--sfmc-yellow); color: #111; font-size: 16px; font-weight: 850; cursor: pointer; box-shadow: 0 7px 22px rgba(255,196,0,.18); }
.sfmc__cart:disabled { cursor: not-allowed; box-shadow: none; opacity: .48; }
.sfmc__status { min-height: 0; margin: 10px 0 0; font-size: 13px; }
.sfmc__status.is-success { color: var(--sfmc-green); }
.sfmc__status.is-error { color: #ff7b72; }
.sfmc__notice { margin: 12px 0 0; color: var(--sfmc-muted); font-size: 11px; line-height: 1.5; }
.sfmc [hidden] { display: none !important; }

.sfmc__legend-swatch.is-middle-clamp, .sfmc__legend-swatch.is-end-clamp { width: 10px; height: 10px; border: 1px solid #89919a; border-radius: 2px; background: #171a1e; }
.sfmc__legend-swatch.is-end-clamp { background: linear-gradient(145deg, #edf0f2, #949da5); }

@media (max-width: 860px) {
  body.sfmc-in-view .sf-mobile-buy-bar { opacity: 0 !important; pointer-events: none !important; transform: translateY(100%) !important; }
  .sf-mobile-buy-bar { transition: opacity .18s ease, transform .18s ease; }
  .single-product-page > .single-product-wrapper:has(+ .sfmc) { margin-bottom: 28px; }
  .single-product-page > .sfmc { margin-top: 0; }
  .sfmc { width: calc(100vw - 8px); max-width: none; margin: 28px 0 44px; margin-left: calc(50% - 50vw + 4px); }
  .sfmc__header { padding: 17px 16px 14px; }
  .sfmc__header h2 { font-size: 23px; }
  .sfmc__header p { font-size: 15px; }
  .sfmc__panel-details { margin-top: 9px; font-size: 14px; }
  .sfmc__grid { display: flex; flex-direction: column; }
  .sfmc__left, .sfmc__right { padding: 12px 10px; border: 0; }
  .sfmc__left { border-bottom: 1px solid var(--sfmc-line); }
  .sfmc__settings-row { grid-template-columns: 1fr; gap: 0; }
  .sfmc__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 30px; grid-template-areas: "title title remove" "orientation stepper stepper"; gap: 10px 8px; min-height: 108px; padding: 11px 10px; }
  .sfmc__row-title { grid-area: title; }
  .sfmc__orientation { grid-area: orientation; }
  .sfmc__stepper { grid-area: stepper; width: 100%; }
  .sfmc__remove { grid-area: remove; width: 30px; }
  .sfmc__roof { min-height: 0; padding: 15px 10px 13px; gap: 12px; }
  .sfmc__visual-heading { align-items: center; }
  .sfmc__visual-tools { gap: 7px; }
  .sfmc__visual-tools > span { display: none; }
  .sfmc__roof-product { flex-direction: column; gap: 5px; padding-bottom: 10px; }
  .sfmc__roof-product strong { font-size: 12px; }
  .sfmc__roof-size { font-size: 11px; }
  .sfmc__array-row { grid-template-columns: 44px minmax(0, 1fr); gap: 7px; }
  .sfmc__rail { min-height: 3px; }
  .sfmc__rail--covered { min-height: 1.5px; }
  .sfmc__mini-rail { min-height: 5px; }
  .sfmc__metrics { grid-template-columns: 1fr; }
  .sfmc__metrics > div { display: flex; justify-content: space-between; align-items: center; }
  .sfmc__metrics strong { font-size: 15px; }
  .sfmc__material { grid-template-columns: minmax(0, 1fr) 112px; }
  .sfmc__total strong { font-size: 21px; }
}

@media (max-width: 340px) {
  .sfmc { width: calc(100vw - 4px); margin-left: calc(50% - 50vw + 2px); }
  .sfmc__left, .sfmc__right { padding-right: 8px; padding-left: 8px; }
  .sfmc__row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 26px; gap: 8px 5px; padding: 9px 7px; }
  .sfmc__orientation button { gap: 5px; padding: 0 4px; font-size: 11px; }
  .sfmc__material { grid-template-columns: minmax(0, 1fr) 98px; gap: 8px; }
  .sfmc__material-name strong { font-size: 13px; }
  .sfmc__material-price small { font-size: 10px; }
}
