<!-- Advanced Pop-up Cart -->
<script>
document.addEventListener("DOMContentLoaded", function() {
  var apcOptions = {
    products_in_cart: [{{ products_in_cart }}],
    open_when_added: {{ open_when_added }},
    autoclose_delay: {{ autoclose_delay }},
    replace_button: {{ replace_button }},
    add_to_cart_already_added: {{ add_to_cart_already_added }},
    btn_in_cart_cp: "{{ btn_in_cart_cp }}",
    btn_in_cart_pp: "{{ btn_in_cart_pp }}",
    base_path: "{{ base_path }}",
    text_loading: "{{ text_loading }}",
    option_popup: {{ option_popup }},
    zone_id: "{{ zone_id }}",
    shipping_method: "{{ shipping_method }}",
    shipping_country_url: "{{ shipping_country_url }}",
    shipping_quote_url: "{{ shipping_quote_url }}",
    text_select: "{{ text_select }}",
    text_none: "{{ text_none }}",
    button_cancel: "{{ button_cancel }}",
    button_shipping: "{{ button_shipping }}",
    is_checkout: {{ is_checkout }},
    related_thumb_width: {{ related_thumb_width }},
  };
  window.apc = new AdvancedPopupCart(apcOptions);
});
</script>
{% if style_status %}
<style>
{% if loader_bg_color %}
.apc-loader {
  background-color: {{ loader_bg_color }};
}
{% endif %}

{% if loader_font_color %}
.apc-loader {
  color: {{ loader_font_color }};
}
{% endif %}

{% if btn_in_cart_bg_color %}
.in-cart {
  background-color: {{ btn_in_cart_bg_color }} !important;
  background-image: none !important;
  border-color: {{ btn_in_cart_bg_color }} !important;
  outline-style: none !important;
  text-shadow: none !important;
}
.in-cart:hover {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.05) !important;
}
.in-cart:active {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.1) !important;
}
{% endif %}

{% if btn_in_cart_font_color %}
.in-cart {
  color: {{ btn_in_cart_font_color }} !important;
}
{% endif %}

{% if popup_width %}
.apc-popup-container {
  max-width: {{ popup_width }}px;
}
{% endif %}

{% if popup_border_radius or popup_border_radius == '0' %}
.apc-popup-content {
  border-radius: {{ popup_border_radius }}px;
}
{% endif %}

{% if heading_bg_color %}
.apc-popup-header {
  background-color: {{ heading_bg_color }};
  border-bottom: 1px solid {{ heading_bg_color }};
}
{% endif %}

{% if heading_font_color %}
.apc-btn-close,
.apc-popup-header > h3,
.apc-subheading {
  color: {{ heading_font_color }};
}
{% endif %}

{% if body_bg_color %}
.apc-popup-body {
  background-color: {{ body_bg_color }};
}
{% endif %}

{% if plain_text_color %}
.apc-popup-body,
.apc-options-block > h3,
.apc-related-block {
  color: {{ plain_text_color }};
}
{% endif %}

{% if link_color %}
.apc-cart-table a, .apc-related-block a {
  color: {{ link_color }};
}
{% endif %}

{% if image_border_size %}
.apc-product-image {
  border-width: {{ image_border_size }}px;
  {% if image_border_color %}
  border-color: {{ image_border_color }};
  {% endif %}
  {% if image_border_radius %}
  border-radius: {{ image_border_radius }}px;
  {% endif %}
}
{% endif %}

{% if btn_continue_bg_color %}
.apc-btn-continue {
  background-color: {{ btn_continue_bg_color }} !important;
  border-color: {{ btn_continue_bg_color }} !important;
  outline-style: none;
  background-image: none;
  text-shadow: none;
}
.apc-btn-continue:hover {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.1);
}
.apc-btn-continue:active {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.2);
}
{% endif %}

{% if btn_continue_font_color %}
.apc-btn-continue {
  color: {{ btn_continue_font_color }} !important;
}
{% endif %}

{% if btn_view_cart_bg_color %}
.apc-btn-view-cart {
  background-color: {{ btn_view_cart_bg_color }} !important;
  border-color: {{ btn_view_cart_bg_color }} !important;
  outline-style: none;
  background-image: none;
  text-shadow: none;
}
.apc-btn-view-cart:hover {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.1);
}
.apc-btn-view-cart:active {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.2);
}
{% endif %}

{% if btn_view_cart_font_color %}
.apc-btn-view-cart {
  color: {{ btn_view_cart_font_color }} !important;
}
{% endif %}

{% if btn_checkout_bg_color %}
.apc-btn-checkout {
  background-color: {{ btn_checkout_bg_color }} !important;
  border-color: {{ btn_checkout_bg_color }} !important;
  outline-style: none;
  background-image: none;
  text-shadow: none;
}
.apc-btn-checkout:hover {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.1);
}
.apc-btn-checkout:active {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.2);
}
{% endif %}

