/* KG NET WVM v2.0.2 – TopMatic single-product variation UI polish */
body.single-product{
  --kgwvm-red:#ef1515;
  --kgwvm-red-dark:#c90d0d;
  --kgwvm-ink:#171717;
  --kgwvm-text:#374151;
  --kgwvm-muted:#7b8491;
  --kgwvm-line:#e5e8ed;
  --kgwvm-soft:#f7f8fa;
}

/* Keep Woo's native engine, but visually de-emphasise the duplicate select when TopMatic pills exist. */
@supports selector(:has(*)){
  body.single-product form.variations_form .variations td.value:has(.tm-b2b-variation-ui) > select{
    position:absolute!important;
    width:1px!important;
    height:1px!important;
    padding:0!important;
    margin:-1px!important;
    overflow:hidden!important;
    clip:rect(0,0,0,0)!important;
    clip-path:inset(50%)!important;
    white-space:nowrap!important;
    border:0!important;
  }
}

body.single-product .woocommerce div.product form.cart .variations{
  border:1px solid var(--kgwvm-line)!important;
  border-radius:16px!important;
  padding:13px!important;
  background:linear-gradient(180deg,#fff 0%,#fcfcfd 100%)!important;
  box-shadow:0 12px 34px rgba(17,24,39,.055)!important;
}
body.single-product .woocommerce div.product form.cart .variations tr{
  display:block;
  padding:0 0 13px;
  margin:0 0 13px;
  border-bottom:1px solid #eef0f3;
}
body.single-product .woocommerce div.product form.cart .variations tr:last-child{
  padding-bottom:0;
  margin-bottom:0;
  border-bottom:0;
}
body.single-product .woocommerce div.product form.cart .variations th,
body.single-product .woocommerce div.product form.cart .variations td{
  display:block;
  width:100%!important;
  padding:0!important;
  text-align:left!important;
}
body.single-product .woocommerce div.product form.cart .variations th.label{
  margin-bottom:8px;
}
body.single-product .woocommerce div.product form.cart .variations label,
body.single-product .tm-b2b-variation-ui__label{
  color:var(--kgwvm-ink)!important;
  font-size:9.5px!important;
  line-height:1.3!important;
  font-weight:900!important;
  letter-spacing:.55px!important;
  text-transform:uppercase!important;
}
body.single-product .tm-b2b-variation-ui{
  position:relative;
  margin:0!important;
  padding:0!important;
}
body.single-product .tm-b2b-variation-ui__label{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0 0 9px!important;
}
body.single-product .tm-b2b-variation-ui__label::before{
  content:"";
  width:16px;
  height:2px;
  border-radius:2px;
  background:var(--kgwvm-red);
}
body.single-product .tm-b2b-variation-ui__options{
  display:flex!important;
  flex-wrap:wrap!important;
  gap:7px!important;
}

/* Pills / values */
body.single-product .tm-b2b-variation-option,
body.single-product button.tm-b2b-variation-option{
  min-height:38px!important;
  padding:8px 11px!important;
  border:1px solid #dde2e8!important;
  border-radius:8px!important;
  background:#fff!important;
  color:var(--kgwvm-text)!important;
  box-shadow:0 2px 8px rgba(17,24,39,.025)!important;
  font-size:9.5px!important;
  line-height:1.2!important;
  font-weight:800!important;
  letter-spacing:.12px!important;
  text-transform:none!important;
  transition:background .18s ease,color .18s ease,border-color .18s ease,box-shadow .18s ease,transform .18s ease!important;
}
body.single-product .tm-b2b-variation-option *,
body.single-product button.tm-b2b-variation-option *{
  color:inherit!important;
}
body.single-product .tm-b2b-variation-option:hover,
body.single-product .tm-b2b-variation-option:focus-visible,
body.single-product .tm-b2b-variation-option.is-active,
body.single-product button.tm-b2b-variation-option:hover,
body.single-product button.tm-b2b-variation-option:focus-visible,
body.single-product button.tm-b2b-variation-option.is-active{
  background:var(--kgwvm-red)!important;
  border-color:var(--kgwvm-red)!important;
  color:#fff!important;
  box-shadow:0 8px 20px rgba(239,21,21,.18)!important;
  transform:translateY(-1px)!important;
  outline:0!important;
}
body.single-product .tm-b2b-variation-option:hover *,
body.single-product .tm-b2b-variation-option:focus-visible *,
body.single-product .tm-b2b-variation-option.is-active *,
body.single-product button.tm-b2b-variation-option:hover *,
body.single-product button.tm-b2b-variation-option:focus-visible *,
body.single-product button.tm-b2b-variation-option.is-active *{
  color:#fff!important;
}
body.single-product .tm-b2b-variation-option.is-disabled,
body.single-product button.tm-b2b-variation-option.is-disabled{
  background:#f3f4f6!important;
  border-color:#e6e8ec!important;
  color:#a0a7b1!important;
  opacity:.62!important;
  cursor:not-allowed!important;
  box-shadow:none!important;
  transform:none!important;
}

/* Colour swatches stay visible on red hover/active background. */
body.single-product .tm-b2b-variation-ui[data-type="color"] .tm-b2b-variation-option{
  gap:8px!important;
  padding:7px 10px!important;
}
body.single-product .tm-b2b-swatch{
  width:27px!important;
  height:27px!important;
  flex:0 0 27px!important;
  border-radius:7px!important;
  border:1px solid rgba(17,24,39,.12)!important;
  background-color:#f1f3f5;
  box-shadow:inset 0 0 0 2px #fff!important;
}
body.single-product .tm-b2b-variation-option:hover .tm-b2b-swatch,
body.single-product .tm-b2b-variation-option.is-active .tm-b2b-swatch{
  border-color:rgba(255,255,255,.82)!important;
  box-shadow:inset 0 0 0 2px #fff,0 0 0 1px rgba(255,255,255,.5)!important;
}
body.single-product .tm-b2b-swatch__name{
  font-size:9.5px!important;
  font-weight:850!important;
}

/* Fallback native select – modern if :has is unsupported. */
body.single-product .woocommerce div.product form.cart .variations select{
  min-height:43px!important;
  width:100%!important;
  max-width:100%!important;
  padding:0 38px 0 12px!important;
  border:1px solid #dfe3e8!important;
  border-radius:8px!important;
  background-color:#fff!important;
  color:#343b45!important;
  box-shadow:none!important;
  font-size:10px!important;
  font-weight:700!important;
}
body.single-product .woocommerce div.product form.cart .variations select:focus{
  border-color:rgba(239,21,21,.6)!important;
  box-shadow:0 0 0 3px rgba(239,21,21,.07)!important;
  outline:0!important;
}
body.single-product .woocommerce div.product form.cart .reset_variations{
  margin:10px 0 0!important;
  color:var(--kgwvm-red)!important;
  font-size:8.5px!important;
  font-weight:850!important;
  text-transform:uppercase!important;
  letter-spacing:.35px!important;
}

/* Quantity / add-to-cart alignment, without replacing Woo behaviour. */
body.single-product .woocommerce div.product form.cart .single_variation_wrap{
  margin-top:13px!important;
}
body.single-product .woocommerce div.product form.cart .woocommerce-variation-price{
  margin-bottom:11px;
  color:var(--kgwvm-ink);
}
body.single-product .woocommerce div.product form.cart .quantity input.qty{
  min-height:47px!important;
  border:1px solid #dde2e8!important;
  border-radius:8px!important;
  background:#fff!important;
  color:#20262f!important;
  font-weight:800!important;
}
body.single-product .woocommerce div.product form.cart .single_add_to_cart_button,
body.single-product .woocommerce div.product form.cart button.single_add_to_cart_button{
  min-height:47px!important;
  border-radius:7px!important;
  background:linear-gradient(135deg,var(--kgwvm-red),var(--kgwvm-red-dark))!important;
  color:#fff!important;
  box-shadow:0 10px 26px rgba(239,21,21,.2)!important;
  font-size:9px!important;
  font-weight:900!important;
  letter-spacing:.45px!important;
}
body.single-product .woocommerce div.product form.cart .single_add_to_cart_button:hover,
body.single-product .woocommerce div.product form.cart button.single_add_to_cart_button:hover{
  color:#fff!important;
  transform:translateY(-1px)!important;
  box-shadow:0 14px 30px rgba(239,21,21,.26)!important;
}

@media(max-width:700px){
  body.single-product .woocommerce div.product form.cart .variations{
    padding:11px!important;
    border-radius:12px!important;
  }
  body.single-product .tm-b2b-variation-ui__options{gap:6px!important}
  body.single-product .tm-b2b-variation-option,
  body.single-product button.tm-b2b-variation-option{
    min-height:40px!important;
    padding:8px 10px!important;
    font-size:9px!important;
  }
  body.single-product .woocommerce div.product form.cart .single_add_to_cart_button,
  body.single-product .woocommerce div.product form.cart button.single_add_to_cart_button{
    width:100%!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body.single-product .tm-b2b-variation-option,
  body.single-product .woocommerce div.product form.cart .single_add_to_cart_button{
    transition-duration:.01ms!important;
  }
}
