{% from 'utils.html.twig' import ico, discountValue %}
<section id="buy-info" class="buy-info">
<div class="container">
<div class="scroll" data-page-height-top="{{ productPage.showShortageControlTime ? '1':'0' }}">
<div class="box">
<input type="hidden" name="product-id" value="{{ productOffer.product.id }}" />
{# COVER #}
{% include 'website/product/product-detail-cover.html.twig' with { mode:'desktop', img_option: 'product-photo-detail' }%}
<div class="col">
<div class="tags-wrap">
{% if (scoreProduct.scoreTotal > 9) %}
<a href="#sec-reviews">
<span class="avaliacao">
{% include 'website/includes/stars.html.twig' with { score: scoreProduct.score }%}
 <span class="total">({{ scoreProduct.scoreTotal }})</span>
</span>
</a>
{% endif %}
</div>
{# PRICING #}
{% include 'website/product/product-detail-pricing.html.twig' %}
{% if saleLimitRemaining > 0 or productOffer.allowSaleLimit == enum('ProductOfferEnum::NO') %}
{% if productOffer.getSaleIsOpen() %}
{# FREE TRIAL #}
{% if productOffer.allowTrial and not userHasProduct(productOffer.product, true) %}
<p class="trial">{{ getLanguage('free_access_by', 'product') }} <b>{{ productOffer.trialPeriod }} {{ getLanguage('days', 'product') }}</b></p>
{% endif %}
{# DISCOUNT AND COUNTDOWN #}
{% include 'website/product/product-detail-discountdown.html.twig' %}
{# SALE LIMIT #}
{% if saleLimitRemaining == 1 %}
<p class="sale-limit"><b>{{ getLanguage('remains', 'product') }}
{{ saleLimitRemaining }} {{ getLanguage('vacancy', 'product') }}</b></p>
{% elseif saleLimitRemaining > 0 %}
<p class="sale-limit"><b>{{ getLanguage('remain', 'product') }}
{{ saleLimitRemaining }} {{ getLanguage('vacancies', 'product') }}</b></p>
{% endif %}
{% endif %}
{% endif %}
<br>
{# FEATURES #}
{% include 'website/product/product-detail-features.html.twig' %}
</div>
<div class="actions">
{% if productOffer.notForSale == enum('ProductEnum::NO') %}
{# BUTTON BOX #}
<div class="btn-box-product-detail" data-status="{{ isInCart ? '' : 'add' }}">
{% include 'website/product/product-detail-actions-btn-box.html.twig' %}
</div>
{# INÍCIO OU FECHAMENTO DA VENDA #}
{% include 'website/product/product-detail-installment-one.html.twig' %}
{% if infoOffer.allowBuyNow and not infoOffer.userHasProduct and productPage.showModuleCoupon %}
{# COUPOM #}
<div class="coupom-product-detail section-coupom" data-status="{{ isInCart ? '' : 'on' }}">
{% include 'website/product/product-detail-coupom.html.twig' %}
</div>
{% endif %}
{% else %}
{% if product.type == enum('ProductEnum::COURSE')
and productOffersSubscriptionSection.items is not empty %}
<div class="btn-box-product-detail" data-status="{{ isInCart ? '' : 'add' }}">
<a href="#section-plans" class="btn-buy">
{{ getLanguage('subscribe_now', 'product') }}
</a>
</div>
{% endif %}
{% endif %}
</div>
{% if user and not infoOffer.userHasProduct %}
{% include 'website/controls/btn-wishlist.html.twig' with {
'wish_id': product.id,
'wish_offer_id': productOffer.id,
'wish_title': product.title,
'wish_currency': productOffer.currencyCode,
'wish_price': productOffer.getPriceRealCopy(),
}%}
{% endif %}
</div>
</div>
{# SELO PREVENDA #}
{% if productOffer.preSale == enum('ProductEnum::YES') %}
<div class="presell">
{{ ico('badge') }}
<span>
{{ getLanguage('pre', 'product')|upper }}
<br>
<small>{{ getLanguage('sale', 'product')|upper }}</small>
</span>
</div>
{% endif %}
</div>
</section>