:root {
  --hbpgp-gap: 12px;
  --hbpgp-radius: 14px;
  --hbpgp-main-max-width: 100%;
  --hbpgp-thumb-size: 82px;
  --hbpgp-mobile-thumbs: 4;
  --hbpgp-aspect-ratio: 1/1;
  --hbpgp-zoom-x: 50%;
  --hbpgp-zoom-y: 50%;
  --hbpgp-cover-bg: none;
}

.hbpgp-gallery-wrap {
  display: flex;
  gap: var(--hbpgp-gap);
  align-items: flex-start;
  width: 100%;
}

.hbpgp-gallery-wrap.hbpgp-pos-bottom {
  display: block;
}

.hbpgp-gallery-wrap.hbpgp-pos-bottom .js-qv-mask,
.hbpgp-gallery-wrap.hbpgp-pos-bottom .product-thumbs,
.hbpgp-gallery-wrap.hbpgp-pos-bottom .product-images > ul,
.hbpgp-gallery-wrap.hbpgp-pos-bottom .product-images-list {
  margin-top: var(--hbpgp-gap);
}

.hbpgp-gallery-wrap.hbpgp-pos-right {
  flex-direction: row-reverse;
}

.product-cover,
.js-qv-product-cover,
.product-cover img,
.js-qv-product-cover img,
.js-qv-mask img,
.product-thumbs img,
.product-images > ul img,
.product-images-list img {
  border-radius: var(--hbpgp-radius);
}

.product-cover,
.js-qv-product-cover,
.product-cover-container,
.product-page-cover {
  max-width: var(--hbpgp-main-max-width);
  overflow: hidden;
  position: relative;
}

.hbpgp-has-fixed-ratio .product-cover,
.hbpgp-has-fixed-ratio .js-qv-product-cover,
.hbpgp-has-fixed-ratio .product-cover-container,
.hbpgp-has-fixed-ratio .product-page-cover {
  aspect-ratio: var(--hbpgp-aspect-ratio);
}

.hbpgp-has-fixed-ratio .product-cover img,
.hbpgp-has-fixed-ratio .js-qv-product-cover img,
.hbpgp-has-fixed-ratio .product-page-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.js-qv-mask,
.product-thumbs,
.product-images > ul,
.product-images-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hbpgp-gap);
  padding: 0;
  margin: 0;
  list-style: none;
}

.hbpgp-gallery-wrap.hbpgp-pos-left .js-qv-mask,
.hbpgp-gallery-wrap.hbpgp-pos-left .product-thumbs,
.hbpgp-gallery-wrap.hbpgp-pos-left .product-images > ul,
.hbpgp-gallery-wrap.hbpgp-pos-left .product-images-list,
.hbpgp-gallery-wrap.hbpgp-pos-right .js-qv-mask,
.hbpgp-gallery-wrap.hbpgp-pos-right .product-thumbs,
.hbpgp-gallery-wrap.hbpgp-pos-right .product-images > ul,
.hbpgp-gallery-wrap.hbpgp-pos-right .product-images-list {
  width: calc(var(--hbpgp-thumb-size) + 4px);
  flex-direction: column;
  flex-wrap: nowrap;
}

.js-qv-mask li,
.product-images > ul li,
.product-images-list li {
  list-style: none;
}

.js-qv-mask img,
.product-thumbs img,
.product-images > ul img,
.product-images-list img {
  width: var(--hbpgp-thumb-size);
  height: var(--hbpgp-thumb-size);
  object-fit: cover;
  cursor: pointer;
  transition: transform .2s ease, opacity .2s ease, box-shadow .2s ease;
}

.js-qv-mask img:hover,
.product-thumbs img:hover,
.product-images > ul img:hover,
.product-images-list img:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
}

