<!-- Bottom bar -->
<div class="overlay2"></div>
<nav class="navbar bottom-bar py-2 fixed-bottom align-items-center text-center visible-xs-flex">
  <a class="d-block buy-button pay-link font-14 ml-4 text-white" id="packageBarCollapse" onclick="packagebar_click();">
    내 인생으로 배송받기
  </a>

  <div id="HeartMobileBox">
  <% if @like == nil %>
  <%= form_tag '/product_like', class: "ml-5 text-white" do %>
    <%= hidden_field_tag 'product_id', @product.id%>
    <button class="heart-mobile"><%=image_tag("heart-white.svg", class: "heart-img-mobile")%></button>
  <% end %>
  <% elsif @like.empty? %>
  <%= form_tag '/product_like', class: "ml-5 text-white", remote: true do %>
    <%= hidden_field_tag 'product_id', @product.id%>
    <button class="heart-mobile"><%=image_tag("heart-white.svg", class: "heart-img-mobile")%></button>
  <% end %>
  <% elsif @like[0].status == true  %>
  <%= form_tag "/product_like/#{ @like[0].id }", class: "ml-5 text-white", remote: true, method: 'put' do %>
    <%= hidden_field_tag 'product_id', @product.id%>
    <button class="heart-mobile" id="HeartMobile"><%=image_tag("heart-red.svg", class: "heart-img-mobile")%></button>
  <% end %>
  <% elsif @like[0].status == false %>
  <%= form_tag "/product_like/#{ @like[0].id }", class: "ml-5 text-white", remote: true, method: 'put' do %>
    <%= hidden_field_tag 'product_id', @product.id%>
    <button class="heart-mobile" id="HeartMobile"><%=image_tag("heart-white.svg", class: "heart-img-mobile")%></button>
  <% end %>
  <%end%>
  </div>
  <!-- <a href="/" class="d-block ml-5 text-white">
    <%=image_tag(@cdn_url+"heart.svg")%>
  </a> -->
  <button class="button-none buy-button text-white" id="shareBarCollapse" onclick="sharebar_click();">
    <%=image_tag(@cdn_url+"link.svg")%>
  </button>
</nav>
<%=render 'package'%>
<%=render 'share'%>
<!-- // Bottom bar -->
