/* Desktop: show exactly 3 thumbnails in the right rail */
@media(min-width:769px){
  #cugb-photo-gallery .cugb-gallery-thumbs{
    display:grid !important;
    grid-template-columns:1fr !important;
    grid-auto-rows:calc((100% - 20px) / 3) !important;
    gap:10px !important;
    height:100% !important;
    min-height:420px !important;
    max-height:620px !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding:1px 7px 1px 1px !important;
  }

  #cugb-photo-gallery .cugb-gallery-thumb{
    width:100% !important;
    height:100% !important;
    min-height:0 !important;
  }

  /* Lift and tighten the slideshow footer tools */
  #cugb-photo-gallery .cugb-gallery-controls{
    margin-top:12px !important;
    padding-top:0 !important;
    grid-template-columns:minmax(145px,1fr) auto minmax(145px,1fr) !important;
    align-items:center !important;
    column-gap:14px !important;
  }

  #cugb-photo-gallery .cugb-gallery-autoplay-wrap{
    justify-self:start !important;
    align-self:center !important;
  }

  #cugb-photo-gallery .cugb-gallery-dots{
    justify-self:center !important;
    align-self:center !important;
  }

  #cugb-photo-gallery .cugb-gallery-bottom-nav{
    justify-self:end !important;
    align-self:center !important;
  }
}

/* Tablet/mobile keep horizontal thumbnail strip */
@media(max-width:768px){
  #cugb-photo-gallery .cugb-gallery-controls{
    margin-top:10px !important;
  }
}
