/*
 * Feature: Actual Single Product Titlebar Hero Fix
 * Scope: WooCommerce single product titlebar only.
 *
 * Why this file exists:
 * The active custom WooCommerce template prints the product title as
 * .gnsc-spx-titlebar > span and the legacy exact template can print
 * .gnsc-spf-titlebar > span. Earlier title-section CSS targeted a different
 * wrapper (.gnsc-spx-title-section), so the visible title kept the old pill /
 * button-like style from style.css. This file intentionally targets only the
 * live titlebar classes and leaves product cards, purchase forms, sidebar,
 * cart, checkout, account, mobile menu, and related products untouched.
 */

body.single-product .gnsc-spx-titlebar,
body.single-product .gnsc-spf-titlebar,
body.single-product.woocommerce div.product .gnsc-spx-titlebar,
body.single-product.woocommerce div.product .gnsc-spf-titlebar,
body.single-product div.product .gnsc-spx-titlebar,
body.single-product div.product .gnsc-spf-titlebar,
body.single-product .product .gnsc-spx-titlebar,
body.single-product .product .gnsc-spf-titlebar {
  --gnsc-sp-title-hero-radius: clamp(20px, 1.45vw, 30px);
  --gnsc-sp-title-hero-pad-x: clamp(18px, 3.2vw, 58px);
  --gnsc-sp-title-hero-pad-y: clamp(18px, 1.65vw, 30px);
  position: relative !important;
  isolation: isolate !important;
  z-index: 2 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  clear: both !important;
  float: none !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: clamp(78px, 5.1vw, 118px) !important;
  margin: clamp(10px, .9vw, 16px) 0 clamp(8px, .7vw, 12px) !important;
  padding: var(--gnsc-sp-title-hero-pad-y) var(--gnsc-sp-title-hero-pad-x) !important;
  box-sizing: border-box !important;
  text-align: center !important;
  overflow: hidden !important;
  border-radius: var(--gnsc-sp-title-hero-radius) !important;
  border: 1px solid rgba(95, 191, 255, .34) !important;
  background:
    radial-gradient(circle at 0% 12%, rgba(56, 189, 248, .38) 0, rgba(56, 189, 248, .12) 18%, transparent 38%),
    radial-gradient(circle at 100% 12%, rgba(236, 72, 153, .30) 0, rgba(236, 72, 153, .10) 20%, transparent 42%),
    radial-gradient(circle at 52% 120%, rgba(34, 211, 238, .18) 0, transparent 42%),
    linear-gradient(110deg, rgba(8, 22, 54, .98) 0%, rgba(15, 56, 116, .98) 20%, rgba(84, 78, 224, .96) 48%, rgba(129, 64, 232, .94) 70%, rgba(8, 33, 82, .98) 100%) !important;
  box-shadow:
    0 24px 72px rgba(2, 12, 32, .36),
    0 14px 34px rgba(37, 99, 235, .18),
    inset 0 1px 0 rgba(255, 255, 255, .14),
    inset 0 -1px 0 rgba(103, 232, 249, .20) !important;
  transform: none !important;
}

body.single-product .gnsc-spx-titlebar::before,
body.single-product .gnsc-spf-titlebar::before,
body.single-product .gnsc-spx-titlebar::after,
body.single-product .gnsc-spf-titlebar::after,
body.single-product.woocommerce div.product .gnsc-spx-titlebar::before,
body.single-product.woocommerce div.product .gnsc-spf-titlebar::before,
body.single-product.woocommerce div.product .gnsc-spx-titlebar::after,
body.single-product.woocommerce div.product .gnsc-spf-titlebar::after {
  content: "" !important;
  position: absolute !important;
  pointer-events: none !important;
  z-index: -1 !important;
}

body.single-product .gnsc-spx-titlebar::before,
body.single-product .gnsc-spf-titlebar::before,
body.single-product.woocommerce div.product .gnsc-spx-titlebar::before,
body.single-product.woocommerce div.product .gnsc-spf-titlebar::before {
  inset: 0 !important;
  background:
    linear-gradient(90deg, rgba(255,255,255,.13), transparent 20%, transparent 80%, rgba(255,255,255,.11)),
    repeating-linear-gradient(90deg, rgba(255,255,255,.060) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255,255,255,.035) 0 1px, transparent 1px 44px) !important;
  opacity: .72 !important;
}

body.single-product .gnsc-spx-titlebar::after,
body.single-product .gnsc-spf-titlebar::after,
body.single-product.woocommerce div.product .gnsc-spx-titlebar::after,
body.single-product.woocommerce div.product .gnsc-spf-titlebar::after {
  left: clamp(20px, 3vw, 64px) !important;
  right: clamp(20px, 3vw, 64px) !important;
  bottom: clamp(10px, .85vw, 16px) !important;
  height: 3px !important;
  border-radius: 999px !important;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, .90), rgba(255, 255, 255, .78), rgba(168, 85, 247, .90), rgba(34, 211, 238, .88), transparent) !important;
  box-shadow:
    0 0 22px rgba(125, 211, 252, .44),
    0 0 34px rgba(168, 85, 247, .30) !important;
  opacity: .92 !important;
}

