/* LENAVITA V12 — exact desktop scroll behaviour from Pandora reference. */

/* The desktop product stage remains two macro columns: gallery wall + checkout.
   Inside the gallery wall, the first image is sticky and only the secondary
   media stream scrolls. Both sticky columns release at the end of the stage. */
@media(min-width:761px){
  body.single-product .lv11-product-stage{
    grid-template-columns:minmax(0,1.58fr) minmax(350px,.72fr)!important;
    gap:64px!important;
    align-items:stretch!important;
    overflow:visible!important;
  }
  body.single-product .lv12-product-gallery{
    display:grid!important;
    grid-template-columns:minmax(0,1.17fr) minmax(0,.83fr)!important;
    gap:2px!important;
    align-items:stretch!important;
    overflow:visible!important;
  }
  body.single-product .lv12-gallery-primary-wrap{
    position:relative!important;
    min-width:0!important;
    overflow:visible!important;
  }
  body.single-product .lv12-gallery-primary-sticky{
    position:sticky!important;
    top:122px!important;
    width:100%!important;
    min-width:0!important;
    align-self:start!important;
    z-index:1!important;
  }
  body.admin-bar.single-product .lv12-gallery-primary-sticky{top:154px!important}
  body.single-product .lv12-primary-cell{width:100%!important}
  body.single-product .lv12-primary-cell img,
  body.single-product .lv12-primary-cell video{width:100%!important;height:auto!important;display:block!important;object-fit:contain!important}
  body.single-product .lv12-gallery-stream{
    display:flex!important;
    flex-direction:column!important;
    gap:2px!important;
    min-width:0!important;
    align-self:start!important;
    overflow:visible!important;
  }
  body.single-product .lv12-stream-cell{width:100%!important;min-width:0!important}
  body.single-product .lv12-stream-cell img,
  body.single-product .lv12-stream-cell video{width:100%!important;height:auto!important;display:block!important;object-fit:contain!important}

  /* Checkout follows the same scroll window as Pandora. */
  body.single-product .lv11-product-summary{overflow:visible!important;align-self:stretch!important}
  body.single-product .lv11-product-summary-inner{
    position:sticky!important;
    top:122px!important;
    max-width:430px!important;
    align-self:start!important;
    z-index:2!important;
  }
  body.admin-bar.single-product .lv11-product-summary-inner{top:154px!important}

  /* Optional merchant-selected visual immediately under the checkout tabs. */
  body.single-product .lv12-summary-media{display:block!important;margin-top:14px!important;width:100%!important;overflow:hidden!important;background:#f5f5f4!important}
  body.single-product .lv12-summary-media img{display:block!important;width:100%!important;height:clamp(150px,16vh,230px)!important;object-fit:cover!important}

  /* Product rails keep Pandora's four-card scale even when the catalogue is still small. */
  body.single-product .lv11-product-section .lv11-product-card{flex:0 0 calc((100% - 15px)/4)!important}
}

@media(min-width:761px) and (max-width:1180px){
  body.single-product .lv11-product-stage{grid-template-columns:minmax(0,1.46fr) minmax(330px,.74fr)!important;gap:36px!important}
  body.single-product .lv12-product-gallery{grid-template-columns:minmax(0,1.14fr) minmax(0,.86fr)!important}
  body.single-product .lv12-gallery-primary-sticky,
  body.single-product .lv11-product-summary-inner{top:112px!important}
  body.admin-bar.single-product .lv12-gallery-primary-sticky,
  body.admin-bar.single-product .lv11-product-summary-inner{top:144px!important}
}

@media(max-width:760px){
  body.single-product .lv12-summary-media{display:none!important}
}