{% if btn_checkout_font_color %}
.apc-btn-checkout {
  color: {{ btn_checkout_font_color }} !important;
}
{% endif %}

{% if btn_qty_bg_color %}
.apc-qty-group-btn > .btn {
  background-color: {{ btn_qty_bg_color }};
  border-color: {{ btn_qty_bg_color }};
  outline-style: none;
  background-image: none;
  text-shadow: none;
}
.apc-qty-group-btn > .btn:hover {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.1);
}
.apc-qty-group-btn > .btn:active {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.2);
}
{% endif %}

{% if btn_qty_font_color %}
.apc-qty-group-btn > .btn {
  color: {{ btn_qty_font_color }};
}
{% endif %}

{% if btn_qty_border_radius or btn_qty_border_radius == '0' %}
.apc-qty-group-btn:first-child > .btn,
[dir=rtl] .apc-qty-group-btn:last-child > .btn {
  border-top-left-radius: {{ btn_qty_border_radius }}px;
  border-bottom-left-radius: {{ btn_qty_border_radius }}px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}
.apc-qty-group-btn:last-child > .btn,
[dir=rtl] .apc-qty-group-btn:first-child > .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: {{ btn_qty_border_radius }}px;
  border-bottom-right-radius: {{ btn_qty_border_radius }}px;
}
{% endif %}

{% if btn_remove_bg_color %}
.apc-btn-remove > .fa {
  color: {{ btn_remove_bg_color }};
}
.apc-btn-remove:focus > .fa,
.apc-btn-remove:hover > .fa {
  color: {{ btn_remove_bg_color }};
  opacity: .8;
}
{% endif %}

{% if btn_other_bg_color %}
.apc-options-btn-cart,
.apc-btn-start-shopping,
.apc-accordion .btn.btn-primary {
  background-color: {{ btn_other_bg_color }} !important;
  border-color: {{ btn_other_bg_color }} !important;
  outline-style: none;
  background-image: none;
  text-shadow: none;
}
.apc-options-btn-cart:hover,
.apc-btn-start-shopping:hover,
.apc-accordion .btn.btn-primary:hover {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.1);
}
.apc-options-btn-cart:active,
.apc-btn-start-shopping:active,
.apc-accordion .btn.btn-primary:active {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.2);
}
{% endif %}

{% if btn_other_font_color %}
.apc-options-btn-cart,
.apc-btn-start-shopping,
.apc-accordion .btn.btn-primary {
  color: {{ btn_other_font_color }} !important;
}
{% endif %}

{% if btn_other_border_radius or btn_other_border_radius == '0' %}
.apc-options-btn-cart,
.apc-btn-cart-add,
.apc-btn-start-shopping,
.apc-buttons .btn,
.apc-panel-shipping .btn,
.apc-panel-shipping .form-control {
  border-radius: {{ btn_other_border_radius }}px;
}
.apc-accordion .input-group > .form-control,
[dir=rtl] .apc-accordion .input-group .btn {
  border-top-left-radius: {{ btn_other_border_radius }}px;
  border-bottom-left-radius: {{ btn_other_border_radius }}px;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.apc-accordion .input-group .btn,
[dir=rtl] .apc-accordion .input-group > .form-control {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
  border-top-right-radius: {{ btn_other_border_radius }}px;
  border-bottom-right-radius: {{ btn_other_border_radius }}px;
}
{% endif %}

{% if related_block_bg_color %}
.apc-related-block {
  background-color: {{ related_block_bg_color }};
  border-top: solid 1px {{ related_block_bg_color }};
}
{% endif %}

{% if related_heading_font_color %}
.apc-related-heading {
  color: {{ related_heading_font_color }};
}
{% endif %}

{% if related_thumb_bg_color %}
.apc-related-thumb {
  background-color: {{ related_thumb_bg_color }};
}
{% endif %}

{% if related_border_color %}
.apc-related-thumb {
  border-color: {{ related_border_color }};
}
{% endif %}

{% if related_border_size or related_border_size == '0' %}
.apc-related-thumb {
  border-width: {{ related_border_size }}px;
}
{% endif %}

{% if related_border_radius %}
.apc-related-thumb {
  border-radius: {{ related_border_radius }}px;
}
{% endif %}

{% if related_addtocart_bg_color %}
.apc-btn-cart-add {
  background-color: {{ related_addtocart_bg_color }} !important;
  border-color: {{ related_addtocart_bg_color }} !important;
  outline-style: none;
  background-image: none;
  text-shadow: none;
}
.apc-btn-cart-add:hover {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.1);
}
.apc-btn-cart-add:active {
  box-shadow: inset 0 100px 0 rgba(0, 0, 0, 0.2);
}
{% endif %}

{% if related_addtocart_font_color %}
.apc-btn-cart-add {
  color: {{ related_addtocart_font_color }} !important;
}
{% endif %}

{{ custom_css_code }}
</style>
{% endif %}
<!-- End of Advanced Pop-up Cart -->