/* IleraCare Product Page Gallery + UI Fix - product pages only */
body.single-product {
  background: #f7f3eb !important;
}

body.single-product .site-main,
body.single-product main,
body.single-product #primary,
body.single-product .content-area {
  overflow: visible !important;
}

body.single-product.woocommerce div.product,
body.single-product .woocommerce div.product,
body.single-product div.product.type-product {
  width: min(1180px, calc(100% - 40px)) !important;
  max-width: 1180px !important;
  margin: clamp(120px, 12vw, 155px) auto 70px !important;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(300px, 560px) minmax(300px, 1fr) !important;
  gap: clamp(34px, 5vw, 78px) !important;
  align-items: start !important;
  clear: both !important;
}

body.admin-bar.single-product.woocommerce div.product,
body.admin-bar.single-product .woocommerce div.product,
body.admin-bar.single-product div.product.type-product {
  margin-top: clamp(135px, 13vw, 170px) !important;
}

body.single-product div.product div.images,
body.single-product.woocommerce div.product div.images,
body.single-product .woocommerce div.product div.images {
  width: 100% !important;
  max-width: 560px !important;
  min-width: 0 !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  position: relative !important;
  display: block !important;
  justify-self: stretch !important;
}

body.single-product div.product div.summary,
body.single-product.woocommerce div.product div.summary,
body.single-product .woocommerce div.product div.summary,
body.single-product .summary.entry-summary {
  width: 100% !important;
  max-width: 560px !important;
  min-width: 0 !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 22px 0 0 !important;
  display: block !important;
}

body.single-product .woocommerce-product-gallery {
  width: 100% !important;
  max-width: 560px !important;
  background: linear-gradient(145deg, rgba(255,255,255,.95), rgba(249,244,236,.88)) !important;
  border: 1px solid rgba(22, 61, 39, .10) !important;
  border-radius: 30px !important;
  padding: clamp(14px, 2.2vw, 24px) !important;
  box-shadow: 0 30px 80px rgba(37, 31, 20, .10) !important;
  overflow: hidden !important;
  opacity: 1 !important;
}

