/* Sticky Things – Quantity Box Enhancer */

/* ---- Full-width flex children — nbo-wrapper, variation table & wrap must
        each occupy their own row so they don't sit beside the action items ---- */
form.cart > .nbo-wrapper,
form.cart > .variations,
form.cart > .single_variation_wrap {
  flex: 0 0 100%;
  width: 100%;
}

form.cart > .nbo-wrapper { order: -1; }

/* ---- Variable product add-to-cart container.
        WooCommerce toggles CSS classes (not inline styles):
          disabled  → woocommerce-variation-add-to-cart-disabled  (hidden)
          enabled   → woocommerce-variation-add-to-cart-enabled   (shown)
        We only apply flex when the enabled class is present.          ---- */
form.cart .woocommerce-variation-add-to-cart.woocommerce-variation-add-to-cart-enabled {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* ---- Heading + helper (full width, above the action row) ---- */
.stq-heading {
  width: 100%;
  margin: 18px 0 8px;
}
.stq-heading .stq-title {
  display: block;
  font-size: 16px;
  font-weight: 700;
  color: #00494e;
  line-height: 1.3;
}
.stq-heading .stq-help {
  display: block;
  font-size: 13px;
  color: #6b7a80;
  margin-top: 3px;
}

/* ---- Cart action row: [stepper] [price] [button slot] on one line ---- */
form.cart {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

/* ---- Stepper ---- */
form.cart .quantity.stq-box {
  display: inline-flex !important;
  align-items: center;
  border: 1px solid #c7d4da;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
form.cart .quantity.stq-box .minus,
form.cart .quantity.stq-box .plus {
  width: 48px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #00494e;
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  border: 0;
  margin: 0;
  transition: background .15s ease;
}
form.cart .quantity.stq-box .minus:hover,
form.cart .quantity.stq-box .plus:hover { background: #0a6b70; }
form.cart .quantity.stq-box .minus i,
form.cart .quantity.stq-box .plus i { color: #fff; }

form.cart .quantity.stq-box input.qty {
  width: 96px !important;
  max-width: 96px !important;
  height: 52px;
  border: 0 !important;
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  color: #243137;
  background: #fff;
  -moz-appearance: textfield;
  box-shadow: none !important;
}
form.cart .quantity.stq-box input.qty::-webkit-outer-spin-button,
form.cart .quantity.stq-box input.qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* ---- Live price display ---- */
.stq-price {
  font-size: 1.4em;
  font-weight: 700;
  color: #00494e;
  white-space: nowrap;
  line-height: 1;
}
.stq-price:empty { display: none; }

/* ---- Variable product: button sits directly in the variation container
        (no .stq-btn-slot on products without NBDesigner). Style it to match. ---- */
form.cart .woocommerce-variation-add-to-cart .single_add_to_cart_button {
  flex: 1 1 auto;
  height: 52px !important;
  margin: 0 !important;
  white-space: nowrap;
}

/* ---- Button slot — Add to Cart and proxy Start Design share this space ---- */
.stq-btn-slot {
  flex: 1 1 auto;
}
.stq-btn-slot .single_add_to_cart_button {
  display: block;
  width: 100%;
  height: 52px !important;
  margin: 0 !important;
  white-space: nowrap;
  box-sizing: border-box;
}

/* ---- Proxy greyed out until a variation is selected ---- */
.woocommerce-variation-add-to-cart-disabled .stq-design-proxy,
.stq-design-proxy:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---- Proxy Start Design button — matches #triggerDesign styling ---- */
.stq-design-proxy {
  display: block;
  width: 100%;
  height: 52px !important;
  margin: 0 !important;
  padding: 0 20px;
  background: #54b37f;
  color: #fff;
  border: 0;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
  transition: background .15s ease, transform .1s ease;
}
.stq-design-proxy:hover {
  background: #48a06e;
  transform: translateY(-1px);
}

/* ---- Hide the real #triggerDesign only once the proxy is in place.
        The form gets class stq-proxy-ready when setupDesignProxy() succeeds,
        so before that the original button remains visible.             ---- */
form.cart.stq-proxy-ready #triggerDesign {
  display: none !important;
}

/* ---- Hide the "/ 1 item" text NBDesigner injects next to the stepper ---- */
form.cart .quantity ~ .ng-binding,
form.cart .nbo-qty-label,
form.cart .nbd-qty-text {
  display: none !important;
}
