.sc-configurator { margin: 18px 0; }

/* Visualizer: stacked PNG layers (0=size base, 1=style, 2=colonial, 3=sash, 4=bug screen, 5=frame) */
.sc-visualizer {
  margin-bottom: 24px;
  max-width: 420px;
}
/* When visualizer is in shortcode holder (e.g. Divi left column): stick so right column can scroll */
.sc-visualizer-holder {
  width: 100%;
  position: sticky;
  top: 1rem;
  align-self: flex-start;
}
.sc-visualizer--in-holder {
  max-width: none;
  width: 100%;
  margin-bottom: 0;
}

/* Divi product layout: make row use flex-start so left column can stick; make right column scroll */
.et_pb_row:has(form.variations_form #sc-configurator) {
  align-items: flex-start;
}
.et_pb_column:has(#sc-configurator) {
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
}

.sc-visualizer__stack {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  background: #f0f0f0;
  border-radius: 8px;
  overflow: hidden;
}
.sc-visualizer__layer {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.sc-visualizer__layer[aria-hidden="false"] {
  visibility: visible;
}
.sc-visualizer__layer[aria-hidden="true"] {
  visibility: hidden;
}
.sc-visualizer__layer img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
}

.sc-visualizer__price {
  margin-top: 12px;
  padding: 10px 0;
  font-size: 1.125rem;
  color: #333;
}
.sc-visualizer__price #sc-visualizer-price-amount {
  font-size: 1.5rem;
  font-weight: 700;
}

.sc-visualizer__debug {
  display: none;
  margin-top: 12px;
  padding: 10px 12px;
  font-size: 12px;
  font-family: monospace;
  line-height: 1.5;
  background: #f8f8f8;
  border: 1px solid #ddd;
  border-radius: 4px;
  color: #333;
}
.sc-visualizer__debug strong {
  font-family: inherit;
}

/* Shutter design: thumbnail selection (120×120) with labels */
.sc-shutter-design-label {
  display: block;
  margin-bottom: 8px;
}
.sc-shutter-design-thumbs {
  display: flex;
  gap: 16px;
  margin: 8px 0 12px 0;
  align-items: flex-start;
  flex-wrap: wrap;
}
.sc-shutter-design-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  border: 2px solid rgba(0,0,0,.2);
  border-radius: 8px;
  background: #f8f8f8;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.sc-shutter-design-option:hover {
  border-color: rgba(0,0,0,.35);
  background: #fff;
}
.sc-shutter-design-option[aria-pressed="true"],
.sc-shutter-design-option.sc-shutter-design-option--selected {
  border-color: #2271b1;
  box-shadow: 0 0 0 1px #2271b1;
  background: #f0f6fc;
}
.sc-shutter-design-option:focus-visible {
  outline: 2px solid #2271b1;
  outline-offset: 2px;
}
.sc-shutter-design-thumb {
  width: 180px;
  height: 180px;
  object-fit: contain;
  border-radius: 4px;
  background: #f5f5f5;
  display: block;
}
.sc-shutter-design-option-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: #1d2327;
}
.sc-hidden-select {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* Bug Screen disabled when no Sash selected */
.sc-bug-screen-disabled .sc-checkbox-label,
.sc-bug-screen-disabled input#screen_bug_screen {
  opacity: 0.6;
  cursor: not-allowed;
}
.sc-bug-screen-hint.sc-hidden { display: none; }

/* Colonial, Sash, Bug Screen disabled when Plain screen selected */
.sc-plain-only-disabled label,
.sc-plain-only-disabled select,
.sc-plain-only-disabled input,
.sc-plain-only-disabled .sc-checkbox-label {
  opacity: 0.6;
  cursor: not-allowed;
}
.sc-plain-only-disabled select,
.sc-plain-only-disabled input {
  pointer-events: none;
}
.sc-plain-only-hint.sc-hidden { display: none; }

.sc-section { 
  margin-bottom: 24px; 
  padding-bottom: 24px; 
  border-bottom: 2px solid rgba(0,0,0,.08); 
}
.sc-section:last-child { 
  border-bottom: none; 
  margin-bottom: 0; 
  padding-bottom: 0; 
}

.sc-section__title { 
  margin: 0 0 16px 0; 
  font-size: 16px !important; 
  font-weight: 600; 
  color: #333; 
  padding-bottom: 8px; 
  border-bottom: 1px solid rgba(0,0,0,.1); 
}

.sc-section__body { 
  display: grid; 
  gap: 12px; 
}

.sc-hint { margin: 0; opacity: .78; font-size: 14px; }
.sc-units { margin: 0; opacity: .9; font-size: 14px; }

.sc-size-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sc-field label { display:block; margin-bottom: 6px; }
.sc-field select { width: 100%; max-width: 100%; }
.sc-text-input { width: 100%; max-width: 100%; padding: 8px 12px; border: 1px solid rgba(0,0,0,.2); border-radius: 4px; font-size: 14px; }
.sc-text-input:focus { outline: none; border-color: rgba(0,0,0,.4); }
.sc-optional { font-weight: normal; opacity: .7; font-size: 0.9em; }
.sc-checkbox-label { display: flex; align-items: center; gap: 8px; cursor: pointer; margin: 0; }
.sc-checkbox-label input[type="checkbox"] { margin: 0; }

.sc-inline { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sc-inline select:first-child { flex: 0 1 220px; min-width: 200px; }
.sc-inline select:last-child  { flex: 0 0 110px; }

@media (max-width: 520px){
  .sc-inline select:first-child { flex: 1 1 100%; min-width: 0; }
  .sc-inline select:last-child  { flex: 1 1 100%; }
}

.sc-help { opacity: .75; font-size: 12px; }
#sc-size-help { margin-top: 2px; }
.sc-muted { opacity: .6; }

.sc-section table.variations { margin: 0; }
.sc-section table.variations td, .sc-section table.variations th { padding: 6px 0; }
.sc-section table.variations select { width: 100%; }

.sc-hidden { display:none !important; }
.single_add_to_cart_button[disabled] { opacity: .5; cursor: not-allowed; }
