/**
 * نوار چسبان «افزودن به سبد خرید» — فقط موبایل/تبلت.
 * قیمت و بج قسط اسنپ‌پی (.mb-snapppay-badge از badge.css) داخل
 * همین باکس .price کنار هم قرار می‌گیرند.
 */

#fixed-cart-plus { display: none; }

@media (max-width: 900px) {
    #fixed-cart-plus {
        display: block;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        background: #fff;
        border-top: 1px solid #eee;
        border-bottom: 2px solid #eee;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, .08);
        z-index: 99999; 
        padding: 12px 15px;
   
        padding-left: 15px;
		 padding-right: 15px;

    }
}

.fixed-cart-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}

@media (max-width: 900px) {
    .fixed-cart-inner {
        align-items: center;
    }

    /* بلوک سمت چپ: ردیف بالا = دکمه‌های تعداد، ردیف پایین = دکمه
       افزودن. عرض این بلوک ۳۰٪ از عرض نوار است. چون qty-btn.minus /
       qty-value / qty-btn.plus / add-plus هر چهارتا به‌صورت هم‌سطح
       داخل .cart-action هستن، با flex-wrap دو ردیفشون می‌کنیم: عرض
       کم سه‌تای اول باعث می‌شه در یک ردیف جا بشن، و add-plus با
       flex-basis:100% به ردیف بعدی می‌ره. */
    .cart-action {
        flex-wrap: wrap;
        justify-content: center;
        flex: 0 0 30%;
        width: 30%;
        row-gap: 6px;
        margin-right: 0;
    }

    .cart-action .add-plus {
        flex: 1 1 100%;
        order: 4;
        margin-right: 0;

    }

    /* ستون قیمت: ۷۰٪ از عرض نوار، بلافاصله کنار بلوک تعداد/افزودن */
    .price-col {
        flex: 0 0 60%;
        max-width: 60%;
        margin-left: 0;
        margin-right: 4px;
    }

    #fixed-cart-plus .price {
        margin-left: 0;
    }
}

/* ستون قیمت: قیمت (اصلی/تخفیف‌دار) بالا، بج قسط اسنپ‌پی زیرش با
   فاصله‌ی مناسب. این ستون خودش یکی از دو ستون اصلی نوار چسبانه؛
   ستون دیگر .cart-action (دکمه‌های تعداد + افزودن) است. */
.price-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

/* قیمت + بج قسط کنار هم، با wrap در صورت کمبود جا */
#fixed-cart-plus .price {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    margin-left: 10px;
}

/* بج قسط زیر قیمت؛ مارجین بالای پیش‌فرضش (برای حالت کارت محصول)
   اینجا صفر می‌شه چون gap ستون خودش فاصله رو مدیریت می‌کنه */
.fixed-cart-badge-bar .mb-snapppay-badge {
    margin-top: 0;
}

.qty-btn {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    font-size: 18px;
    cursor: pointer;
}

.qty-btn:hover { background: #eaeaea; }

.qty-value {
    min-width: 20px;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.cart-action {
    display: flex;
    align-items: center;
    /*! gap: 6px; */
    margin-right: auto; /* شروع از سمت چپ */
}

.add-plus {
    flex: 1;
    width: 50px;
    height: 38px;
    font-size: 12px;
    border: none;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    font-style: normal;
    text-transform: none;
    line-height: 1.0 !important;
    font-weight: 600;
    letter-spacing: 0em;
    transition-duration: 0.3s;
    transition-timing-function: ease;
    background: #433d3e;
    border-color: transparent;
    color: var(--color-header-middle-bg) !important;
}
.add-plus:hover{
   background: #d5b56e; 
}

@media (max-width: 900px) {
    #fixed-cart-plus .price {
        /*! font-size: 14px; */
    }
}

/* پیام پایین صفحه فقط موبایل */
@media (max-width: 900px) {
    .woocommerce-notices-wrapper {
        display: block;
        position: fixed;
        bottom: 140px;
        left: 12px;
        right: 12px;
        z-index: 10050;
        pointer-events: none;
    }

    .woocommerce-message,
    .woocommerce-error,
    .woocommerce-info {
        pointer-events: auto;
        background: #111;
        color: #fff;
        border-radius: 14px;
        padding: 14px 16px;
        margin: 0;
        font-size: 14px;
        line-height: 1.5;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
        text-align: center;
    }

    .woocommerce-message a.button { display: none !important; }
}

.cart-action:has(.add-plus:disabled) { opacity: .5; }
.cart-action:has(.add-plus:disabled) .qty-btn { pointer-events: none; }

.add-plus:disabled {
    background: #777 !important;
    cursor: not-allowed;
}