/**
 * Single product — crumbs, qty steppers, trust strip, swatches, gallery arrows.
 * Colors from Kadence --global-palette* with --vp-* fallbacks.
 */

body.single-product .kadence-breadcrumbs,
body.single-product .woocommerce-breadcrumb,
body.single-product .product-title.product-above {
  display: none !important;
}

body.single-product .rank-math-breadcrumbs-wrap {
  margin: 0 0 1rem;
  padding: 0.35rem 0 0.6rem;
  color: var(--global-palette3, var(--vp-ink-muted, #6b7b8c));
  font-size: 0.85rem;
  line-height: 1.45;
}

body.single-product .rank-math-breadcrumbs-wrap a {
  color: inherit;
  text-decoration: none;
}

body.single-product .rank-math-breadcrumbs-wrap a:hover {
  text-decoration: underline;
}

/* Shop Kit extras duplicate the trust copy we output as .vpro-trust-badges. */
body.single-product .single-product-extras,
body.single-product .single-product-payments {
  display: none !important;
}

/* —— Qty + ATC + wishlist row —— */
body.single-product div.product form.cart .woocommerce-variation-add-to-cart,
body.single-product div.product form.cart:not(.variations_form) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

body.single-product.woocommerce div.product form.cart div.quantity {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: stretch;
  float: none;
  width: auto;
  height: 48px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--global-gray-400, var(--vp-line, #e8eaee));
  border-radius: 6px;
  background: #fff;
}

body.single-product form.cart .quantity:has(input[type="hidden"]) {
  display: none;
}

body.single-product .quantity .minus,
body.single-product .quantity .plus,
body.single-product .quantity .vpro-qty-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 44px;
  width: 44px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--global-palette1, var(--vp-ink, #0b1524)) !important;
  color: #fff !important;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: none;
  cursor: pointer;
  appearance: none;
}

body.single-product .quantity .minus:hover,
body.single-product .quantity .plus:hover,
body.single-product .quantity .vpro-qty-btn:hover {
  background: var(--global-palette2, var(--vp-primary-dark, #00568f)) !important;
}

body.single-product.woocommerce div.product form.cart .quantity .qty {
  width: 52px;
  min-width: 52px;
  max-width: 52px;
  height: 48px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  color: var(--global-palette1, var(--vp-ink, #0b1524));
  font-size: 16px;
  font-weight: 600;
  line-height: 48px;
  text-align: center;
  box-shadow: none;
  -moz-appearance: textfield;
  appearance: textfield;
}

body.single-product .quantity input.qty::-webkit-outer-spin-button,
body.single-product .quantity input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

body.single-product.woocommerce div.product form.cart .single_add_to_cart_button {
  flex: 1 1 12rem;
  min-height: 48px;
  width: auto;
}

body.single-product .yith-wcwl-add-to-wishlist,
body.single-product .tinv-wishlist,
body.single-product .wcboost-wishlist-button,
body.single-product .wcboost-wishlist-button.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  margin: 0;
  background: var(--global-palette7, var(--vp-bg-subtle, #f7f8fa)) !important;
  color: var(--global-palette1, var(--vp-ink, #0b1524)) !important;
  border: 1px solid var(--global-gray-400, var(--vp-line, #e8eaee));
  border-radius: 6px;
  box-shadow: none;
}

body.single-product .yith-wcwl-add-to-wishlist .yith-wcwl-icon,
body.single-product .wcboost-wishlist-button__text,
body.single-product .tinvwl_add_to_wishlist-text {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* —— Trust strip —— */
body.single-product .vpro-trust-badges {
  margin: 0.85rem 0 0;
  padding: 0.85rem 1rem;
  background: var(--global-palette9, var(--vp-bg-subtle, #f7f8fa));
  border: 1px solid var(--global-gray-400, var(--vp-line, #e8eaee));
  border-radius: 8px;
}

body.single-product .vpro-trust-badges__list,
body.single-product .vpro-trust-badges__pay {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 1.1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.single-product .vpro-trust-badges__item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--global-palette3, var(--vp-ink-muted, #6b7b8c));
  font-size: 0.85rem;
  line-height: 1.35;
}

body.single-product .vpro-trust-badges__check {
  display: inline-flex;
  color: var(--global-palette1, var(--vp-primary, #0070c0));
}

body.single-product .vpro-trust-badges__pay {
  margin-top: 0.7rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--global-gray-400, var(--vp-line, #e8eaee));
}

body.single-product .vpro-trust-badges__pay img {
  display: block;
  height: 28px;
  width: auto;
  background: #fff;
  border-radius: 3px;
}

body.single-product .summary .product_meta {
  margin: 0.85rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--global-gray-400, var(--vp-line, #e8eaee));
  color: var(--global-palette3, var(--vp-ink-muted, #6b7b8c));
  font-size: 0.85rem;
  line-height: 1.6;
}

body.single-product .summary .product_meta > span {
  display: block;
  margin: 0 0 0.35rem;
}

/* —— Flavor / variation out of stock (Kadence Shop Kit radios + common swatch plugins) —— */
body.single-product .kad_radio_variations .kt_disabled,
body.single-product .kad_radio_variations label.kt_disabled,
body.single-product .kad_radio_variations input.kt_disabled + label,
body.single-product .variable-item.disabled,
body.single-product .woo-variation-swatches .variable-item.disabled,
body.single-product .woo-variation-swatches .out-of-stock {
  opacity: 1;
  color: var(--global-palette-highlight, var(--vp-accent, #e8452c));
}

body.single-product .kad_radio_variations input.kt_disabled + label::after,
body.single-product .kad_radio_variations label.kt_disabled::after,
body.single-product .variable-item.disabled::after,
body.single-product .woo-variation-swatches .out-of-stock::after {
  content: "Out of stock";
  display: inline-block;
  margin-left: 0.4em;
  padding: 0 0.35em;
  border-radius: 3px;
  background: var(--vp-accent-bg, #fdece9);
  color: var(--global-palette-highlight, var(--vp-accent, #e8452c));
  font-size: 0.7em;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  vertical-align: middle;
}

body.single-product .kad_radio_variations input.kt_disabled:checked + label,
body.single-product .kad_radio_variations input:checked + label.kt_disabled,
body.single-product .variable-item.disabled.selected,
body.single-product .woo-variation-swatches .variable-item.disabled.selected {
  background: var(--global-palette1, #1d1d1d);
  color: #fff;
  border-color: var(--global-palette1, #1d1d1d);
}

body.single-product .kad_radio_variations input.kt_disabled:checked + label::after,
body.single-product .variable-item.disabled.selected::after {
  background: #fff;
  color: var(--global-palette1, #1d1d1d);
}

/* —— Tabs —— */
body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li a {
  color: var(--global-palette3, var(--vp-ink-muted, #6b7b8c));
}

body.single-product.woocommerce div.product .woocommerce-tabs ul.tabs li.active a {
  color: var(--global-palette1, var(--vp-ink, #0b1524));
}

/* —— Gallery arrows: live = Kadence Shop Kit Splide; Flexslider if Shop Kit is off —— */
body.single-product .splide__arrow,
body.single-product .flex-direction-nav a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #fff !important;
  color: var(--global-palette1, var(--vp-ink, #0b1524));
  border: 1px solid var(--global-gray-400, var(--vp-line, #e8eaee));
  border-radius: 50%;
  opacity: 1;
  box-shadow: 0 1px 3px rgba(11, 21, 36, 0.08);
}

body.single-product .splide__arrow svg,
body.single-product .flex-direction-nav a:before {
  fill: currentColor;
  width: 14px;
  height: 14px;
}

body.single-product .splide .splide__arrow:hover,
body.single-product .splide .splide__arrow:focus,
body.single-product .flex-direction-nav a:hover {
  background: var(--global-palette1, var(--vp-primary, #c81e26)) !important;
  color: #fff !important;
  opacity: 1;
}

body.single-product .splide .splide__arrow:hover svg,
body.single-product .splide .splide__arrow:hover path,
body.single-product .splide .splide__arrow:focus svg,
body.single-product .splide .splide__arrow:focus path {
  fill: #fff !important;
  stroke: #fff !important;
  color: #fff !important;
}

body.single-product .flex-direction-nav {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  pointer-events: none;
}

body.single-product .flex-direction-nav li {
  pointer-events: auto;
}

body.single-product .flex-direction-nav .flex-prev {
  left: 8px;
}

body.single-product .flex-direction-nav .flex-next {
  right: 8px;
}

@media (max-width: 767px) {
  body.single-product div.product form.cart .woocommerce-variation-add-to-cart,
  body.single-product div.product form.cart:not(.variations_form) {
    display: grid;
    grid-template-columns: max-content 1fr auto;
    grid-template-areas:
      "qty . wish"
      "atc atc atc";
    gap: 8px;
  }

  body.single-product.woocommerce div.product form.cart div.quantity {
    grid-area: qty;
  }

  body.single-product.woocommerce div.product form.cart .single_add_to_cart_button {
    grid-area: atc;
    width: 100%;
  }

  body.single-product .yith-wcwl-add-to-wishlist,
  body.single-product .tinv-wishlist,
  body.single-product .wcboost-wishlist-button {
    grid-area: wish;
  }

  body.single-product .vpro-trust-badges__list {
    flex-direction: column;
    align-items: flex-start;
  }
}
