/* =========================================
   استایل‌های نوار چسبان موبایل (نسخه مدرن)
   ========================================= */

/* پنهان کردن کلی در حالت پیش‌فرض دسکتاپ */
.wc-sticky-mobile-cart {
    display: none !important;
}

@media (max-width: 768px) {
    
    /* پیکربندی اصلی نوار چسبان پایین موبایل */
    .wc-sticky-mobile-cart {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        box-shadow: 0 -4px 15px rgba(0,0,0,0.08);
        display: flex !important;
        justify-content: space-between;
        align-items: center;
        padding: 10px 12px;
        z-index: 99999;
        direction: rtl;
        gap: 8px;
        box-sizing: border-box;
        border: 1px solid rgba(255,255,255,0.1);
        transition: all 0.3s ease-in-out;
    }

    /* پنهان کردن المان‌های تکراری و مزاحم در صفحه محصول موبایل */
    form.cart .single_add_to_cart_button {
        position: absolute !important;
        left: -9999px !important;
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none !important;
        height: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    form.cart .quantity {
        display: none !important;
    }

    .single_variation_wrap {
        margin: 0 !important;
        padding: 0 !important;
    }

    /* دکمه‌های اصلی چسبان */
    .wc-sticky-mobile-cart .wc-sticky-btn {
        order: 1; 
        flex: 1.8 !important; 
        display: flex;
    }

    .wc-sticky-mobile-cart button {
        width: 100%;
        height: 42px;
        padding: 0 5px;
        border: none;
        font-weight: bold;
        cursor: pointer;
        transition: all 0.2s ease-in-out;
        white-space: nowrap;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    }

    .wc-sticky-mobile-cart button:active {
        opacity: 0.8;
        transform: scale(0.98);
    }

    /* بخش تنظیم تعداد */
    .wc-sticky-mobile-cart .wc-sticky-qty {
        order: 2;
        flex: 0 0 85px !important; 
    }
    
    .sticky-qty-wrapper {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        border: 1px solid rgba(0,0,0,0.08) !important;
        height: 42px !important;
        overflow: hidden !important;
    }

    .sticky-qty-input {
        width: 35px !important; 
        height: 100% !important;
        border: none !important;
        background: transparent !important;
        padding: 0 !important;
        margin: 0 !important;
        text-align: center !important;
        font-weight: bold !important;
        box-shadow: none !important;
        outline: none !important;
        -moz-appearance: textfield !important;
    }

    .sticky-qty-input::-webkit-outer-spin-button,
    .sticky-qty-input::-webkit-inner-spin-button {
        -webkit-appearance: none !important;
        margin: 0 !important;
    }

    .sticky-plus,
    .sticky-minus {
        width: 25px !important; 
        height: 100% !important;
        border: none !important;
        background: transparent !important;
        cursor: pointer !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important; 
        line-height: 1 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .sticky-plus:active,
    .sticky-minus:active {
        background: rgba(0,0,0,0.05) !important;
    }

    /* فواصل و استایل قیمت‌ها */
    .wc-sticky-mobile-cart .wc-sticky-price {
        order: 3; 
        flex: 1 !important; 
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        text-align: center;
        line-height: 1.2;
    }

    .wc-sticky-mobile-cart .wc-sticky-price del, 
    .wc-sticky-mobile-cart .wc-sticky-price del .amount {
        text-decoration: line-through;
        margin-bottom: 2px;
        opacity: 0.8;
    }

    .wc-sticky-mobile-cart .wc-sticky-price ins, 
    .wc-sticky-mobile-cart .wc-sticky-price ins .amount,
    .wc-sticky-mobile-cart .wc-sticky-price > .amount {
        text-decoration: none;
    }

    .wc-sticky-mobile-cart .screen-reader-text {
        display: none;
    }
}