.cwb-builder { border:1px solid #eee; padding:12px; border-radius:6px; margin:12px 0; }
.cwb-grid { display:grid; grid-template-columns: 1fr 1fr; gap:16px; align-items:start; min-width:0; }
.cwb-preview { position:relative; width:100%; aspect-ratio:1/1; background:#fff; border:1px solid #eee; border-radius:6px; overflow:hidden; }
.cwb-preview img { position:absolute; inset:0; width:100%; height:100%; object-fit:contain; }
.cwb-controls { min-width:0; }
.cwb-group { margin-bottom:12px; width:100%; }
.cwb-group legend { font-weight:600; margin-bottom:6px; }
.cwb-required { color:#c00; }
.cwb-options { display:flex; flex-wrap:wrap; gap:8px; }
.cwb-option { display:flex; align-items:center; gap:8px; padding:6px 8px; border:1px solid #ddd; border-radius:4px; background:#fafafa; cursor:pointer; flex: 1 1 240px; max-width:100%; }
.cwb-option input { display:none; }
.cwb-option.cwb-disabled { opacity:.55; cursor:not-allowed; }
.cwb-option img { width:40px; height:40px; object-fit:contain; background:#fff; border:1px solid #eee; border-radius:4px; flex:0 0 auto; }
.cwb-swatch { display:flex; align-items:center; gap:8px; }
.cwb-label { display:block; font-size:14px; line-height:1.2; white-space:normal; word-break:break-word; }
.cwb-price-delta { display:block; font-size:12px; opacity:.85; }
.cwb-price-delta .woocommerce-Price-amount { font-size:12px; }
.cwb-stock { display:block; font-size:11px; opacity:.7; }
.cwb-summary { margin-top:10px; font-size:16px; }
.cwb-standalone .cwb-title { margin:0 0 .25rem; }
.cwb-standalone .cwb-base-price { margin:0 0 .5rem; font-weight:600; }

/* Tighten layout on small screens */
@media (max-width: 900px) {
  .cwb-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .cwb-option { flex: 1 1 100%; }
  .cwb-option img { width:36px; height:36px; }
  .cwb-builder { padding:10px; }
}
