/* Square product stage and four-column thumbnail grid. */
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid{display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto;align-content:start;gap:14px;padding:0;background:transparent;min-width:0}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-main-image{grid-column:1;grid-row:1;position:relative;aspect-ratio:1;width:100%;height:auto;min-height:0;margin:0;padding:0;border:0;border-radius:8px;overflow:hidden;background:#f7f7f7}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-main-image>img{display:block;width:100%;height:100%;max-width:none;max-height:none;object-fit:contain;object-position:center}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails{grid-column:1;grid-row:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;width:100%;max-width:none;max-height:none;margin:0;padding:0;overflow:visible;border:0;border-radius:0;background:transparent;scrollbar-gutter:auto}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails button{display:block;width:100%;min-width:0;height:auto;aspect-ratio:1;margin:0;padding:0;border:0;border-radius:8px;background:#f7f7f7;overflow:hidden;box-shadow:none;cursor:pointer}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails button.active{padding:0;border:0;box-shadow:0 0 0 2px #182ABB;outline-offset:3px}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails img{display:block;width:100%;height:100%;border-radius:8px;object-fit:cover;transition:opacity .2s}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails button:hover img{opacity:.82}
body.babu-retail #product-page .pd-photo-grid .pd-photo-zoom{position:absolute;z-index:3;top:8px;left:8px;display:grid;place-items:center;width:30px;height:30px;padding:7px;border:0;border-radius:50%;background:#fffffff2;color:#202635;box-shadow:0 1px 6px #0000000b;cursor:pointer}
body.babu-retail #product-page .pd-photo-grid .pd-photo-zoom svg{width:16px;height:16px}
body.babu-retail #product-page .pd-photo-grid .photo-nav{opacity:0;pointer-events:none;transition:opacity .2s}
body.babu-retail #product-page .pd-photo-grid .pd-main-image:hover .photo-nav,body.babu-retail #product-page .pd-photo-grid .photo-nav:focus-visible{opacity:1;pointer-events:auto}
body.babu-retail #product-page .pd-photo-grid .pd-photo-dialog{position:fixed;inset:0;width:min(1000px,94vw);max-width:94vw;height:min(850px,90dvh);max-height:90dvh;margin:auto;padding:24px;border:0;border-radius:14px;background:#fff;box-sizing:border-box;overflow:hidden}
body.babu-retail #product-page .pd-photo-grid .pd-photo-dialog:not([open]){display:none}
body.babu-retail #product-page .pd-photo-grid .pd-photo-dialog[open]{display:grid;place-items:center}
body.babu-retail #product-page .pd-photo-grid .pd-photo-dialog::backdrop{background:#111827b8;backdrop-filter:blur(3px)}
body.babu-retail #product-page .pd-photo-grid .pd-photo-dialog>img{display:block;width:100%;height:100%;min-height:0;object-fit:contain}
body.babu-retail #product-page .pd-photo-grid .pd-photo-dialog-close{position:absolute;z-index:2;top:10px;right:10px;display:grid;place-items:center;width:36px;height:36px;padding:0;border:0;border-radius:50%;background:#f1f2f5;color:#202635;font:28px/1 Arial,sans-serif;cursor:pointer}
body.babu-retail #product-page .pd-photo-grid button:focus-visible{outline:2px solid #182ABB;outline-offset:3px}
@media(max-width:600px){body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid{gap:10px}body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails{gap:10px}body.babu-retail #product-page .pd-photo-grid .pd-photo-dialog{padding:14px}}
@media(hover:none){body.babu-retail #product-page .pd-photo-grid .photo-nav{opacity:.8;pointer-events:auto}}
@media(prefers-reduced-motion:reduce){body.babu-retail #product-page .pd-photo-grid *{transition:none!important}}

/* Give the main product photograph more room on three-column desktops. */
@media(min-width:1200px){body.babu-retail #product-page .pd-product-frame .pd-grid:has(.pd-photo-grid){grid-template-columns:minmax(0,1.4fr) minmax(0,1.2fr) minmax(230px,.7fr)}}

/* A single thumbnail row with navigation at either end. */
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnail-carousel{grid-column:1;grid-row:2;display:grid;grid-template-columns:24px minmax(0,1fr) 24px;align-items:center;gap:8px;min-width:0;width:100%}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails{grid-column:2;grid-row:1;display:flex;gap:10px;max-width:100%;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x mandatory;scrollbar-width:none;padding:3px;box-sizing:border-box}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails::-webkit-scrollbar{display:none}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumbnails button{flex:0 0 calc((100% - 30px)/4);scroll-snap-align:start}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumb-arrow{display:grid;place-items:center;width:24px;height:36px;padding:0;border:1px solid #e5e7eb;border-radius:6px;background:#fff;color:#303744;font:26px/1 Roboto,sans-serif;cursor:pointer}
body.babu-retail #product-page .pd-product-frame .pd-gallery.pd-photo-grid .pd-thumb-arrow:hover{background:#f4f5ff;color:#182abb}