/* abx-gallery.css — shared product gallery (classic + 2024). Loaded after each
   template's own CSS; only adds video/gallery rules, never restyles photos. */
.abx-gal-main{ position:relative; }
.abx-gal-main #pdpMainVideo{ position:absolute; top:0; left:0; right:0; bottom:0; width:100%; height:100%; object-fit:contain; background:#000; display:none; z-index:2; }
.abx-gal-main.abx-gal-playing #pdpMainImage{ visibility:hidden; }
/* video thumb: real frame painted as background + centered play badge */
.abx-gal-strip .pdp-vthumb{ position:relative; box-sizing:border-box; display:inline-flex; align-items:center; justify-content:center; flex:0 0 auto; cursor:pointer; background:#000 center/cover no-repeat; overflow:hidden; vertical-align:top; }
.abx-gal-strip > .pdp-vthumb{ width:64px; height:64px; border:2px solid #ddd; border-radius:6px; }
.abx-gal-strip.abx-gal-2024 > .pdp-vthumb{ width:72px; height:72px; border-color:#111; }
.abx-gal-strip .pdp-vthumb.active, .abx-gal-strip > .pdp-vthumb:hover{ border-color:#1e90ff; }
.abx-gal-strip .pdp-vthumb video.abx-vlive{ position:absolute; top:0; left:0; width:100%; height:100%; object-fit:cover; pointer-events:none; }
.abx-gal-strip .pdp-vthumb .vplay{ position:relative; z-index:1; width:28px; height:28px; border-radius:50%; background:rgba(0,0,0,.65); border:1px solid rgba(255,255,255,.85); color:#fff; display:flex; align-items:center; justify-content:center; font-size:12px; line-height:1; padding-left:2px; box-sizing:border-box; }
/* admin cells */
.abx-gal-strip .pim-frame .pdp-vthumb{ display:flex; width:100%; height:100%; border:0; border-radius:0; }
.abx-gal-strip .pim-cell.is-video.abx-active .pim-frame{ border-color:#1e90ff; }
.abx-gal-strip .pim-vbadge{ position:absolute; left:0; bottom:0; z-index:2; background:rgba(0,0,0,.7); color:#fff; font-size:9px; line-height:1; padding:2px 4px; border-radius:0 4px 0 0; pointer-events:none; }
.abx-gal-strip .pim-acts button[disabled]{ opacity:.4; cursor:not-allowed; }

/* ===== Classic theme: compact gallery card (scoped to .abx-gal-card; 2024 untouched) ===== */
.abx-gal-card{ border:1px solid #bbc3d3; border-radius:8px; background:#fff; padding:8px; box-sizing:border-box; }
.abx-gal-card .pdp-main.abx-gal-fit{ height:auto; min-height:160px; max-height:none; border:0; border-radius:4px; background:#fff; padding:0; display:flex; align-items:center; justify-content:center; }
.abx-gal-card .pdp-main.abx-gal-fit #pdpMainImage{ position:static !important; width:auto !important; height:auto !important; max-width:100% !important; max-height:420px !important; object-fit:contain; margin:0 auto; }
.abx-gal-card .pdp-main.abx-gal-fit.abx-gal-playing{ min-height:240px; background:#000; }
/* thumbnail grid: wraps into rows (JS keeps 2 rows + "+N more") */
.abx-gal-card .abx-gal-strip.abx-gal-rows{ display:flex; flex-wrap:wrap; gap:6px; overflow:visible; margin:8px 0 0; padding:0; }
.abx-gal-card .abx-gal-rows > img.pdp-thumb,
.abx-gal-card .abx-gal-rows > .pdp-vthumb{ width:58px; height:58px; margin:0; border:2px solid #ddd; border-radius:5px; box-sizing:border-box; }
.abx-gal-card .abx-gal-rows > img.pdp-thumb.active,
.abx-gal-card .abx-gal-rows > img.pdp-thumb:hover,
.abx-gal-card .abx-gal-rows > .pdp-vthumb.active,
.abx-gal-card .abx-gal-rows > .pdp-vthumb:hover{ border-color:#33547a; }
.abx-gal-rows > .abx-more-hidden{ display:none !important; }
.abx-gal-rows > .abx-more{ width:58px; height:58px; box-sizing:border-box; border:2px solid #c5dbec; border-radius:5px; background:#eaf4fd; color:#2e6e9e; font-weight:bold; font-size:12px; font-family:inherit; cursor:pointer; padding:0; flex:0 0 auto; }
.abx-gal-rows > .abx-more:hover{ background:#d0e5f5; border-color:#33547a; }
.abx-gal-card .pdp-thumbs-admin{ gap:8px; }
.abx-gal-card .pim-toolbar{ margin:8px 0 0 !important; }
/* tighter vertical rhythm around the classic product top */
.product-page .product-top{ margin-bottom:4px; }
.product-page .product-description-section{ margin-top:6px; padding-top:10px; }
@media (max-width:768px){
  .abx-gal-card{ padding:6px; }
  .abx-gal-card .pdp-main.abx-gal-fit{ min-height:140px; max-height:none; height:auto; }
  .abx-gal-card .pdp-main.abx-gal-fit #pdpMainImage{ max-width:100% !important; max-height:80vw !important; }
  .abx-gal-card .abx-gal-rows > img.pdp-thumb,
  .abx-gal-card .abx-gal-rows > .pdp-vthumb,
  .abx-gal-rows > .abx-more{ width:52px; height:52px; }
}

/* ===== Classic card v3: viewer fills the card, height matched to the details column (JS sets it) ===== */
.abx-gal-card{ display:flex; flex-direction:column; }
.abx-gal-card .pdp-main.abx-gal-fill{ position:relative; width:100%; height:360px; min-height:0; max-height:none; border:0; border-radius:6px; background:#f4f6f9; padding:0; margin:0; overflow:hidden; box-sizing:border-box; }
.abx-gal-card .pdp-main.abx-gal-fill #pdpMainImage{ position:absolute !important; top:0; left:0; width:100% !important; height:100% !important; max-width:none !important; max-height:none !important; object-fit:contain; object-fit:scale-down; margin:0 !important; padding:6px; box-sizing:border-box; background:transparent; }
.abx-gal-card .pdp-main.abx-gal-fill.abx-gal-playing{ background:#000; }
/* thumbs: a grid that fills each row evenly */
.abx-gal-card .abx-gal-strip.abx-gal-rows{ display:grid; grid-template-columns:repeat(auto-fill, minmax(56px, 1fr)); gap:6px; }
.abx-gal-card .abx-gal-rows > img.pdp-thumb,
.abx-gal-card .abx-gal-rows > .pdp-vthumb,
.abx-gal-card .abx-gal-rows > .abx-more{ width:100%; height:auto; aspect-ratio:1 / 1; min-height:48px; object-fit:cover; background:#eef1f5; }
.abx-gal-card .abx-gal-rows > .pdp-vthumb{ background-color:#111; }
.abx-gal-rows > .abx-broken{ display:none !important; }
.product-page .product-description-section{ margin-top:4px; padding-top:6px; }
@media (max-width:768px){
  .abx-gal-card .abx-gal-strip.abx-gal-rows{ grid-template-columns:repeat(auto-fill, minmax(50px, 1fr)); }
}
/* ===== Classic admin grid: equal square cells, controls bar right under each, videos identical ===== */
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin{ display:grid; grid-template-columns:repeat(auto-fill, minmax(72px, 1fr)); gap:8px 6px; align-items:start; margin:8px 0 0; padding:0; overflow:visible; }
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-cell{ display:flex; flex-direction:column; width:auto; min-width:0; margin:0; }
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-frame{ display:block; position:relative; width:100%; height:auto; box-sizing:border-box; background:#eef1f5; overflow:hidden; }
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-frame:before{ content:''; display:block; padding-top:100%; }   /* square box, any browser */
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-frame img.pdp-thumb,
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-frame .pdp-vthumb{ position:absolute; top:0; left:0; width:100%; height:100%; margin:0; border:0; border-radius:0; box-sizing:border-box; }
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-frame img.pdp-thumb{ object-fit:cover; display:block; }
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-frame .pdp-vthumb{ display:flex; align-items:center; justify-content:center; }
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-tag,
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-vbadge{ z-index:3; }
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-acts{ display:flex; gap:2px; height:20px; margin-top:3px; }
.abx-gal-card .pdp-thumbs.pdp-thumbs-admin .pim-acts button{ flex:1 1 0; min-width:0; height:20px; padding:0; font-size:9.5px; line-height:18px; overflow:hidden; white-space:nowrap; }
