/* GARMACH Universal Gallery 1.0 – shared gallery appearance for AGP, MGP and future models. */
.gau-gallery-grid,
.gmg .gmg-gallery,
.garmach-product-gallery {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:16px;
}
.gau-gallery-grid > a.gau-gallery-link,
.gmg .gmg-gallery > a[data-gmg-zoom],
.garmach-product-gallery > a[data-garmach-photo] {
  display:flex;
  justify-content:center;
  align-items:center;
  position:relative;
  aspect-ratio:4/3;
  min-width:0;
  padding:12px;
  overflow:hidden;
  border:1px solid #dce7dd;
  border-radius:12px;
  background:#fff;
  cursor:zoom-in;
  transition:box-shadow .15s ease,border-color .15s ease;
}
.gau-gallery-grid > a.gau-gallery-link img,
.gmg .gmg-gallery > a[data-gmg-zoom] img,
.garmach-product-gallery > a[data-garmach-photo] img {
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  max-height:100%;
  object-fit:contain;
  object-position:center;
  background:transparent;
  transition:none;
  transform:none;
}
.gau-gallery-grid > a.gau-gallery-link:hover,
.gau-gallery-grid > a.gau-gallery-link:focus-visible,
.gmg .gmg-gallery > a[data-gmg-zoom]:hover,
.gmg .gmg-gallery > a[data-gmg-zoom]:focus-visible,
.garmach-product-gallery > a[data-garmach-photo]:hover,
.garmach-product-gallery > a[data-garmach-photo]:focus-visible {
  border-color:#2b8056;
  box-shadow:0 7px 22px rgba(17,57,39,.16);
}
.gau-gallery-grid > a.gau-gallery-link:hover img { transform:none; }
@media(max-width:840px){
  .gau-gallery-grid,.gmg .gmg-gallery,.garmach-product-gallery {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
}
@media(max-width:470px){
  .gau-gallery-grid,.gmg .gmg-gallery,.garmach-product-gallery {gap:9px;}
  .gau-gallery-grid > a.gau-gallery-link,.gmg .gmg-gallery > a[data-gmg-zoom],.garmach-product-gallery > a[data-garmach-photo]{padding:7px;border-radius:9px;}
}

/* The viewer lives directly under <body> so sticky headers and transformed theme containers cannot cover it. */
.garmach-ug-viewer[hidden]{display:none!important;}
.garmach-ug-viewer,
.garmach-ug-viewer *{box-sizing:border-box;}
.garmach-ug-viewer{
  position:fixed;
  inset:0;
  z-index:2147483000;
  width:100%;
  height:100vh;
  height:100dvh;
  display:grid;
  grid-template-rows:auto minmax(0,1fr) auto;
  background:rgba(8,20,16,.975);
  color:#fff;
  font:inherit;
  margin:0;
  padding:0;
  isolation:isolate;
  overscroll-behavior:contain;
}
body.garmach-ug-scroll-locked{overflow:hidden!important;}
.garmach-ug-toolbar{
  display:flex;align-items:center;gap:12px;
  min-height:64px;
  padding:10px clamp(12px,3vw,34px);
  border-bottom:1px solid rgba(255,255,255,.15);
}
.garmach-ug-heading{font-size:.95rem;font-weight:700;line-height:1.3;color:#fff;margin:0;}
.garmach-ug-count{margin-left:auto;font-size:.88rem;white-space:nowrap;color:#cce2d5;font-variant-numeric:tabular-nums;}
.garmach-ug-viewer button{
  color:#fff;
  border:1px solid rgba(255,255,255,.3);
  background:rgba(255,255,255,.09);
  box-shadow:none;
  font:inherit;
  cursor:pointer;
  -webkit-tap-highlight-color:transparent;
  transition:background .12s ease,border-color .12s ease;
}
.garmach-ug-viewer button:hover{background:rgba(255,255,255,.22);}
.garmach-ug-viewer button:focus-visible{outline:3px solid #efc94c;outline-offset:3px;}
.garmach-ug-viewer button:disabled{opacity:.3;cursor:default;}
.garmach-ug-close{display:flex;align-items:center;justify-content:center;gap:9px;padding:7px 12px;border-radius:24px;min-height:43px;min-width:53px;}
.garmach-ug-close-mark{font-size:1.8rem;line-height:1;}
.garmach-ug-close-label{font-size:.84rem;font-weight:600;}
.garmach-ug-stage{
  min-height:0;
  display:grid;
  grid-template-columns:clamp(47px,7vw,86px) minmax(0,1fr) clamp(47px,7vw,86px);
  align-items:center;
  padding:8px 0;
}
.garmach-ug-figure{
  display:flex;align-items:center;justify-content:center;
  width:100%;height:100%;min-width:0;min-height:0;
  overflow:hidden;
  cursor:default;
  touch-action:pan-y;
}
.garmach-ug-image{display:block;width:100%;height:100%;max-width:100%;max-height:100%;object-fit:contain;user-select:none;-webkit-user-select:none;}
.garmach-ug-arrow{
  justify-self:center;
  display:flex;align-items:center;justify-content:center;
  width:clamp(39px,5.2vw,56px);height:clamp(44px,5.2vw,56px);
  padding:0;border-radius:50%;font-size:2.5rem!important;line-height:1!important;
}
.garmach-ug-viewer[data-single="true"] .garmach-ug-arrow{visibility:hidden;}
.garmach-ug-footer{
  display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;
  min-height:98px;
  padding:7px 12px 13px;
  border-top:1px solid rgba(255,255,255,.15);
}
.garmach-ug-strip{
  max-width:min(1040px,100%);width:100%;
  display:flex;align-items:center;justify-content:safe center;gap:9px;
  overflow-x:auto;overscroll-behavior-x:contain;
  scrollbar-width:thin;
  padding:4px 2px 8px;
}
.garmach-ug-thumb{
  flex:0 0 72px;
  display:block;width:72px;height:58px;padding:4px;
  overflow:hidden;border-radius:7px;
  border:2px solid transparent!important;
}
.garmach-ug-thumb img{display:block;width:100%;height:100%;object-fit:contain;}
.garmach-ug-thumb[aria-pressed="true"]{border-color:#efc94c!important;background:rgba(255,255,255,.25);}
.garmach-ug-hint{font-size:.76rem;line-height:1.2;color:#b4cbbd;text-align:center;}
.garmach-ug-viewer[data-single="true"] .garmach-ug-strip {display:none;}
.garmach-ug-viewer[data-single="true"] .garmach-ug-footer {min-height:42px;}
@media(max-width:600px){
 .garmach-ug-toolbar{padding:8px 10px;min-height:56px;gap:8px;}
 .garmach-ug-heading{font-size:.8rem;}
 .garmach-ug-count{font-size:.76rem;}
 .garmach-ug-close{min-width:42px;min-height:42px;padding:5px 9px;}
 .garmach-ug-close-label{display:none;}
 .garmach-ug-stage{grid-template-columns:42px minmax(0,1fr) 42px;}
 .garmach-ug-arrow{width:36px;height:47px;font-size:2rem!important;border-radius:10px;}
 .garmach-ug-footer{min-height:82px;padding:5px 8px 8px;}
 .garmach-ug-thumb{flex-basis:56px;width:56px;height:48px;}
 .garmach-ug-hint{font-size:.68rem;}
}
@media(prefers-reduced-motion:reduce){
 .garmach-ug-viewer button,.gau-gallery-grid > a.gau-gallery-link,.gmg .gmg-gallery > a[data-gmg-zoom]{transition:none!important;}
}
