/* Lá Família 3D · V4 · Image sizing and dialog fallbacks, including older Safari. */
dialog:not([open]) { display: none; }
dialog[open] { display: block; }
body.lf-modal-open { overflow: hidden; }
dialog { max-height: 90vh; max-height: 90dvh; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.cart-dialog { height: 100vh; max-height: 100vh; height: 100dvh; max-height: 100dvh; }
dialog::backdrop { -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
.lf-dialog-backdrop { position: fixed; top: 0; right: 0; bottom: 0; left: 0; inset: 0; background: #050c08c9; -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }
dialog.lf-dialog-fallback { position: fixed; top: 50%; left: 50%; right: auto; bottom: auto; margin: 0; transform: translate(-50%, -50%); }
dialog.cart-dialog.lf-dialog-fallback { top: 0; left: auto; right: 0; bottom: 0; transform: none; }
/* Explicitly sized frame avoids percentage-height/aspect-ratio differences. */
.product-art { height: 0; padding-top: 105%; aspect-ratio: auto; }
.product-art img { position: absolute; top: 0; left: 0; inset: 0; width: 100%; height: 100%; }
.product-art .product-badge, .product-art .product-open { z-index: 2; }
.detail-image-box { position: relative; width: 100%; height: 340px; flex: 0 0 auto; }
.detail-image-box > img { display: block; width: 100%; height: 100%; object-fit: contain; }
.gallery-thumbs button { position: relative; }
.gallery-thumbs button[aria-pressed="true"] { border: 2px solid var(--lime); }
.gallery-thumbs img { pointer-events: none; }
.gallery-retry { padding: 10px 16px; margin-top: 10px; background: #172217; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; }
.cart-photo { position: relative; width: 72px; height: 78px; }
.lf-photo-failed { visibility: hidden; }
.lf-photo-status { position: absolute; left: 8px; right: 8px; top: 50%; transform: translateY(-50%); text-align: center; color: var(--muted); font-size: 12px; line-height: 1.4; pointer-events: none; }
.gallery-thumbs .lf-photo-status, .cart-photo .lf-photo-status { font-size: 9px; }
.scene-fallback { top: 0; right: 0; bottom: 0; left: 0; display: block; pointer-events: none; }
.scene.scene-3d-ready .scene-fallback { display: none; }
.scene:not(.scene-3d-ready) canvas { pointer-events: none; }
.scene-zoom { z-index: 5; }
.lf-static-notice { padding: 14px 22px; margin: 16px auto; max-width: 1328px; background: #253222; border: 1px solid #c2ec8640; border-radius: 12px; color: var(--ink); }
@media (max-width: 800px) {
  .product-art { padding-top: 100%; }
  .detail-image-box { height: 290px; }
}
@media (max-width: 560px) {
  .product-art { padding-top: 112%; }
  .detail-image-box { height: 250px; }
}
