/*
OctaDivision Button Studio for WooCommerce 5.6.0
Important V5 change:
Selectors are NOT restricted to body.woocommerce-page.
That allows styling to work inside Elementor Products widgets on normal pages.
*/

body.tc-preorder-pro-v5-active .products li.product,
body.tc-preorder-pro-v5-active .product-grid-item,
body.tc-preorder-pro-v5-active .wd-product,
body.tc-preorder-pro-v5-active .wc-block-grid__product,
body.tc-preorder-pro-v5-active .wp-block-post.product,
body.tc-preorder-pro-v5-active .wp-block-woocommerce-product-template > li {
  position: relative !important;
  overflow: hidden !important;
}

/* Remove legacy pseudo delivery labels everywhere a product grid appears. */
body.tc-preorder-pro-v5-active .products li.product::before,
body.tc-preorder-pro-v5-active .products li.product::after,
body.tc-preorder-pro-v5-active .product-grid-item::before,
body.tc-preorder-pro-v5-active .product-grid-item::after,
body.tc-preorder-pro-v5-active .wd-product::before,
body.tc-preorder-pro-v5-active .wd-product::after,
body.tc-preorder-pro-v5-active .wc-block-grid__product::before,
body.tc-preorder-pro-v5-active .wc-block-grid__product::after,
body.tc-preorder-pro-v5-active .wp-block-post.product::before,
body.tc-preorder-pro-v5-active .wp-block-post.product::after,
body.tc-preorder-pro-v5-active .product-element-bottom::before,
body.tc-preorder-pro-v5-active .product-element-bottom::after,
body.tc-preorder-pro-v5-active .fade-in-block::before,
body.tc-preorder-pro-v5-active .fade-in-block::after,
body.tc-preorder-pro-v5-active .hover-content::before,
body.tc-preorder-pro-v5-active .hover-content::after {
  content: none !important;
  display: none !important;
}

/* Existing V5 controlled stack: category, related and shortcode grids. */
body.tc-preorder-pro-v5-active .tc-preorder-v5-stack,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-stack {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: var(--tc-pob-stack-gap, 10px) !important;
  margin: 0 !important;
  padding: 0 !important;
  position: relative !important;
  z-index: 5 !important;
  background: transparent !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
}

/* Elementor-specific clone stack. */
body.tc-preorder-pro-v5-active .elementor-widget .tc-preorder-v5-elementor-stack,
body.tc-preorder-pro-v5-active .elementor-element .tc-preorder-v5-elementor-stack {
  width: 100% !important;
  max-width: 100% !important;
}

