/* Schede prodotto: pop-up con testata fissa e un unico contenuto scorrevole. */
:is(#productView.product-view,#quickViewDrawer.drawer.right,#offerQuickViewDrawer.drawer.right){
  position:fixed!important;
  inset:auto!important;
  top:50%!important;
  left:50%!important;
  width:min(960px,calc(100vw - 24px))!important;
  height:min(840px,calc(100vh - 24px))!important;
  height:min(840px,calc(100dvh - 24px))!important;
  max-height:none!important;
  display:flex!important;
  flex-direction:column;
  padding:0!important;
  border-radius:24px!important;
  background:#f1ede5;
  color:#171512;
  overflow:hidden!important;
  z-index:1100!important;
  box-shadow:0 24px 80px rgba(0,0,0,.5);
  transform:translate(-50%,-48%) scale(.98)!important;
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transition:opacity .2s,transform .25s!important;
}
:is(#productView.product-view,#quickViewDrawer.drawer.right,#offerQuickViewDrawer.drawer.right).open{
  transform:translate(-50%,-50%)!important;
  opacity:1;
  visibility:visible;
  pointer-events:auto;
}
:is(#productView.product-view,#quickViewDrawer.drawer.right,#offerQuickViewDrawer.drawer.right) > :is(.drawer-head,.product-view-head){
  position:relative;
  flex:0 0 auto;
  margin:0;
  padding:.8rem 1rem;
  background:#f1ede5;
  color:#171512;
  z-index:5;
}
:is(#productView.product-view,#quickViewDrawer.drawer.right,#offerQuickViewDrawer.drawer.right) :is(.close-btn,[data-close]){
  flex:0 0 auto;
  min-width:44px;
  min-height:44px;
}
:is(#productDetail,#quickViewBody,#offerQuickViewBody){
  flex:1 1 auto;
  min-height:0;
  min-width:0;
  width:100%!important;
  max-height:none!important;
  margin:0!important;
  padding:1rem!important;
  overflow-y:auto!important;
  overflow-x:hidden;
  overscroll-behavior:contain;
  -webkit-overflow-scrolling:touch;
  scroll-padding-block:1rem;
}
#productDetail{align-items:start}
#productDetail .product-detail{position:static;padding:0;min-width:0}
:is(#quickViewBody,#offerQuickViewBody) .quick-product-shell{grid-template-columns:minmax(0,1fr)!important}
:is(#quickViewBody,#offerQuickViewBody) .quick-product-shell > *{min-width:0;max-width:100%}
:is(#quickViewBody,#offerQuickViewBody) .quick-thumbs{min-width:0;max-width:100%;overflow-x:auto}
:is(#productDetail,#quickViewBody,#offerQuickViewBody) :is(.quick-product-shell,.quick-detail,.quick-section,.attribute-grid,.attribute,.quick-spec-row){min-width:0;max-width:100%;overflow-wrap:anywhere}
:is(#productDetail,#quickViewBody,#offerQuickViewBody) :is(h1,h2){font-size:clamp(1.5rem,5vw,2.5rem)!important;line-height:1.12!important;overflow-wrap:anywhere}
:is(#quickViewBody,#offerQuickViewBody) .quick-main-stage{
  width:100%;
  height:clamp(200px,42vh,440px);
  height:clamp(200px,42dvh,440px);
  aspect-ratio:auto!important;
}
:is(#quickViewBody,#offerQuickViewBody) .quick-main-stage img{object-fit:contain!important}
:is(#quickViewBody,#offerQuickViewBody) .quick-actions.smart{
  position:static!important;
  margin:1rem 0 0!important;
  padding:1rem 0 max(1rem,env(safe-area-inset-bottom))!important;
}
.rp-product-gallery{display:block!important;min-width:0}
.rp-product-gallery figure{
  display:block;
  width:100%;
  height:clamp(200px,42vh,440px);
  height:clamp(200px,42dvh,440px);
  aspect-ratio:auto!important;
  margin:0!important;
}
.rp-product-gallery figure::after{content:none!important}
.rp-product-gallery figure:not(.is-active){display:none!important}
.rp-product-gallery figure img{width:100%;height:100%;object-fit:contain!important;cursor:zoom-in}
.rp-product-thumbs{display:flex;gap:.5rem;overflow-x:auto;padding:.6rem 0;max-width:100%}
.rp-product-thumb{flex:0 0 64px;width:64px;height:72px;padding:2px;border:2px solid transparent;border-radius:10px;background:#e5ded5;cursor:pointer}
.rp-product-thumb[aria-pressed="true"]{border-color:#8a6444}
.rp-product-thumb img{width:100%;height:100%;object-fit:contain}
body:has(#productView.open) .floating-actions{visibility:hidden}
@media(max-width:759px){
  :is(#productView.product-view,#quickViewDrawer.drawer.right,#offerQuickViewDrawer.drawer.right){
    width:calc(100vw - 16px)!important;
    height:calc(100vh - 16px)!important;
    height:calc(100dvh - 16px)!important;
    border-radius:20px!important;
  }
  #productDetail{grid-template-columns:minmax(0,1fr)!important;gap:1rem}
  :is(#quickViewBody,#offerQuickViewBody) .attribute-grid{grid-template-columns:minmax(0,1fr)!important}
  :is(#quickViewBody,#offerQuickViewBody) :is(.quick-actions,.quick-actions-v3){grid-template-columns:minmax(0,1fr)!important}
}
@media(prefers-reduced-motion:reduce){
  :is(#productView.product-view,#quickViewDrawer.drawer.right,#offerQuickViewDrawer.drawer.right){transition:none!important}
}
