/** Shopify CDN: Minification failed

Line 9:5 Unexpected "="
Line 183:0 Unexpected "<"
Line 254:8 Comments in CSS use "/* ... */" instead of "//"
Line 257:8 Comments in CSS use "/* ... */" instead of "//"

**/
<!-- =========================================================
   STICKY MOBILE CART BAR - FULL UPGRADED REWRITE
   Replace your current sticky cart section with this block
========================================================= -->

<!-- ====================== HTML ====================== -->
<div class="sticky-cart-bar" id="stickyCart" aria-live="polite" aria-label="Shopping cart summary">
  <div class="sticky-cart-content">

    <div class="sticky-cart-info">
      <span class="sticky-cart-count" id="stickyCartCount">2 items</span>
      <span class="sticky-cart-total" id="stickyCartTotal">$120.00</span>
    </div>

    <a href="/cart" class="sticky-cart-button" id="stickyCartButton">
      View Cart
    </a>

  </div>
</div>

<!-- ====================== CSS ====================== -->
<style>
  /* ====================== BASE RESET (OPTIONAL SAFE STYLING) ====================== */
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  /* ====================== STICKY MOBILE CART BAR ====================== */
  .sticky-cart-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 2px solid #d4af37;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.18);
    z-index: 9999;
    padding: 12px 16px;

    /* Animation */
    transform: translateY(100%);
    transition: transform 0.35s ease, opacity 0.35s ease;
    opacity: 0;
  }

  /* Active / visible state */
  .sticky-cart-bar.active {
    transform: translateY(0);
    opacity: 1;
  }

  /* Inner layout */
  .sticky-cart-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
  }

  /* Info section */
  .sticky-cart-info {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow: hidden;
  }

  /* Item count */
  .sticky-cart-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
    color: #666;
    font-size: 13px;
    line-height: 1;
    padding: 5px 8px;
    border-radius: 6px;
    white-space: nowrap;
  }

  /* Total */
  .sticky-cart-total {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-left: 8px;
    white-space: nowrap;
  }

  /* Button */
  .sticky-cart-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #0071bc;
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 9999px;
    font-weight: 700;
    text-decoration: none;
    font-size: 14px;
    line-height: 1;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0, 113, 188, 0.3);
    transition: background 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    border: none;
    cursor: pointer;
  }

  /* Hover */
  .sticky-cart-button:hover {
    background: #005a96;
    transform: translateY(-2px);
  }

  /* Tap feedback */
  .sticky-cart-button:active {
    transform: scale(0.96);
    box-shadow: 0 2px 6px rgba(0, 113, 188, 0.25);
  }

  /* Keyboard focus */
  .sticky-cart-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 113, 188, 0.4);
  }

  /* Only show on mobile/tablet widths */
  @media screen and (max-width: 768px) {
    .sticky-cart-bar {
      display: block;
    }

    /* Prevent bar from covering bottom content */
    body {
      padding-bottom: 85px;
    }
  }

  /* Smaller phone tuning */
  @media screen and (max-width: 480px) {
    .sticky-cart-bar {
      padding: 10px 12px;
    }

    .sticky-cart-content {
      gap: 8px;
    }

    .sticky-cart-count {
      font-size: 12px;
      padding: 4px 7px;
    }

    .sticky-cart-total {
      font-size: 16px;
      margin-left: 6px;
    }

    .sticky-cart-button {
      padding: 11px 18px;
      font-size: 13px;
    }
  }
</style>

<!-- ====================== JAVASCRIPT ====================== -->
<script>
  document.addEventListener("DOMContentLoaded", function () {
    const cartBar = document.getElementById("stickyCart");
    const cartCountEl = document.getElementById("stickyCartCount");
    const cartTotalEl = document.getElementById("stickyCartTotal");

    /*
      ========================================================
      DEMO VALUES
      Replace these with your real cart values if needed
      ========================================================
    */
    let cartItemCount = 2;
    let cartTotal = 120.00;

    /*
      ========================================================
      UPDATE CART DISPLAY
      Call this whenever your cart changes
      Example:
      updateStickyCart(3, 149.99);
      ========================================================
    */
    function updateStickyCart(count, total) {
      cartItemCount = count;
      cartTotal = total;

      cartCountEl.textContent = count + (count === 1 ? " item" : " items");
      cartTotalEl.textContent = "$" + Number(total).toFixed(2);

      if (window.innerWidth <= 768 && cartItemCount > 0) {
        cartBar.classList.add("active");
      } else {
        cartBar.classList.remove("active");
      }
    }

    /*
      ========================================================
      INITIAL SHOW
      Small delay = smoother first appearance
      ========================================================
    */
    if (window.innerWidth <= 768 && cartItemCount > 0) {
      setTimeout(function () {
        cartBar.classList.add("active");
      }, 300);
    }

    /*
      ========================================================
      OPTIONAL: HIDE ON SCROLL DOWN / SHOW ON SCROLL UP
      Feels more modern on mobile
      ========================================================
    */
    let lastScrollTop = window.pageYOffset || document.documentElement.scrollTop;

    window.addEventListener("scroll", function () {
      if (window.innerWidth > 768) return;

      let scrollTop = window.pageYOffset || document.documentElement.scrollTop;

      if (cartItemCount <= 0) {
        cartBar.classList.remove("active");
        return;
      }

      if (scrollTop > lastScrollTop && scrollTop > 50) {
        // Scrolling down
        cartBar.classList.remove("active");
      } else {
        // Scrolling up
        cartBar.classList.add("active");
      }

      lastScrollTop = scrollTop <= 0 ? 0 : scrollTop;
    });

    /*
      ========================================================
      HANDLE WINDOW RESIZE
      Hide on desktop, show on mobile if cart has items
      ========================================================
    */
    window.addEventListener("resize", function () {
      if (window.innerWidth <= 768 && cartItemCount > 0) {
        cartBar.classList.add("active");
      } else {
        cartBar.classList.remove("active");
      }
    });

    /*
      ========================================================
      INITIAL RENDER
      ========================================================
    */
    updateStickyCart(cartItemCount, cartTotal);

    /*
      ========================================================
      OPTIONAL GLOBAL ACCESS
      So you can update from anywhere else in your theme/scripts:
      window.updateStickyCart(4, 199.99);
      ========================================================
    */
    window.updateStickyCart = updateStickyCart;
  });
</script>