body.single-product .woocommerce-product-gallery__wrapper {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  display: block !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

body.single-product .woocommerce-product-gallery__wrapper::before,
body.single-product .woocommerce-product-gallery__wrapper::after {
  display: none !important;
}

body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image.flex-active-slide {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
  position: relative !important;
  transform: none !important;
  overflow: hidden !important;
}

body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image:not(.ilera-active-slide) {
  display: none !important;
}

body.single-product .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image.ilera-active-slide {
  display: block !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.single-product .woocommerce-product-gallery__image a {
  display: block !important;
  width: 100% !important;
  line-height: 0 !important;
}

body.single-product .woocommerce-product-gallery__image img,
body.single-product .woocommerce-product-gallery__image.ilera-active-slide img {
  width: 100% !important;
  height: min(58vw, 540px) !important;
  max-height: 540px !important;
  min-height: 360px !important;
  object-fit: contain !important;
  object-position: center center !important;
  display: block !important;
  margin: 0 auto !important;
  background: #fff !important;
  border-radius: 7% !important;
  box-shadow: inset 0 0 0 1px rgba(18, 59, 38, .04) !important;
}

body.single-product .woocommerce-product-gallery .woocommerce-product-gallery__trigger {
  top: 24px !important;
  right: 24px !important;
  width: 44px !important;
  height: 44px !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.94) !important;
  box-shadow: 0 12px 28px rgba(21, 28, 20, .13) !important;
  z-index: 12 !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
  list-style: none !important;
  margin: 18px 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
  overflow: visible !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs li {
  width: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  padding: 0 !important;
  float: none !important;
  display: block !important;
  flex: 0 0 76px !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs img {
  width: 76px !important;
  height: 76px !important;
  object-fit: cover !important;
  object-position: center center !important;
  border-radius: 16px !important;
  padding: 4px !important;
  background: #fff !important;
  border: 2px solid rgba(17, 58, 37, .10) !important;
  opacity: .78 !important;
  cursor: pointer !important;
  transition: transform .22s ease, border-color .22s ease, opacity .22s ease, box-shadow .22s ease !important;
  box-shadow: 0 12px 28px rgba(35, 28, 18, .08) !important;
}

body.single-product .woocommerce-product-gallery .flex-control-thumbs img.flex-active,
body.single-product .woocommerce-product-gallery .flex-control-thumbs img.ilera-thumb-active,
body.single-product .woocommerce-product-gallery .flex-control-thumbs img:hover {
  opacity: 1 !important;
  border-color: #123b25 !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 18px 34px rgba(18, 59, 37, .16) !important;
}

body.single-product .summary.entry-summary .product_title,
body.single-product div.product .product_title {
  color: #123b25 !important;
  font-size: clamp(2rem, 3vw, 3.3rem) !important;
  line-height: 1.03 !important;
  letter-spacing: -.03em !important;
  margin: 0 0 12px !important;
}

body.single-product div.product p.price,
body.single-product div.product span.price,
body.single-product .woocommerce-variation-price .price {
  color: #b99649 !important;
  font-size: clamp(1.3rem, 2vw, 1.75rem) !important;
  font-weight: 800 !important;
  margin: 0 0 10px !important;
}

body.single-product div.product .woocommerce-product-details__short-description {
  color: #3f473f !important;
  font-size: 1rem !important;
  line-height: 1.7 !important;
  margin: 0 0 18px !important;
}

body.single-product form.variations_form {
  margin-top: 18px !important;
  padding: 18px !important;
  background: rgba(255,255,255,.68) !important;
  border: 1px solid rgba(18,59,37,.10) !important;
  border-radius: 24px !important;
  box-shadow: 0 18px 45px rgba(35, 28, 18, .06) !important;
}

body.single-product table.variations {
  width: 100% !important;
  margin: 0 0 14px !important;
  border: 0 !important;
  border-collapse: separate !important;
  border-spacing: 0 10px !important;
}

body.single-product table.variations tr,
body.single-product table.variations th,
body.single-product table.variations td {
  display: block !important;
  width: 100% !important;
  border: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  text-align: left !important;
}

body.single-product table.variations label {
  display: block !important;
  margin: 0 0 8px !important;
  color: #123b25 !important;
  font-size: .82rem !important;
  font-weight: 900 !important;
  letter-spacing: .14em !important;
  text-transform: uppercase !important;
}

body.single-product table.variations select {
  width: 100% !important;
  min-height: 54px !important;
  border-radius: 999px !important;
  border: 1px solid rgba(18,59,37,.20) !important;
  background: #fff !important;
  color: #1b2d21 !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  padding: 0 50px 0 20px !important;
  outline: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.75), 0 12px 28px rgba(28, 22, 14, .06) !important;
  appearance: auto !important;
}

body.single-product table.variations select:focus {
  border-color: #123b25 !important;
  box-shadow: 0 0 0 4px rgba(18, 59, 37, .10), 0 12px 28px rgba(28, 22, 14, .06) !important;
}

body.single-product table.variations .reset_variations {
  display: inline-flex !important;
  align-items: center !important;
  margin-top: 10px !important;
  color: #8c7035 !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

body.single-product .woocommerce-variation.single_variation {
  margin: 10px 0 14px !important;
}

body.single-product .woocommerce-variation-availability {
  margin: 0 !important;
}

body.single-product div.product form.cart .woocommerce-variation-add-to-cart,
body.single-product div.product form.cart:not(.variations_form) {
  display: flex !important;
  align-items: center !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  margin-top: 12px !important;
}

body.single-product div.product form.cart div.quantity,
body.single-product div.product .quantity {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: 54px !important;
  min-width: 112px !important;
  background: #fff !important;
  border: 1px solid rgba(18,59,37,.20) !important;
  border-radius: 999px !important;
  overflow: hidden !important;
  margin: 0 !important;
  box-shadow: 0 12px 28px rgba(28, 22, 14, .06) !important;
}

body.single-product div.product form.cart div.quantity input.qty,
body.single-product div.product .quantity input.qty {
  width: 74px !important;
  height: 52px !important;
  border: 0 !important;
  background: transparent !important;
  color: #123b25 !important;
  font-weight: 900 !important;
  text-align: center !important;
  padding: 0 !important;
  box-shadow: none !important;
}

body.single-product div.product form.cart .button.single_add_to_cart_button,
body.single-product div.product form.cart button.single_add_to_cart_button {
  min-height: 54px !important;
  padding: 0 30px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #123b25 !important;
  color: #fff !important;
  font-size: .92rem !important;
  font-weight: 900 !important;
  letter-spacing: .03em !important;
  text-transform: uppercase !important;
  box-shadow: 0 18px 38px rgba(18, 59, 37, .22) !important;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease !important;
}

body.single-product div.product form.cart .button.single_add_to_cart_button:hover,
body.single-product div.product form.cart button.single_add_to_cart_button:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 24px 48px rgba(18, 59, 37, .28) !important;
}

body.single-product div.product form.cart .button.single_add_to_cart_button.disabled,
body.single-product div.product form.cart button.single_add_to_cart_button.disabled,
body.single-product div.product form.cart .button.single_add_to_cart_button.wc-variation-selection-needed {
  opacity: .55 !important;
  cursor: not-allowed !important;
  transform: none !important;
}

body.single-product .product_meta {
  margin-top: 22px !important;
  padding-top: 18px !important;
  border-top: 1px solid rgba(18, 59, 37, .11) !important;
  color: #3f473f !important;
  font-size: .95rem !important;
  line-height: 1.65 !important;
}

body.single-product .product_meta a {
  color: #123b25 !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

body.single-product .woocommerce-tabs,
body.single-product .related.products,
body.single-product .upsells.products {
  grid-column: 1 / -1 !important;
  width: 100% !important;
  max-width: 1180px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body.single-product .woocommerce-tabs {
  margin-top: 36px !important;
}

@media (max-width: 900px) {
  body.single-product.woocommerce div.product,
  body.single-product .woocommerce div.product,
  body.single-product div.product.type-product {
    width: min(100% - 28px, 680px) !important;
    grid-template-columns: 1fr !important;
    gap: 26px !important;
    margin-top: 118px !important;
  }

  body.admin-bar.single-product.woocommerce div.product,
  body.admin-bar.single-product .woocommerce div.product,
  body.admin-bar.single-product div.product.type-product {
    margin-top: 132px !important;
  }

  body.single-product div.product div.images,
  body.single-product div.product div.summary,
  body.single-product .woocommerce-product-gallery {
    max-width: 100% !important;
    justify-self: stretch !important;
  }

  body.single-product .summary.entry-summary .product_title,
  body.single-product div.product .product_title {
    font-size: clamp(1.85rem, 7vw, 2.6rem) !important;
  }
}

@media (max-width: 560px) {
  body.single-product.woocommerce div.product,
  body.single-product .woocommerce div.product,
  body.single-product div.product.type-product {
    width: calc(100% - 24px) !important;
    margin-top: 105px !important;
  }

  body.single-product .woocommerce-product-gallery {
    border-radius: 22px !important;
    padding: 12px !important;
  }

  body.single-product .woocommerce-product-gallery__image img,
  body.single-product .woocommerce-product-gallery__image.ilera-active-slide img {
    height: 360px !important;
    min-height: 300px !important;
    border-radius: 7% !important;
  }

  body.single-product .woocommerce-product-gallery .flex-control-thumbs {
    gap: 8px !important;
  }

  body.single-product .woocommerce-product-gallery .flex-control-thumbs li,
  body.single-product .woocommerce-product-gallery .flex-control-thumbs img {
    width: 62px !important;
    height: 62px !important;
    flex-basis: 62px !important;
  }

  body.single-product form.variations_form {
    padding: 14px !important;
    border-radius: 20px !important;
  }

  body.single-product div.product form.cart .woocommerce-variation-add-to-cart,
  body.single-product div.product form.cart:not(.variations_form) {
    align-items: stretch !important;
  }

  body.single-product div.product form.cart div.quantity,
  body.single-product div.product form.cart .button.single_add_to_cart_button,
  body.single-product div.product form.cart button.single_add_to_cart_button {
    width: 100% !important;
  }
}

/* v1.2 robust single-stage gallery: prevents stacked/layered WooCommerce images */
body.single-product.woocommerce div.product,
body.single-product .woocommerce div.product,
body.single-product div.product.type-product {
  margin-top: clamp(92px, 8vw, 118px) !important;
}
body.admin-bar.single-product.woocommerce div.product,
body.admin-bar.single-product .woocommerce div.product,
body.admin-bar.single-product div.product.type-product {
  margin-top: clamp(106px, 9vw, 132px) !important;
}

body.single-product .woocommerce-product-gallery.ilera-gallery-enhanced {
  position: relative !important;
  overflow: hidden !important;
}

body.single-product .woocommerce-product-gallery.ilera-gallery-enhanced .woocommerce-product-gallery__wrapper {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  left: -9999px !important;
  top: 0 !important;
  z-index: -1 !important;
}

body.single-product .woocommerce-product-gallery.ilera-gallery-enhanced .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image,
body.single-product .woocommerce-product-gallery.ilera-gallery-enhanced .woocommerce-product-gallery__wrapper .woocommerce-product-gallery__image img {
  display: block !important;
  width: 1px !important;
  height: 1px !important;
  max-width: 1px !important;
  max-height: 1px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

body.single-product .ilera-main-stage {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: clamp(390px, 42vw, 540px) !important;
  background: #fff !important;
  border-radius: 7% !important;
  overflow: hidden !important;
  box-shadow: inset 0 0 0 1px rgba(18, 59, 38, .05) !important;
}

body.single-product .ilera-main-stage-link {
  display: flex !important;
  width: 100% !important;
  height: 100% !important;
  align-items: center !important;
  justify-content: center !important;
  line-height: 0 !important;
  cursor: zoom-in !important;
}

body.single-product .ilera-main-stage-img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  object-position: center center !important;
  border-radius: 7% !important;
  background: #fff !important;
  margin: 0 auto !important;
}

body.single-product .ilera-main-stage-zoom {
  position: absolute !important;
  top: 18px !important;
  right: 18px !important;
  width: 46px !important;
  height: 46px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border-radius: 999px !important;
  background: rgba(255,255,255,.94) !important;
  color: #111 !important;
  font-size: 30px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 14px 28px rgba(21, 28, 20, .13) !important;
  pointer-events: none !important;
  z-index: 8 !important;
}

body.single-product .woocommerce-product-gallery.ilera-gallery-enhanced .woocommerce-product-gallery__trigger {
  display: none !important;
}

body.single-product .woocommerce-product-gallery.ilera-gallery-enhanced .flex-control-thumbs {
  margin-top: 14px !important;
  position: relative !important;
  z-index: 4 !important;
}

@media (max-width: 900px) {
  body.single-product.woocommerce div.product,
  body.single-product .woocommerce div.product,
  body.single-product div.product.type-product {
    margin-top: 98px !important;
  }
  body.admin-bar.single-product.woocommerce div.product,
  body.admin-bar.single-product .woocommerce div.product,
  body.admin-bar.single-product div.product.type-product {
    margin-top: 112px !important;
  }
}

@media (max-width: 560px) {
  body.single-product.woocommerce div.product,
  body.single-product .woocommerce div.product,
  body.single-product div.product.type-product {
    margin-top: 92px !important;
  }
  body.single-product .ilera-main-stage {
    height: 360px !important;
    border-radius: 24px !important;
  }
  body.single-product .ilera-main-stage-img {
    border-radius: 24px !important;
  }
}
