/* Huuguu v81.30.7 — Woo Single Gallery Full Reset
   Uses a custom template, not Woo/FlexSlider thumbnails. Keeps Woo/PhotoSwipe trigger. */

body.single-product div.product .hgg-single-product-gallery,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery {
  position: relative;
  width: 100%;
  max-width: 100%;
  margin: 0;
  opacity: 1;
  visibility: visible;
  overflow: visible;
}

body.single-product div.product .hgg-single-product-gallery__stage,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__stage {
  position: relative;
  display: block;
  width: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: var(--hgg-wc-single-image-radius, 18px);
  background: var(--hgg-wc-single-gallery-bg, #f7f2eb);
}

body.single-product div.product .hgg-single-product-gallery__main-link,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__main-link {
  display: block;
  width: 100%;
  cursor: zoom-in;
}

body.single-product div.product .hgg-single-product-gallery__wrapper,
body.single-product div.product .hgg-single-product-gallery__image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__wrapper,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__image {
  display: block;
  width: 100%;
  margin: 0;
}

body.single-product div.product .hgg-single-product-gallery__main-image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__main-image {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
  border-radius: var(--hgg-wc-single-image-radius, 18px);
  background: var(--hgg-wc-single-gallery-bg, #f7f2eb);
  transition: opacity .12s ease;
}

body.single-product div.product .hgg-single-product-gallery.is-switching .hgg-single-product-gallery__main-image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery.is-switching .hgg-single-product-gallery__main-image {
  opacity: .96;
}

body.single-product div.product .hgg-single-product-gallery__zoom,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__zoom {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: var(--hgg-surface, #fff);
  color: var(--hgg-text, #172033);
  text-decoration: none;
  font-size: 28px;
  line-height: 1;
  box-shadow: 0 10px 24px rgba(17, 34, 68, .12);
}


body.single-product div.product .hgg-single-product-gallery__zoom::before,
body.single-product div.product .hgg-single-product-gallery__zoom::after,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__zoom::before,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__zoom::after {
  content: none !important;
  display: none !important;
}

body.single-product div.product .hgg-single-product-gallery__thumbs,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--hgg-wc-single-thumb-gap, 14px);
  width: 100%;
  max-width: 100%;
  margin: 16px 0 var(--hgg-wc-gallery-thumbs-margin-bottom, 24px);
  padding: 0;
  overflow: visible;
}

body.single-product div.product .hgg-single-product-gallery__thumb,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumb {
  display: block;
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hgg-wc-single-thumb-border, rgba(17, 34, 68, .08));
  border-radius: var(--hgg-wc-single-thumb-radius, 14px);
  background: var(--hgg-wc-single-gallery-bg, #f7f2eb);
  cursor: pointer;
  overflow: hidden;
  opacity: .7;
  box-shadow: none;
  appearance: none;
  transition: opacity .18s ease, box-shadow .18s ease, transform .18s ease, border-color .18s ease;
}

body.single-product div.product .hgg-single-product-gallery__thumb-image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumb-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center center;
}

body.single-product div.product .hgg-single-product-gallery__thumb.is-active,
body.single-product div.product .hgg-single-product-gallery__thumb:hover,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumb.is-active,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumb:hover {
  opacity: 1;
  border-color: var(--hgg-wc-single-thumb-active-border, var(--hgg-primary, #007721));
  box-shadow: 0 10px 24px rgba(17, 34, 68, .14);
  transform: translateY(-1px);
}

/* Safety: hide old native/custom thumbnail lists if any legacy output survives. */
body.single-product div.product .hgg-single-product-gallery ~ .flex-control-thumbs,
body.single-product div.product .hgg-single-product-gallery .flex-control-thumbs,
body.single-product div.product .hgg-wc-thumbs-carousel,
body.single-product div.product .hgg-wc-thumbs-arrow,
body.single-product div.product .hgg-wc-native-thumbs-arrow,
body.single-product div.product .hgg-wc-gallery-arrow,
body.single-product div.product .hgg-wc-gallery-thumbs-carousel,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery ~ .flex-control-thumbs,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery .flex-control-thumbs,
body.woocommerce-page.single-product div.product .hgg-wc-thumbs-carousel,
body.woocommerce-page.single-product div.product .hgg-wc-thumbs-arrow,
body.woocommerce-page.single-product div.product .hgg-wc-native-thumbs-arrow,
body.woocommerce-page.single-product div.product .hgg-wc-gallery-arrow,
body.woocommerce-page.single-product div.product .hgg-wc-gallery-thumbs-carousel {
  display: none;
}

body.single-product div.product .woocommerce-tabs,
body.single-product div.product .woocommerce-tabs.wc-tabs-wrapper,
body.woocommerce-page.single-product div.product .woocommerce-tabs,
body.woocommerce-page.single-product div.product .woocommerce-tabs.wc-tabs-wrapper {
  margin-top: var(--hgg-wc-single-tabs-margin-top, 28px);
}

@media (max-width: 1024px) {
  body.single-product div.product .hgg-single-product-gallery__thumbs,
  body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumbs {
    gap: var(--hgg-wc-single-thumb-gap-tablet, 12px);
  }
}

@media (max-width: 767px) {
  body.single-product div.product .hgg-single-product-gallery__thumbs,
  body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumbs {
    gap: var(--hgg-wc-single-thumb-gap-mobile, 10px);
  }

  body.single-product div.product .woocommerce-tabs,
  body.single-product div.product .woocommerce-tabs.wc-tabs-wrapper,
  body.woocommerce-page.single-product div.product .woocommerce-tabs,
  body.woocommerce-page.single-product div.product .woocommerce-tabs.wc-tabs-wrapper {
    margin-top: var(--hgg-wc-single-tabs-margin-top-mobile, 22px);
  }
}

@media (max-width: 480px) {
  body.single-product div.product .hgg-single-product-gallery__zoom,
  body.woocommerce-page.single-product div.product .hgg-single-product-gallery__zoom {
    top: 10px;
    right: 10px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }
}

/* Huuguu v81.30.8 — hide duplicate native WooCommerce zoom triggers.
   The custom gallery keeps one PhotoSwipe trigger: .hgg-single-product-gallery__zoom. */
body.single-product div.product .hgg-single-product-gallery--custom > .woocommerce-product-gallery__trigger:not(.hgg-single-product-gallery__zoom),
body.single-product div.product .hgg-single-product-gallery--custom .woocommerce-product-gallery__trigger:not(.hgg-single-product-gallery__zoom),
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom > .woocommerce-product-gallery__trigger:not(.hgg-single-product-gallery__zoom),
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .woocommerce-product-gallery__trigger:not(.hgg-single-product-gallery__zoom) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__zoom,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__zoom {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__zoom::before,
body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__zoom::after,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__zoom::before,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__zoom::after {
  content: none !important;
  display: none !important;
}

/* Huuguu v81.30.9 — keep custom thumbnails clickable after duplicate zoom cleanup. */
body.single-product div.product .hgg-single-product-gallery--custom [data-hgg-gallery-thumb],
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom [data-hgg-gallery-thumb] {
  pointer-events: auto !important;
  position: relative;
  z-index: 2;
}


/* Huuguu v81.30.10 — deterministic custom gallery fix.
   Prevent Woo native zoom/FlexSlider leftovers from blocking the custom switcher. */
body.single-product div.product .hgg-single-product-gallery--custom .zoomImg,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .zoomImg,
body.single-product div.product .hgg-single-product-gallery--custom .woocommerce-product-gallery__trigger:not(.hgg-single-product-gallery__zoom),
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .woocommerce-product-gallery__trigger:not(.hgg-single-product-gallery__zoom) {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__main-link,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__main-link {
  position: relative;
  z-index: 1;
}

body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__thumbs,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__thumbs {
  position: relative;
  z-index: 3;
}

body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__thumb,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__thumb {
  pointer-events: auto;
  touch-action: manipulation;
}

/* Huuguu v81.30.12 — smooth fixed-stage gallery switch. */
body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__main-link,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__main-link {
  display: block;
  position: relative;
  overflow: hidden;
  aspect-ratio: 1 / 1;
  border-radius: var(--hgg-wc-gallery-radius, 16px);
  background: var(--hgg-wc-gallery-bg, #f7f2eb);
}

body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__main-image,
body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__fade-image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__main-image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__fade-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__fade-image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__fade-image {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 0;
  transition: opacity 180ms ease;
}

body.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__fade-image.is-visible,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .hgg-single-product-gallery__fade-image.is-visible {
  opacity: 1;
}

body.single-product div.product .hgg-single-product-gallery--custom .zoomImg,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom .zoomImg {
  display: none !important;
  pointer-events: none !important;
}


/* Huuguu v81.31.5 — gallery accessibility + stable crossfade support. */
body.single-product div.product .hgg-single-product-gallery__main-link,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__main-link {
  position: relative;
  overflow: hidden;
}

body.single-product div.product .hgg-single-product-gallery__fade-image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__fade-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
  opacity: 0;
  transition: opacity .18s ease;
  border-radius: var(--hgg-wc-single-image-radius, 18px);
  background: var(--hgg-wc-single-gallery-bg, #f7f2eb);
  pointer-events: none;
}

body.single-product div.product .hgg-single-product-gallery__fade-image.is-visible,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__fade-image.is-visible {
  opacity: 1;
}

/* Huuguu v1.54.24 — WooCommerce single mobile rhythm.
   Adds explicit breathing room between the product summary card and tabs on mobile.
   Theme-only fix: no widget/plugin selectors. */
@media (max-width: 767px) {
  body.single-product:not(.huu-service-product-page):not(.huuguu-wc-single-service) div.product,
  body.woocommerce-page.single-product:not(.huu-service-product-page):not(.huuguu-wc-single-service) div.product {
    row-gap: var(--hgg-wc-single-mobile-row-gap, 24px) !important;
  }

  body.single-product:not(.huu-service-product-page):not(.huuguu-wc-single-service) div.product .summary,
  body.woocommerce-page.single-product:not(.huu-service-product-page):not(.huuguu-wc-single-service) div.product .summary {
    margin-bottom: var(--hgg-wc-single-mobile-summary-tabs-gap, 24px) !important;
  }

  body.single-product:not(.huu-service-product-page):not(.huuguu-wc-single-service) div.product > .woocommerce-tabs,
  body.single-product:not(.huu-service-product-page):not(.huuguu-wc-single-service) div.product > .wc-tabs-wrapper,
  body.woocommerce-page.single-product:not(.huu-service-product-page):not(.huuguu-wc-single-service) div.product > .woocommerce-tabs,
  body.woocommerce-page.single-product:not(.huu-service-product-page):not(.huuguu-wc-single-service) div.product > .wc-tabs-wrapper {
    margin-top: var(--hgg-wc-single-mobile-summary-tabs-gap, 24px) !important;
    clear: both;
  }

  body.single-product .woocommerce-tabs ul.tabs,
  body.woocommerce-page.single-product .woocommerce-tabs ul.tabs {
    margin-top: 0 !important;
  }
}

/* Huuguu v1.54.74 — final single product thumbnail radius authority.
   The custom gallery thumbnail wrapper, native Woo thumbnail wrapper and image now read the
   same Customizer token, so 6px is actually rendered as 6px in preview and frontend. */
body.single-product div.product .hgg-single-product-gallery__thumb,
body.single-product div.product .hgg-single-product-gallery__thumb-image,
body.single-product div.product .hgg-single-product-gallery--custom [data-hgg-gallery-thumb],
body.single-product div.product .hgg-single-product-gallery--custom [data-hgg-gallery-thumb] img,
body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li,
body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li a,
body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img,
body.single-product div.product .hgg-wc-gallery-thumbs-carousel,
body.single-product div.product .hgg-wc-gallery-thumbs-carousel .hgg-wc-gallery-thumb,
body.single-product div.product .hgg-wc-gallery-thumbs-carousel img,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumb,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumb-image,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom [data-hgg-gallery-thumb],
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom [data-hgg-gallery-thumb] img,
body.woocommerce-page.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li,
body.woocommerce-page.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li a,
body.woocommerce-page.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li img,
body.woocommerce-page.single-product div.product .hgg-wc-gallery-thumbs-carousel,
body.woocommerce-page.single-product div.product .hgg-wc-gallery-thumbs-carousel .hgg-wc-gallery-thumb,
body.woocommerce-page.single-product div.product .hgg-wc-gallery-thumbs-carousel img {
  border-radius: var(--hgg-wc-single-thumb-image-radius, var(--hgg-wc-single-thumbnail-radius, var(--hgg-wc-single-thumb-radius, 6px))) !important;
}

body.single-product div.product .hgg-single-product-gallery__thumb,
body.single-product div.product .hgg-single-product-gallery--custom [data-hgg-gallery-thumb],
body.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery__thumb,
body.woocommerce-page.single-product div.product .hgg-single-product-gallery--custom [data-hgg-gallery-thumb],
body.woocommerce-page.single-product div.product .woocommerce-product-gallery .flex-control-thumbs li {
  overflow: hidden !important;
}
