/* ============================================================
   MOBILE STICKY PURCHASE BAR
   ============================================================ */

/* Mobile only (hide on desktop/tablet) */
@media (min-width: 769px) {
  .fifo-sticky-bar { display: none !important; }
}

@media (max-width: 768px) {
  /* Add padding to the body so the footer doesn't get hidden behind the fixed bar */
  body.single-product {
    padding-bottom: 85px !important;
  }

  .fifo-sticky-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    height: 76px;
    box-sizing: border-box;
    transition: transform 0.3s cubic-bezier(0.2, 0.9, 0.2, 1);
  }

  /* Left Side: Pricing */
  .fifo-sticky-bar-price-col {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-width: 0;
  }

  .fifo-sticky-bar-mrp-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 2px;
  }

  .fifo-sticky-bar-mrp {
    font-size: 13px;
    color: #9ca3af;
    text-decoration: line-through;
    font-weight: 500;
  }

  .fifo-sticky-bar-discount {
    font-size: 11px;
    color: #059669; /* Emerald Green */
    font-weight: 800;
    background: #d1fae5;
    padding: 2px 6px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
  }

  .fifo-sticky-bar-price {
    font-size: 20px;
    font-weight: 800;
    color: #111827;
    line-height: 1;
    display: flex;
    align-items: baseline;
    gap: 2px;
  }
  .fifo-sticky-bar-price .woocommerce-Price-currencySymbol {
    font-size: 16px;
  }

  /* Right Side: Buttons */
  .fifo-sticky-bar-btns {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
  }

  .fifo-sticky-btn {
    border: none;
    border-radius: 8px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 700;
    padding: 0 16px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .fifo-sticky-btn-cart {
    background: #f3f4f6;
    color: #111827;
  }

  .fifo-sticky-btn-buy {
    background: #f07021; /* Fifozone Orange */
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(240, 112, 33, 0.25);
  }

  .fifo-sticky-btn:active {
    transform: scale(0.96);
  }

  .fifo-sticky-btn.is-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
    color: transparent !important;
  }

  .fifo-sticky-btn.is-loading::after {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: fifo-spin 0.8s linear infinite;
  }
  .fifo-sticky-btn-cart.is-loading::after {
    border: 2px solid rgba(17, 24, 39, 0.2);
    border-top-color: #111827;
  }

  @keyframes fifo-spin {
    to { transform: rotate(360deg); }
  }

  /* Hide WooCommerce native fixed add-to-cart if themes have it */
  .storefront-sticky-add-to-cart {
    display: none !important;
  }
}
