/* RoboticWorld product/header polish — loaded after the main theme styles. */

/* Keep the fixed navigation in the same low-contrast, violet-tinted language
 * as the rest of the site. The explicit button reset also prevents the
 * browser's white default button from leaking into the mobile header. */
.site-nav {
  background: linear-gradient(180deg, rgba(8, 8, 15, 0.94), rgba(8, 8, 15, 0.76));
  border-bottom-color: rgba(139, 92, 246, 0.14);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
}

.nav-toggle {
  appearance: none;
  -webkit-appearance: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 8px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 11px;
  background: rgba(15, 15, 28, 0.78);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 18px rgba(0, 0, 0, 0.18);
  transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.nav-toggle:hover,
.nav-toggle:focus-visible,
.nav-toggle.active {
  background: rgba(139, 92, 246, 0.14);
  border-color: rgba(139, 92, 246, 0.52);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.12), 0 8px 20px rgba(0, 0, 0, 0.2);
}

.nav-toggle:focus-visible {
  outline: none;
}

.nav-toggle span {
  width: 20px;
  height: 2px;
  background: rgba(255, 255, 255, 0.88);
}

.nav-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 768px) {
  .site-nav {
    background: rgba(8, 8, 15, 0.94);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
  }

  .nav-inner {
    padding-left: 16px;
    padding-right: 16px;
  }

  .nav-right {
    gap: 10px;
  }

  .nav-links.open {
    background: rgba(8, 8, 15, 0.98);
    border-bottom-color: rgba(139, 92, 246, 0.18);
    box-shadow: 0 18px 28px rgba(0, 0, 0, 0.28);
  }
}

/* Product quantity stepper. The input remains editable and WooCommerce still
 * receives the same name/value; these buttons simply make the control clear
 * and usable on touch screens and browsers that hide native number spinners. */
.single-product-page form.cart .quantity {
  display: inline-flex;
  align-items: stretch;
  min-height: 50px;
  border: 1px solid rgba(139, 92, 246, 0.24);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(15, 15, 28, 0.78);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.single-product-page form.cart .quantity input.qty {
  width: 68px;
  height: 50px;
  padding: 12px 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  -moz-appearance: textfield;
  appearance: textfield;
}

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

.single-product-page form.cart .quantity input.qty:focus {
  border: 0;
  box-shadow: none;
}

.rw-quantity-stepper {
  display: flex;
  flex-direction: column;
  width: 29px;
  border-left: 1px solid rgba(139, 92, 246, 0.18);
}

.rw-quantity-step {
  position: relative;
  display: flex;
  flex: 1 1 50%;
  align-items: center;
  justify-content: center;
  min-width: 29px;
  min-height: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.62);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}

.rw-quantity-step + .rw-quantity-step {
  border-top: 1px solid rgba(139, 92, 246, 0.14);
}

.rw-quantity-step svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.rw-quantity-step:hover,
.rw-quantity-step:focus-visible {
  background: rgba(139, 92, 246, 0.16);
  color: var(--text);
  outline: none;
}

.rw-quantity-step:disabled {
  color: rgba(255, 255, 255, 0.2);
  cursor: default;
}

/* Stripe owns the actual wallet button. Reserve its footprint immediately so
 * the product layout does not jump while the hosted iframe is initializing. */
.single-product-page #wc-stripe-express-checkout-element {
  position: relative;
  clear: both;
  min-height: 48px;
  margin-top: 16px !important;
}

.single-product-page #wc-stripe-express-checkout-element.rw-express-loading::before {
  content: "Loading fast checkout…";
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 1px solid rgba(139, 92, 246, 0.26);
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.15), rgba(99, 102, 241, 0.08));
  color: rgba(255, 255, 255, 0.68);
  font: 500 0.82rem/1.2 var(--ff-body);
  letter-spacing: 0.01em;
}

.single-product-page #wc-stripe-express-checkout-element.rw-express-ready::before {
  display: none;
}

.single-product-page #wc-stripe-express-checkout-element > div {
  min-height: 48px;
}
