.ag-art-gallery [hidden]{display:none!important}
.ag-gallery-ready .ag-gallery-stage{aspect-ratio:4/5;background:#eeece7;display:grid;align-items:center}
.ag-gallery-ready .ag-gallery-slide{display:flex;width:100%;height:100%;min-height:0;align-items:center;justify-content:center;cursor:zoom-in}
.astarte .ag-gallery-ready .ag-gallery-stage img{display:block;width:100%;height:100%;max-height:680px;object-fit:contain;margin:0}
.ag-gallery-toolbar{display:flex;justify-content:space-between;gap:16px;margin:12px 0 18px;color:#68645b;font-size:14px}
.ag-gallery-thumbs{display:flex;flex-wrap:wrap;gap:10px}
.ag-gallery-thumb{width:76px;height:88px;padding:5px;border:1px solid transparent;background:#eeece7;cursor:pointer;border-radius:0}
.astarte .ag-gallery-thumb img{width:100%;height:100%;object-fit:contain;margin:0}
.ag-gallery-thumb[aria-pressed=true]{border-color:#7d663f}
.ag-gallery-thumb:hover{border-color:#68645b}
.ag-gallery-thumb:focus-visible,.ag-gallery-slide:focus-visible{outline:2px solid #7d663f;outline-offset:3px}
.ag-gallery-dialog{position:fixed;inset:0;width:96vw;max-width:1500px;height:94dvh;max-height:96dvh;margin:auto;padding:54px 24px 16px;border:0;background:#faf8f4;color:#25241f;box-sizing:border-box}
.ag-gallery-dialog::backdrop{background:rgba(20,19,17,.88)}
.ag-gallery-dialog[open]{display:flex;flex-direction:column}
.ag-lightbox-stage{flex:1;min-height:0;display:flex;align-items:center;justify-content:center}
.astarte .ag-lightbox-stage img{width:100%;height:100%;max-height:100%;object-fit:contain;margin:0}
.ag-gallery-dialog button{font:inherit;min-width:44px;min-height:44px;border:1px solid #dedad1;border-radius:0;background:transparent;color:#25241f;cursor:pointer}
.ag-gallery-dialog button:focus-visible{outline:2px solid #7d663f;outline-offset:3px}
.ag-gallery-dialog .ag-lightbox-close{position:absolute;right:12px;top:6px;font-size:30px;border:0}
.ag-lightbox-controls{display:flex;align-items:center;justify-content:center;gap:24px;padding-top:12px;font:15px Arial,Helvetica,sans-serif}
@media(max-width:760px){.ag-gallery-thumb{width:64px;height:74px}.ag-gallery-dialog{width:100vw;height:100dvh;max-height:100dvh;padding:54px 12px 18px}.ag-gallery-toolbar{font-size:14px}.ag-gallery-ready .ag-gallery-stage{aspect-ratio:4/5}}

/* Keep theme button states from replacing the ASTARTE palette. */
.astarte .ag-art-gallery button.ag-gallery-thumb{background:#eeece7;color:#25241f;border:1px solid transparent;box-shadow:none;text-shadow:none;outline:none;border-radius:0}
.astarte .ag-art-gallery button.ag-gallery-thumb:hover{background:#e6e2d9;color:#25241f;border-color:#9a845f}
.astarte .ag-art-gallery button.ag-gallery-thumb:focus,
.astarte .ag-art-gallery button.ag-gallery-thumb:active{background:#eeece7;color:#25241f;border-color:#9a845f;box-shadow:none}
.astarte .ag-art-gallery button.ag-gallery-thumb[aria-pressed=true]{background:#eeece7;color:#25241f;border-color:#7d663f}
.astarte .ag-art-gallery button.ag-gallery-thumb:focus-visible{outline:2px solid #7d663f;outline-offset:3px}
.astarte .ag-art-gallery .ag-gallery-dialog button{background:transparent;color:#25241f;border-color:#dedad1;box-shadow:none;text-shadow:none;border-radius:0;outline:none}
.astarte .ag-art-gallery .ag-gallery-dialog button:hover{background:#eeece7;color:#7d663f;border-color:#9a845f}
.astarte .ag-art-gallery .ag-gallery-dialog button:focus,
.astarte .ag-art-gallery .ag-gallery-dialog button:active{background:#eeece7;color:#25241f;border-color:#9a845f;box-shadow:none}
.astarte .ag-art-gallery .ag-gallery-dialog button:focus-visible{outline:2px solid #7d663f;outline-offset:3px}
.astarte .ag-art-gallery .ag-gallery-dialog button.ag-lightbox-close{border:0;background:transparent;color:#25241f}
.astarte .ag-art-gallery .ag-gallery-dialog button.ag-lightbox-close:hover,
.astarte .ag-art-gallery .ag-gallery-dialog button.ag-lightbox-close:active{background:#eeece7;color:#7d663f}
