/* v1.7.1 - coordinate-system parity fix.
   One rule: live and editor interpret saved coordinates against the same containers.
   Mini-cards are positioned relative to .editorial-grid; child elements are positioned relative to their own mini-card. */

html body .magazine-shell .page-safe-area{
  position:relative!important;
  overflow:hidden!important;
}
html body .magazine-shell .editorial-grid{
  position:relative!important;
  min-height:0!important;
}
html body .magazine-shell .editorial-grid.manual-canvas{
  position:relative!important;
  display:block!important;
  overflow:hidden!important;
}
html body .magazine-shell .editorial-grid.manual-canvas > .product-card.is-manual-card,
html body .magazine-shell .editorial-grid.manual-canvas > .product-card[style*="--x"],
html body .magazine-shell .editorial-grid.manual-canvas > .product-card[style*="--y"],
html body .magazine-shell .editorial-grid.manual-canvas > .product-card[style*="--w"],
html body .magazine-shell .editorial-grid.manual-canvas > .product-card[style*="--h"]{
  position:absolute!important;
  left:var(--x,0)!important;
  top:var(--y,0)!important;
  width:var(--w,240px)!important;
  height:var(--h,180px)!important;
  z-index:var(--z,1)!important;
  box-sizing:border-box!important;
  max-width:none!important;
  max-height:none!important;
  min-width:60px!important;
  min-height:46px!important;
  margin:0!important;
  overflow:hidden!important;
}

/* Critical fix: a card with manually positioned children MUST be the containing block.
   Without this, live positions children against the page while editor positions them against the card. */
html body .magazine-shell .product-card.is-child-layout{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
  box-sizing:border-box!important;
  contain:layout paint style!important;
}
html body .magazine-shell .product-card.is-child-layout .product-copy,
html body .magazine-shell .product-card.is-child-layout .price-row,
html body .magazine-shell .product-card.is-child-layout .nc-structure-wrapper{
  display:contents!important;
  position:static!important;
  inset:auto!important;
  width:auto!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
  box-shadow:none!important;
  transform:none!important;
}
html body .magazine-shell .product-card.is-child-layout [data-nc-child]{
  box-sizing:border-box!important;
  max-width:none!important;
  max-height:none!important;
}
html body .magazine-shell .product-card.is-child-layout [data-nc-child][style*="--x"],
html body .magazine-shell .product-card.is-child-layout [data-nc-child][style*="--y"],
html body .magazine-shell .product-card.is-child-layout [data-nc-child][style*="--w"],
html body .magazine-shell .product-card.is-child-layout [data-nc-child][style*="--h"]{
  position:absolute!important;
  left:var(--x,0)!important;
  top:var(--y,0)!important;
  width:var(--w,80px)!important;
  height:var(--h,32px)!important;
  z-index:var(--z,10)!important;
  display:block!important;
  margin:0!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  color:var(--text-color,inherit)!important;
  background:var(--card-bg,transparent)!important;
  font-size:var(--font-size,inherit)!important;
  font-family:var(--font-family,inherit)!important;
  font-weight:var(--font-weight,inherit)!important;
  text-align:var(--text-align,inherit)!important;
  border-color:var(--border-color,transparent)!important;
  border-width:var(--border-width,0)!important;
  border-style:var(--border-style,solid)!important;
  border-radius:var(--radius,0)!important;
  padding:var(--pad,0)!important;
  opacity:var(--opacity,1)!important;
  line-height:1.05!important;
  transform:none!important;
}
html body .magazine-shell .product-card.is-child-layout [data-nc-child="image"][style*="--x"] img,
html body .magazine-shell .product-card.is-child-layout [data-nc-child="image"][style*="--y"] img,
html body .magazine-shell .product-card.is-child-layout [data-nc-child="image"][style*="--w"] img,
html body .magazine-shell .product-card.is-child-layout [data-nc-child="image"][style*="--h"] img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
html body .magazine-shell .product-card.is-child-layout [data-nc-child="discount"][style*="--x"],
html body .magazine-shell .product-card.is-child-layout [data-nc-child="discount"][style*="--y"]{
  transform:rotate(6deg)!important;
  transform-origin:center!important;
}
html body .magazine-shell .product-card.is-child-layout [data-nc-child="old_price"]{
  text-decoration:line-through!important;
  text-decoration-thickness:3px!important;
}
html body .magazine-shell .product-card.is-child-layout [style*="display:none"],
html body .magazine-shell .product-card.is-child-layout [style*="display: none"]{
  display:none!important;
}

/* Editor selection overlays must never alter the measured layout used by live. */
body.nc-editor-page .magazine-shell .is-editor-selected,
body.nc-editor-page .magazine-shell .is-editor-child-selected,
body.nc-editor-page .magazine-shell .is-active-page{
  transform:none!important;
}
body:not(.nc-editor-page) .nc-select-card,
body:not(.nc-editor-page) .nc-resize-handle,
body:not(.nc-editor-page) .nc-selection-box,
body:not(.nc-editor-page) .nc-element-toolbar{
  display:none!important;
}
