/* Controls are siblings of the scrolling layout on every viewport. */
.product-detail-dialog{display:flex;flex-direction:column;overflow:hidden}
.product-detail-toolbar{position:relative;z-index:5;display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:none;min-height:68px;padding:12px 18px;background:#fff;border-bottom:1px solid #e1e7eb}
.product-detail-toolbar .product-detail-close,.product-share-trigger{position:static;display:inline-flex;align-items:center;justify-content:center;flex:none;width:44px;height:44px;border:1px solid #cad6de;border-radius:50%;background:#fff;color:#123b5a;cursor:pointer}
.product-share-trigger svg{width:22px;height:22px;fill:currentColor}
.product-share-trigger:disabled{opacity:.5;cursor:not-allowed}
.product-share-status{margin-right:auto;color:#123b5a;font-size:.8rem;line-height:1.3}
.product-share-menu{position:absolute;top:calc(100% - 6px);right:18px;max-width:calc(100vw - 60px);width:260px;max-height:calc(92vh - 68px);max-height:calc(92dvh - 68px);overflow-y:auto;overscroll-behavior:contain;padding:8px;background:#fff;border:1px solid #cad6de;border-radius:12px;box-shadow:0 8px 24px #123b5a26}
.product-share-menu :is(a,button){display:flex;align-items:center;width:100%;min-height:44px;padding:10px 12px;border:0;border-radius:8px;background:#fff;color:#123b5a;font:inherit;text-decoration:none;text-align:left;cursor:pointer}
.product-share-menu :is(a,button):hover{background:#eef4f6}
.product-share-menu label{display:block;padding:8px;font-size:.85rem;color:#123b5a}
.product-share-menu input{width:100%;min-height:44px;margin-top:6px}
.product-detail-toolbar [hidden]{display:none!important}
.product-detail-dialog :is(a,button,input):focus-visible{outline:3px solid #28688f;outline-offset:-3px}
.product-detail-layout{min-height:0;overflow-y:auto;overscroll-behavior:contain}
.product-detail-content{overflow-wrap:anywhere}
@media(min-width:761px){
  .product-detail-layout{height:min(620px,calc(92vh - 68px));min-height:0;max-height:none;overflow:hidden}
  .product-detail-content{max-height:100%;padding-top:28px}
}
@media(max-width:760px){
  .product-detail-layout{display:block;max-height:calc(94vh - 68px)}
  .product-detail-media{border-radius:0}
  .product-detail-toolbar{padding-inline:12px}
}
@media(max-width:640px){
  .product-detail-layout{max-height:calc(96svh - 68px)}
}

/* LUSO catalog UX: the product description may be long, but pricing, quantity
   and purchase must remain available inside the current modal scrollport.
   Keep this scoped to product details; cart and checkout remain untouched. */
.product-detail-content{min-height:0}
.product-detail-purchase{
  position:sticky;
  bottom:0;
  z-index:2;
  margin-top:auto;
  flex:0 0 auto;
  padding:12px 0 14px;
  background:#fff;
  border-top:1px solid #dfe6eb;
  box-shadow:0 -8px 16px rgba(255,255,255,.95);
}
.product-detail-purchase .product-detail-stock{margin:0 0 5px}
.product-detail-purchase .product-detail-buy{
  border:0;
  padding:5px 0 0;
  gap:10px;
  align-items:center;
}
.product-detail-purchase .product-detail-add{
  display:block;
  width:100%;
  min-height:46px;
  margin-top:12px;
}
.product-detail-benefits{margin:12px 0 14px}
@media(max-width:760px){
  /* A foto permanece integral e proporcional, mas não ocupa toda a tela
     antes que o comprador consiga encontrar o resumo de compra. */
  .product-detail-media{
    height:min(34svh,300px)!important;
    min-height:0!important;
    aspect-ratio:auto!important;
  }
  .product-detail-media img{
    height:100%!important;
    max-height:100%!important;
    aspect-ratio:auto!important;
    object-fit:contain;
  }
  .product-detail-purchase{
    padding-bottom:calc(12px + env(safe-area-inset-bottom,0px));
  }
  .product-detail-purchase .product-detail-add{min-height:48px}
}
