/* v2.2.0 premium refined format gallery */

.single-product div.product .woocommerce-product-gallery__trigger,
.single-product div.product .images .woocommerce-product-gallery__trigger,
.single-product div.product .images .zoom,
.single-product div.product .images .zoom-button,
.single-product div.product .images .product-lightbox-trigger,
.single-product div.product .images .product-gallery__trigger,
.single-product div.product .images [class*="lightbox-trigger"],
.single-product div.product .images [class*="zoom-icon"],
.single-product div.product .images [class*="zoom_button"],
.single-product div.product .easyzoom-flyout,
.single-product div.product .easyzoom-notice {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.single-product div.product .woocommerce-product-gallery.afp-clean-gallery-active.afp-clean-gallery-ready,
.single-product div.product .images.afp-clean-gallery-active.afp-clean-gallery-ready,
.single-product div.product .images.afp-clean-gallery-host {
  position: relative !important;
  padding: 3px !important;
  background: var(--afp-gallery-lightbox-close-bg, #fffaf7) !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 0 !important;
  height: auto !important;
}

.single-product div.product .images.afp-clean-gallery-host > .woocommerce-product-gallery,
.single-product div.product .images.afp-clean-gallery-host > .woocommerce-product-gallery.afp-clean-gallery-active,
.single-product div.product .images.afp-clean-gallery-host > .woocommerce-product-gallery.afp-clean-gallery-ready {
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  min-height: 0 !important;
  height: auto !important;
}

.single-product div.product .woocommerce-product-gallery.afp-clean-gallery-active.afp-clean-gallery-ready > :not(.afp-clean-gallery),
.single-product div.product .images.afp-clean-gallery-active.afp-clean-gallery-ready > :not(.afp-clean-gallery) {
  display: none !important;
}

.single-product div.product .afp-clean-gallery {
  display: none;
  position: relative !important;
  width: 100%;
  margin: 0 !important;
  padding: 14px !important;
  box-sizing: border-box !important;
  line-height: 0 !important;
  background: linear-gradient(180deg, var(--afp-gallery-shell-bg-top, #fffdfa) 0%, var(--afp-gallery-shell-bg-bottom, #f8f2ec) 100%) !important;
  border: 2px solid var(--afp-gallery-shell-border, #dfd2c7) !important;
  border-radius: 30px !important;
  box-shadow: 0 14px 30px rgba(43, 28, 20, 0.045) !important;
  isolation: isolate !important;
  overflow: hidden !important;
}

.single-product div.product .afp-clean-gallery.is-ready {
  display: block !important;
}

.single-product div.product .afp-clean-gallery__stage {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: block !important;
  position: relative !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--afp-gallery-stage-border, #dfd2c7) !important;
  outline: 0 !important;
  border-radius: 24px !important;
  overflow: hidden !important;
  background: var(--afp-gallery-stage-bg, #fffdfa) !important;
  box-shadow: 0 10px 22px rgba(43, 28, 20, 0.05) !important;
  transform: translateZ(0) !important;
  isolation: isolate !important;
  line-height: 0 !important;
  cursor: zoom-in !important;
}


.single-product div.product .afp-clean-gallery__stage::after {
  display: none !important;
  content: none !important;
}

.single-product div.product .afp-clean-gallery__stage:focus,
.single-product div.product .afp-clean-gallery__thumb:focus,
.afp-photo-lightbox__close:focus {
  outline: none !important;
}

@media (min-width: 1025px) {
  .single-product div.product .afp-clean-gallery__stage {
    aspect-ratio: var(--afp-gallery-ratio, 1 / 1) !important;
    min-height: var(--afp-gallery-stage-min-height-desktop, clamp(420px, 33vw, 640px)) !important;
  }
}

@media (max-width: 1024px) {
  .single-product div.product .afp-clean-gallery__stage {
    aspect-ratio: var(--afp-gallery-ratio, 1 / 1) !important;
  }
}

.single-product div.product .afp-clean-gallery__stage-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  vertical-align: top !important;
}

@media (min-width: 1025px) {
  .single-product div.product .afp-clean-gallery__stage-img {
    min-height: var(--afp-gallery-stage-min-height-desktop, clamp(420px, 33vw, 640px)) !important;
  }
}

.single-product div.product .afp-clean-gallery__thumbs {
  display: flex !important;
  align-items: flex-start !important;
  justify-content: flex-start !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin: 14px 0 0 !important;
  padding: 0 !important;
  overflow: visible !important;
}

.single-product div.product .afp-clean-gallery__thumbs.is-hidden {
  display: none !important;
}

.single-product div.product .afp-clean-gallery__thumb {
  appearance: none !important;
  -webkit-appearance: none !important;
  display: inline-flex !important;
  position: relative !important;
  align-items: stretch !important;
  justify-content: stretch !important;
  box-sizing: border-box !important;
  flex: 0 0 auto !important;
  width: 64px !important;
  height: 64px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--afp-gallery-thumb-border, #dfd2c7) !important;
  border-radius: 18px !important;
  overflow: hidden !important;
  background: var(--afp-gallery-thumb-bg, #fffdfa) !important;
  box-shadow: 0 6px 14px rgba(43, 28, 20, 0.06) !important;
  transform: translateZ(0) !important;
  cursor: pointer !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease, background .18s ease !important;
}


.single-product div.product .afp-clean-gallery__thumb::after {
  display: none !important;
  content: none !important;
}

.single-product div.product .afp-clean-gallery__thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  min-width: 100% !important;
  min-height: 100% !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
  border: 0 !important;
  border-radius: inherit !important;
  background: transparent !important;
  transform: none !important;
  vertical-align: top !important;
}

.single-product div.product .afp-clean-gallery__thumb:hover {
  transform: translateY(-1px) !important;
  border-color: var(--afp-gallery-thumb-hover-border, #cfb5a6) !important;
  box-shadow: 0 10px 20px rgba(43, 28, 20, 0.09) !important;
}

.single-product div.product .afp-clean-gallery__thumb.is-active {
  border-color: var(--afp-gallery-thumb-active-border, #c5977f) !important;
  background: var(--afp-gallery-thumb-bg, #fffdfa) !important;
  box-shadow: 0 0 0 2px rgba(197, 151, 127, 0.16), 0 12px 22px rgba(43, 28, 20, 0.1) !important;
}

.single-product div.product .afp-clean-gallery__thumb.is-active::after {
  display: none !important;
}

body.afp-photo-lightbox-open {
  overflow: hidden !important;
}

.afp-photo-lightbox {
  position: fixed !important;
  inset: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px !important;
  background: rgba(22, 16, 12, 0.72) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: opacity .22s ease, visibility .22s ease !important;
}

.afp-photo-lightbox.is-open {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.afp-photo-lightbox__dialog {
  position: relative !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: min(94vw, 1480px) !important;
  max-height: 92vh !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.afp-photo-lightbox__img {
  display: block !important;
  max-width: 100% !important;
  max-height: 92vh !important;
  width: auto !important;
  height: auto !important;
  border-radius: 24px !important;
  background: transparent !important;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.26) !important;
}

.afp-photo-lightbox__close {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  z-index: 3 !important;
  display: inline-flex !important;
  position: relative !important;
  align-items: center !important;
  justify-content: center !important;
  width: 44px !important;
  height: 44px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: var(--afp-gallery-lightbox-close-bg, #fffaf7) !important;
  color: var(--afp-gallery-lightbox-close-icon, #4f3a31) !important;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18) !important;
  cursor: pointer !important;
  font-size: 0 !important;
  line-height: 0 !important;
  transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease !important;
}

.afp-photo-lightbox__close svg {
  display: none !important;
}

.afp-photo-lightbox__close::before,
.afp-photo-lightbox__close::after {
  content: '' !important;
  position: absolute !important;
  left: 50% !important;
  top: 50% !important;
  width: 18px !important;
  height: 2.5px !important;
  margin-left: -9px !important;
  margin-top: -1.25px !important;
  border-radius: 999px !important;
  background: var(--afp-gallery-lightbox-close-icon, #4f3a31) !important;
  box-shadow: 0 0 0 0.35px rgba(79, 58, 49, 0.18) !important;
}

.afp-photo-lightbox__close::before {
  transform: rotate(45deg) !important;
}

.afp-photo-lightbox__close::after {
  transform: rotate(-45deg) !important;
}

.afp-photo-lightbox__close:hover {
  transform: translateY(-1px) !important;
  background: transparent !important;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.22) !important;
}

@media (max-width: 767px) {
  .single-product div.product .afp-clean-gallery {
    padding: 6px 6px 10px !important;
    border-radius: 24px !important;
    border-width: 2px !important;
    box-shadow: 0 10px 20px rgba(43,28,20,0.04) !important;
  }

  .single-product div.product .afp-clean-gallery__stage {
    border-radius: 20px !important;
  }

  .single-product div.product .afp-clean-gallery__thumbs {
    gap: 10px !important;
    margin-top: 12px !important;
    padding: 0 !important;
  }

  .single-product div.product .afp-clean-gallery__thumb {
    width: 56px !important;
    height: 56px !important;
    border-radius: 16px !important;
    padding: 0 !important;
  }

  
.single-product div.product .afp-clean-gallery__thumb::after {
  display: none !important;
  content: none !important;
}

.single-product div.product .afp-clean-gallery__thumb img {
    border-radius: inherit !important;
  }

  .afp-photo-lightbox {
    padding: 16px !important;
  }

  .afp-photo-lightbox__img {
    border-radius: 18px !important;
    max-height: 88vh !important;
  }

  .afp-photo-lightbox__close {
    top: 12px !important;
    right: 12px !important;
    width: 40px !important;
    height: 40px !important;
  }

  .afp-photo-lightbox__close::before,
  .afp-photo-lightbox__close::after {
    width: 16px !important;
    margin-left: -8px !important;
  }
}
