.cms-image-gallery { margin: 1.5rem 0; }
.cms-public-page .cms-gallery-stage { float: none; margin: 0; max-width: none; width: 100%; }
.cms-gallery-stage > button { background: transparent; border: 0; cursor: zoom-in; display: block; padding: 0; width: 100%; }
.cms-public-page .cms-gallery-stage img { aspect-ratio: 16/9; border-radius: 10px; display: block; height: auto; object-fit: contain; width: 100%; }
.cms-gallery-stage figcaption:empty { display: none; }
.cms-gallery-thumbnails { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; overscroll-behavior-inline: contain; padding: 3px 2px 10px; scrollbar-width: thin; }
.cms-gallery-thumbnails button { background: transparent; border: 2px solid transparent; border-radius: 8px; cursor: pointer; flex: 0 0 112px; opacity: .68; padding: 2px; transition: border-color .15s ease, opacity .15s ease, transform .15s ease; }
.cms-gallery-thumbnails button:hover, .cms-gallery-thumbnails button:focus, .cms-gallery-thumbnails button.is-active { border-color: var(--accent_color, #4caf50); opacity: 1; outline: none; transform: translateY(-2px); }
.cms-gallery-thumbnails img { aspect-ratio: 4/3; border-radius: 5px; display: block; height: 78px; object-fit: cover; width: 100%; }
.cms-gallery-lightbox { align-items: center; background: rgba(0,0,0,.9); border: 0; box-sizing: border-box; display: none; inset: 0; justify-content: center; padding: 32px; position: fixed; z-index: 10000; }
.cms-gallery-lightbox.is-open { display: flex; }
.cms-gallery-lightbox img { max-height: 85vh; max-width: 92vw; object-fit: contain; }
.cms-gallery-lightbox p { bottom: 8px; color: #fff; left: 20px; position: absolute; right: 20px; text-align: center; }
.cms-gallery-lightbox button { background: rgba(0,0,0,.65); border: 1px solid #fff; border-radius: 50%; color: #fff; cursor: pointer; font-size: 24px; height: 42px; position: absolute; right: 18px; top: 18px; width: 42px; }
@media (max-width: 600px) { .cms-gallery-thumbnails button { flex-basis: 86px; } .cms-gallery-thumbnails img { height: 60px; } }
