.jsm-hb-builder{--jsm-green:#173c25;--jsm-gold:#c6a233;clear:both;margin:22px 0 30px;padding:24px;border:1px solid #dfe5df;background:#fff;border-radius:10px;box-shadow:0 10px 30px rgba(20,50,30,.08)}
.jsm-hb-heading h2{margin:0 0 8px;color:var(--jsm-green);font-size:clamp(24px,3vw,34px);line-height:1.15}
.jsm-hb-heading p{margin:0 0 22px;color:#555;font-size:14px;line-height:1.6}
.jsm-hb-layout{display:grid;grid-template-columns:minmax(0,1.45fr) minmax(300px,.55fr);gap:26px;align-items:start}
.jsm-hb-preview-column{position:sticky;top:24px;min-width:0;width:100%;max-width:none}
.jsm-hb-canvas-wrap{position:relative;overflow:hidden;width:100%;max-width:none;border:1px solid #d9ded9;border-radius:10px 10px 0 0;background:#f4f4f1;aspect-ratio:10/7}
#jsm-hb-canvas{display:block;width:100%;height:auto;max-width:none;background:#f4f4f1}
.jsm-hb-loading{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;background:rgba(244,244,241,.9);color:var(--jsm-green);font-weight:700;text-align:center}
.jsm-hb-price-row{display:flex;justify-content:space-between;align-items:center;gap:16px;padding:15px 18px;background:var(--jsm-green);color:#fff;border-radius:0 0 10px 10px;font-size:15px}
.jsm-hb-price-row strong{color:#fff;font-size:25px;white-space:nowrap}
.jsm-hb-preview-note{font-size:12px;color:#707070;margin:10px 2px 0;line-height:1.45}
.jsm-hb-options-column{padding:2px 0}
.jsm-hb-field,.jsm-hb-fieldset{margin:0 0 17px;padding:0;border:0}
.jsm-hb-field>label,.jsm-hb-fieldset>legend{display:block;margin:0 0 8px;padding:0;color:#252525;font-weight:700;font-size:14px}
.jsm-hb-select-wrap{position:relative;display:flex;align-items:center}
.jsm-hb-live-swatch{position:absolute;left:13px;z-index:2;width:21px;height:21px;border:1px solid #b9c0b9;border-radius:50%;box-shadow:inset 0 0 0 2px rgba(255,255,255,.8);pointer-events:none}
.jsm-hb-live-swatch.is-empty{background:linear-gradient(135deg,#fff 0 45%,#d7d7d7 46% 54%,#fff 55% 100%)!important}
.jsm-hb-field select{width:100%;min-height:46px;border:1px solid #cfd5cf;border-radius:5px;background:#fff;padding:0 38px 0 47px;color:#252525}
.jsm-hb-field select:focus{border-color:var(--jsm-gold);box-shadow:0 0 0 1px var(--jsm-gold);outline:0}
.jsm-hb-checkbox-grid{display:grid;grid-template-columns:1fr;gap:8px}
.jsm-hb-choice-card{display:flex;align-items:center;gap:10px;min-height:44px;padding:9px 12px;border:1px solid #d8ddd8;border-radius:5px;cursor:pointer;background:#fff;transition:border-color .15s,box-shadow .15s,background .15s}
.jsm-hb-choice-card:hover{border-color:var(--jsm-gold)}
.jsm-hb-choice-card:has(input:checked){border-color:var(--jsm-green);background:#f3f7f4;box-shadow:0 0 0 1px var(--jsm-green)}
.jsm-hb-choice-card input{width:18px;height:18px;margin:0;accent-color:var(--jsm-green)}
.jsm-hb-adjustment{font-size:.9em;opacity:.8}
.jsm-hb-errors{min-height:24px;color:#a00;font-weight:600;line-height:1.45}
.jsm-hb-builder .required{color:#b32d2e}

/* Full-width gallery mode. The existing WooCommerce gallery wrapper is reused, not replaced by a narrow sibling. */
.jsm-hb-preview-moved .jsm-hb-layout{display:block}
.jsm-hb-preview-moved .jsm-hb-options-column{display:block;padding-top:0}
.woocommerce-product-gallery.jsm-hb-gallery-mounted{display:block!important;float:none!important;opacity:1!important;visibility:visible!important;width:100%!important;max-width:none!important}
.woocommerce-product-gallery.jsm-hb-gallery-mounted .woocommerce-product-gallery__trigger,
.woocommerce-product-gallery.jsm-hb-gallery-mounted .flex-control-thumbs,
.woocommerce-product-gallery.jsm-hb-gallery-mounted .wd-nav-pagin-wrap,
.woocommerce-product-gallery.jsm-hb-gallery-mounted .wd-carousel-pagin{display:none!important}
.woocommerce-product-gallery.jsm-hb-gallery-mounted .woocommerce-product-gallery__wrapper.jsm-hb-gallery-slot,
.woocommerce-product-gallery.jsm-hb-gallery-mounted .jsm-hb-gallery-slot{display:block!important;position:relative!important;float:none!important;clear:both!important;grid-column:1/-1!important;grid-row:1!important;flex:0 0 100%!important;width:100%!important;min-width:100%!important;max-width:none!important;height:auto!important;margin:0!important;padding:0!important;transform:none!important}
.woocommerce-product-gallery.jsm-hb-gallery-mounted .jsm-hb-gallery-slot>*{width:100%!important;max-width:none!important}
.woocommerce-product-gallery.jsm-hb-gallery-mounted .jsm-hb-preview-column{display:block!important;position:static!important;top:auto!important;float:none!important;width:100%!important;min-width:100%!important;max-width:none!important;margin:0!important;padding:0!important}
.woocommerce-product-gallery.jsm-hb-gallery-mounted .jsm-hb-canvas-wrap{display:block!important;width:100%!important;min-width:100%!important;max-width:none!important;height:auto!important;min-height:0!important;aspect-ratio:10/7!important;background:#f4f4f1;border-color:#e2e5e2}
.woocommerce-product-gallery.jsm-hb-gallery-mounted #jsm-hb-canvas{display:block!important;width:100%!important;max-width:none!important;height:auto!important;margin:0!important}
.woocommerce-product-gallery.jsm-hb-gallery-mounted .jsm-hb-preview-note{padding:0 4px}

@media(max-width:1050px){
  .jsm-hb-layout{grid-template-columns:1fr}
  .jsm-hb-preview-column{position:static}
  .jsm-hb-options-column{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
  .jsm-hb-fieldset,.jsm-hb-errors{grid-column:1/-1}
  .jsm-hb-preview-moved .jsm-hb-options-column{display:grid}
}
@media(max-width:620px){
  .jsm-hb-builder{padding:16px;margin-left:-5px;margin-right:-5px}
  .jsm-hb-options-column,.jsm-hb-preview-moved .jsm-hb-options-column{display:block}
  .jsm-hb-price-row{align-items:flex-start;flex-direction:column;gap:5px}
  .jsm-hb-price-row strong{font-size:24px}
}

/* v2 technical render */
.woocommerce-product-gallery.jsm-hb-gallery-mounted .jsm-hb-canvas-wrap{background:#f7f7f4;min-height:0!important}
.woocommerce-product-gallery.jsm-hb-gallery-mounted #jsm-hb-canvas{aspect-ratio:10/7;object-fit:contain}

/* v2.1.2: preserve WoodMart native product columns; enlarge only the render inside the canvas. */
body.single-product .woocommerce-product-gallery.jsm-hb-gallery-mounted{width:100%!important;max-width:100%!important}
