/* ==================== QUANTITY WIDGET - COMPACT SIZE ==================== */

.quantity-widget {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid #B704F6;
    background-color: #FFFFFF;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.2s ease;
    min-height: 28px; /* ← FIXED: Much smaller */
    max-width: 100%;
    overflow: hidden;
}

/* ==================== ZERO STATE ("Add" button) ==================== */

.quantity-widget.zero.quantity-add {
    padding: 0.9rem 1.6rem; /* ← FIXED: Smaller padding */
    cursor: pointer;
    font-size: 0.8125rem; /* ← FIXED: 13px */
    font-weight: 600;
    color: #B704F6;
    font-family: 'PlusJakartaSans', -apple-system, sans-serif;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.quantity-widget.zero.quantity-add:hover {
    background-color: #FBEFFF;
}

.quantity-widget.zero.quantity-add:active {
    transform: scale(0.98);
}

.quantity-widget.zero.disabled.quantity-add {
    color: #bdbdbd;
    border-color: #e0e0e0;
    cursor: not-allowed;
}

/* ==================== NON-ZERO STATE (Controls) ==================== */

.quantity-controls {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    gap: 0;
    width: 100%;
}

/* ==================== QUANTITY BUTTONS (Minus & Plus) ==================== */

.quantity-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px; /* ← FIXED: Smaller */
    height: 28px; /* ← FIXED: Smaller */
    cursor: pointer;
    font-size: 0.9375rem; /* ← FIXED: 15px */
    line-height: 1;
    user-select: none;
    color: #B704F6;
    font-weight: 400;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    transition: background-color 0.2s ease;
    flex-shrink: 0;
    background-color: transparent;
    border: none;
    margin: 0;
    padding: 0;
}

.quantity-button:hover:not(.disabled) {
    background-color: #F8F4FF;
}

.quantity-button:active:not(.disabled) {
    background-color: #F0E8FF;
}

.quantity-button.disabled {
    color: #CBD5E1;
    cursor: not-allowed;
    opacity: 0.5;
}

/* ==================== QUANTITY NUMBER (Center Display) ==================== */

.quantity-number {
    min-width: 20px; /* ← FIXED: Smaller */
    text-align: center;
    font-size: 0.8125rem; /* ← FIXED: 13px */
    font-weight: 500;
    color: #0F172A;
    font-family: 'PlusJakartaSans', -apple-system, sans-serif;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    height: 28px; /* ← FIXED: Match button height */
    padding: 0 0.1875rem;
}

/* ==================== MOBILE RESPONSIVE ==================== */

@media (max-width: 768px) {
    .quantity-widget {
        min-height: 26px;
        border-radius: 5px;
    }

    .quantity-button {
        width: 26px;
        height: 26px;
        font-size: 0.875rem;
    }

    .quantity-number {
        min-width: 18px;
        height: 26px;
        font-size: 0.75rem;
        padding: 0 0.125rem;
    }

    .quantity-widget.zero.quantity-add {
        padding: 0.75rem 2rem;
        font-size: 0.75rem;
    }
}

@media (max-width: 480px) {
    .quantity-widget {
        min-height: 24px;
        border-radius: 5px;
    }

    .quantity-button {
        width: 24px;
        height: 24px;
        font-size: 0.8125rem;
    }

    .quantity-number {
        min-width: 16px;
        height: 24px;
        font-size: 0.6875rem;
        padding: 0 0.125rem;
    }

}

/* ==================== ACCESSIBILITY ==================== */

.quantity-button:focus-visible {
    outline: 2px solid #B704F6;
    outline-offset: -2px;
}

@media (prefers-contrast: high) {
    .quantity-widget {
        border-width: 2px;
        border-color: #000;
    }

    .quantity-button {
        color: #8B00FF;
    }

    .quantity-number {
        color: #000;
    }

    .quantity-button.disabled {
        color: #666;
    }
}

@media (prefers-reduced-motion: reduce) {
    .quantity-widget,
    .quantity-widget.zero.quantity-add,
    .quantity-button {
        transition: none;
    }

    .quantity-widget.zero.quantity-add:active {
        transform: none;
    }
}
