/* =========================================================
   FEATURE: ADD TO CART / BUY NOW BUTTON STYLING
   The real Add to Cart submit button, selected via
   :not(#btn-1cc-pdp) since both Add to Cart and Buy Now share
   the exact same .single_add_to_cart_button class and only
   Buy Now carries an id (from the Razorpay 1-click plugin).

   Only enqueued when Settings > Digiskyward > Add to Cart /
   Buy Now Styling is switched on. Does not affect the sticky
   bar's own buttons -- see sticky-bar.css for those.
   ========================================================= */

.single_add_to_cart_button:not(#btn-1cc-pdp) {
  position: relative;
  overflow: hidden !important;
  isolation: isolate;

  border: 0 !important;
  border-radius: var(--bbpb-radius) !important;
  background: var(--bbpb-black) !important;
  color: #FFFFFF !important;
  /* WooCommerce/Astra's own .disabled button styling includes
     opacity:.5 -- this button defines its own honest "not ready"
     look via background colour instead (see .disabled below), so
     that upstream fade is switched off here rather than stacking
     on top of it and washing the colour out further. */
  opacity: 1 !important;

  font-family: "Inter", sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: .01em;

  min-height: 50px;
  padding: 14px 28px !important;

  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.single_add_to_cart_button:not(#btn-1cc-pdp):not(.disabled) {
  background: var(--bbpb-red) !important;
  box-shadow: 0 8px 22px rgba(226,28,33,.28);
}

.single_add_to_cart_button:not(#btn-1cc-pdp):not(.disabled):hover {
  background: var(--bbpb-red-dark) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(226,28,33,.34);
}

/* Disabled: honest "not ready yet" state -- muted, not a weak
   version of the brand color (the washed-out pink/salmon this
   was rendering as before, which just looks like a bug) */

.single_add_to_cart_button:not(#btn-1cc-pdp).disabled,
.single_add_to_cart_button:not(#btn-1cc-pdp):disabled {
  background: #C9C9C9 !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

.single_add_to_cart_button:not(#btn-1cc-pdp).disabled:hover {
  transform: none;
}


/* ---- Buy Now -- solid black fill, the one button that carries
   the premium shine sweep (Add to Cart is deliberately plain now
   so the shine reads as a signal pointing at the fastest checkout
   path, not decoration on every button). ---- */

#btn-1cc-pdp {
  position: relative;
  overflow: hidden !important;
  isolation: isolate;

  border: 0 !important;
  border-radius: var(--bbpb-radius) !important;
  background: var(--bbpb-black) !important;
  color: #FFFFFF !important;
  opacity: 1 !important;

  font-family: "Inter", sans-serif !important;
  font-weight: 900 !important;
  letter-spacing: .01em;

  min-height: 50px;
  padding: 14px 28px !important;

  transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

#btn-1cc-pdp:not(.disabled) {
  box-shadow: 0 8px 22px rgba(0,0,0,.24);
}

#btn-1cc-pdp:not(.disabled)::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(
    110deg,
    transparent 0%,
    rgba(255,255,255,.55) 50%,
    transparent 100%
  );
  transform: skewX(-20deg);
  animation: bbpbShine 4.5s ease-in-out infinite;
  pointer-events: none;
  z-index: 1;
}

#btn-1cc-pdp:not(.disabled):hover {
  background: var(--bbpb-black-soft) !important;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(0,0,0,.3);
}

#btn-1cc-pdp.disabled,
#btn-1cc-pdp:disabled {
  background: #C9C9C9 !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
  cursor: not-allowed;
}

#btn-1cc-pdp.disabled:hover {
  transform: none;
}


/* ---- Quantity input -- align its height with the buttons
   next to it so the whole row reads as one considered unit ---- */

.quantity .qty {
  height: 50px !important;
  border: 1.5px solid var(--bbpb-border) !important;
  border-radius: var(--bbpb-radius) !important;
  font-family: "Inter", sans-serif;
  font-weight: 700;
  text-align: center;
}

/* Keep the label on one line -- with tight padding the two-word
   "Add to Cart" / "Buy Now" labels can wrap to two lines and look
   broken instead of just growing the button to fit. */
.single_add_to_cart_button,
#btn-1cc-pdp {
  white-space: nowrap !important;
}

.single_add_to_cart_button:focus-visible,
#btn-1cc-pdp:focus-visible {
  outline: 2px solid var(--bbpb-red);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  #btn-1cc-pdp:not(.disabled)::after {
    animation: none;
    display: none;
  }
}

@media (max-width: 600px) {
  .single_add_to_cart_button:not(#btn-1cc-pdp),
  #btn-1cc-pdp {
    width: 100%;
    min-height: 52px;
    font-size: 15px !important;
  }
}
