.jmh-fmg-gallery[hidden],.jmh-fmg-modal[hidden]{display:none!important}
.jmh-fmg-gallery{display:block;box-sizing:border-box;width:100%;clear:both;margin:18px 0 20px;padding:14px;border:1px solid #e7e7e7;border-radius:10px;background:#fff;color:#222}
.jmh-fmg-gallery *{box-sizing:border-box}
.jmh-fmg-head{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}
.jmh-fmg-head h3{font-family:inherit;font-size:17px;line-height:1.4;font-weight:650;margin:0}
.jmh-fmg-count{font-size:12px;color:#777;white-space:nowrap}
.jmh-fmg-subtitle{font-size:12px;color:#555;line-height:1.4;margin:5px 0 12px}
.jmh-fmg-thumbs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.jmh-fmg-thumb{border:1px solid #dfdfdf;background:#f5f5f5;padding:0;position:relative;display:flex;align-items:center;justify-content:center;border-radius:6px;min-height:68px;aspect-ratio:1/1;width:100%;overflow:hidden;cursor:pointer;transition:border-color .2s,box-shadow .2s}
.jmh-fmg-thumb img{width:100%;height:100%;position:absolute;inset:0;object-fit:cover}
.jmh-fmg-thumb:focus-visible{outline:2px solid #222;outline-offset:2px}
.jmh-fmg-thumb:hover{border-color:#333;box-shadow:0 1px 5px #0002}
.jmh-fmg-play{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;border-radius:50%;background:#000a;color:white;font-size:18px;width:38px;height:38px;padding-left:2px}
.jmh-fmg-note{color:#777;font-size:11px;line-height:1.4;margin:10px 0 0}
.jmh-fmg-modal{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:center;justify-content:center;background:rgba(0,0,0,.88);padding:24px}
.jmh-fmg-modal-inner{position:relative;max-width:95vw;max-height:95vh;min-width:min(500px,95vw);display:flex;align-items:center;justify-content:center}
.jmh-fmg-modal-content{display:flex;align-items:center;justify-content:center;width:100%;max-height:88vh}
.jmh-fmg-modal-content img,.jmh-fmg-modal-content video{display:block;max-width:100%;max-height:82vh;object-fit:contain;width:auto;height:auto}
.jmh-fmg-modal-content video{width:100%;max-height:82vh}
.jmh-fmg-close{position:absolute;right:0;top:-42px;background:transparent;border:0;color:white;font-size:34px;line-height:1;cursor:pointer;padding:0 6px}
.jmh-fmg-modal-open{overflow:hidden}
@media(max-width:500px){.jmh-fmg-gallery{padding:11px}.jmh-fmg-thumbs{gap:6px}.jmh-fmg-thumb{min-height:55px}.jmh-fmg-head h3{font-size:15px}.jmh-fmg-modal{padding:12px}}

.jmh-fmg-public-note[hidden]{display:none!important}
.jmh-fmg-public-note{color:#555;font-size:12px;line-height:1.4;margin:8px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}

.jmh-fmg-reference-label[hidden]{display:none!important}
.jmh-fmg-reference-label{font-size:12px;font-weight:600;line-height:1.4;color:#555;margin:8px 0 0}

/* Keep Woostify's two original float columns intact. */
.jmh-fmg-image-column{box-sizing:border-box;width:100%;max-width:100%;min-width:0;display:flow-root;float:none}
.jmh-fmg-image-column>.product-gallery{float:none!important;width:100%!important;max-width:100%}
@media(min-width:992px){.jmh-fmg-image-column{float:left;width:calc((100% - 30px) / 2)}}
