.cnpd-wrap{display:grid;grid-template-columns:minmax(320px,1.25fr) minmax(280px,.75fr);gap:22px;margin:24px 0;padding:18px;border:1px solid #ece7dc;border-radius:22px;background:#fffdf8;box-shadow:0 14px 36px rgba(65,45,15,.08);max-width:1120px}.cnpd-preview-card{border-radius:18px;background:linear-gradient(145deg,#f8f3e8,#fff);padding:18px;border:1px solid #eee2cf}.cnpd-preview-stage{border-radius:16px;overflow:hidden;position:relative}.cnpd-neck-template{background:radial-gradient(circle at 54% 55%,rgba(255,235,218,.82),rgba(203,139,103,.58) 45%,rgba(139,83,55,.45) 100%),linear-gradient(135deg,#a86a50,#e0a581 48%,#9d6048);box-shadow:inset 0 0 80px rgba(95,50,28,.14)}.cnpd-neck-template:before{content:"";position:absolute;inset:0;background:repeating-radial-gradient(circle at 50% 50%,rgba(255,255,255,.17) 0 1px,transparent 1px 7px);opacity:.19;pointer-events:none}.cnpd-svg{width:100%;height:auto;display:block;position:relative;z-index:1}.cnpd-note{font-size:13px;color:#6c604d;margin:12px 4px 0}.cnpd-controls label{display:block;font-weight:650;margin:0 0 14px;color:#2b2417}.cnpd-controls input,.cnpd-controls select{width:100%;min-height:44px;border:1px solid #ddd1bd;border-radius:12px;padding:9px 12px;background:#fff;margin-top:6px}.cnpd-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}.cnpd-reservation{padding:13px 14px;border-radius:14px;background:#19150e;color:#fff;margin-top:4px}.cnpd-engine-note{font-size:12px;color:#7a6c55;margin-top:10px}.cnpd-add-button{margin-top:12px}.cnpd-name-svg{paint-order:stroke fill;transition:font-size .16s ease,letter-spacing .16s ease}.cnpd-chain,.cnpd-ring,.cnpd-connector-left,.cnpd-connector-right,.cnpd-subtle-bridge{transition:all .18s ease}.cnpd-standalone-form{max-width:1120px;margin:auto}.cnpd-v2 .cnpd-renderer{transform-origin:center}@media(max-width:760px){.cnpd-wrap{grid-template-columns:1fr;padding:14px}.cnpd-row{grid-template-columns:1fr}.cnpd-controls input,.cnpd-controls select{min-height:42px}}

/* v3 Stage 2: make the designer behave like the product featured image block */
.cnpd-featured-product-image{float:left;width:48%;clear:left;margin:0 4% 2em 0;box-sizing:border-box}.cnpd-featured-product-image .cnpd-wrap{display:block;max-width:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}.cnpd-featured-product-image .cnpd-preview-card{padding:0;border:0;background:transparent}.cnpd-featured-product-image .cnpd-controls{margin-top:18px}.cnpd-featured-product-image .cnpd-add-button{width:100%;min-height:48px}.cnpd-featured-product-image .cnpd-row{grid-template-columns:1fr 1fr}.cnpd-featured-product-image .cnpd-preview-stage{border-radius:0;background:#f8f8f8}.cnpd-featured-product-image .cnpd-note{margin-left:0}@media(max-width:768px){.cnpd-featured-product-image{float:none;width:100%;margin:0 0 24px}.cnpd-featured-product-image .cnpd-row{grid-template-columns:1fr}}

/* v3 Stage 2.1: keep preview in gallery column and controls in product summary */
.cnpd-featured-product-image{float:left;width:clamp(520px,48vw,670px);clear:left;margin:0 5% 2em 0;box-sizing:border-box}.cnpd-featured-product-image .cnpd-wrap{display:block;max-width:none;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent}.cnpd-featured-product-image .cnpd-preview-card{padding:0;border:0;background:transparent}.cnpd-featured-product-image .cnpd-controls,.cnpd-featured-product-image .cnpd-add-button{display:none!important}.cnpd-featured-product-image .cnpd-preview-stage{border-radius:0;background:#f8f8f8}.cnpd-featured-product-image .cnpd-note{margin-left:0}.cnpd-summary-product-designer{margin:18px 0 22px;max-width:420px}.cnpd-summary-product-designer .cnpd-wrap{display:block;margin:0;padding:0;border:0;border-radius:0;box-shadow:none;background:transparent;max-width:none}.cnpd-summary-product-designer .cnpd-preview-card{display:none!important}.cnpd-summary-product-designer .cnpd-controls label{margin-bottom:14px}.cnpd-summary-product-designer .cnpd-add-button{width:100%;min-height:48px;margin-top:12px}.cnpd-summary-product-designer .cnpd-reservation{margin-top:8px}.cnpd-summary-product-designer form.cart{margin:0}@media(max-width:1024px){.cnpd-featured-product-image{width:48%;min-width:0}}@media(max-width:768px){.cnpd-featured-product-image{float:none;width:100%;margin:0 0 24px}.cnpd-summary-product-designer{max-width:none}}

/* Stage 2.1 contrast fix */
.cnpd-reservation{
display:flex;
justify-content:space-between;
align-items:center;
background:#1f1b18;
border:1px solid rgba(212,175,55,.35);
font-weight:600;
}
.cnpd-reservation strong,
.cnpd-reservation b,
.cnpd-reservation .amount,
.cnpd-reservation span:last-child{
color:#D4AF37 !important;
font-size:20px;
font-weight:700;
}
.cnpd-reservation,
.cnpd-reservation span:first-child{
color:#fff !important;
}

/* v3.0.2 Stage 2.2: native WooCommerce flow. The preview is moved into the existing gallery by JS; controls stay inside the native cart form. */
.cnpd-native-product-designer{margin:18px 0 18px;max-width:520px}
.cnpd-native-product-designer .cnpd-wrap{display:block;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none;max-width:none}
.cnpd-native-product-designer .cnpd-controls{display:block!important}
.cnpd-native-product-designer .cnpd-preview-card{margin-bottom:18px}
.cnpd-native-product-designer .cnpd-row{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.woocommerce-product-gallery.cnpd-gallery-live-preview,.product .images.cnpd-gallery-live-preview{background:#f8f8f8!important;overflow:hidden;float:left;width:48%;margin:0 5% 2em 0;box-sizing:border-box}
.cnpd-gallery-live-preview .cnpd-preview-card{padding:0!important;border:0!important;border-radius:0!important;background:transparent!important}
.cnpd-gallery-live-preview .cnpd-preview-stage{border-radius:0!important;background:#f8f8f8!important}
.cnpd-gallery-live-preview .cnpd-note{margin:12px 0 0!important;color:#6c604d;font-size:13px}
.cnpd-gallery-live-preview .cnpd-controls{display:none!important}
.cnpd-gallery-live-preview .cnpd-svg{width:100%;height:auto;display:block}
.cnpd-native-product-designer .cnpd-preview-card{display:none!important}
.cnpd-native-product-designer + .quantity,
.cnpd-native-product-designer ~ .quantity{margin-top:10px}
@media(max-width:768px){.woocommerce-product-gallery.cnpd-gallery-live-preview,.product .images.cnpd-gallery-live-preview{float:none;width:100%;margin:0 0 24px}.cnpd-native-product-designer{max-width:none}.cnpd-native-product-designer .cnpd-row{grid-template-columns:1fr}}


/* v3.0.3 Stage 2.3: gallery size fix for Alukas/WooCommerce themes */
.woocommerce div.product div.images.cnpd-gallery-live-preview,
div.product div.images.cnpd-gallery-live-preview,
.woocommerce-product-gallery.cnpd-gallery-live-preview,
.product .images.cnpd-gallery-live-preview{
  width:48% !important;
  max-width:670px !important;
  min-width:520px;
  float:left !important;
  margin:0 5% 2em 0 !important;
  display:block !important;
  box-sizing:border-box !important;
  background:#f8f8f8 !important;
}
.cnpd-gallery-live-preview .cnpd-preview-card{
  width:100% !important;
  display:block !important;
}
.cnpd-gallery-live-preview .cnpd-preview-stage{
  width:100% !important;
  aspect-ratio: 1 / 1;
  min-height:520px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
}
.cnpd-gallery-live-preview .cnpd-svg{
  width:100% !important;
  height:100% !important;
  display:block !important;
}
.cnpd-gallery-live-preview .cnpd-note{
  background:#fff;
  padding:12px 0 0;
}
@media(max-width:1100px){
  .woocommerce div.product div.images.cnpd-gallery-live-preview,
  div.product div.images.cnpd-gallery-live-preview,
  .woocommerce-product-gallery.cnpd-gallery-live-preview,
  .product .images.cnpd-gallery-live-preview{
    min-width:0;
    width:48% !important;
  }
  .cnpd-gallery-live-preview .cnpd-preview-stage{min-height:420px;}
}
@media(max-width:768px){
  .woocommerce div.product div.images.cnpd-gallery-live-preview,
  div.product div.images.cnpd-gallery-live-preview,
  .woocommerce-product-gallery.cnpd-gallery-live-preview,
  .product .images.cnpd-gallery-live-preview{
    float:none !important;
    width:100% !important;
    max-width:none !important;
    min-width:0;
    margin:0 0 24px !important;
  }
  .cnpd-gallery-live-preview .cnpd-preview-stage{min-height:360px;}
}


/* v3.0.4 Stage 2.4: use the real Alukas gallery column size and keep the SVG's natural 900x520 ratio */
.single-product-content .col-md-6 > .woocommerce-product-gallery.cnpd-gallery-live-preview,
.pls-single-product-wrapper .col-md-6 > .woocommerce-product-gallery.cnpd-gallery-live-preview,
.product .col-md-6 > .woocommerce-product-gallery.cnpd-gallery-live-preview{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  float:none !important;
  margin:0 !important;
  display:block !important;
  box-sizing:border-box !important;
}
.woocommerce div.product div.images.cnpd-gallery-live-preview .cnpd-preview-stage,
div.product div.images.cnpd-gallery-live-preview .cnpd-preview-stage,
.woocommerce-product-gallery.cnpd-gallery-live-preview .cnpd-preview-stage,
.product .images.cnpd-gallery-live-preview .cnpd-preview-stage{
  width:100% !important;
  aspect-ratio:900 / 520 !important;
  min-height:0 !important;
  height:auto !important;
  display:block !important;
  overflow:hidden !important;
}
.woocommerce div.product div.images.cnpd-gallery-live-preview .cnpd-svg,
div.product div.images.cnpd-gallery-live-preview .cnpd-svg,
.woocommerce-product-gallery.cnpd-gallery-live-preview .cnpd-svg,
.product .images.cnpd-gallery-live-preview .cnpd-svg{
  width:100% !important;
  height:auto !important;
  max-height:none !important;
  object-fit:contain !important;
}
.cnpd-gallery-live-preview .cnpd-preview-card,
.cnpd-gallery-live-preview .cnpd-preview-stage{
  background:#f8f8f8 !important;
}


/* v3.0.5 Stage 2.5: Alukas gallery column restore.
   The previous build only matched direct-child gallery layouts, causing some Alukas templates to render the preview at thumbnail width.
   This forces the live preview to fill the existing left product column without changing the two-column product layout. */
.single-product-content .col-md-6 .woocommerce-product-gallery.cnpd-gallery-live-preview,
.pls-single-product-wrapper .col-md-6 .woocommerce-product-gallery.cnpd-gallery-live-preview,
.product .col-md-6 .woocommerce-product-gallery.cnpd-gallery-live-preview,
.single-product-content .col-md-6 div.images.cnpd-gallery-live-preview,
.pls-single-product-wrapper .col-md-6 div.images.cnpd-gallery-live-preview,
.product .col-md-6 div.images.cnpd-gallery-live-preview,
.woocommerce div.product div.images.cnpd-gallery-live-preview,
div.product div.images.cnpd-gallery-live-preview,
.woocommerce-product-gallery.cnpd-gallery-live-preview,
.product .images.cnpd-gallery-live-preview{
  width:100% !important;
  max-width:100% !important;
  min-width:0 !important;
  float:none !important;
  margin:0 0 18px 0 !important;
  display:block !important;
  box-sizing:border-box !important;
  clear:none !important;
}
.cnpd-gallery-live-preview .cnpd-preview-card{
  width:100% !important;
  max-width:100% !important;
  display:block !important;
}
.cnpd-gallery-live-preview .cnpd-preview-stage{
  width:100% !important;
  aspect-ratio: 900 / 520 !important;
  min-height:390px !important;
  height:auto !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  overflow:hidden !important;
}
.cnpd-gallery-live-preview .cnpd-svg{
  width:100% !important;
  height:100% !important;
  display:block !important;
}
@media(max-width:1100px){
  .cnpd-gallery-live-preview .cnpd-preview-stage{min-height:320px !important;}
}
@media(max-width:768px){
  .cnpd-gallery-live-preview .cnpd-preview-stage{min-height:300px !important;}
}
