/* R19: exact six-family scope. Original pixels, captions and source URLs stay intact. */
body:is([data-page="/showroom-vn/vat-lieu/gi-set/"],[data-page="/showroom-vn/vat-lieu/terra-plus/"],[data-page="/showroom-vn/vat-lieu/eco/"],[data-page="/showroom-vn/vat-lieu/upcycle/"],[data-page="/showroom-vn/vat-lieu/ngoc-trai/"],[data-page="/showroom-vn/vat-lieu/kim-loai-long/"]) .material-detail > .gallery > img {
  display:block;width:auto;height:auto;max-width:100%;max-height:650px;aspect-ratio:auto;
  margin-inline:auto;object-fit:contain;background:transparent;filter:none;opacity:1;transform:none;
}
body[data-material-family-r19] .gallery-thumbs {flex-wrap:wrap}
body[data-material-family-r19] .gallery-thumbs button {min-height:44px}
body[data-material-family-r19] .rust-swatch-grid-r09 {align-items:start}
body[data-material-family-r19] .rust-swatch-r09 img {
  display:block;width:auto;height:auto;max-width:100%;max-height:none;aspect-ratio:auto;
  margin-inline:auto;object-fit:contain;background:transparent;filter:none;opacity:1;transform:none!important;
}
/* Reserve only the audited Rust thumbnail proportions before image decoding. */
body[data-page="/showroom-vn/vat-lieu/gi-set/"] .rust-swatch-r09 img[width="500"][height="424"] {
  width:100%;max-width:500px;height:auto;aspect-ratio:auto 500/424;
  object-fit:contain;margin-inline:auto;
}
/* Only product cards: never category/brand heroes, SEO article images or procedure diagrams. */
body.vn-material-gallery[data-material-family-r19] .product_item .image_block {
  display:block;aspect-ratio:auto;height:auto;min-height:0;padding:0!important;
  background:transparent;overflow:visible;
}
body.vn-material-gallery[data-material-family-r19] .product_item .image_block > a {
  display:block;height:auto;min-height:0;max-width:100%;background:transparent;
}
body.vn-material-gallery[data-material-family-r19] .product_item .image_block img,
body.vn-material-gallery[data-material-family-r19] .product_item .image_block a:hover img {
  display:block;width:auto;height:auto;max-width:100%;max-height:none;margin-inline:auto;
  aspect-ratio:auto;object-fit:contain;background:transparent;filter:none;opacity:1;transform:none;transition:none;
}
body[data-material-family-r19] .material-native-gallery-r19 {
  min-width:0;width:100%;margin-inline:auto;align-self:start;
}
body[data-material-family-r19] .material-native-gallery-r19 .fotorama__stage,
body[data-material-family-r19] .material-native-gallery-r19 .fotorama__nav,
body[data-material-family-r19] .material-native-gallery-r19 .fotorama__thumb {background:transparent}
body[data-material-family-r19] .material-native-gallery-r19 .fotorama__img {filter:none;opacity:1;transition:none}
body[data-material-family-r19] .material-native-gallery-r19 .fotorama__arr,
body[data-material-family-r19] .material-native-gallery-r19 .fotorama__fullscreen-icon {min-width:44px;min-height:44px}
body[data-material-family-r19] .material-native-gallery-r19 :focus-visible,
body[data-material-family-r19] .material-view-tools-r19 button:focus-visible,
.material-image-dialog-r19 :focus-visible {outline:2px solid var(--wine,#331628);outline-offset:3px}
body[data-material-family-r19] .material-view-tools-r19 {
  display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:8px 20px;
  width:100%;margin:12px 0 0;padding:10px 0 0;border-top:1px solid var(--line,#d5c9cf);
  color:var(--ink,#292227);font-family:"Be Vietnam Pro",Arial,sans-serif;
}
/* Fotorama hides direct siblings of its own wrapper; this toolbar is intentional. */
body[data-material-family-r19] .material-native-gallery-r19 > .material-view-tools-r19 {display:flex!important}
body[data-material-family-r19] .material-native-gallery-r19.fotorama--fullscreen > .material-view-tools-r19 {display:none!important}
body[data-material-family-r19] .material-view-count-r19 {font-size:12px;line-height:1.6;margin:0;color:var(--muted,#63565e)}
body[data-material-family-r19] .material-view-tools-r19 button {
  display:inline-flex;align-items:center;gap:16px;min-height:44px;max-width:100%;padding:8px 0;
  border:0;border-bottom:1px solid currentColor;background:none;color:var(--wine,#331628);
  font:500 13px/1.5 "Be Vietnam Pro",Arial,sans-serif;cursor:pointer;
}
/* Native technical content is preserved; only media width follows its existing column. */
body.vn-material-gallery[data-material-family-r19] .products_videos iframe {
  width:100%;max-width:100%;height:auto;aspect-ratio:16/9;
}
.material-image-dialog-r19 {
  box-sizing:border-box;width:min(1200px,calc(100vw - 24px));max-width:calc(100vw - 24px);
  height:calc(100dvh - 24px);max-height:calc(100dvh - 24px);padding:0;border:0;
  background:var(--paper,#f3eeea);color:var(--ink,#292227);overflow:hidden;
  font-family:"Be Vietnam Pro",Arial,sans-serif;
}
.material-image-dialog-r19[open] {display:grid;grid-template-rows:auto minmax(0,1fr) auto}
.material-image-dialog-r19::backdrop {background:rgba(25,20,23,.8)}
.material-image-head-r19 {display:flex;align-items:center;justify-content:space-between;gap:16px;padding:12px 22px;border-bottom:1px solid var(--line,#d5c9cf)}
.material-image-head-r19 h2 {margin:0;font:500 16px/1.5 "Be Vietnam Pro",Arial,sans-serif;letter-spacing:0;overflow-wrap:anywhere}
.material-image-dialog-r19 button {min-width:44px;min-height:44px;border:1px solid var(--line,#d5c9cf);padding:8px 12px;background:transparent;color:inherit;font:inherit;cursor:pointer}
.material-image-dialog-r19 button:disabled {opacity:.4;cursor:default}
.material-image-dialog-r19 .material-image-close-r19 {flex-shrink:0;border:0;font-size:24px;line-height:1}
.material-image-dialog-r19 figure {display:flex;flex-direction:column;justify-content:center;align-items:center;min-width:0;min-height:0;margin:0;padding:18px 22px 8px;overflow:auto}
.material-image-dialog-r19 figure img {display:block;width:auto;height:auto;max-width:100%;max-height:calc(100dvh - 220px);object-fit:contain;filter:none;opacity:1;transform:none;flex:0 1 auto}
.material-image-dialog-r19 figcaption {font-size:12px;line-height:1.6;margin-top:12px;text-align:center;color:var(--muted,#63565e);max-width:100%}
.material-image-footer-r19 {display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:12px 22px;padding:12px 22px 18px;border-top:1px solid var(--line,#d5c9cf)}
.material-image-nav-r19 {display:flex;align-items:center;gap:12px}
.material-image-position-r19 {font-size:13px;min-width:48px;text-align:center}
.material-image-source-r19 {font-size:13px;line-height:1.5;min-height:44px;display:inline-flex;align-items:center;border-bottom:1px solid currentColor;color:inherit;text-decoration:none}
.material-image-status-r19 {font-size:13px;line-height:1.6;max-width:42ch;margin:10px 0 0;text-align:center}
.material-image-dialog-r19 [hidden] {display:none!important}
@media(max-width:720px) {
  body[data-material-family-r19] .material-detail > .gallery > img {max-height:560px}
  .material-image-dialog-r19 {width:calc(100vw - 16px);max-width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:calc(100dvh - 16px)}
  .material-image-head-r19,.material-image-footer-r19 {padding:10px 14px}
  .material-image-head-r19 h2 {font-size:14px}
  .material-image-dialog-r19 figure {padding:12px 14px 8px}
  .material-image-dialog-r19 figure img {max-height:calc(100dvh - 250px)}
  .material-image-footer-r19 {gap:8px 14px;justify-content:center;padding-bottom:max(10px,env(safe-area-inset-bottom))}
  .material-image-source-r19 {font-size:12px}
}
