/* Trafcue gallery: shared by all seven offer types */
.offer-gallery{width:100%;min-width:0}.gallery-main{display:block;width:100%;padding:0;border:0;background:#f5f7fa;border-radius:16px;overflow:hidden;cursor:zoom-in}.gallery-main img{display:block;width:100%;height:auto;max-height:560px;object-fit:contain}.gallery-thumbnails{display:flex;gap:10px;overflow-x:auto;padding:12px 2px 4px}.gallery-thumb{flex:0 0 78px;width:78px;height:66px;border:2px solid transparent;border-radius:10px;overflow:hidden;background:#f3f6f9;padding:2px;cursor:pointer}.gallery-thumb.is-active,.gallery-thumb:focus-visible{border-color:#ff7900}.gallery-thumb img{width:100%;height:100%;object-fit:cover;border-radius:6px}.gallery-lightbox[hidden]{display:none!important}.gallery-lightbox{position:fixed;inset:0;z-index:99999;background:rgba(5,13,25,.94);display:flex;align-items:center;justify-content:center;padding:65px 64px}.gallery-lightbox>img{display:block;max-width:100%;max-height:100%;object-fit:contain}.gallery-lightbox button{position:absolute;border:0;background:rgba(255,255,255,.16);color:white;border-radius:50%;width:44px;height:44px;font-size:30px;cursor:pointer}.gallery-close{top:14px;right:16px}.gallery-prev{left:12px;top:50%}.gallery-next{right:12px;top:50%}.gallery-open{overflow:hidden}.admin-gallery-grid{display:flex;flex-wrap:wrap;gap:12px}.admin-gallery-item{display:flex;flex-direction:column;gap:6px;width:125px;padding:8px;border:1px solid #dbe3ed;border-radius:10px}.admin-gallery-item img{width:100%;height:90px;object-fit:contain}.admin-gallery-item span{font-size:13px}@media(max-width:600px){.gallery-lightbox{padding:64px 42px}.gallery-thumb{flex-basis:64px;width:64px;height:56px}.gallery-main img{max-height:420px}}

/* v1.2.1: The legacy .detail-image has aspect-ratio:4/3 and overflow:hidden.
   That clips thumbnails below the main image. Let the gallery size naturally. */
.detail-image:has(.offer-gallery){aspect-ratio:auto;overflow:visible;background:transparent;min-width:0}
.detail-image .offer-gallery .gallery-main img{height:auto;max-height:480px;object-fit:contain}
.detail-image .offer-gallery .gallery-thumbnails{width:100%;min-width:0;overflow-x:auto;overflow-y:hidden}

/* v1.2.2: override legacy image box in all browsers without :has(). */
.product-detail .detail-image { aspect-ratio:auto !important; height:auto !important; max-height:none !important; overflow:visible !important; display:block !important; align-self:start; }
.product-detail .detail-image .offer-gallery { display:block !important; height:auto !important; overflow:visible !important; }
.product-detail .detail-image .gallery-main { display:block !important; width:100%; height:auto !important; overflow:hidden; }
.product-detail .detail-image .gallery-main img { display:block; width:100%; height:auto !important; max-height:480px; object-fit:contain; }
.product-detail .detail-image .gallery-thumbnails { display:flex !important; position:relative; width:100%; height:auto !important; min-height:80px; padding:12px 2px 6px; overflow-x:auto; overflow-y:visible; visibility:visible !important; opacity:1 !important; }
.product-detail .detail-image .gallery-thumb { display:block !important; flex:0 0 78px; width:78px; height:66px !important; }
.product-detail .detail-image .gallery-thumb img { display:block; width:100%; height:100% !important; object-fit:cover; }
