@media (min-width: 1100px) {

  .single-product .woocommerce-product-gallery {
    min-height: 450px;
  }

  .single-product .woocommerce-product-gallery.b2b-thumbs-scroll-ready {
    grid-template-columns: 90px 450px;
  }

  .single-product .woocommerce-product-gallery .flex-viewport,
  .single-product .woocommerce-product-gallery__wrapper,
  .single-product .woocommerce-product-gallery__image {
    min-height: 450px;
  }

  .b2b-gallery-thumbs-wrap {
    grid-column: 1;
    grid-row: 1;
    width: 90px !important;
    height: 450px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    box-sizing: border-box;
  }

  .b2b-gallery-thumbs-scroll {
    width: 90px;
    max-height: 410px;
    overflow-y: auto;
    overflow-x: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
    box-sizing: border-box;
  }

  .b2b-gallery-thumbs-scroll::-webkit-scrollbar {
    display: none;
  }

  .b2b-gallery-thumbs-scroll ol.flex-control-thumbs {
    width: 90px !important;
    max-width: 90px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    margin: 0 auto !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow: visible !important;
  }

  .b2b-gallery-thumbs-scroll ol.flex-control-thumbs li,
  .b2b-gallery-thumbs-scroll ol.flex-control-thumbs li:first-child {
    width: 80px !important;
    height: 80px !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  .b2b-thumbs-arrow {
    width: 80px;
    height: 18px;
    min-height: 18px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    cursor: pointer;
    font-size: 13px;
    line-height: 14px;
    padding: 0;
    margin: 0 auto;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
  }

  .b2b-thumbs-arrow:hover {
    background: #f5f5f5;
  }

  .b2b-thumbs-arrow-up {
    margin-bottom: 4px;
  }

  .b2b-thumbs-arrow-down {
    margin-top: 4px;
  }

  .b2b-thumbs-arrow.is-disabled {
    opacity: 0.35;
    cursor: default;
    pointer-events: none;
  }

}

@media (max-width: 1099px) {

  .single-product .woocommerce-product-gallery {
    overflow: visible !important;
  }

  .single-product .woocommerce-product-gallery .flex-viewport {
    width: 100% !important;
    height: clamp(300px, 48vw, 450px) !important;
    overflow: hidden !important;
  }

  .single-product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__wrapper {
    width: 100% !important;
    height: 100% !important;
    transform: none !important;
    transition: none !important;
    display: block !important;
  }

  .single-product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image {
    float: none !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    margin: 0 !important;
    text-align: center !important;
    display: none !important;
  }

  .single-product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image:first-child,
  .single-product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image.flex-active-slide {
    display: block !important;
  }

  .single-product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__wrapper:has(.flex-active-slide) .woocommerce-product-gallery__image:first-child:not(.flex-active-slide) {
    display: none !important;
  }

  .single-product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image a {
    width: 100% !important;
    height: 100% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    box-sizing: border-box !important;
    padding: 2px !important;
  }

  .single-product .woocommerce-product-gallery .flex-viewport .woocommerce-product-gallery__image img:not(.zoomImg) {
    width: auto !important;
    height: auto !important;
    max-width: calc(100% - 4px) !important;
    max-height: calc(100% - 4px) !important;
    object-fit: contain !important;
    margin: auto !important;
  }

  .b2b-gallery-thumbs-wrap,
  .b2b-gallery-thumbs-scroll {
    display: contents !important;
  }

  .b2b-thumbs-arrow {
    display: none !important;
  }

}
