/* ============================================================
   MOBILE PRODUCT PURCHASE BAR
   CafePSD
============================================================ */


/* ============================================================
   DEFAULT
   دسکتاپ کاملاً مخفی
============================================================ */

.mobile-product-purchase {
    display: none;
}


/* ============================================================
   MOBILE
============================================================ */

@media (max-width: 768px) {

    /* --------------------------------------------------------
       Reserve space for fixed bottom bar
    -------------------------------------------------------- */
    .box.desktop-product-purchase {
        display: none;
    }
    body.single-product {
        padding-bottom: 73px;
    }

    /* --------------------------------------------------------
       Mobile Purchase Bar
    -------------------------------------------------------- */

    .mobile-product-purchase {
        display: block;
        position: fixed;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        /* height: 73px; */
        background: #fff;
        border-top: 1px solid #e1e8ed;
        box-shadow:
            0 -3px 15px rgba(0, 0, 0, .08);
        z-index: 99999;
        /*
         * برای گوشی‌هایی که Home Indicator دارند
         */
        padding-bottom: env(safe-area-inset-bottom);
        box-sizing: content-box;
    }


    /* ========================================================
       INNER
    ========================================================= */

    .mobile-product-purchase__inner {
        width: 100%;
        /* height: 73px; */
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 3px 9px;
        box-sizing: border-box;
        background: #fff;
    }


    /* ========================================================
       ACTION / BUTTON
    ========================================================= */

    .mobile-product-purchase__action {

        width: 50%;

        min-width: 0;

        height: 48px;

        display: flex;

        align-items: center;
    }


    .mobile-product-purchase__button {

        width: 100%;

        height: 48px;

        display: flex;

        align-items: center;

        justify-content: center;

        padding: 0 10px;

        border: 0;

        border-radius: 8px;

        background-color: var(--color-green);

        color: #fff;

        font-size: 15px;

        font-weight: 600;

        line-height: 1;

        text-align: center;

        text-decoration: none;

        white-space: nowrap;

        cursor: pointer;

        text-shadow:
            0 0 1px rgba(0, 0, 0, .35);

        transition:
            background-color .2s ease,
            transform .15s ease,
            opacity .2s ease;
    }


    .mobile-product-purchase__button:hover {

        color: #fff;

        opacity: .94;

        text-decoration: none;
    }


    .mobile-product-purchase__button:active {

        transform: scale(.98);
    }


    /* ============================================================
    MOBILE PRICE
    ============================================================ */

    .mobile-product-purchase__price {

        width: 50%;
        min-width: 0;

        height: 48px;

        display: flex;
        flex-direction: column;

        align-items: flex-end;
        justify-content: center;

        overflow: hidden;
    }


    /* ============================================================
    MAIN PRICE
    ============================================================ */

    .mobile-product-purchase__price-main {

        width: 100%;

        display: flex;

        align-items: center;
        justify-content: flex-end;

        line-height: 1.1;

        white-space: nowrap;
    }


    /* ============================================================
    PRICE
    ============================================================ */

    .product-item aside .mobile-product-purchase__price-main
    .woocommerce-Price-amount {

        color: #1f2937;

        font-size: 19px;

        font-weight: 700;

        white-space: nowrap;
    }


    .product-item aside .mobile-product-purchase__price-main
    .woocommerce-Price-currencySymbol {

        margin-right: 3px;

        color: #64748b;

        font-size: 11px;

        font-weight: 400;
    }


    /* ============================================================
    SUBSCRIPTION LINK
    ============================================================ */

    #main .product-item aside .mobile-product-purchase__subscription {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        margin: 0 8px 5px 0;
        font-size: 11px;
        font-weight: 500;
        line-height: 0;
        text-decoration: none;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        border: none;
    }

    #main .product-item aside .mobile-product-purchase__subscription:hover {
        color: var(--cafepsd-primary);
        text-decoration: none;
    }
    #main .product-item aside .mobile-product-purchase__subscription.get-subscription > a{
        color: var(--cafepsd-primary);
    }
    #main .product-item aside .mobile-product-purchase__subscription.get-subscription > a::before {
        padding: 0 0 0 20px;
    }

    /* ============================================================
    SUBSCRIPTION ICON
    ============================================================ */

    .mobile-product-purchase__subscription-icon {
        margin-left: 4px;
        font-family: 'FontAwesome';
        font-size: 10px;
        line-height: 1;
    }
    .mobile-product-purchase__subscription-number {
        color: var(--color-green);
        margin: 0 3px;
    }

    body #scroll-to-top.active {
        bottom: 90px !important;
    }

    /* ========================================================
       SAFE AREA

       ارتفاع واقعی نوار در گوشی‌هایی مثل iPhone:
       73px + safe-area
    ========================================================= */

    @supports (padding-bottom: env(safe-area-inset-bottom)) {

        .mobile-product-purchase {

            padding-bottom:
                env(safe-area-inset-bottom);
        }

    }

}

/* ========================================================
    VERY SMALL PHONES
    320px - 360px
========================================================= */

@media (max-width: 380px) {

    .mobile-product-purchase__inner {

        gap: 8px;
        padding: 3px 9px;
    }


    .mobile-product-purchase__button {

        font-size: 14px;

        border-radius: 7px;
    }


    .mobile-product-purchase__price-value
    .woocommerce-Price-amount {

        font-size: 17px;
    }


    .mobile-product-purchase__price-value
    ins .woocommerce-Price-amount {

        font-size: 17px;
    }


    .mobile-product-purchase__price-label {

        font-size: 11px;
    }


    .mobile-product-purchase__price-value
    .woocommerce-Price-currencySymbol {

        font-size: 11px;
    }
    .product-item aside .mobile-product-purchase__action a.add-to-cart {
        font-size: 14px;
    }
}

