/* Jetin Store · media framing hardening · 2026-09-25 */

/* Prevent product modals from creating horizontal overflow on desktop/mobile. */
.managed-product-gallery,
.managed-gallery-shell,
.managed-gallery-media,
.managed-gallery-info,
.lib-product-dialog,
.lib-product-dialog-shell,
.lib-product-dialog-visual,
.lib-product-dialog-info{
  min-width:0!important;
  max-width:100%!important;
  box-sizing:border-box!important;
}
.managed-product-gallery,
.lib-product-dialog{
  overflow:hidden!important;
}
.managed-gallery-shell,
.lib-product-dialog-shell{
  overflow-x:hidden!important;
}
.managed-gallery-media,
.lib-product-dialog-visual{
  overflow:hidden!important;
}
.managed-gallery-info,
.lib-product-dialog-info{
  overflow-x:hidden!important;
}

/* Keep direct photos complete in the large viewer. */
.managed-gallery-visual{
  display:grid!important;
  place-items:center!important;
  overflow:hidden!important;
  background-color:#fff!important;
}
.managed-gallery-visual>img{
  width:auto!important;
  height:auto!important;
  max-width:94%!important;
  max-height:94%!important;
  object-fit:contain!important;
  object-position:center!important;
}

/* Sheet-backed products are crops, not full catalog pages. */
.live-product-bg,
.managed-gallery-thumb-bg,
.managed-gallery-visual.is-background,
.lib-card-visual-image,
.lib-product-dialog-image{
  background-repeat:no-repeat!important;
}

/* Tazas: reduce empty/gray bands in cards while preserving full image in modals. */
html[data-jetin-category-slug="tazas"] .product-card .source-thumb{
  background-size:112% auto!important;
  background-position:center!important;
}
html[data-jetin-category-slug="tazas"] .source-dialog .source-visual,
html[data-jetin-category-slug="tazas"] #lbSource{
  background-size:contain!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}

/* Desayunos: keep opened product centered and fully visible. */
html[data-jetin-category-slug="desayunos"] .managed-gallery-visual>img{
  max-width:90%!important;
  max-height:90%!important;
}

/* Collection cards should always expose their published cover image. */
.polo-group-image{
  overflow:hidden!important;
  background:#efe3d3!important;
}
.polo-group-image img{
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
  object-position:center!important;
  opacity:1!important;
  visibility:visible!important;
}

/* Hero layers must fill the visual area without exposing the raw sheet strip. */
.jetin-category-cover-layer{
  width:100%!important;
  height:100%!important;
  background-repeat:no-repeat!important;
  will-change:transform;
}

@media(max-width:900px){
  .managed-product-gallery,
  .lib-product-dialog{
    width:calc(100vw - 12px)!important;
    max-width:calc(100vw - 12px)!important;
  }
  .managed-gallery-visual>img{
    max-width:100%!important;
    max-height:100%!important;
  }
}

@media(max-width:520px){
  html[data-jetin-category-slug="tazas"] .product-card .source-thumb{
    background-size:108% auto!important;
  }
}