.hbpgp-zoom-enabled .hbpgp-cover-zoom::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: var(--hbpgp-cover-bg);
  background-repeat: no-repeat;
  background-size: 200%;
  background-position: var(--hbpgp-zoom-x) var(--hbpgp-zoom-y);
  opacity: 0;
  transition: opacity .18s ease;
  pointer-events: none;
}

.hbpgp-zoom-enabled .hbpgp-cover-zoom:hover::after {
  opacity: 1;
}

.hbpgp-cover-clickable {
  cursor: zoom-in;
}

.hbpgp-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .88);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  padding: 20px;
}

.hbpgp-lightbox.is-open {
  display: flex;
}

.hbpgp-lightbox__img {
  max-width: min(96vw, 1400px);
  max-height: 90vh;
  border-radius: 16px;
}

.hbpgp-lightbox__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 999px;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  background: #fff;
}

html.hbpgp-no-scroll,
html.hbpgp-no-scroll body {
  overflow: hidden;
}

@media (max-width: 767px) {
  .hbpgp-gallery-wrap,
  .hbpgp-gallery-wrap.hbpgp-pos-left,
  .hbpgp-gallery-wrap.hbpgp-pos-right,
  .hbpgp-gallery-wrap.hbpgp-pos-bottom {
    display: block;
  }

  .js-qv-mask,
  .product-thumbs,
  .product-images > ul,
  .product-images-list,
  .hbpgp-gallery-wrap.hbpgp-pos-left .js-qv-mask,
  .hbpgp-gallery-wrap.hbpgp-pos-left .product-thumbs,
  .hbpgp-gallery-wrap.hbpgp-pos-left .product-images > ul,
  .hbpgp-gallery-wrap.hbpgp-pos-left .product-images-list,
  .hbpgp-gallery-wrap.hbpgp-pos-right .js-qv-mask,
  .hbpgp-gallery-wrap.hbpgp-pos-right .product-thumbs,
  .hbpgp-gallery-wrap.hbpgp-pos-right .product-images > ul,
  .hbpgp-gallery-wrap.hbpgp-pos-right .product-images-list {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(var(--hbpgp-mobile-thumbs), minmax(0, 1fr));
  }

  .js-qv-mask img,
  .product-thumbs img,
  .product-images > ul img,
  .product-images-list img {
    width: 100%;
    aspect-ratio: 1 / 1;
    height: auto;
  }

  .hbpgp-hide-mobile-thumbs .js-qv-mask,
  .hbpgp-hide-mobile-thumbs .product-thumbs,
  .hbpgp-hide-mobile-thumbs .product-images > ul,
  .hbpgp-hide-mobile-thumbs .product-images-list {
    display: none !important;
  }
}


/* Hummingbird / product page stronger targeting */
.hbpgp-gallery-wrap{width:100%}
.hbpgp-gallery-wrap > .product-cover,
.hbpgp-gallery-wrap > .js-qv-product-cover,
.hbpgp-gallery-wrap > .product-cover-container,
.hbpgp-gallery-wrap > .product-page-cover,
.hbpgp-gallery-wrap > [data-product-cover],
.hbpgp-gallery-wrap > .product-gallery__main{flex:1 1 auto;min-width:0;}
.hbpgp-gallery-wrap.hbpgp-pos-left,.hbpgp-gallery-wrap.hbpgp-pos-right{display:flex!important}
.hbpgp-gallery-wrap.hbpgp-pos-bottom{display:block!important}
.product-page__left .product-cover,
.product-page__left .js-qv-product-cover,
.product-page__left .product-cover-container,
.product-page__left .product-page-cover,
.product-page__left [data-product-cover],
.product-page__left .product-gallery__main{max-width:var(--hbpgp-main-max-width)!important}
.product-page__left .js-qv-mask,
.product-page__left .product-thumbs,
.product-page__left .product-images > ul,
.product-page__left .product-images-list,
.product-page__left [data-product-thumbnails],
.product-page__left .product-gallery__thumbnails{gap:var(--hbpgp-gap)!important}