body.single-product .gnsc-spx-titlebar > span,
body.single-product .gnsc-spf-titlebar > span,
body.single-product.woocommerce div.product .gnsc-spx-titlebar > span,
body.single-product.woocommerce div.product .gnsc-spf-titlebar > span,
body.single-product div.product .gnsc-spx-titlebar > span,
body.single-product div.product .gnsc-spf-titlebar > span,
body.single-product .product .gnsc-spx-titlebar > span,
body.single-product .product .gnsc-spf-titlebar > span {
  position: relative !important;
  z-index: 1 !important;
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 clamp(8px, 1.4vw, 22px) !important;
  box-sizing: border-box !important;
  border: 0 !important;
  border-radius: 0 !important;
  outline: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
  filter: none !important;
  transform: none !important;
  color: #ffffff !important;
  text-align: center !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  font-size: clamp(28px, 1.55rem + 1.45vw, 52px) !important;
  font-weight: 950 !important;
  line-height: 1.08 !important;
  letter-spacing: -.038em !important;
  text-shadow:
    0 2px 0 rgba(5, 12, 30, .18),
    0 12px 28px rgba(3, 10, 28, .52),
    0 0 30px rgba(125, 211, 252, .22) !important;
}

body.single-product .gnsc-spx-titlebar > span::before,
body.single-product .gnsc-spf-titlebar > span::before,
body.single-product .gnsc-spx-titlebar > span::after,
body.single-product .gnsc-spf-titlebar > span::after {
  content: none !important;
  display: none !important;
}

html.gnsc-shop-mode-light body.single-product .gnsc-spx-titlebar,
html.gnsc-shop-mode-light body.single-product .gnsc-spf-titlebar,
body.single-product.gnsc-shop-mode-light .gnsc-spx-titlebar,
body.single-product.gnsc-shop-mode-light .gnsc-spf-titlebar {
  border-color: rgba(68, 130, 255, .28) !important;
  background:
    radial-gradient(circle at 0% 12%, rgba(56, 189, 248, .30) 0, rgba(56, 189, 248, .10) 18%, transparent 38%),
    radial-gradient(circle at 100% 12%, rgba(168, 85, 247, .28) 0, rgba(168, 85, 247, .09) 20%, transparent 42%),
    radial-gradient(circle at 52% 120%, rgba(14, 165, 233, .16) 0, transparent 42%),
    linear-gradient(110deg, rgba(37, 99, 235, .96) 0%, rgba(56, 147, 255, .96) 22%, rgba(132, 79, 246, .94) 52%, rgba(14, 165, 233, .94) 79%, rgba(29, 78, 216, .96) 100%) !important;
  box-shadow:
    0 24px 68px rgba(55, 105, 210, .20),
    0 12px 30px rgba(37, 99, 235, .13),
    inset 0 1px 0 rgba(255, 255, 255, .32),
    inset 0 -1px 0 rgba(255, 255, 255, .18) !important;
}

html.gnsc-shop-mode-light body.single-product .gnsc-spx-titlebar > span,
html.gnsc-shop-mode-light body.single-product .gnsc-spf-titlebar > span,
body.single-product.gnsc-shop-mode-light .gnsc-spx-titlebar > span,
body.single-product.gnsc-shop-mode-light .gnsc-spf-titlebar > span {
  color: #ffffff !important;
  text-shadow:
    0 2px 0 rgba(15, 23, 42, .10),
    0 12px 26px rgba(15, 23, 42, .25),
    0 0 26px rgba(255, 255, 255, .18) !important;
}

body.single-product .gnsc-spx-titlebar + .gnsc-spx-card,
body.single-product .gnsc-spf-titlebar + .gnsc-spf-card,
body.single-product.woocommerce div.product .gnsc-spx-titlebar + .gnsc-spx-card,
body.single-product.woocommerce div.product .gnsc-spf-titlebar + .gnsc-spf-card {
  margin-top: clamp(8px, .65vw, 12px) !important;
}

@media (max-width: 980px) {
  body.single-product .gnsc-spx-titlebar,
  body.single-product .gnsc-spf-titlebar,
  body.single-product.woocommerce div.product .gnsc-spx-titlebar,
  body.single-product.woocommerce div.product .gnsc-spf-titlebar {
    min-height: clamp(68px, 10vw, 94px) !important;
    margin-top: clamp(8px, 2vw, 14px) !important;
    margin-bottom: 8px !important;
    padding: clamp(15px, 3vw, 22px) clamp(14px, 3.2vw, 24px) !important;
    border-radius: clamp(18px, 4vw, 24px) !important;
  }

  body.single-product .gnsc-spx-titlebar > span,
  body.single-product .gnsc-spf-titlebar > span,
  body.single-product.woocommerce div.product .gnsc-spx-titlebar > span,
  body.single-product.woocommerce div.product .gnsc-spf-titlebar > span {
    font-size: clamp(24px, 5.6vw, 38px) !important;
    line-height: 1.12 !important;
    letter-spacing: -.030em !important;
  }
}

@media (max-width: 520px) {
  body.single-product .gnsc-spx-titlebar,
  body.single-product .gnsc-spf-titlebar,
  body.single-product.woocommerce div.product .gnsc-spx-titlebar,
  body.single-product.woocommerce div.product .gnsc-spf-titlebar {
    min-height: 64px !important;
    padding: 14px 13px 17px !important;
    border-radius: 18px !important;
  }

  body.single-product .gnsc-spx-titlebar::after,
  body.single-product .gnsc-spf-titlebar::after,
  body.single-product.woocommerce div.product .gnsc-spx-titlebar::after,
  body.single-product.woocommerce div.product .gnsc-spf-titlebar::after {
    left: 18px !important;
    right: 18px !important;
    bottom: 8px !important;
    height: 2px !important;
  }

  body.single-product .gnsc-spx-titlebar > span,
  body.single-product .gnsc-spf-titlebar > span,
  body.single-product.woocommerce div.product .gnsc-spx-titlebar > span,
  body.single-product.woocommerce div.product .gnsc-spf-titlebar > span {
    padding: 0 4px !important;
    font-size: clamp(22px, 7vw, 31px) !important;
  }
}