body.tc-preorder-pro-v5-active .tc-preorder-v5-title,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-title {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #20272d !important;
  font-family: "Cormorant Garamond", Georgia, serif !important;
  font-size: 23px !important;
  font-weight: 600 !important;
  line-height: 1.12 !important;
  text-align: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.tc-preorder-pro-v5-active .tc-preorder-v5-price,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-price {
  width: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  color: #60788e !important;
  font-family: "Manrope", Arial, sans-serif !important;
  font-size: 16px !important;
  font-weight: 800 !important;
  line-height: 1.25 !important;
  text-align: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

body.tc-preorder-pro-v5-active .tc-preorder-v5-price del,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-price del {
  color: #989ea3 !important;
  font-weight: 500 !important;
  opacity: 1 !important;
}

body.tc-preorder-pro-v5-active .tc-preorder-v5-price ins,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-price ins {
  color: #60788e !important;
  font-weight: 800 !important;
  text-decoration: none !important;
}

body.tc-preorder-pro-v5-active .tc-preorder-v5-delivery,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-delivery {
  display: block !important;
  width: max-content !important;
  max-width: 100% !important;
  margin: var(--tc-pob-delivery-mt, 0px) auto var(--tc-pob-delivery-mb, 0px) !important;
  padding: var(--tc-pob-delivery-py, 7px) var(--tc-pob-delivery-px, 12px) !important;
  border: 1px solid var(--tc-pob-delivery-border, #e7ded7) !important;
  border-radius: var(--tc-pob-delivery-radius, 999px) !important;
  color: var(--tc-pob-delivery-text, #2b4053) !important;
  background: linear-gradient(90deg, var(--tc-pob-delivery-bg-start, #f8f4f0) 0%, var(--tc-pob-delivery-bg-end, #eef3f7) 100%) !important;
  font-family: "Manrope", Arial, sans-serif !important;
  font-size: var(--tc-pob-delivery-font, 12px) !important;
  font-weight: var(--tc-pob-delivery-weight, 700) !important;
  line-height: 1.2 !important;
  text-align: center !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Hide only original sources after Elementor clones are built. */
body.tc-preorder-pro-v5-active .tc-preorder-v5-original-hidden,
body.tc-preorder-pro-v5-active .tc-preorder-v5-source-hidden {
  display: none !important;
  height: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

/* Button wrappers. */
body.tc-preorder-pro-v5-active .tc-preorder-v5-button-wrap,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-button-wrap {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  margin: var(--tc-pob-mt, 4px) 0 var(--tc-pob-mb, 14px) !important;
  padding: 0 !important;
  position: static !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
}

/* Real button anchors on every page, including Elementor pages. */
body.tc-preorder-pro-v5-active .tc-preorder-v5-button-wrap > a,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-button-wrap > a,
body.tc-preorder-pro-v5-active a.tc-preorder-v5-button,
body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product .single_add_to_cart_button {
  width: var(--tc-pob-width, 100%) !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: var(--tc-pob-py, 12px) var(--tc-pob-px, 18px) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: static !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: var(--tc-pob-radius, 5px) !important;
  color: var(--tc-pob-text, #ffffff) !important;
  background: linear-gradient(135deg, var(--tc-pob-start, #1d2d3c), var(--tc-pob-end, #60788e)) !important;
  box-shadow: 0 11px 24px rgba(29, 45, 60, 0.18) !important;
  font-family: "Manrope", Arial, sans-serif !important;
  font-size: var(--tc-pob-font, 14px) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;
  text-transform: var(--tc-pob-transform, none) !important;
  white-space: normal !important;
  opacity: 1 !important;
  visibility: visible !important;
  transform: none !important;
  pointer-events: auto !important;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease !important;
}

body.tc-preorder-pro-v5-active .tc-preorder-v5-real-label {
  display: inline !important;
  color: var(--tc-pob-text, #ffffff) !important;
  font-family: "Manrope", Arial, sans-serif !important;
  font-size: var(--tc-pob-font, 14px) !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  text-transform: var(--tc-pob-transform, none) !important;
  opacity: 1 !important;
  visibility: visible !important;
}

/* Plugin-created duplicates always stay hidden. */
body.tc-preorder-pro-v5-active .tc-preorder-v5-duplicate {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Optional WoodMart floating controls. */
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .product-element-top > .wd-add-btn,
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .product-element-top > .wd-add-btn-replace,
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .product-element-top > .add-to-cart-loop,
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .wd-tooltip-label,
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .wd-tooltip,
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .wd-wishlist-btn,
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .wd-compare-btn,
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .quick-view,
body.tc-preorder-pro-v5-active.tc-pob-hide-floating-actions .product-quick-view {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Remove all pseudo icons and fake labels. */
body.tc-preorder-pro-v5-active .tc-preorder-v5-button-wrap::before,
body.tc-preorder-pro-v5-active .tc-preorder-v5-button-wrap::after,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-button-wrap::before,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-button-wrap::after,
body.tc-preorder-pro-v5-active .tc-preorder-v5-button-wrap > a::before,
body.tc-preorder-pro-v5-active .tc-preorder-v5-button-wrap > a::after,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-button-wrap > a::before,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-button-wrap > a::after,
body.tc-preorder-pro-v5-active a.tc-preorder-v5-button::before,
body.tc-preorder-pro-v5-active a.tc-preorder-v5-button::after {
  content: none !important;
  display: none !important;
}

/* Neutralize white WoodMart hover covers globally. */
body.tc-preorder-pro-v5-active .content-product-imagin,
body.tc-preorder-pro-v5-active .wd-hover-with-fade .content-product-imagin,
body.tc-preorder-pro-v5-active .woodmart-hover-base .content-product-imagin,
body.tc-preorder-pro-v5-active .wd-hover-base .content-product-imagin {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

body.tc-preorder-pro-v5-active .tc-preorder-v5-button-wrap > a:hover,
body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-button-wrap > a:hover,
body.tc-preorder-pro-v5-active a.tc-preorder-v5-button:hover,
body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product .single_add_to_cart_button:hover {
  color: var(--tc-pob-text, #ffffff) !important;
  background: linear-gradient(135deg, var(--tc-pob-hover-start, #243b4f), var(--tc-pob-hover-end, #6c8498)) !important;
  transform: var(--tc-pob-lift, translateY(-1px)) !important;
  box-shadow: 0 15px 30px rgba(29, 45, 60, 0.23) !important;
}

@media (max-width: 767px) {
  body.tc-preorder-pro-v5-active .tc-preorder-v5-stack,
  body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-stack {
    gap: min(var(--tc-pob-stack-gap, 10px), 8px) !important;
  }

  body.tc-preorder-pro-v5-active .tc-preorder-v5-title,
  body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-title {
    font-size: 18px !important;
  }

  body.tc-preorder-pro-v5-active .tc-preorder-v5-price,
  body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-price {
    font-size: 13px !important;
  }

  body.tc-preorder-pro-v5-active .tc-preorder-v5-delivery,
  body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-delivery {
    padding: 6px 8px !important;
    font-size: 10px !important;
  }

  body.tc-preorder-pro-v5-active .tc-preorder-v5-button-wrap > a,
  body.tc-preorder-pro-v5-active .tc-preorder-v5-elementor-button-wrap > a,
  body.tc-preorder-pro-v5-active a.tc-preorder-v5-button {
    min-height: 40px !important;
    font-size: var(--tc-pob-font-mobile, 12px) !important;
  }

  body.tc-preorder-pro-v5-active .tc-preorder-v5-real-label {
    font-size: var(--tc-pob-font-mobile, 12px) !important;
  }
}

/* =========================================================
   5.4.1 — SINGLE-PRODUCT HITBOX + SMOOTH HOVER SAFETY
   The form itself is not a click target. Only real controls are interactive.
   The main button keeps a fixed hitbox; hover changes colour/shadow only.
   ========================================================= */

body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe,
body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe .woocommerce-variation-add-to-cart {
  cursor: default !important;
}

body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe .single_add_to_cart_button {
  position: relative !important;
  inset: auto !important;
  isolation: isolate !important;
  contain: paint !important;
  clip-path: inset(0 round var(--tc-pob-radius, 5px)) !important;
  cursor: pointer !important;
  transform: none !important;
  animation: none !important;
  will-change: auto !important;
  filter: brightness(1) !important;
  transition:
    background .20s ease,
    box-shadow .20s ease,
    color .20s ease,
    filter .20s ease !important;
}

body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe .single_add_to_cart_button::before,
body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe .single_add_to_cart_button::after {
  content: none !important;
  display: none !important;
  pointer-events: none !important;
}

body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe .single_add_to_cart_button:hover,
body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe .single_add_to_cart_button:focus-visible {
  color: var(--tc-pob-text, #ffffff) !important;
  background: linear-gradient(135deg, var(--tc-pob-hover-start, #243b4f), var(--tc-pob-hover-end, #6c8498)) !important;
  transform: none !important;
  animation: none !important;
  filter: brightness(1.03) !important;
  box-shadow: 0 15px 30px rgba(29,45,60,.23) !important;
}

body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe .single_add_to_cart_button:not(:hover):not(:focus-visible) {
  color: var(--tc-pob-text, #ffffff) !important;
  background: linear-gradient(135deg, var(--tc-pob-start, #1d2d3c), var(--tc-pob-end, #60788e)) !important;
  transform: none !important;
  filter: brightness(1) !important;
  box-shadow: 0 11px 24px rgba(29,45,60,.18) !important;
}

body.tc-preorder-pro-v5-active.tc-pob-single-enabled.single-product form.cart.tc-pob-hitbox-safe .single_add_to_cart_button:active {
  transform: none !important;
  filter: brightness(.97) !important;
  box-shadow: 0 8px 18px rgba(29,45,60,.18) !important;
}

/* =========================================================
   5.5.0 — OCTADIVISION QUICK BUY MODULE
   Optional and disabled by default. It never changes the main
   Pre-order button action or clickable geometry.
   ========================================================= */

body.tc-ods-button-studio-active.single-product form.cart .tc-ods-quick-buy-button {
  width: var(--tc-ods-qb-width, 100%) !important;
  min-width: 0 !important;
  min-height: 42px !important;
  margin: var(--tc-ods-qb-mt, 10px) 0 var(--tc-ods-qb-mb, 0px) !important;
  padding: var(--tc-ods-qb-py, 12px) var(--tc-ods-qb-px, 18px) !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
  isolation: isolate !important;
  overflow: hidden !important;
  border: 0 !important;
  border-radius: var(--tc-ods-qb-radius, 5px) !important;
  color: var(--tc-ods-qb-text, #ffffff) !important;
  background: linear-gradient(135deg, var(--tc-ods-qb-start, #9a3412), var(--tc-ods-qb-end, #f97316)) !important;
  background-size: 200% 200% !important;
  box-shadow: 0 11px 24px rgba(154, 52, 18, .22) !important;
  font-family: "Manrope", Arial, sans-serif !important;
  font-size: var(--tc-ods-qb-font, 14px) !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  text-decoration: none !important;
  white-space: normal !important;
  cursor: pointer !important;
  transform: none !important;
  filter: none !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transition: background .2s ease, box-shadow .2s ease, color .2s ease, filter .2s ease !important;
}

body.tc-ods-button-studio-active.single-product form.cart .tc-ods-quick-buy-button.is-full-width {
  width: 100% !important;
}

body.tc-ods-button-studio-active.single-product form.cart .tc-ods-quick-buy-button:hover,
body.tc-ods-button-studio-active.single-product form.cart .tc-ods-quick-buy-button:focus-visible {
  color: var(--tc-ods-qb-text, #ffffff) !important;
  background: linear-gradient(135deg, var(--tc-ods-qb-hover-start, #7c2d12), var(--tc-ods-qb-hover-end, #ea580c)) !important;
  transform: none !important;
  filter: brightness(1.03) !important;
  box-shadow: 0 15px 30px rgba(154, 52, 18, .28) !important;
  outline: 2px solid rgba(249, 115, 22, .35) !important;
  outline-offset: 2px !important;
}

body.tc-ods-button-studio-active.single-product form.cart .tc-ods-quick-buy-label {
  position: relative !important;
  z-index: 2 !important;
  color: inherit !important;
  pointer-events: none !important;
}

body.tc-ods-button-studio-active.single-product form.cart .tc-ods-quick-buy-button.is-processing {
  cursor: progress !important;
  filter: brightness(.96) !important;
}

/* Soft pulse */
body.tc-ods-button-studio-active .tc-ods-quick-buy-button.tc-ods-effect-pulse {
  animation: tc-ods-soft-pulse 1.8s ease-in-out infinite !important;
}

/* Shine sweep */
body.tc-ods-button-studio-active .tc-ods-quick-buy-button.tc-ods-effect-shine::after {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: -40% auto -40% -55% !important;
  width: 34% !important;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.48), transparent) !important;
  transform: skewX(-18deg) !important;
  animation: tc-ods-shine 2.4s ease-in-out infinite !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

/* Neon glow */
body.tc-ods-button-studio-active .tc-ods-quick-buy-button.tc-ods-effect-glow {
  animation: tc-ods-neon-glow 1.7s ease-in-out infinite alternate !important;
}

/* Fire-like glow without moving the hitbox */
body.tc-ods-button-studio-active .tc-ods-quick-buy-button.tc-ods-effect-fire {
  animation: tc-ods-fire-glow 1.25s ease-in-out infinite alternate !important;
}

body.tc-ods-button-studio-active .tc-ods-quick-buy-button.tc-ods-effect-fire::before {
  content: "" !important;
  display: block !important;
  position: absolute !important;
  inset: -35% -8% !important;
  background:
    radial-gradient(circle at 18% 78%, rgba(255, 225, 120, .45), transparent 24%),
    radial-gradient(circle at 50% 92%, rgba(255, 90, 0, .42), transparent 31%),
    radial-gradient(circle at 82% 75%, rgba(255, 190, 60, .38), transparent 26%) !important;
  filter: blur(10px) !important;
  animation: tc-ods-fire-layer 1.1s ease-in-out infinite alternate !important;
  pointer-events: none !important;
  z-index: 0 !important;
}

/* Moving gradient */
body.tc-ods-button-studio-active .tc-ods-quick-buy-button.tc-ods-effect-gradient {
  animation: tc-ods-gradient-flow 3s ease infinite !important;
}

/* Border pulse */
body.tc-ods-button-studio-active .tc-ods-quick-buy-button.tc-ods-effect-border {
  animation: tc-ods-border-pulse 1.6s ease-in-out infinite !important;
}

@keyframes tc-ods-soft-pulse {
  0%, 100% { box-shadow: 0 11px 24px rgba(154, 52, 18, .20); }
  50% { box-shadow: 0 14px 34px rgba(249, 115, 22, .42); }
}

@keyframes tc-ods-shine {
  0%, 20% { left: -55%; opacity: 0; }
  35% { opacity: 1; }
  65%, 100% { left: 125%; opacity: 0; }
}

@keyframes tc-ods-neon-glow {
  from { box-shadow: 0 10px 22px rgba(154, 52, 18, .22), 0 0 0 rgba(249,115,22,0); }
  to { box-shadow: 0 14px 30px rgba(154, 52, 18, .28), 0 0 24px rgba(249,115,22,.58); }
}

@keyframes tc-ods-fire-glow {
  from { box-shadow: 0 10px 24px rgba(154, 52, 18, .26), 0 0 10px rgba(255, 95, 0, .25); }
  to { box-shadow: 0 14px 30px rgba(154, 52, 18, .34), 0 0 26px rgba(255, 132, 0, .62); }
}

@keyframes tc-ods-fire-layer {
  from { opacity: .45; filter: blur(10px) brightness(.95); }
  to { opacity: .9; filter: blur(13px) brightness(1.15); }
}

@keyframes tc-ods-gradient-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes tc-ods-border-pulse {
  0%, 100% { outline: 0 solid rgba(249,115,22,0); outline-offset: 0; }
  50% { outline: 5px solid rgba(249,115,22,.20); outline-offset: 3px; }
}

@media (max-width: 767px) {
  body.tc-ods-button-studio-active.single-product form.cart .tc-ods-quick-buy-button {
    min-height: 40px !important;
    font-size: var(--tc-ods-qb-font-mobile, 12px) !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.tc-ods-button-studio-active .tc-ods-quick-buy-button {
    animation: none !important;
  }

  body.tc-ods-button-studio-active .tc-ods-quick-buy-button::before,
  body.tc-ods-button-studio-active .tc-ods-quick-buy-button::after {
    animation: none !important;
  }
}

