﻿

/* ---------- استایل‌های دکمه‌های + و - ---------- */
.quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
}

.quantity-btn {
    width: 38px;
    height: 38px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    user-select: none;
}

    .quantity-btn:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }

    .quantity-btn:active {
        transform: scale(0.95);
        background: #dee2e6;
    }

    .quantity-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
        transform: none;
    }

/* ---------- استایل TextBox تعداد ---------- */
.quantity-input {
    width: 60px;
    height: 38px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    font-weight: bold;
    padding: 0;
    background: #ffffff;
    color: #333333;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

    .quantity-input:focus {
        outline: none;
        border-color: #007bff;
        box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
    }

    /* حذف فلش‌های افزایش/کاهش در مرورگرها */
    .quantity-input::-webkit-outer-spin-button,
    .quantity-input::-webkit-inner-spin-button {
        -webkit-appearance: none;
        margin: 0;
    }

.quantity-input {
    -moz-appearance: textfield;
    appearance: textfield;
}

/* ---------- استایل لیبل تعداد ---------- */
.quantity-label {
    font-weight: 600;
    display: block;
    margin-bottom: 8px;
}

/* ---------- استایل موجودی انبار ---------- */
.stock-info {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-size: 13px;
}

    .stock-info .stock-number {
        color: #28a745;
        font-weight: 600;
    }

        .stock-info .stock-number.low-stock {
            color: #ffc107;
        }

        .stock-info .stock-number.out-of-stock {
            color: #dc3545;
        }

/* ---------- استایل دکمه افزودن به سبد ---------- */
.btn-add-to-cart {
    height: 44px;
    font-weight: 600;
    font-size: 15px;
    width: 100%;
}

/* ---------- استایل‌های بخش موجودی کم ---------- */
.low-stock-warning {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    margin-top: 5px;
    display: inline-block;
}

/* ---------- استایل‌های ریسپانسیو ---------- */
@media (max-width: 768px) {
    .quantity-btn {
        width: 34px;
        height: 34px;
        font-size: 18px;
    }

    .quantity-input {
        width: 50px;
        height: 34px;
        font-size: 14px;
    }

    .btn-add-to-cart {
        height: 38px;
        font-size: 13px;
    }
}
