/* v5.1.34 — hard fix for off-canvas product images + mobile bottom spacing */

body.vlg-theme.single-product .vlg-product-gallery-card .woocommerce-product-gallery,
body.vlg-theme.single-product .vlg-product-gallery-card div.images,
body.vlg-theme.single-product .vlg-product-gallery-card .flex-viewport,
body.vlg-theme.single-product .vlg-product-gallery-card .flex-control-thumbs,
body.vlg-theme.single-product .vlg-product-gallery-card .woocommerce-product-gallery__wrapper {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  min-height: 0 !important;
  max-height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
  overflow: hidden !important;
}

body.vlg-theme.single-product .vlg-mobile-featured-image {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
  background: #fff !important;
}

body.vlg-theme.single-product .vlg-mobile-featured-image__link {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  height: 100% !important;
  min-width: 0 !important;
  min-height: 0 !important;
}

body.vlg-theme.single-product .vlg-mobile-featured-image__img,
body.vlg-theme.single-product .vlg-mobile-featured-image img {
  display: block !important;
  width: auto !important;
  height: auto !important;
  max-width: 96% !important;
  max-height: 96% !important;
  object-fit: contain !important;
  object-position: center center !important;
  margin: auto !important;
  transform: none !important;
}

body.vlg-theme.single-product .vlg-mobile-featured-image__img.vlg-autocropped-image,
body.vlg-theme.single-product .vlg-mobile-featured-image img.vlg-autocropped-image {
  max-width: 98% !important;
  max-height: 98% !important;
}

body.vlg-theme.single-product .vlg-mobile-featured-image__img.vlg-crop-failed {
  max-width: none !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
}

@media (min-width: 783px) {
  body.vlg-theme.single-product .vlg-product-gallery-card {
    min-height: 0 !important;
    padding: 18px !important;
  }

  body.vlg-theme.single-product .vlg-mobile-featured-image {
    min-height: 420px !important;
    max-height: 520px !important;
    aspect-ratio: 1 / .66 !important;
    border-radius: 22px !important;
  }

  body.vlg-theme.single-product .vlg-mobile-featured-image__img,
  body.vlg-theme.single-product .vlg-mobile-featured-image img {
    max-height: 470px !important;
  }
}

@media (max-width: 782px) {
  html body.vlg-theme.single-product,
  html body.vlg-theme.single-product #page,
  html body.vlg-theme.single-product .site,
  html body.vlg-theme.single-product main,
  html body.vlg-theme.single-product .vlg-product-detail,
  html body.vlg-theme.single-product .vlg-product-main-grid,
  html body.vlg-theme.single-product .vlg-product-left,
  html body.vlg-theme.single-product .vlg-product-right,
  html body.vlg-theme.single-product .vlg-product-summary-card {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  html body.vlg-theme.single-product .vlg-single-product-page {
    padding-left: 8px !important;
    padding-right: 8px !important;
    padding-bottom: calc(180px + env(safe-area-inset-bottom)) !important;
  }

  html body.vlg-theme.single-product .vlg-product-gallery-card {
    padding: 6px !important;
    margin: 0 0 8px !important;
    min-height: 0 !important;
    height: auto !important;
    border-radius: 20px !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  html body.vlg-theme.single-product .vlg-product-gallery-media {
    display: block !important;
    position: relative !important;
    min-height: 0 !important;
    overflow: hidden !important;
  }

  html body.vlg-theme.single-product .vlg-mobile-featured-image {
    aspect-ratio: 1 / .58 !important;
    min-height: 156px !important;
    max-height: 224px !important;
    padding: 4px !important;
    border-radius: 16px !important;
  }

  html body.vlg-theme.single-product .vlg-mobile-featured-image__img,
  html body.vlg-theme.single-product .vlg-mobile-featured-image img {
    max-width: 98% !important;
    max-height: 206px !important;
  }

  html body.vlg-theme.single-product .vlg-single-image-energy {
    right: 5px !important;
    bottom: 5px !important;
    transform: scale(.48) !important;
    transform-origin: right bottom !important;
  }

  html body.vlg-theme.single-product .vlg-product-summary-card,
  html body.vlg-theme.single-product div.product .summary {
    padding: 14px !important;
    padding-bottom: calc(120px + env(safe-area-inset-bottom)) !important;
    border-radius: 20px !important;
  }

  html body.vlg-theme.single-product .product_title,
  html body.vlg-theme.single-product div.product .product_title {
    font-size: clamp(17px, 5vw, 24px) !important;
    line-height: 1.15 !important;
  }

  html body.vlg-theme.single-product .vlg-product-buybox,
  html body.vlg-theme.single-product #vlg-product-buybox {
    margin-bottom: calc(110px + env(safe-area-inset-bottom)) !important;
  }

  html body.vlg-theme.single-product form.cart:not(.variations_form),
  html body.vlg-theme.single-product .vlg-product-buybox form.cart:not(.variations_form),
  html body.vlg-theme.single-product form.variations_form .single_variation_wrap,
  html body.vlg-theme.single-product form.variations_form .woocommerce-variation-add-to-cart,
  html body.vlg-theme.single-product form.variations_form .woocommerce-variation-add-to-cart.variations_button {
    display: grid !important;
    grid-template-columns: 70px minmax(0, 1fr) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  html body.vlg-theme.single-product form.cart .quantity,
  html body.vlg-theme.single-product .vlg-product-buybox form.cart .quantity {
    width: 70px !important;
    min-width: 70px !important;
    max-width: 70px !important;
  }
}

@media (max-width: 390px) {
  html body.vlg-theme.single-product .vlg-mobile-featured-image {
    min-height: 148px !important;
    max-height: 204px !important;
    aspect-ratio: 1 / .56 !important;
  }

  html body.vlg-theme.single-product .vlg-mobile-featured-image__img,
  html body.vlg-theme.single-product .vlg-mobile-featured-image img {
    max-height: 188px !important;
  }
}
